-
Notifications
You must be signed in to change notification settings - Fork 30
/
Makefile
101 lines (92 loc) · 4.17 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
.DEFAULT_GOAL := all
.SILENT: release-lin release-win release
all:
CGO_ENABLED=0 GOOS=windows go build -ldflags '-s -w' -tags phocus -o ./phocus.exe . && \
CGO_ENABLED=0 GOOS=windows go build -ldflags '-s -w' -o ./aeacus.exe . && \
echo "Windows production build successful!" && \
CGO_ENABLED=0 GOOS=linux go build -ldflags '-s -w' -tags phocus -o ./phocus . && \
CGO_ENABLED=0 GOOS=linux go build -ldflags '-s -w' -o ./aeacus . && \
echo "Linux production build successful!"
all-dev:
CGO_ENABLED=0 GOOS=windows go build -tags phocus -o ./phocus.exe . && \
CGO_ENABLED=0 GOOS=windows go build -o ./aeacus.exe . && \
echo "Windows development build successful!" && \
CGO_ENABLED=0 GOOS=linux go build -tags phocus -o ./phocus . && \
CGO_ENABLED=0 GOOS=linux go build -o ./aeacus . && \
echo "Linux development build successful!"
lin:
CGO_ENABLED=0 GOOS=linux go build -ldflags '-s -w' -tags phocus -o ./phocus . && \
CGO_ENABLED=0 GOOS=linux go build -ldflags '-s -w' -o ./aeacus . && \
echo "Linux production build successful!"
lin-dev:
CGO_ENABLED=0 GOOS=linux go build -tags phocus -o ./phocus . && \
CGO_ENABLED=0 GOOS=linux go build -o ./aeacus . && \
echo "Linux development build successful!"
win:
CGO_ENABLED=0 GOOS=windows go build -ldflags '-s -w' -tags phocus -o ./phocus.exe . && \
CGO_ENABLED=0 GOOS=windows go build -ldflags '-s -w' -o ./aeacus.exe . && \
echo "Windows production build successful!"
win-dev:
CGO_ENABLED=0 GOOS=windows go build -tags phocus -o ./phocus.exe . && GOOS=windows go build -o ./aeacus.exe . && \
echo "Windows development build successful!"
release:
echo "Building obfuscated binaries..." && \
sh misc/dev/gen-crypto.sh && \
CGO_ENABLED=0 GOOS=windows go build -ldflags '-s -w' -tags phocus -o ./phocus.exe . && \
CGO_ENABLED=0 GOOS=windows go build -ldflags '-s -w' -o ./aeacus.exe . && \
echo "Windows production build successful!" && \
CGO_ENABLED=0 GOOS=linux go build -ldflags '-s -w' -tags phocus -o ./phocus . && \
CGO_ENABLED=0 GOOS=linux go build -ldflags '-s -w' -o ./aeacus . && \
echo "Linux production build successful!" && \
mv crypto.go.bak crypto.go && \
echo "Restored crypto.go" && \
mkdir aeacus-win32/ && mkdir aeacus-linux/ && \
mv aeacus.exe aeacus-win32/aeacus.exe && \
mv phocus.exe aeacus-win32/phocus.exe && \
mv aeacus aeacus-linux/aeacus && \
mv phocus aeacus-linux/phocus && \
cp -Rf assets/ aeacus-win32/ && \
cp -Rf misc/ aeacus-win32/ && \
cp -Rf LICENSE aeacus-win32/ && \
cp -Rf assets/ aeacus-linux/ && \
cp -Rf misc/ aeacus-linux/ && \
cp -Rf LICENSE aeacus-linux/ && \
zip -r aeacus-win32.zip aeacus-win32/ > /dev/null && \
echo "Successfully compressed aeacus-win32!" && \
zip -r aeacus-linux.zip aeacus-linux/ > /dev/null && \
echo "Successfully compressed aeacus-linux!" && \
rm -rf aeacus-win32/ && rm -rf aeacus-linux/
release-lin:
echo "Building obfuscated binaries..." && \
sh misc/dev/gen-crypto.sh && \
CGO_ENABLED=0 GOOS=linux go build -ldflags '-s -w' -tags phocus -o ./phocus . && \
CGO_ENABLED=0 GOOS=linux go build -ldflags '-s -w' -o ./aeacus . && \
echo "Linux production build successful!" && \
mv crypto.go.bak crypto.go && \
echo "Restored crypto.go" && \
mkdir aeacus-linux/ && \
mv aeacus aeacus-linux/aeacus && \
mv phocus aeacus-linux/phocus && \
cp -Rf assets/ aeacus-linux/ && \
cp -Rf misc/ aeacus-linux/ && \
cp -Rf LICENSE aeacus-linux/ && \
zip -r aeacus-linux.zip aeacus-linux/ > /dev/null && \
echo "Successfully compressed aeacus-linux!" && \
rm -rf aeacus-linux/
release-win:
echo "Building obfuscated binaries..." && \
sh misc/dev/gen-crypto.sh && \
CGO_ENABLED=0 GOOS=windows go build -ldflags '-s -w' -tags phocus -o ./phocus.exe . && \
CGO_ENABLED=0 GOOS=windows go build -ldflags '-s -w' -o ./aeacus.exe . && \
echo "Windows production build successful!" && \
mv crypto.go.bak crypto.go && \
echo "Restored crypto.go" && \
mkdir aeacus-win32/ && \
mv aeacus.exe aeacus-win32/aeacus.exe && \
mv phocus.exe aeacus-win32/phocus.exe && \
cp -Rf assets/ aeacus-win32/ && \
cp -Rf misc/ aeacus-win32/ && \
cp -Rf LICENSE aeacus-win32/ && \
zip -r aeacus-win32.zip aeacus-win32/ > /dev/null && \
echo "Successfully compressed aeacus-win32!" && \
rm -rf aeacus-win32/