forked from APE-Project/APE_Server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·38 lines (33 loc) · 836 Bytes
/
build.sh
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
#!/bin/bash
OS_TARGET=`uname -s`
case "$OS_TARGET" in
linux* | Linux*)
HOST_OS=Linux
echo "#define USE_EPOLL_HANDLER" > ./src/configure.h
echo "LINUX_BUILD = 1" > ./modules/plateform.mk;;
Darwin*)
HOST_OS=Darwin
echo "#define USE_KQUEUE_HANDLER" > ./src/configure.h
echo "DARWIN_BUILD = 1" > ./modules/plateform.mk;;
*)
HOST_IS=Linux;;
esac
cd ./deps/udns-0.0.9/
make clean && ./configure && make
cd ../../
if [ -e "/usr/include/mysql/mysql.h" ]
then
echo "HAS_MYSQL = yes" > ./modules/mysql.mk
echo "#define _USE_MYSQL 1" >> ./src/configure.h
cd ./modules/deps/mysac/
make
cd ../../../
else
echo "HAS_MYSQL = 0" > ./modules/mysql.mk
echo "#undef _USE_MYSQL" >> ./src/configure.h
fi
cd ./deps/js/src/
./configure && make -j8
cd ../../../
make
cd ./modules/ && make