-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
87 lines (72 loc) · 2.7 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
WORK_DIR=$(shell pwd)
OUTPUT_DIR=$(WORK_DIR)/bin
VENDOR_DIR=$(WORK_DIR)/src/vendor
LOG_DIR=$(OUTPUT_DIR)/log
XLSX_DIR=$(WORK_DIR)/xlsx
########################################################################################################################
.PHONY: all clean clean-log glide-up unzip-vendor zip-vendor publish rpc model gateway login-msg login game-sd game-msg game-cache game robot
########################################################################################################################
all: server
########################################################################################################################
clean:
rm -rf $(WORK_DIR)/pkg
rm -f $(OUTPUT_DIR)/mlgs*
clean-client:
rm -rf $(WORK_DIR)/pkg
rm -f $(OUTPUT_DIR)/client*
clean-log:
rm -f $(LOG_DIR)/*.log
glide-up:
go_tool.sh glide-up
unzip-vendor:
go_tool.sh unzip-vendor
zip-vendor:
rm -rf $(VENDOR_DIR)/gitee.com/lwj8507/nggs/vendor.zip
rm -rf $(VENDOR_DIR)/gitee.com/lwj8507/light-protoactor-go/vendor.zip
rm -rf $(VENDOR_DIR)/github.com/coreos/etcd/cmd
go_tool.sh zip-vendor
########################################################################################################################
publish:
rm -rf $(WORK_DIR)/publish/bin
mkdir -p $(WORK_DIR)/publish/bin
cp $(OUTPUT_DIR)/mlgs $(WORK_DIR)/publish/bin/mlgs
rm -rf $(WORK_DIR)/publish/xlsx
mkdir -p $(WORK_DIR)/publish/xlsx
cp $(XLSX_DIR)/*.xlsx $(WORK_DIR)/publish/xlsx
cd $(WORK_DIR)/publish;tar czf mlgs.$(shell date "+%Y%m%d%k%M").tar.gz ./bin ./xlsx;rm -rf ./bin ./xlsx
rm -rf $(WORK_DIR)/publish/bin
rm -rf $(WORK_DIR)/publish/xlsx
rpc:
@echo $(shell date "+%F %R:%S")
cd $(WORK_DIR)/src/rpc; go generate; go test
model:
@echo $(shell date "+%F %R:%S")
cd $(WORK_DIR)/src/model; ./gen.sh
gateway:
@echo $(shell date "+%F %R:%S")
go build -o $(OUTPUT_DIR)/gateway gateway
login-msg:
@echo $(shell date "+%F %R:%S")
cd $(WORK_DIR)/src/login/msg; go generate; go test
login:
@echo $(shell date "+%F %R:%S")
go build -o $(OUTPUT_DIR)/login login
msg:
@echo $(shell date "+%F %R:%S")
cd $(WORK_DIR)/src/msg; ./gen.sh
sd:
@echo $(shell date "+%F %R:%S")
cd $(WORK_DIR)/src/sd; go generate
game-cache:
@echo $(shell date "+%F %R:%S")
cd $(WORK_DIR)/src/game/cache; go generate; go test
server:
@echo $(shell date "+%F %R:%S")
cd $(WORK_DIR)/src;go build -o $(OUTPUT_DIR)/mlgs.$(shell date "+%Y%m%d%H%M")
robot:
@echo $(shell date "+%F %R:%S")
cd $(WORK_DIR)/src;go build -o $(OUTPUT_DIR)/robot
client:
@echo $(shell date "+%F %R:%S")
cd $(WORK_DIR)/src/robot;go build -o $(OUTPUT_DIR)/client.$(shell date "+%Y%m%d%H%M")
########################################################################################################################