aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xLuaSL/build.sh73
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
4export LOCALDIR=`pwd` 3export LOCALDIR=`pwd`
5 4
6cd src
7rm -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.
11if [ -d "/opt/e17" ]
12then
13 export E17DIR="/opt/e17"
14else
15 export E17DIR="/usr"
16fi
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
20CFLAGS="-g -Wall -Wunreachable-code -I include -I $LOCALDIR/src" 7CFLAGS="-g -Wall -Wunreachable-code -I include -I $LOCALDIR"
21CFLAGS="$CFLAGS -I ../../libraries" 8CFLAGS="$CFLAGS -I ../../libraries"
22#CFLAGS="$CFLAGS -I ../../libraries/LuaJIT-2.0.2/src"
23CFLAGS="$CFLAGS $(pkg-config --cflags luajit)" 9CFLAGS="$CFLAGS $(pkg-config --cflags luajit)"
24#CFLAGS="$CFLAGS -I /usr/include/lua5.1" 10CFLAGS="$CFLAGS $(pkg-config --cflags eo)"
25CFLAGS="$CFLAGS -I $E17DIR/include/eo-1" 11CFLAGS="$CFLAGS $(pkg-config --cflags eet)"
26CFLAGS="$CFLAGS -I $E17DIR/include/eina-1" 12CFLAGS="$CFLAGS $(pkg-config --cflags ecore-con)"
27CFLAGS="$CFLAGS -I $E17DIR/include/eina-1/eina" 13CFLAGS="$CFLAGS $(pkg-config --cflags ecore-evas)"
28CFLAGS="$CFLAGS -I $E17DIR/include/eet-1" 14CFLAGS="$CFLAGS $(pkg-config --cflags ecore-file)"
29CFLAGS="$CFLAGS -I $E17DIR/include/embryo-1" 15CFLAGS="$CFLAGS $(pkg-config --cflags edje)"
30CFLAGS="$CFLAGS -I $E17DIR/include/edje-1" 16CFLAGS="$CFLAGS -DPACKAGE_BIN_DIR=\"$LOCALDIR\""
31CFLAGS="$CFLAGS -I $E17DIR/include/evas-1" 17CFLAGS="$CFLAGS -DPACKAGE_LIB_DIR=\"$LOCALDIR\""
32CFLAGS="$CFLAGS -I $E17DIR/include/ecore-1"
33CFLAGS="$CFLAGS -I $E17DIR/include/efl-1"
34CFLAGS="$CFLAGS -I $E17DIR/include/ecore-con-1"
35CFLAGS="$CFLAGS -I $E17DIR/include/ecore-evas-1"
36CFLAGS="$CFLAGS -I $E17DIR/include/ecore-file-1"
37CFLAGS="$CFLAGS -I $E17DIR/include"
38CFLAGS="$CFLAGS -DPACKAGE_DATA_DIR=\"$LOCALDIR\" $CFLAGOPTS" 18CFLAGS="$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" 20LDFLAGS="$(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" 21libs="$(pkg-config --libs edje) $libs $(pkg-config --libs luajit)"
42LDFLAGS="$(pkg-config --libs-only-L luajit) -L lib -L /usr/lib -L /lib -L $E17DIR/lib"
43libs="-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
56LFLAGS="-d" 23LFLAGS="-d"
57EDJE_FLAGS="-id images -fd fonts" 24EDJE_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
28cd src
29echo "clean"
30rm -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.
63command="../../libraries/lemon/lemon -s -T../../libraries/lemon/lempar.c LuaSL_lemon_yaccer.y" 33command="../../libraries/lemon/lemon -s -T../../libraries/lemon/lempar.c LuaSL_lemon_yaccer.y"
64echo $command 34echo "lemon"
65$command 35$command
66 36
67command="flex -C --outfile=LuaSL_lexer.c --header-file=LuaSL_lexer.h LuaSL_lexer.l" 37command="flex -C --outfile=LuaSL_lexer.c --header-file=LuaSL_lexer.h LuaSL_lexer.l"
68echo $command 38echo "flex"
69$command 39$command
70 40
71command="edje_cc $EDJE_FLAGS LuaSL.edc ../LuaSL.edj" 41command="edje_cc $EDJE_FLAGS LuaSL.edc ../LuaSL.edj"
72echo $command 42echo "edje_cc"
73$command 43$command
74 44
75names="LuaSL_main LuaSL_compile LuaSL_threads LuaSL_utilities LuaSL_lexer LuaSL_lemon_yaccer" 45names="LuaSL_main LuaSL_compile LuaSL_threads LuaSL_utilities LuaSL_lexer LuaSL_lemon_yaccer"
@@ -77,12 +47,12 @@ objects=""
77for i in $names 47for i in $names
78do 48do
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"
83done 53done
84command="gcc $CFLAGS -o ../LuaSL $objects $LDFLAGS $libs" 54command="gcc $CFLAGS -o ../LuaSL $objects $LDFLAGS $libs"
85echo $command 55echo "LuaSL"
86$command 56$command
87 57
88names="LuaSL_test LuaSL_utilities" 58names="LuaSL_test LuaSL_utilities"
@@ -90,11 +60,10 @@ objects=""
90for i in $names 60for i in $names
91do 61do
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"
96done 66done
97command="gcc $CFLAGS -o ../LuaSL_test $objects $LDFLAGS $libs" 67command="gcc $CFLAGS -o ../LuaSL_test $objects $LDFLAGS $libs"
98echo $command 68echo "LuaSL_test"
99$command 69$command
100