This repository has been archived by the owner on Oct 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
executable file
·209 lines (162 loc) · 4.83 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
export ROOT_DIR=${PWD}
# build crypto++
define crypto++
@printf "`tput setaf 1`********** BUILDING CRYPTO++ **********`tput sgr0`\n"
# build
${MAKE} -C ${ROOT_DIR}/extern/crypto++/src/ static dynamic cryptest.exe
# validate
./extern/crypto++/src/cryptest.exe v
./extern/crypto++/src/cryptest.exe tv all
${MAKE} -C ${ROOT_DIR}/extern/crypto++/src/ libcryptopp.a libcryptopp.so cryptest.exe
# create install directory
mkdir -p ${ROOT_DIR}/extern/crypto++/bin/
# install
sudo ${MAKE} -C ${ROOT_DIR}/extern/crypto++/src/ install PREFIX=${ROOT_DIR}/extern/crypto++/bin/
endef
# clean crypto++
define clean_crypto++
@printf "`tput setaf 1`********** CLEANING UP CRYPTO++ FILES **********`tput sgr0`\n"
rm -f ${ROOT_DIR}/extern/crypto++/src/*.o
rm -f ${ROOT_DIR}/extern/crypto++/src/*.so
rm -f ${ROOT_DIR}/extern/crypto++/src/*.so.*
rm -f ${ROOT_DIR}/extern/crypto++/src/*.a
rm -f ${ROOT_DIR}/extern/crypto++/src/*.out
endef
# download openssl
define download_openssl
@printf "`tput setaf 1`********** DOWNLOADING OPENSSL REPO FROM GITHUB **********`tput sgr0`\n"
${MAKE} -C ${ROOT_DIR}/extern/OpenSSL/src/ download
endef
# extract openssl
define extract_openssl
@printf "`tput setaf 1`********** UNPACKING OPENSSL REPO **********`tput sgr0`\n"
${MAKE} -C ${ROOT_DIR}/extern/OpenSSL/src/ extract
endef
# configure openssl
define configure_openssl
@printf "`tput setaf 1`********** CONFIGURING OPENSSL **********`tput sgr0`\n"
${MAKE} -C ${ROOT_DIR}/extern/OpenSSL/src/ configure
endef
# build openssl
define build_openssl
@printf "`tput setaf 1`********** BUILDING OPENSSL **********`tput sgr0`\n"
${MAKE} -C ${ROOT_DIR}/extern/OpenSSL/src/ -i -k build
endef
# install openssl
define install_openssl
@printf "`tput setaf 1`********** INSTALLING OPENSSL **********`tput sgr0`\n"
${MAKE} -C ${ROOT_DIR}/extern/OpenSSL/src/ -i -k install
endef
# clean openssl
define clean_openssl
@printf "`tput setaf 1`********** CLEANING UP OPENSSL FILES **********`tput sgr0`\n"
rm -f ${ROOT_DIR}/extern/OpenSSL/src/openssl-source.tar.gz
endef
# clean all
define clean_all
@printf "`tput setaf 1`********** CLEANING UP EVERYTHING **********`tput sgr0`\n"
$(clean_crypto++)
$(clean_openssl)
endef
# build netcore
define build_netcore
@printf "`tput setaf 1`********** BUILDING NETCORE **********`tput sgr0`\n"
${MAKE} -C ${ROOT_DIR}/Win-Net/Net/NetCore/
endef
# build netclient
define build_netclient
@printf "`tput setaf 1`********** BUILDING NETCLIENT **********`tput sgr0`\n"
${MAKE} -C ${ROOT_DIR}/Win-Net/Net/NetClient/
endef
# build netserver
define build_netserver
@printf "`tput setaf 1`********** BUILDING NETSERVER **********`tput sgr0`\n"
${MAKE} -C ${ROOT_DIR}/Win-Net/Net/NetServer/
endef
# build netwebsocket
define build_netwebsocket
@printf "`tput setaf 1`********** BUILDING NETWEBSOCKET **********`tput sgr0`\n"
${MAKE} -C ${ROOT_DIR}/Win-Net/Net/NetWebSocket/
endef
# build sandboxclient
define build_sandboxclient
@printf "`tput setaf 1`********** BUILDING SANDBOX CLIENT **********`tput sgr0`\n"
${MAKE} -C ${ROOT_DIR}/Sandbox/Client/Client/
endef
# build sandboxserver
define build_sandboxserver
@printf "`tput setaf 1`********** BUILDING SANDBOX SERVER **********`tput sgr0`\n"
${MAKE} -C ${ROOT_DIR}/Sandbox/Server/Server/
endef
# build sandboxwebsocket
define build_sandboxwebsocket
@printf "`tput setaf 1`********** BUILDING SANDBOX WEBSOCKET **********`tput sgr0`\n"
${MAKE} -C ${ROOT_DIR}/Sandbox/WebSocket/WebSocket/
endef
# build sandboxfeatures
define build_sandboxfeatures
@printf "`tput setaf 1`********** BUILDING SANDBOX FEATURES **********`tput sgr0`\n"
${MAKE} -C ${ROOT_DIR}/Sandbox/Features/Features/
endef
# run task
all:
$(crypto++)
$(download_openssl)
$(extract_openssl)
$(configure_openssl)
$(build_openssl)
$(install_openssl)
$(clean_all)
$(build_netcore)
$(build_netclient)
$(build_netserver)
$(build_netwebsocket)
build:
$(build_netcore)
$(build_netclient)
$(build_netserver)
$(build_netwebsocket)
sandbox:
$(build_sandboxclient)
$(build_sandboxserver)
$(build_sandboxwebsocket)
$(build_sandboxfeatures)
openssl-download:
$(download_openssl)
openssl-unpack:
$(extract_openssl)
openssl-configure:
$(configure_openssl)
openssl-build:
$(build_openssl)
openssl-install:
$(install_openssl)
cryptopp:
$(crypto++)
crypto++:
$(crypto++)
cryptopp-clean:
$(clean_crypto++)
crypto++-clean:
$(clean_crypto++)
openssl-clean:
$(clean_openssl)
netcore:
$(build_netcore)
netserver:
$(build_netserver)
netclient:
$(build_netclient)
netwebsocket:
$(build_netwebsocket)
sandboxserver:
$(build_sandboxserver)
sandboxclient:
$(build_sandboxclient)
sandboxwebsocket:
$(build_sandboxwebsocket)
sandboxfeatures:
$(build_sandboxfeatures)
clean:
$(clean_all)
# end