forked from jhalter/mobius
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
85 lines (67 loc) · 3.87 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
linux_client_arm_target=dist/mobius_client_linux_arm
build-linux-arm-client:
mkdir $(linux_client_arm_target) ; true
GOOS=linux GOARCH=arm go build -o $(linux_client_arm_target)/mobius-hotline-client cmd/mobius-hotline-client/main.go
package-linux-arm-client: build-linux-arm-client
cp cmd/mobius-hotline-client/mobius-client-config.yaml $(linux_client_arm_target)
tar -zcvf $(linux_client_arm_target).tar.gz $(linux_client_arm_target)
linux_client_amd64_target=dist/mobius_client_linux_amd64
build-linux-amd64-client:
mkdir $(linux_client_amd64_target) ; true
GOOS=linux GOARCH=amd64 go build -o $(linux_client_amd64_target)/mobius-hotline-client cmd/mobius-hotline-client/main.go
package-linux-amd64-client: build-linux-amd64-client
cp cmd/mobius-hotline-client/mobius-client-config.yaml $(linux_client_amd64_target)
tar -zcvf $(linux_client_amd64_target).tar.gz $(linux_client_amd64_target)
linux_server_arm_target=dist/mobius_server_linux_arm
build-linux-arm-server:
mkdir $(linux_server_arm_target) ; true
GOOS=linux GOARCH=arm go build -o $(linux_server_arm_target)/mobius-hotline-server cmd/mobius-hotline-server/main.go
package-linux-arm-server: build-linux-arm-server
cp -r cmd/mobius-hotline-server/mobius/config $(linux_server_arm_target)
tar -zcvf $(linux_server_arm_target).tar.gz $(linux_server_arm_target)
linux_server_amd64_target=dist/mobius_server_linux_amd64
build-linux-amd64-server:
mkdir $(linux_server_amd64_target) ; true
GOOS=linux GOARCH=amd64 go build -o $(linux_server_amd64_target)/mobius-hotline-server cmd/mobius-hotline-server/main.go
package-linux-amd64-server: build-linux-amd64-server
cp -r cmd/mobius-hotline-server/mobius/config $(linux_server_amd64_target)
tar -zcvf $(linux_server_amd64_target).tar.gz $(linux_server_amd64_target)
darwin_server_amd64_target=dist/mobius_server_darwin_amd64
build-darwin-amd64-server:
mkdir $(darwin_server_amd64_target) ; true
GOOS=darwin GOARCH=amd64 go build -o $(darwin_server_amd64_target)/mobius-hotline-server cmd/mobius-hotline-server/main.go
package-darwin-amd64-server: build-darwin-amd64-server
cp -r cmd/mobius-hotline-server/mobius/config $(darwin_server_amd64_target)
tar -zcvf dist/mobius_server_darwin_amd64.tar.gz $(darwin_server_amd64_target)
darwin_client_amd64_target=dist/mobius_client_darwin_amd64
build-darwin-amd64-client:
mkdir $(darwin_client_amd64_target) ; true
GOOS=darwin GOARCH=amd64 go build -o $(darwin_client_amd64_target)/mobius-hotline-client cmd/mobius-hotline-client/main.go
package-darwin-amd64-client: build-darwin-amd64-client
cp cmd/mobius-hotline-client/mobius-client-config.yaml $(darwin_client_amd64_target)
tar -zcvf dist/mobius_client_darwin_amd64.tar.gz $(darwin_client_amd64_target)
windows_client_amd64_target=dist/mobius_client_windows_amd64
build-win-amd64-client:
mkdir $(windows_client_amd64_target) ; true
GOOS=windows GOARCH=amd64 go build -o $(windows_client_amd64_target)/mobius-hotline-client.exe cmd/mobius-hotline-client/main.go
package-win-amd64-client: build-win-amd64-client
cp cmd/mobius-hotline-client/mobius-client-config.yaml $(windows_client_amd64_target)
zip -r dist/mobius_client_windows_amd64.zip $(windows_client_amd64_target)
windows_server_amd64_target=dist/mobius_server_windows_amd64
build-win-server-amd64:
mkdir $(windows_server_amd64_target) ; true
GOOS=windows GOARCH=amd64 go build -o $(windows_server_amd64_target)/mobius-hotline-server.exe cmd/mobius-hotline-server/main.go
package-win-amd64-server: build-win-server-amd64
cp -r cmd/mobius-hotline-server/mobius/config $(windows_server_amd64_target)
zip -r dist/mobius_server_windows_amd64.zip $(windows_server_amd64_target)
all: clean \
package-win-amd64-server \
package-win-amd64-client \
package-darwin-amd64-client \
package-darwin-amd64-server \
package-linux-arm-server \
package-linux-amd64-server \
package-linux-arm-client \
package-linux-amd64-client \
clean:
rm -rf dist/*