diff options
Diffstat (limited to 'src/BuildIt.sh')
-rwxr-xr-x | src/BuildIt.sh | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/BuildIt.sh b/src/BuildIt.sh index 53a57e9..81ad06e 100755 --- a/src/BuildIt.sh +++ b/src/BuildIt.sh | |||
@@ -2,7 +2,6 @@ | |||
2 | 2 | ||
3 | mkdir -p build | 3 | mkdir -p build |
4 | 4 | ||
5 | |||
6 | # Poor mans git sub modules / subtrees, coz otherwise it gets complex. | 5 | # Poor mans git sub modules / subtrees, coz otherwise it gets complex. |
7 | if [ ! -d git-sub-modules/fcgi2 ]; then | 6 | if [ ! -d git-sub-modules/fcgi2 ]; then |
8 | pushd git-sub-modules >/dev/null | 7 | pushd git-sub-modules >/dev/null |
@@ -11,7 +10,7 @@ if [ ! -d git-sub-modules/fcgi2 ]; then | |||
11 | else | 10 | else |
12 | pushd git-sub-modules/fcgi2 >/dev/null | 11 | pushd git-sub-modules/fcgi2 >/dev/null |
13 | echo "Updating fcgi2." | 12 | echo "Updating fcgi2." |
14 | git pull | grep "Already up-to-date." && rm -fr build/fcgi2 | 13 | # git pull | grep "Already up-to-date." && rm -fr build/fcgi2 |
15 | popd >/dev/null | 14 | popd >/dev/null |
16 | fi | 15 | fi |
17 | 16 | ||
@@ -29,7 +28,6 @@ fi | |||
29 | 28 | ||
30 | echo "" | 29 | echo "" |
31 | echo "" | 30 | echo "" |
32 | echo "" | ||
33 | 31 | ||
34 | if [ ! -d git-sub-modules/luajit ]; then | 32 | if [ ! -d git-sub-modules/luajit ]; then |
35 | pushd git-sub-modules >/dev/null | 33 | pushd git-sub-modules >/dev/null |
@@ -42,7 +40,7 @@ if [ ! -d git-sub-modules/luajit ]; then | |||
42 | else | 40 | else |
43 | pushd git-sub-modules/luajit >/dev/null | 41 | pushd git-sub-modules/luajit >/dev/null |
44 | echo "Updating LuaJIT." | 42 | echo "Updating LuaJIT." |
45 | git pull | grep "Already up-to-date." && rm -fr build/luajit | 43 | # git pull | grep "Already up-to-date." && rm -fr build/luajit |
46 | popd >/dev/null | 44 | popd >/dev/null |
47 | fi | 45 | fi |
48 | 46 | ||
@@ -58,16 +56,18 @@ fi | |||
58 | 56 | ||
59 | echo "" | 57 | echo "" |
60 | echo "" | 58 | echo "" |
61 | echo "" | ||
62 | 59 | ||
63 | if [ ! -d git-sub-modules/qlibc ]; then | 60 | if [ ! -d git-sub-modules/qlibc ]; then |
64 | pushd git-sub-modules >/dev/null | 61 | pushd git-sub-modules >/dev/null |
65 | git clone https://github.com/wolkykim/qlibc.git | 62 | git clone https://github.com/wolkykim/qlibc.git |
63 | pushd qlibc >/dev/null | ||
64 | patch -p1 <../../patches/qlibc.patch | ||
65 | popd >/dev/null | ||
66 | popd >/dev/null | 66 | popd >/dev/null |
67 | else | 67 | else |
68 | pushd git-sub-modules/qlibc >/dev/null | 68 | pushd git-sub-modules/qlibc >/dev/null |
69 | echo "Updating qlibc." | 69 | echo "Updating qlibc." |
70 | git pull | grep "Already up-to-date." && rm -fr build/qlibc | 70 | # git pull | grep "Already up-to-date." && rm -fr build/qlibc |
71 | popd >/dev/null | 71 | popd >/dev/null |
72 | fi | 72 | fi |
73 | 73 | ||
@@ -84,7 +84,6 @@ fi | |||
84 | 84 | ||
85 | echo "" | 85 | echo "" |
86 | echo "" | 86 | echo "" |
87 | echo "" | ||
88 | 87 | ||
89 | if [ ! -d git-sub-modules/toybox ]; then | 88 | if [ ! -d git-sub-modules/toybox ]; then |
90 | pushd git-sub-modules >/dev/null | 89 | pushd git-sub-modules >/dev/null |
@@ -93,7 +92,7 @@ if [ ! -d git-sub-modules/toybox ]; then | |||
93 | else | 92 | else |
94 | pushd git-sub-modules/toybox >/dev/null | 93 | pushd git-sub-modules/toybox >/dev/null |
95 | echo "Updating toybox." | 94 | echo "Updating toybox." |
96 | git pull | grep "Already up-to-date." && rm -fr build/toybox | 95 | # git pull | grep "Already up-to-date." && rm -fr build/toybox |
97 | popd >/dev/null | 96 | popd >/dev/null |
98 | fi | 97 | fi |
99 | 98 | ||
@@ -119,18 +118,18 @@ fi | |||
119 | 118 | ||
120 | echo "" | 119 | echo "" |
121 | echo "" | 120 | echo "" |
122 | echo "" | ||
123 | 121 | ||
124 | pushd build/toybox >/dev/null | 122 | pushd build/toybox >/dev/null |
125 | export CFLAGS="-I../luajit/src -I../fcgi2 -I../fcgi2/include -I../qlibc/include/qlibc $(mysql_config --cflags) -g3" | 123 | export CFLAGS="-I../luajit/src -I../fcgi2 -I../fcgi2/include -I../qlibc/include/qlibc $(mysql_config --cflags) -g3" |
126 | export 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" | 124 | export 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" |
127 | make || exit 1 | 125 | make || exit 1 |
128 | popd >/dev/null | 126 | popd >/dev/null |
127 | ln -fs ../src/build/toybox/generated/unstripped/toybox ../bin/sledjchisl | ||
129 | 128 | ||
130 | sudo rm -f /opt/opensim_SC/var/cache/sledjchisl.socket | 129 | #sudo rm -f /opt/opensim_SC/var/cache/sledjchisl.socket |
131 | #sudo rm -f /opt/opensim_SC/var/cache/sessions/* | 130 | #sudo rm -f /opt/opensim_SC/var/cache/sessions/* |
132 | #sudo rm -f /opt/opensim_SC/var/lib/users/* | 131 | #sudo rm -f /opt/opensim_SC/var/lib/users/* |
133 | sudo spawn-fcgi -n -u opensimsc -s /opt/opensim_SC/var/cache/sledjchisl.socket -M 0660 -G www-data -- /usr/bin/valgrind --leak-check=full build/toybox/generated/unstripped/toybox sledjchisl | 132 | #sudo spawn-fcgi -n -u opensimsc -s /opt/opensim_SC/var/cache/sledjchisl.socket -M 0660 -G www-data -- /usr/bin/valgrind --leak-check=full build/toybox/generated/unstripped/toybox sledjchisl |
134 | #sudo spawn-fcgi -n -u opensimsc -s /opt/opensim_SC/var/cache/sledjchisl.socket -M 0660 -G www-data -- /usr/bin/valgrind --leak-check=full build/toybox/generated/unstripped/toybox sledjchisl 2>&1 | tee log.txt | 133 | ##sudo spawn-fcgi -n -u opensimsc -s /opt/opensim_SC/var/cache/sledjchisl.socket -M 0660 -G www-data -- /usr/bin/valgrind --leak-check=full build/toybox/generated/unstripped/toybox sledjchisl 2>&1 | tee log.txt |
135 | #sudo spawn-fcgi -n -u opensimsc -s /opt/opensim_SC/var/cache/sledjchisl.socket -M 0660 -G www-data -- /usr/bin/valgrind --leak-check=full --show-leak-kinds=all build/toybox/generated/unstripped/toybox sledjchisl | 134 | ##sudo spawn-fcgi -n -u opensimsc -s /opt/opensim_SC/var/cache/sledjchisl.socket -M 0660 -G www-data -- /usr/bin/valgrind --leak-check=full --show-leak-kinds=all build/toybox/generated/unstripped/toybox sledjchisl |
136 | ##sudo spawn-fcgi -n -u opensimsc -s /opt/opensim_SC/var/cache/sledjchisl.socket -M 0660 -G www-data -- /usr/bin/ddd build/toybox/generated/unstripped/toybox sledjchisl | 135 | ###sudo spawn-fcgi -n -u opensimsc -s /opt/opensim_SC/var/cache/sledjchisl.socket -M 0660 -G www-data -- /usr/bin/ddd build/toybox/generated/unstripped/toybox sledjchisl |