Skip to content

Commit f46a481

Browse files
authored
Update Makefile
1 parent 19bc121 commit f46a481

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

Makefile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ else
1616
DEFAULT_BUILD_FILENAME := StealthIMProxy
1717
endif
1818

19+
.PHONY: run
1920
run: build
2021
./bin/$(DEFAULT_BUILD_FILENAME)
2122

@@ -34,14 +35,15 @@ StealthIM.Session/session_grpc.pb.go StealthIM.Session/session.pb.go: proto/sess
3435
StealthIM.User/user_grpc.pb.go StealthIM.User/user.pb.go: proto/user.proto
3536
$(PROTOCCMD) --plugin=protoc-gen-go=$(PROTOGEN_PATH) --plugin=protoc-gen-go-grpc=$(PROTOGENGRPC_PATH) --go-grpc_out=. --go_out=. proto/user.proto
3637

38+
.PHONY: proto
3739
proto: \
3840
StealthIM.FileAPI/fileapi_grpc.pb.go StealthIM.FileAPI/fileapi.pb.go \
3941
StealthIM.GroupUser/groupuser_grpc.pb.go StealthIM.GroupUser/groupuser.pb.go \
4042
StealthIM.MSAP/msap_grpc.pb.go StealthIM.MSAP/msap.pb.go \
4143
StealthIM.Session/session_grpc.pb.go StealthIM.Session/session.pb.go \
4244
StealthIM.User/user_grpc.pb.go StealthIM.User/user.pb.go
4345

44-
46+
.PHONY: build
4547
build: ./bin/$(DEFAULT_BUILD_FILENAME)
4648

4749
./bin/StealthIMProxy.exe: $(GO_FILES) proto
@@ -50,9 +52,11 @@ build: ./bin/$(DEFAULT_BUILD_FILENAME)
5052
./bin/StealthIMProxy: $(GO_FILES) proto
5153
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o ./bin/StealthIMProxy
5254

55+
.PHONY: build_linux build_win
5356
build_win: ./bin/StealthIMProxy.exe
5457
build_linux: ./bin/StealthIMProxy
5558

59+
.PHONY: docker_run
5660
docker_run:
5761
docker-compose up
5862

@@ -62,20 +66,23 @@ docker_run:
6266
zstd ./bin/StealthIMProxy.docker -19
6367
@rm ./bin/StealthIMProxy.docker
6468

69+
.PHONY: build_docker
6570
build_docker: ./bin/StealthIMProxy.docker.zst
6671

72+
.PHONY: release
6773
release: build_win build_linux build_docker
6874

75+
.PHONY: clean
6976
clean:
70-
@rm -rf ./StealthIM.DBGateway
71-
@rm -rf ./StealthIM.Session
72-
@rm -rf ./StealthIM.Proxy
77+
@rm -rf ./StealthIM.*
7378
@rm -rf ./bin
7479
@rm -rf ./__debug*
7580

81+
.PHONY: dev
7682
dev:
7783
./run_env.sh
7884

85+
.PHONY: debug_proto
7986
debug_proto:
8087
cd test && python -m grpc_tools.protoc -I. --python_out=. --mypy_out=. --grpclib_python_out=. --proto_path=../proto user.proto
8188
cd test && python -m grpc_tools.protoc -I. --python_out=. --mypy_out=. --grpclib_python_out=. --proto_path=../proto proxy.proto

0 commit comments

Comments
 (0)