2021-08-31 23:30:14 +08:00
|
|
|
BASE_PATH = $(shell pwd)
|
|
|
|
STORAGE_PATH = $(BASE_PATH)/storage
|
|
|
|
BASE_OUT = $(BASE_PATH)/bin
|
|
|
|
|
2021-10-16 23:54:17 +08:00
|
|
|
MAKEFLAGS+= --no-print-directory
|
|
|
|
|
2021-08-31 23:30:14 +08:00
|
|
|
dcgen:
|
2021-09-23 10:11:18 +08:00
|
|
|
@python3 ./shell/gen_protobuf.py
|
2021-09-05 17:07:34 +08:00
|
|
|
@python3 ./shell/proto.py
|
2021-09-23 10:11:18 +08:00
|
|
|
@python3 ./shell/make-struct.py
|
2021-08-31 23:30:14 +08:00
|
|
|
|
2021-10-16 22:50:38 +08:00
|
|
|
.PHONY: build-storage
|
|
|
|
build-storage:
|
2021-09-05 17:07:34 +08:00
|
|
|
@cd storage && go build -o $(BASE_OUT)/storage
|
|
|
|
|
2021-10-16 22:50:38 +08:00
|
|
|
.PHONY: build-gateway
|
|
|
|
build-gateway:
|
|
|
|
@cd gateway && go build -o $(BASE_OUT)/gateway
|
|
|
|
|
2021-09-05 17:07:34 +08:00
|
|
|
.PHONY: install
|
|
|
|
install:
|
2021-09-29 21:18:00 +08:00
|
|
|
@make gen-middleware
|
2021-10-16 22:50:38 +08:00
|
|
|
@make build-storage
|
|
|
|
@make build-gateway
|
2021-10-28 00:24:39 +08:00
|
|
|
@sudo python3 ./shell/init_conf.py
|
2021-09-05 21:27:08 +08:00
|
|
|
|
2021-10-16 22:50:38 +08:00
|
|
|
.PHONY: storage
|
|
|
|
storage:
|
2021-09-16 20:43:03 +08:00
|
|
|
@./bin/storage storage
|
|
|
|
|
2021-10-16 22:50:38 +08:00
|
|
|
.PHONY: gateway
|
|
|
|
gateway:
|
|
|
|
@./bin/gateway gateway
|
|
|
|
|
2021-09-21 10:44:27 +08:00
|
|
|
.PHONY: gen-struct
|
|
|
|
gen-struct:
|
2021-09-16 20:43:03 +08:00
|
|
|
@python3 ./shell/make-struct.py
|
2021-09-19 10:37:30 +08:00
|
|
|
|
|
|
|
.PHONY: gen-protobuf
|
|
|
|
gen-protobuf:
|
2021-09-20 16:36:47 +08:00
|
|
|
@python3 ./shell/gen_protobuf.py
|
2021-09-29 18:55:18 +08:00
|
|
|
|
2021-09-29 21:18:00 +08:00
|
|
|
.PHONY: gen-middleware
|
2021-09-29 18:55:18 +08:00
|
|
|
gen-middleware:
|
|
|
|
@python3 ./shell/gen_middleware.py
|
2021-10-04 11:21:02 +08:00
|
|
|
|
|
|
|
.PHONY: init-conf
|
|
|
|
init-conf:
|
2021-10-04 20:32:55 +08:00
|
|
|
@python3 ./shell/init_conf.py
|
2021-10-27 21:38:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
.PHONY: gen-service
|
|
|
|
gen-service:
|
|
|
|
@python3 ./shell/make_service.py
|
2021-11-18 14:54:42 +08:00
|
|
|
|
|
|
|
.PHONY: gen-mock
|
|
|
|
gen-mock:
|
|
|
|
@mockgen -source=./pkg/proto/storage.pb.go CommServerClient > ./mock/storage/mock_client.gen.go
|