-
Notifications
You must be signed in to change notification settings - Fork 79
/
Makefile
115 lines (78 loc) · 3.59 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# -*- coding:utf-8 -*-
.PHOmakeNY: build
build:build.clean mod cp.etc build.api build.dg build.dm build.ud
runall: run.dm run.dg run.ud run.api
buildone:build.clean mod cp.etc build.api moduleupdate build.core build.front
#仅编译后端
buildback: build.clean mod cp.etc build.api
packback: buildback toremote
packbackzhou: buildback toremotezhou
moduleupdate:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@git submodule update --init --recursive
@git submodule foreach git checkout master
@git submodule foreach git pull
build.front:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@mkdir -p ./cmd/core/dist/app/things
@cd module/front/things && yarn install && yarn run build && cp -rf ./dist/* ../../../cmd/core/dist/app/things
build.core:
@mkdir -p ./cmd/core
@cd module/core && make buildone
@cp -rf module/core/cmd/* ./cmd/core
build.coreback:
@mkdir -p ./cmd/core
@cd module/core && make buildback
@cp -rf module/core/cmd/* ./cmd/core
toremote:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>tormote cmd<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@rsync -r -v ./cmd/* [email protected]:/root/git/iThings
toremotezhou:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>tormote cmd<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@rsync -r -v ./cmd/* [email protected]:/root/git/iThings
killall:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>killing all<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@killall apisvr &
@killall dgsvr &
@killall syssvr &
@killall dmsvr &
@killall timedjob &
@killall timedscheduler &
build.clean:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>clean cmd<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@rm -rf ./cmd/*
mod:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>downloading $@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@go mod tidy
cp.etc:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>copying etc<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@mkdir -p ./cmd/things/etc/
@mkdir -p ./cmd/things/dist/
@cp -rf ./service/apisvr/etc/* ./cmd/things/etc/
build.api:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>making $@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@go build -ldflags="-s -w" -tags no_k8s -o ./cmd/things/thingsvr ./service/apisvr
build.dg:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>making $@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@go build -ldflags="-s -w" -tags no_k8s -o ./cmd/things/dgsvr ./service/dgsvr
build.dm:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>making $@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@go build -ldflags="-s -w" -tags no_k8s -o ./cmd/things/dmsvr ./service/dmsvr
build.ud:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>making $@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@go build -ldflags="-s -w" -tags no_k8s -o ./cmd/things/udsvr ./service/udsvr
run.api:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>run $@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@cd cmd/things && nohup ./apisvr & cd ..
run.view:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>run $@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@cd cmd/things && nohup ./viewsvr & cd ..
run.dg:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>run $@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@cd cmd/things && nohup ./dgsvr & cd ..
run.dm:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>run $@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@cd cmd/things && nohup ./dmsvr & cd ..
run.ud:
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>run $@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@cd cmd/things && nohup ./udsvr & cd ..