diff options
Diffstat (limited to '')
-rwxr-xr-x | LuaSL/build.sh | 73 |
1 files changed, 21 insertions, 52 deletions
diff --git a/LuaSL/build.sh b/LuaSL/build.sh index 4605cb0..8d776d6 100755 --- a/LuaSL/build.sh +++ b/LuaSL/build.sh | |||
@@ -1,75 +1,45 @@ | |||
1 | #! /bin/bash | 1 | #! /bin/bash |
2 | 2 | ||
3 | |||
4 | export LOCALDIR=`pwd` | 3 | export LOCALDIR=`pwd` |
5 | 4 | ||
6 | cd src | ||
7 | rm -f ../LuaSL *.o *.output *.backup ../luac.out ../*.edj LuaSL_lexer.h LuaSL_lexer.c LuaSL_lemon_yaccer.h LuaSL_lemon_yaccer.c LuaSL_lemon_yaccer.out | ||
8 | |||
9 | |||
10 | # This assumes you have EFL installed in one of two standard places. | ||
11 | if [ -d "/opt/e17" ] | ||
12 | then | ||
13 | export E17DIR="/opt/e17" | ||
14 | else | ||
15 | export E17DIR="/usr" | ||
16 | fi | ||
17 | |||
18 | # No need for a make file, or dependencies, the entire thing takes only a few seconds to build. | 5 | # No need for a make file, or dependencies, the entire thing takes only a few seconds to build. |
19 | 6 | ||
20 | CFLAGS="-g -Wall -Wunreachable-code -I include -I $LOCALDIR/src" | 7 | CFLAGS="-g -Wall -Wunreachable-code -I include -I $LOCALDIR" |
21 | CFLAGS="$CFLAGS -I ../../libraries" | 8 | CFLAGS="$CFLAGS -I ../../libraries" |
22 | #CFLAGS="$CFLAGS -I ../../libraries/LuaJIT-2.0.2/src" | ||
23 | CFLAGS="$CFLAGS $(pkg-config --cflags luajit)" | 9 | CFLAGS="$CFLAGS $(pkg-config --cflags luajit)" |
24 | #CFLAGS="$CFLAGS -I /usr/include/lua5.1" | 10 | CFLAGS="$CFLAGS $(pkg-config --cflags eo)" |
25 | CFLAGS="$CFLAGS -I $E17DIR/include/eo-1" | 11 | CFLAGS="$CFLAGS $(pkg-config --cflags eet)" |
26 | CFLAGS="$CFLAGS -I $E17DIR/include/eina-1" | 12 | CFLAGS="$CFLAGS $(pkg-config --cflags ecore-con)" |
27 | CFLAGS="$CFLAGS -I $E17DIR/include/eina-1/eina" | 13 | CFLAGS="$CFLAGS $(pkg-config --cflags ecore-evas)" |
28 | CFLAGS="$CFLAGS -I $E17DIR/include/eet-1" | 14 | CFLAGS="$CFLAGS $(pkg-config --cflags ecore-file)" |
29 | CFLAGS="$CFLAGS -I $E17DIR/include/embryo-1" | 15 | CFLAGS="$CFLAGS $(pkg-config --cflags edje)" |
30 | CFLAGS="$CFLAGS -I $E17DIR/include/edje-1" | 16 | CFLAGS="$CFLAGS -DPACKAGE_BIN_DIR=\"$LOCALDIR\"" |
31 | CFLAGS="$CFLAGS -I $E17DIR/include/evas-1" | 17 | CFLAGS="$CFLAGS -DPACKAGE_LIB_DIR=\"$LOCALDIR\"" |
32 | CFLAGS="$CFLAGS -I $E17DIR/include/ecore-1" | ||
33 | CFLAGS="$CFLAGS -I $E17DIR/include/efl-1" | ||
34 | CFLAGS="$CFLAGS -I $E17DIR/include/ecore-con-1" | ||
35 | CFLAGS="$CFLAGS -I $E17DIR/include/ecore-evas-1" | ||
36 | CFLAGS="$CFLAGS -I $E17DIR/include/ecore-file-1" | ||
37 | CFLAGS="$CFLAGS -I $E17DIR/include" | ||
38 | CFLAGS="$CFLAGS -DPACKAGE_DATA_DIR=\"$LOCALDIR\" $CFLAGOPTS" | 18 | CFLAGS="$CFLAGS -DPACKAGE_DATA_DIR=\"$LOCALDIR\" $CFLAGOPTS" |
39 | 19 | ||
40 | #LDFLAGS="-L ../../libraries/LuaJIT-2.0.2/src -L lib -L /usr/lib -L /lib -L $E17DIR/lib" | 20 | LDFLAGS="$(pkg-config --libs-only-L luajit) -L lib -L /usr/lib -L /lib" |
41 | #libs="-leo -lecore -levas -ledje -lembryo -leet -leina -lluajit -lpthread -lm" | 21 | libs="$(pkg-config --libs edje) $libs $(pkg-config --libs luajit)" |
42 | LDFLAGS="$(pkg-config --libs-only-L luajit) -L lib -L /usr/lib -L /lib -L $E17DIR/lib" | ||
43 | libs="-leo -lecore -levas -ledje -lembryo -leet -leina $(pkg-config --libs-only-L luajit) -lpthread -lm" | ||
44 | #LDFLAGS="-L /usr/lib/lua/5.1 -L lib -L /usr/lib -L /lib -L $E17DIR/lib" | ||
45 | #libs="-lecore -levas -ledje -lembryo -leet -leina -llua5.1 -lpthread -lm" | ||
46 | # These need to be added to libs if linking staticaly, though some parts of EFL don't like that. | ||
47 | #-lecore_evas \ | ||
48 | #-lecore_file \ | ||
49 | #-ldl \ | ||
50 | #-lfontconfig \ | ||
51 | #-lfreetype \ | ||
52 | #-lexpat \ | ||
53 | #-lrt \ | ||
54 | #-lz | ||
55 | 22 | ||
56 | LFLAGS="-d" | 23 | LFLAGS="-d" |
57 | EDJE_FLAGS="-id images -fd fonts" | 24 | EDJE_FLAGS="-id images -fd fonts" |
58 | # Dunno why I needed this, not gonna work with a packaged LuaJIT anyway. | 25 | # Dunno why I needed this, not gonna work with a packaged LuaJIT anyway. |
59 | #LD_RUN_PATH="../../libraries/LuaJIT-2.0.2/src:" | 26 | #LD_RUN_PATH="../../libraries/LuaJIT-2.0.2/src:" |
60 | 27 | ||
28 | cd src | ||
29 | echo "clean" | ||
30 | rm -f ../LuaSL *.o *.output *.backup ../luac.out ../*.edj LuaSL_lexer.h LuaSL_lexer.c LuaSL_lemon_yaccer.h LuaSL_lemon_yaccer.c LuaSL_lemon_yaccer.out | ||
61 | 31 | ||
62 | # Run lemon first, flex depends on it to define the symbol values. | 32 | # Run lemon first, flex depends on it to define the symbol values. |
63 | command="../../libraries/lemon/lemon -s -T../../libraries/lemon/lempar.c LuaSL_lemon_yaccer.y" | 33 | command="../../libraries/lemon/lemon -s -T../../libraries/lemon/lempar.c LuaSL_lemon_yaccer.y" |
64 | echo $command | 34 | echo "lemon" |
65 | $command | 35 | $command |
66 | 36 | ||
67 | command="flex -C --outfile=LuaSL_lexer.c --header-file=LuaSL_lexer.h LuaSL_lexer.l" | 37 | command="flex -C --outfile=LuaSL_lexer.c --header-file=LuaSL_lexer.h LuaSL_lexer.l" |
68 | echo $command | 38 | echo "flex" |
69 | $command | 39 | $command |
70 | 40 | ||
71 | command="edje_cc $EDJE_FLAGS LuaSL.edc ../LuaSL.edj" | 41 | command="edje_cc $EDJE_FLAGS LuaSL.edc ../LuaSL.edj" |
72 | echo $command | 42 | echo "edje_cc" |
73 | $command | 43 | $command |
74 | 44 | ||
75 | names="LuaSL_main LuaSL_compile LuaSL_threads LuaSL_utilities LuaSL_lexer LuaSL_lemon_yaccer" | 45 | names="LuaSL_main LuaSL_compile LuaSL_threads LuaSL_utilities LuaSL_lexer LuaSL_lemon_yaccer" |
@@ -77,12 +47,12 @@ objects="" | |||
77 | for i in $names | 47 | for i in $names |
78 | do | 48 | do |
79 | command="gcc $CFLAGS -c -o $i.o $i.c" | 49 | command="gcc $CFLAGS -c -o $i.o $i.c" |
80 | echo $command | 50 | echo $i |
81 | $command | 51 | $command |
82 | objects="$objects $i.o" | 52 | objects="$objects $i.o" |
83 | done | 53 | done |
84 | command="gcc $CFLAGS -o ../LuaSL $objects $LDFLAGS $libs" | 54 | command="gcc $CFLAGS -o ../LuaSL $objects $LDFLAGS $libs" |
85 | echo $command | 55 | echo "LuaSL" |
86 | $command | 56 | $command |
87 | 57 | ||
88 | names="LuaSL_test LuaSL_utilities" | 58 | names="LuaSL_test LuaSL_utilities" |
@@ -90,11 +60,10 @@ objects="" | |||
90 | for i in $names | 60 | for i in $names |
91 | do | 61 | do |
92 | command="gcc $CFLAGS -c -o $i.o $i.c" | 62 | command="gcc $CFLAGS -c -o $i.o $i.c" |
93 | echo $command | 63 | echo $i |
94 | $command | 64 | $command |
95 | objects="$objects $i.o" | 65 | objects="$objects $i.o" |
96 | done | 66 | done |
97 | command="gcc $CFLAGS -o ../LuaSL_test $objects $LDFLAGS $libs" | 67 | command="gcc $CFLAGS -o ../LuaSL_test $objects $LDFLAGS $libs" |
98 | echo $command | 68 | echo "LuaSL_test" |
99 | $command | 69 | $command |
100 | |||