aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rwxr-xr-xsrc/BuildIt.sh67
1 files changed, 33 insertions, 34 deletions
diff --git a/src/BuildIt.sh b/src/BuildIt.sh
index 883aa3b..448fe21 100755
--- a/src/BuildIt.sh
+++ b/src/BuildIt.sh
@@ -25,35 +25,6 @@ if [ ! -d build/fcgi2 ]; then
25 make 25 make
26 popd >/dev/null 26 popd >/dev/null
27fi 27fi
28
29echo ""
30echo ""
31
32if [ ! -d git-sub-modules/json-builder ]; then
33 pushd git-sub-modules >/dev/null
34 git clone https://github.com/json-parser/json-builder.git
35 popd >/dev/null
36else
37 pushd git-sub-modules/json-builder >/dev/null
38 echo "Updating json-builder."
39# git pull
40 popd >/dev/null
41fi
42
43echo ""
44echo ""
45
46if [ ! -d git-sub-modules/json-parser ]; then
47 pushd git-sub-modules >/dev/null
48 git clone https://github.com/json-parser/json-parser.git
49 popd >/dev/null
50else
51 pushd git-sub-modules/json-parser >/dev/null
52 echo "Updating json-parser."
53# git pull
54 popd >/dev/null
55fi
56
57echo "" 28echo ""
58echo "" 29echo ""
59 30
@@ -136,14 +107,9 @@ if [ ! -d build/toybox ]; then
136 ln -fs ../toys/sledjchisl/fcgi_SC.h build/toybox/lib 107 ln -fs ../toys/sledjchisl/fcgi_SC.h build/toybox/lib
137 ln -fs ../toys/boxes/handlekeys.c build/toybox/lib 108 ln -fs ../toys/boxes/handlekeys.c build/toybox/lib
138 ln -fs ../toys/boxes/handlekeys.h build/toybox/lib 109 ln -fs ../toys/boxes/handlekeys.h build/toybox/lib
139 ln -fs ../../../git-sub-modules/json-builder/json-builder.c build/toybox/lib
140 ln -fs ../../../git-sub-modules/json-builder/json-builder.h build/toybox/lib
141 ln -fs ../../../git-sub-modules/json-parser/json.c build/toybox/lib
142 ln -fs ../../../git-sub-modules/json-parser/json.h build/toybox/lib
143 110
144 pushd build/toybox >/dev/null 111 pushd build/toybox >/dev/null
145 sed -e "s/strend(/tb_strend(/g" -i lib/lib.h 112 sed -e "s/strend(/tb_strend(/g" -i lib/lib.h
146 sed -e 's/<json.h>/"json.h"/g' -i lib/json-builder.h
147 find ./ -type f -name "*.c" -exec sed -e "s/strend(/tb_strend(/g" -i {} \; 113 find ./ -type f -name "*.c" -exec sed -e "s/strend(/tb_strend(/g" -i {} \;
148 make clean 114 make clean
149 #make defconfig 115 #make defconfig
@@ -155,6 +121,39 @@ fi
155echo "" 121echo ""
156echo "" 122echo ""
157 123
124if [ ! -d git-sub-modules/json-builder ]; then
125 pushd git-sub-modules >/dev/null
126 git clone https://github.com/json-parser/json-builder.git
127 popd >/dev/null
128 sed -e 's/<json.h>/"json.h"/g' -i git-sub-modules/json-builder/json-builder.h
129 ln -fs ../../../git-sub-modules/json-builder/json-builder.c build/toybox/lib
130 ln -fs ../../../git-sub-modules/json-builder/json-builder.h build/toybox/lib
131else
132 pushd git-sub-modules/json-builder >/dev/null
133 echo "Updating json-builder."
134# git pull
135 popd >/dev/null
136fi
137
138echo ""
139echo ""
140
141if [ ! -d git-sub-modules/json-parser ]; then
142 pushd git-sub-modules >/dev/null
143 git clone https://github.com/json-parser/json-parser.git
144 popd >/dev/null
145 ln -fs ../../../git-sub-modules/json-parser/json.c build/toybox/lib
146 ln -fs ../../../git-sub-modules/json-parser/json.h build/toybox/lib
147else
148 pushd git-sub-modules/json-parser >/dev/null
149 echo "Updating json-parser."
150# git pull
151 popd >/dev/null
152fi
153
154echo ""
155echo ""
156
158pushd build/toybox >/dev/null 157pushd build/toybox >/dev/null
159export CFLAGS="-I../luajit/src -I../fcgi2 -I../fcgi2/include -I../qlibc/include/qlibc $(mysql_config --cflags) -g3" 158export CFLAGS="-I../luajit/src -I../fcgi2 -I../fcgi2/include -I../qlibc/include/qlibc $(mysql_config --cflags) -g3"
160export LDFLAGS="-L../luajit/src -L../fcgi2/libfcgi/.libs -L../qlibc/lib $(mysql_config --libs) -Wl,-E -l:libluajit.a -l:libqlibcext.a -l:libfcgi.a -l:libqlibc.a -lcrypto -luuid -lpthread -ldl" 159export LDFLAGS="-L../luajit/src -L../fcgi2/libfcgi/.libs -L../qlibc/lib $(mysql_config --libs) -Wl,-E -l:libluajit.a -l:libqlibcext.a -l:libfcgi.a -l:libqlibc.a -lcrypto -luuid -lpthread -ldl"