-
Notifications
You must be signed in to change notification settings - Fork 11
/
configure
executable file
·387 lines (373 loc) · 17.5 KB
/
configure
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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
#!/bin/bash
#
# Copyright (C) Niklaus F.Schen.
#
os=`uname -s`
if ! case $os in MINGW*) false;; esac; then
cc="gcc"
mcc="gcc"
else
cc="cc"
mcc="cc"
fi
echo -e "#include <stdio.h>\nint main(void) {printf(\"1\");return 0;}" > .xcode.c
$mcc -o .xcode .xcode.c 2>/dev/null 1>&2
if [ $? -ne 0 ]; then
mcc="$mcc -isysroot `xcrun --show-sdk-path`"
cc="$cc -isysroot `xcrun --show-sdk-path`"
fi
rm -fr .xcode .xcode.c
#output installation path
echo -e "#include <stdio.h>\nint main(int argc, char *argv[]) {printf(\"%s\", argv[1]);return 0;}" > .path_generator.c
$cc -o path_generator .path_generator.c
wasm=0
debug=0
mysql=0
mysql_enable=0
mysql_header_path=`./path_generator /usr/include/mysql`
mysql_lib_path=`./path_generator /usr/lib64/mysql`
mysql_lib=""
dl=""
c99=""
libmelonPath=`./path_generator /usr/local/melon`
libPath=`./path_generator /usr/local/lib/melang_dynamic`
if ! case $os in MINGW*) false;; esac; then
installPath=`./path_generator "$HOME/melang-0.6.0"`
libmelonPath=`./path_generator "$HOME/libmelon"`
libPath=`./path_generator $HOME/lib/melang_dynamic`
elif [ $os == 'Darwin' ]; then
installPath=`./path_generator "/usr/local/bin/"`
else
installPath=`./path_generator "/usr/bin/"`
fi
echo -e "Installation Path \t[$installPath]"
if [ $os = 'Linux' ]; then
dl="-ldl"
fi
for param in $@
do
if [ $param == "--help" ]; then
echo -e "\nMelang installation help."
echo "Copyright (C) Niklaus F.Schen."
echo "Options:"
echo -e "\t--prefix=INSTALL_PATH"
echo -e "\t--melon-prefix=LIBMELON_INSTALL_PATH"
echo -e "\t--lib-prefix=LIB_INSTALL_PATH"
echo -e "\t--enable-mysql"
echo -e "\t--mysql_header_path=MYSQL_CLIENT_HREADER_PATH"
echo -e "\t--mysql_lib_path=MYSQL_CLIENT_LIB_PATH"
echo -e "\t--enable-wasm"
echo -e "\t--debug"
echo -e "\t--c99"
exit 0
fi
param_prefix=`echo $param|cut -d '=' -f 1`
param_suffix=`echo $param|cut -d '=' -f 2`
if [ $param_prefix == "--prefix" ]; then
installPath=`./path_generator $param_suffix`
elif [ $param_prefix == "--melon-prefix" ]; then
libmelonPath=`./path_generator $param_suffix`
elif [ $param_prefix == "--lib-prefix" ]; then
libPath=`./path_generator $param_suffix`
elif [ $param_prefix == "--mysql_header_path" ]; then
mysql_header_path=`./path_generator $param_suffix`
elif [ $param_prefix == "--mysql_lib_path" ]; then
mysql_lib_path=`./path_generator $param_suffix`
elif [ $param_prefix == "--enable-mysql" ]; then
mysql_enable=1
elif [ $param_prefix == "--debug" ]; then
debug=1
elif [ $param_prefix == "--c99" ]; then
c99="-std=c99 -DMLN_C99 -D_POSIX_C_SOURCE=200112L"
elif [ $param_prefix == "--enable-wasm" ]; then
wasm=1
mcc="emcc"
fi
done
rm -f path_generator .path_generator.c
#debug
if [ $debug -ne 0 ]; then
if [ $wasm -eq 1 ]; then
debug='-g -D__DEBUG__'
else
debug='-ggdb -D__DEBUG__'
fi
else
debug=''
fi
#wasm
if [ $wasm -eq 1 ]; then
echo -e "Webassembly\t\t[enable]"
#llvm
llvm_flag=""
cc --help|grep LLVM > /dev/null 2>&1
if [ $? -ne 0 ]; then
llvm_flag="--llvm-lto 1"
fi
fi
#test MySQL Asynchronous----------#
if [ $mysql_enable -eq 1 ]; then
echo -e "#include <stdio.h>\n#include <mysql.h>" > mysql_test.c
echo "int main(void){MYSQL *mysql_local = mysql_init(NULL);mysql_real_connect_nonblocking(mysql_local, NULL, NULL, NULL, NULL, 3306, NULL, 0);return 0;}" >> mysql_test.c
cc -o mysql_test mysql_test.c -I/usr/include/mysql/ -L/usr/lib64/mysql/ -lmysqlclient 2>/dev/null
if [ "$?" == "0" ]; then
mysql=1
mysql_lib="-I $mysql_header_path -L $mysql_lib_path -lmysqlclient"
echo -e "MySQL Asynchronous\t[support]"
else
mysql=0
echo -e "MySQL Asynchronous\t[not support]"
fi
rm -fr mysql_test mysql_test.c
fi
#test MySQL Asynchronous end------#
# Generate Makefile
echo "#" > Makefile
echo "# Copyright (C) Niklaus F.Schen." >> Makefile
echo "#" >> Makefile
echo "CC = $cc" >> Makefile
echo "MCC = $mcc" >> Makefile
echo "FLAGS = -I$libmelonPath/include -Ilib_src -c -Wall $debug $c99 -Werror -O3 -fPIC" >> Makefile
if [ $wasm -eq 1 ]; then
echo "MFLAGS = -I$libmelonPath/include -c $debug $c99 -O3 $llvm_flag -s -mmutable-globals -mnontrapping-fptoint -msign-ext -Wemcc" >> Makefile
echo "MELANG = melang.wasm" >> Makefile
else
echo "MFLAGS = -I$libmelonPath/include -c -Wall $debug $c99 -Werror -O3 -fPIC" >> Makefile
echo "MELANG = melang" >> Makefile
fi
if ! case $os in MINGW*) false;; esac; then
echo "LIBAES = aes.dll" >> Makefile
echo "LIBBASE64 = base64.dll" >> Makefile
echo "LIBDES = des.dll" >> Makefile
echo "LIBFILE = file.dll" >> Makefile
echo "LIBJSON = json.dll" >> Makefile
echo "LIBHTTP = http.dll" >> Makefile
echo "LIBMATRIX = matrix.dll" >> Makefile
echo "LIBMD5 = md5.dll" >> Makefile
echo "LIBMQ = mq.dll" >> Makefile
echo "LIBMYSQL = mysql.dll" >> Makefile
echo "LIBNETWORK = net.dll" >> Makefile
echo "LIBPRIME = prime.dll" >> Makefile
echo "LIBRC = rc.dll" >> Makefile
echo "LIBSHA = sha.dll" >> Makefile
echo "LIBSTR = str.dll" >> Makefile
echo "LIBSYS = sys.dll" >> Makefile
else
echo "LIBAES = aes.so" >> Makefile
echo "LIBBASE64 = base64.so" >> Makefile
echo "LIBDES = des.so" >> Makefile
echo "LIBFILE = file.so" >> Makefile
echo "LIBJSON = json.so" >> Makefile
echo "LIBHTTP = http.so" >> Makefile
echo "LIBMATRIX = matrix.so" >> Makefile
echo "LIBMD5 = md5.so" >> Makefile
echo "LIBMQ = mq.so" >> Makefile
echo "LIBMYSQL = mysql.so" >> Makefile
echo "LIBNETWORK = net.so" >> Makefile
echo "LIBPRIME = prime.so" >> Makefile
echo "LIBRC = rc.so" >> Makefile
echo "LIBSHA = sha.so" >> Makefile
echo "LIBSTR = str.so" >> Makefile
echo "LIBSYS = sys.so" >> Makefile
fi
echo "" >> Makefile
echo "MELANGOBJS = objs/melang.o" >> Makefile
echo "LIBAESOBJS = objs/mln_lang_aes.o" >> Makefile
echo "LIBBASE64OBJS = objs/mln_lang_base64.o" >> Makefile
echo "LIBDESOBJS = objs/mln_lang_des.o" >> Makefile
echo "LIBFILEOBJS = objs/mln_lang_file.o" >> Makefile
echo "LIBJSONOBJS = objs/mln_lang_json.o" >> Makefile
echo "LIBHTTPOBJS = objs/mln_lang_http.o" >> Makefile
echo "LIBMATRIXOBJS = objs/mln_lang_matrix.o" >> Makefile
echo "LIBMD5OBJS = objs/mln_lang_md5.o" >> Makefile
echo "LIBMQOBJS = objs/mln_lang_msgqueue.o objs/mln_lang_msgqueue_impl.o" >> Makefile
echo "LIBMYSQLOBJS = objs/mln_lang_mysql.o" >> Makefile
echo "LIBNETWORKOBJS = objs/mln_lang_network.o" >> Makefile
echo "LIBPRIMEOBJS = objs/mln_lang_prime.o" >> Makefile
echo "LIBRCOBJS = objs/mln_lang_rc.o" >> Makefile
echo "LIBSHAOBJS = objs/mln_lang_sha.o" >> Makefile
echo "LIBSTROBJS = objs/mln_lang_string.o" >> Makefile
echo "LIBSYSOBJS = objs/mln_lang_sys.o" >> Makefile
echo "" >> Makefile
echo ".PHONY : compile all install clean" >> Makefile
echo "compile: PREPARE \$(MELANGOBJS) \$(MELANG) COMPILECLEAN" >> Makefile
echo "lib: PREPARE \$(LIBAESOBJS) \$(LIBBASE64OBJS) \$(LIBDESOBJS) \$(LIBFILEOBJS) \$(LIBJSONOBJS) \\" >> Makefile
echo " \$(LIBMATRIXOBJS) \$(LIBMD5OBJS) \$(LIBMQOBJS) \$(LIBMYSQLOBJS) \$(LIBNETWORKOBJS) \$(LIBPRIMEOBJS) \\" >> Makefile
echo " \$(LIBRCOBJS) \$(LIBSHAOBJS) \$(LIBSTROBJS) \$(LIBSYSOBJS) \$(LIBHTTPOBJS) \\" >> Makefile
echo " \$(LIBAES) \$(LIBBASE64) \$(LIBDES) \$(LIBFILE) \$(LIBJSON) \$(LIBMATRIX) \$(LIBMD5) \\" >> Makefile
echo " \$(LIBMQ) \$(LIBMYSQL) \$(LIBNETWORK) \$(LIBPRIME) \$(LIBRC) \$(LIBSHA) \$(LIBSTR) \$(LIBSYS) \\" >> Makefile
echo " \$(LIBHTTP) \\" >> Makefile
echo " COMPILECLEAN" >> Makefile
echo "all: PREPARE \$(MELANGOBJS) \$(LIBAESOBJS) \$(LIBBASE64OBJS) \$(LIBDESOBJS) \$(LIBFILEOBJS) \$(LIBJSONOBJS) \\" >> Makefile
echo " \$(LIBMATRIXOBJS) \$(LIBMD5OBJS) \$(LIBMQOBJS) \$(LIBMYSQLOBJS) \$(LIBNETWORKOBJS) \$(LIBPRIMEOBJS) \\" >> Makefile
echo " \$(LIBRCOBJS) \$(LIBSHAOBJS) \$(LIBSTROBJS) \$(LIBSYSOBJS) \$(LIBHTTPOBJS) \\" >> Makefile
echo " \$(MELANG) \$(LIBAES) \$(LIBBASE64) \$(LIBDES) \$(LIBFILE) \$(LIBJSON) \$(LIBMATRIX) \$(LIBMD5) \\" >> Makefile
echo " \$(LIBMQ) \$(LIBMYSQL) \$(LIBNETWORK) \$(LIBPRIME) \$(LIBRC) \$(LIBSHA) \$(LIBSTR) \$(LIBSYS) \\" >> Makefile
echo " \$(LIBHTTP) \\" >> Makefile
echo " COMPILECLEAN" >> Makefile
echo "clean:" >> Makefile
echo " rm -fr objs libs bin Makefile" >> Makefile
echo "PREPARE :" >> Makefile
echo " test -d objs || mkdir objs" >> Makefile
echo " test -d libs || mkdir libs" >> Makefile
echo " test -d bin || mkdir bin" >> Makefile
if ! case $os in MINGW*) false;; esac; then
echo -en " \b"
else
echo " cp -f $libmelonPath/lib/libmelon_static.a ." >> Makefile
fi
echo "COMPILECLEAN :" >> Makefile
if ! case $os in MINGW*) false;; esac; then
echo -en " \b"
else
echo " rm -f libmelon_static.a" >> Makefile
fi
echo "\$(MELANG) : \$(MELANGOBJS)" >> Makefile
if ! case $os in MINGW*) false;; esac; then
echo " \$(MCC) -o bin/\$@ \$^ -static -O3 -L$libmelonPath/lib -llibmelon -lpthread $mysql_lib -lWs2_32" >> Makefile
else
echo " \$(MCC) -o bin/\$@ \$^ -O3 -L. -lmelon_static -ldl -lpthread $mysql_lib" >> Makefile
fi
echo "\$(LIBAES) : \$(LIBAESOBJS)" >> Makefile
if ! case $os in MINGW*) false;; esac; then
echo " \$(CC) -o libs/\$@ \$^ -static $debug $c99 -Wall -lpthread -shared -fPIC -L$libmelonPath/lib -llibmelon -lWs2_32" >> Makefile
else
echo " \$(CC) -o libs/\$@ \$^ $debug $c99 -Wall -lpthread -lc -shared -fPIC -L. -lmelon_static" >> Makefile
fi
echo "\$(LIBBASE64) : \$(LIBBASE64OBJS)" >> Makefile
if ! case $os in MINGW*) false;; esac; then
echo " \$(CC) -o libs/\$@ \$^ -static $debug $c99 -Wall -lpthread -shared -fPIC -L$libmelonPath/lib -llibmelon -lWs2_32" >> Makefile
else
echo " \$(CC) -o libs/\$@ \$^ $debug $c99 -Wall -lpthread -lc -shared -fPIC -L. -lmelon_static" >> Makefile
fi
echo "\$(LIBDES) : \$(LIBDESOBJS)" >> Makefile
if ! case $os in MINGW*) false;; esac; then
echo " \$(CC) -o libs/\$@ \$^ -static $debug $c99 -Wall -lpthread -shared -fPIC -L$libmelonPath/lib -llibmelon -lWs2_32" >> Makefile
else
echo " \$(CC) -o libs/\$@ \$^ $debug $c99 -Wall -lpthread -lc -shared -fPIC -L. -lmelon_static" >> Makefile
fi
echo "\$(LIBFILE) : \$(LIBFILEOBJS)" >> Makefile
if ! case $os in MINGW*) false;; esac; then
echo " \$(CC) -o libs/\$@ \$^ -static $debug $c99 -Wall -lpthread -shared -fPIC -L$libmelonPath/lib -llibmelon -lWs2_32" >> Makefile
else
echo " \$(CC) -o libs/\$@ \$^ $debug $c99 -Wall -lpthread -lc -shared -fPIC -L. -lmelon_static" >> Makefile
fi
echo "\$(LIBJSON) : \$(LIBJSONOBJS)" >> Makefile
if ! case $os in MINGW*) false;; esac; then
echo " \$(CC) -o libs/\$@ \$^ -static $debug $c99 -Wall -lpthread -shared -fPIC -L$libmelonPath/lib -llibmelon -lWs2_32" >> Makefile
else
echo " \$(CC) -o libs/\$@ \$^ $debug $c99 -Wall -lpthread -lc -shared -fPIC -L. -lmelon_static" >> Makefile
fi
echo "\$(LIBHTTP) : \$(LIBHTTPOBJS)" >> Makefile
if ! case $os in MINGW*) false;; esac; then
echo " \$(CC) -o libs/\$@ \$^ -static $debug $c99 -Wall -lpthread -shared -fPIC -L$libmelonPath/lib -llibmelon -lWs2_32" >> Makefile
else
echo " \$(CC) -o libs/\$@ \$^ $debug $c99 -Wall -lpthread -lc -shared -fPIC -L. -lmelon_static" >> Makefile
fi
echo "\$(LIBMATRIX) : \$(LIBMATRIXOBJS)" >> Makefile
if ! case $os in MINGW*) false;; esac; then
echo " \$(CC) -o libs/\$@ \$^ -static $debug $c99 -Wall -lpthread -shared -fPIC -L$libmelonPath/lib -llibmelon -lWs2_32" >> Makefile
else
echo " \$(CC) -o libs/\$@ \$^ $debug $c99 -Wall -lpthread -lc -shared -fPIC -L. -lmelon_static" >> Makefile
fi
echo "\$(LIBMD5) : \$(LIBMD5OBJS)" >> Makefile
if ! case $os in MINGW*) false;; esac; then
echo " \$(CC) -o libs/\$@ \$^ -static $debug $c99 -Wall -lpthread -shared -fPIC -L$libmelonPath/lib -llibmelon -lWs2_32" >> Makefile
else
echo " \$(CC) -o libs/\$@ \$^ $debug $c99 -Wall -lpthread -lc -shared -fPIC -L. -lmelon_static" >> Makefile
fi
echo "\$(LIBMQ) : \$(LIBMQOBJS)" >> Makefile
if ! case $os in MINGW*) false;; esac; then
echo " \$(CC) -o libs/\$@ \$^ -static $debug $c99 -Wall -lpthread -shared -fPIC -L$libmelonPath/lib -llibmelon -lWs2_32" >> Makefile
else
echo " \$(CC) -o libs/\$@ \$^ $debug $c99 -Wall -lpthread -lc -shared -fPIC -L. -lmelon_static" >> Makefile
fi
echo "\$(LIBMYSQL) : \$(LIBMYSQLOBJS)" >> Makefile
if ! case $os in MINGW*) false;; esac; then
echo " \$(CC) -o libs/\$@ \$^ -static $debug $c99 -Wall -lpthread -shared -fPIC -L$libmelonPath/lib -llibmelon -lWs2_32" >> Makefile
else
echo " \$(CC) -o libs/\$@ \$^ $debug $c99 -Wall -lpthread -lc -shared -fPIC -L. -lmelon_static" >> Makefile
fi
echo "\$(LIBNETWORK) : \$(LIBNETWORKOBJS)" >> Makefile
if ! case $os in MINGW*) false;; esac; then
echo " \$(CC) -o libs/\$@ \$^ -static $debug $c99 -Wall -lpthread -shared -fPIC -L$libmelonPath/lib -llibmelon -lWs2_32" >> Makefile
else
echo " \$(CC) -o libs/\$@ \$^ $debug $c99 -Wall -lpthread -lc -shared -fPIC -L. -lmelon_static" >> Makefile
fi
echo "\$(LIBPRIME) : \$(LIBPRIMEOBJS)" >> Makefile
if ! case $os in MINGW*) false;; esac; then
echo " \$(CC) -o libs/\$@ \$^ -static $debug $c99 -Wall -lpthread -shared -fPIC -L$libmelonPath/lib -llibmelon -lWs2_32" >> Makefile
else
echo " \$(CC) -o libs/\$@ \$^ $debug $c99 -Wall -lpthread -lc -shared -fPIC -L. -lmelon_static" >> Makefile
fi
echo "\$(LIBRC) : \$(LIBRCOBJS)" >> Makefile
if ! case $os in MINGW*) false;; esac; then
echo " \$(CC) -o libs/\$@ \$^ -static $debug $c99 -Wall -lpthread -shared -fPIC -L$libmelonPath/lib -llibmelon -lWs2_32" >> Makefile
else
echo " \$(CC) -o libs/\$@ \$^ $debug $c99 -Wall -lpthread -lc -shared -fPIC -L. -lmelon_static" >> Makefile
fi
echo "\$(LIBSHA) : \$(LIBSHAOBJS)" >> Makefile
if ! case $os in MINGW*) false;; esac; then
echo " \$(CC) -o libs/\$@ \$^ -static $debug $c99 -Wall -lpthread -shared -fPIC -L$libmelonPath/lib -llibmelon -lWs2_32" >> Makefile
else
echo " \$(CC) -o libs/\$@ \$^ $debug $c99 -Wall -lpthread -lc -shared -fPIC -L. -lmelon_static" >> Makefile
fi
echo "\$(LIBSTR) : \$(LIBSTROBJS)" >> Makefile
if ! case $os in MINGW*) false;; esac; then
echo " \$(CC) -o libs/\$@ \$^ -static $debug $c99 -Wall -lpthread -shared -fPIC -L$libmelonPath/lib -llibmelon -lWs2_32" >> Makefile
else
echo " \$(CC) -o libs/\$@ \$^ $debug $c99 -Wall -lpthread -lc -shared -fPIC -L. -lmelon_static" >> Makefile
fi
echo "\$(LIBSYS) : \$(LIBSYSOBJS) objs/mln_lang_msgqueue_impl.o" >> Makefile
if ! case $os in MINGW*) false;; esac; then
echo " \$(CC) -o libs/\$@ \$^ -static $debug $c99 -Wall -lpthread -shared -fPIC -L$libmelonPath/lib -llibmelon -lWs2_32" >> Makefile
else
echo " \$(CC) -o libs/\$@ \$^ $debug $c99 -Wall -lpthread -lc -shared -fPIC -L. -lmelon_static" >> Makefile
fi
echo "install:" >> Makefile
echo " test -d $libPath || mkdir -p $libPath" >> Makefile
echo " test -d $installPath || mkdir -p $installPath" >> Makefile
echo " cp -fr libs/* $libPath/" >> Makefile
echo " cp -fr bin/melang $installPath/" >> Makefile
echo "" >> Makefile
echo "objs/melang.o : melang.c" >> Makefile
echo " \$(MCC) \$(MFLAGS) -o \$@ \$<" >> Makefile
echo "objs/mln_lang_aes.o : lib_src/aes/mln_lang_aes.c lib_src/aes/mln_lang_aes.h" >> Makefile
echo " \$(CC) \$(FLAGS) -o \$@ \$<" >> Makefile
echo "objs/mln_lang_base64.o : lib_src/base64/mln_lang_base64.c lib_src/base64/mln_lang_base64.h" >> Makefile
echo " \$(CC) \$(FLAGS) -o \$@ \$<" >> Makefile
echo "objs/mln_lang_des.o : lib_src/des/mln_lang_des.c lib_src/des/mln_lang_des.h" >> Makefile
echo " \$(CC) \$(FLAGS) -o \$@ \$<" >> Makefile
echo "objs/mln_lang_file.o : lib_src/file/mln_lang_file.c lib_src/file/mln_lang_file.h" >> Makefile
echo " \$(CC) \$(FLAGS) -o \$@ \$<" >> Makefile
echo "objs/mln_lang_json.o : lib_src/json/mln_lang_json.c lib_src/json/mln_lang_json.h" >> Makefile
echo " \$(CC) \$(FLAGS) -o \$@ \$<" >> Makefile
echo "objs/mln_lang_http.o : lib_src/http/mln_lang_http.c lib_src/http/mln_lang_http.h" >> Makefile
echo " \$(CC) \$(FLAGS) -o \$@ \$<" >> Makefile
echo "objs/mln_lang_matrix.o : lib_src/matrix/mln_lang_matrix.c lib_src/matrix/mln_lang_matrix.h" >> Makefile
echo " \$(CC) \$(FLAGS) -o \$@ \$<" >> Makefile
echo "objs/mln_lang_md5.o : lib_src/md5/mln_lang_md5.c lib_src/md5/mln_lang_md5.h" >> Makefile
echo " \$(CC) \$(FLAGS) -o \$@ \$<" >> Makefile
echo "objs/mln_lang_msgqueue_impl.o : lib_src/msgqueue/mln_lang_msgqueue_impl.c lib_src/msgqueue/mln_lang_msgqueue.h" >> Makefile
echo " \$(CC) \$(FLAGS) -o \$@ \$<" >> Makefile
echo "objs/mln_lang_msgqueue.o : lib_src/msgqueue/mln_lang_msgqueue.c lib_src/msgqueue/mln_lang_msgqueue.h" >> Makefile
echo " \$(CC) \$(FLAGS) -o \$@ \$<" >> Makefile
echo "objs/mln_lang_mysql.o : lib_src/mysql/mln_lang_mysql.c lib_src/mysql/mln_lang_mysql.h" >> Makefile
if [ $mysql -eq 1 ]; then
echo " \$(CC) \$(FLAGS) -o \$@ \$< -DMLN_MYSQL" >> Makefile
else
echo " \$(CC) \$(FLAGS) -o \$@ \$<" >> Makefile
fi
echo "objs/mln_lang_network.o : lib_src/network/mln_lang_network.c lib_src/network/mln_lang_network.h" >> Makefile
echo " \$(CC) \$(FLAGS) -o \$@ \$<" >> Makefile
echo "objs/mln_lang_prime.o : lib_src/prime/mln_lang_prime.c lib_src/prime/mln_lang_prime.h" >> Makefile
echo " \$(CC) \$(FLAGS) -o \$@ \$<" >> Makefile
echo "objs/mln_lang_rc.o : lib_src/rc/mln_lang_rc.c lib_src/rc/mln_lang_rc.h" >> Makefile
echo " \$(CC) \$(FLAGS) -o \$@ \$<" >> Makefile
echo "objs/mln_lang_sha.o : lib_src/sha/mln_lang_sha.c lib_src/sha/mln_lang_sha.h" >> Makefile
echo " \$(CC) \$(FLAGS) -o \$@ \$<" >> Makefile
echo "objs/mln_lang_string.o : lib_src/string/mln_lang_string.c lib_src/string/mln_lang_string.h" >> Makefile
echo " \$(CC) \$(FLAGS) -o \$@ \$<" >> Makefile
echo "objs/mln_lang_sys.o : lib_src/sys/mln_lang_sys.c lib_src/sys/mln_lang_sys.h" >> Makefile
echo " \$(CC) \$(FLAGS) -o \$@ \$<" >> Makefile
echo "Complete!"