default: help P2 := $(word 2, $(MAKECMDGOALS)) # 第2个参数 P3 := $(word 3, $(MAKECMDGOALS)) # 第3个参数 P4 := $(word 4, $(MAKECMDGOALS)) # 第4个参数 chmod: chmod +x ./etc/script/*.sh chmod +x ./etc/cli/*.sh chmod +x ./_excel/bin/ee_darwin chmod +x ./_excel/bin/ee_linux init: @echo "[INIT] Install protoc-gen-go" go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.8 clean: @echo "[CLEAN] publish directory" && \ rm -rf _excel/ && \ rm -rf _proto/ && \ rm -rf _cherry/ && \ rm -rf logs/ && \ rm -rf publish/ && \ rm -rf nodes/center/__debug_bin* && \ rm -rf nodes/chat/__debug_bin* && \ rm -rf nodes/game/__debug_bin* && \ rm -rf nodes/gate/__debug_bin* && \ rm -rf nodes/map/__debug_bin* && \ rm -rf nodes/master/__debug_bin* && \ rm -rf nodes/match/__debug_bin* && \ rm -rf nodes/ops/__debug_bin* && \ rm -rf nodes/record/__debug_bin* && \ rm -rf nodes/web/__debug_bin* pe: pull-excel @ pull-e: pull-excel @ pull-excel: @echo "[git] pull excel repo" && \ cd ./etc/script && \ ./pull_repo.sh "excel" "_excel" "ssh://git@git.chun-pu.com:9022/f1/excel.git" $(branch) && \ cd .. \ pp: pull-proto @ pull-p: pull-proto @ pull-proto: @echo "[git] pull proto repo" && \ cd ./etc/script && \ ./pull_repo.sh "proto" "_proto" "ssh://git@git.chun-pu.com:9022/f1/protocol.git" $(branch) && \ cd .. \ pc: pull-cherry @ pull-c: pull-cherry @ pull-cherry: @echo "[git] pull cherry repo" && \ cd ./etc/script && \ ./pull_repo.sh "cherry" "_cherry" "git@github.com:cherry-game/cherry.git" && \ cd .. \ b: build @ build: @echo "[BUILD] Compile project" && \ cd ./etc/script && \ ./build.sh $(P2) $(P3) $(P4) c: code @ code: @echo "[BUILD] source code" && \ cd ./etc/script && \ ./build_code.sh $(P2) $(P3) e: excel @ excel: @echo "[BUILD EXCEL] files" && \ cd ./etc/script && \ ./build_excel.sh p: proto @ proto: proto-route @echo "[BUILD PROTOBUF] files" && \ cd ./etc/script && \ ./build_proto.sh proto-route: @echo "[BUILD PROTOBUF] route config" && \ go run ./tool/proto-route/main.go help: @echo "COMMAND:" @echo " ----------------------------------------------------------------" @echo " make chmod Add Shell files execute permission" @echo " make init Install plugins for Project" @echo " make clean Clean publish directory" @echo " ----------------------------------------------------------------" @echo " make [pe | pull-e | pull-excel] Update excel repo" @echo " make [pp | pull-p | pull-proto] Update proto repo" @echo " make [pc | pull-c | pull-cherry] Update cherry repo" @echo " ----------------------------------------------------------------" @echo " make [b | build] Build project" @echo " make [c | code] Build source code" @echo " make [e | excel] Build excel files" @echo " make [p | proto] Build protobuf files" @echo " ----------------------------------------------------------------"