From b6bf06c4cd7d6e9b9ec50992c92aa5d2e0062d9c Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 20 Apr 2014 10:21:59 +1000 Subject: Clean up all the build and test scripts to be similar, and not have the EFL directory hard coded. --- ClientHamr/GuiLua/build.sh | 1 - ClientHamr/GuiLua/test.sh | 2 +- ClientHamr/extantz/build.sh | 26 ++++++++++++---- ClientHamr/extantz/test.sh | 4 ++- LuaSL/build.sh | 73 +++++++++++++-------------------------------- test.sh | 7 ++++- 6 files changed, 52 insertions(+), 61 deletions(-) diff --git a/ClientHamr/GuiLua/build.sh b/ClientHamr/GuiLua/build.sh index 076c106..c405bb2 100755 --- a/ClientHamr/GuiLua/build.sh +++ b/ClientHamr/GuiLua/build.sh @@ -4,7 +4,6 @@ export LOCALDIR=`pwd` # No need for a make file, or dependencies, the entire thing takes only a few seconds to build. - CFLAGS="-g -Wall -I include -I $LOCALDIR" CFLAGS="$CFLAGS -I ../../libraries" CFLAGS="$CFLAGS $(pkg-config --cflags luajit)" diff --git a/ClientHamr/GuiLua/test.sh b/ClientHamr/GuiLua/test.sh index 4f72c52..c1b0afb 100755 --- a/ClientHamr/GuiLua/test.sh +++ b/ClientHamr/GuiLua/test.sh @@ -1,3 +1,3 @@ -#!/bin/bash +#! /bin/bash export LD_LIBRARY_PATH="."; ./skang -l test -foo "argy bargy" diff --git a/ClientHamr/extantz/build.sh b/ClientHamr/extantz/build.sh index 17344b1..d3ad3b0 100755 --- a/ClientHamr/extantz/build.sh +++ b/ClientHamr/extantz/build.sh @@ -1,4 +1,20 @@ -export PKG_CONFIG_PATH="/opt/e17/lib/pkgconfig" +#! /bin/bash + +export LOCALDIR=`pwd` + +# No need for a make file, or dependencies, the entire thing takes only a few seconds to build. + +CFLAGS="-g -Wall -I include -I $LOCALDIR" +CFLAGS="$CFLAGS -I ../../libraries -I../../libraries/irrlicht-1.8.1/include -I/usr/X11R6/include" +CFLAGS="$CFLAGS $(pkg-config --cflags luajit)" +CFLAGS="$CFLAGS $(pkg-config --cflags elementary)" +CFLAGS="$CFLAGS $(pkg-config --cflags ephysics)" +CFLAGS="$CFLAGS -DPACKAGE_BIN_DIR=\"$LOCALDIR\"" +CFLAGS="$CFLAGS -DPACKAGE_LIB_DIR=\"$LOCALDIR\"" +CFLAGS="$CFLAGS -DPACKAGE_DATA_DIR=\"$LOCALDIR\" $CFLAGOPTS" + +LDFLAGS="-L $LOCALDIR $(pkg-config --libs-only-L luajit) -L lib -L /usr/lib -L /lib -L../../libraries/irrlicht-1.8.1/lib/Linux " +libs="$(pkg-config --cflags --libs elementary) $(pkg-config --libs luajit) -lpthread -lm -ldl -lIrrlicht -lGL -lbz2" echo "clean" rm -f extantz crappisspuke.o CDemo.o extantzCamera.o extantz.edj @@ -6,8 +22,8 @@ echo "edje" edje_cc -id images extantz.edc extantz.edj echo "Irrlicht" #g++ -O3 -ffast-math crappisspuke.cpp -o crappisspuke -I../../libraries/irrlicht-1.8/include -I/usr/X11R6/include -L../../libraries/irrlicht-1.8/lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor && ./crappisspuke -g++ -O3 -ffast-math -c crappisspuke.cpp -o crappisspuke.o -I../../libraries/irrlicht-1.8.1/include -I/usr/X11R6/include $(pkg-config --cflags elementary) -g++ -O3 -ffast-math -c CDemo.cpp -o CDemo.o -I../../libraries/irrlicht-1.8.1/include -I/usr/X11R6/include $(pkg-config --cflags elementary) +g++ $CFLAGS -O3 -ffast-math -c crappisspuke.cpp -o crappisspuke.o $LDFLAGS +g++ $CFLAGS -O3 -ffast-math -c CDemo.cpp -o CDemo.o $LDFLAGS echo "extantz" -g++ -O3 -ffast-math -c extantzCamera.cpp -o extantzCamera.o -I../../libraries/irrlicht-1.8.1/include -I/usr/X11R6/include $(pkg-config --cflags elementary) -gcc -g -DPACKAGE_BIN_DIR="\"$(pwd)\"" -DPACKAGE_DATA_DIR="\"$(pwd)\"" extantz.c crappisspuke.o CDemo.o extantzCamera.o -o extantz $(pkg-config --cflags --libs eo) $(pkg-config --cflags --libs ecore-x) $(pkg-config --cflags --libs elementary) $(pkg-config --cflags --libs ephysics) -L../../libraries/irrlicht-1.8.1/lib/Linux -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor -lpng -ljpeg -lbz2 && strip extantz +g++ $CFLAGS -O3 -ffast-math -c extantzCamera.cpp -o extantzCamera.o $LDFLAGS +gcc $CFLAGS extantz.c crappisspuke.o CDemo.o extantzCamera.o -o extantz $LDFLAGS $libs && strip extantz diff --git a/ClientHamr/extantz/test.sh b/ClientHamr/extantz/test.sh index 01c2abe..f2a17fa 100755 --- a/ClientHamr/extantz/test.sh +++ b/ClientHamr/extantz/test.sh @@ -1 +1,3 @@ -./build.sh && ./extantz +#! /bin/bash + +./extantz 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 @@ #! /bin/bash - export LOCALDIR=`pwd` -cd src -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 - - -# This assumes you have EFL installed in one of two standard places. -if [ -d "/opt/e17" ] -then - export E17DIR="/opt/e17" -else - export E17DIR="/usr" -fi - # No need for a make file, or dependencies, the entire thing takes only a few seconds to build. -CFLAGS="-g -Wall -Wunreachable-code -I include -I $LOCALDIR/src" +CFLAGS="-g -Wall -Wunreachable-code -I include -I $LOCALDIR" CFLAGS="$CFLAGS -I ../../libraries" -#CFLAGS="$CFLAGS -I ../../libraries/LuaJIT-2.0.2/src" CFLAGS="$CFLAGS $(pkg-config --cflags luajit)" -#CFLAGS="$CFLAGS -I /usr/include/lua5.1" -CFLAGS="$CFLAGS -I $E17DIR/include/eo-1" -CFLAGS="$CFLAGS -I $E17DIR/include/eina-1" -CFLAGS="$CFLAGS -I $E17DIR/include/eina-1/eina" -CFLAGS="$CFLAGS -I $E17DIR/include/eet-1" -CFLAGS="$CFLAGS -I $E17DIR/include/embryo-1" -CFLAGS="$CFLAGS -I $E17DIR/include/edje-1" -CFLAGS="$CFLAGS -I $E17DIR/include/evas-1" -CFLAGS="$CFLAGS -I $E17DIR/include/ecore-1" -CFLAGS="$CFLAGS -I $E17DIR/include/efl-1" -CFLAGS="$CFLAGS -I $E17DIR/include/ecore-con-1" -CFLAGS="$CFLAGS -I $E17DIR/include/ecore-evas-1" -CFLAGS="$CFLAGS -I $E17DIR/include/ecore-file-1" -CFLAGS="$CFLAGS -I $E17DIR/include" +CFLAGS="$CFLAGS $(pkg-config --cflags eo)" +CFLAGS="$CFLAGS $(pkg-config --cflags eet)" +CFLAGS="$CFLAGS $(pkg-config --cflags ecore-con)" +CFLAGS="$CFLAGS $(pkg-config --cflags ecore-evas)" +CFLAGS="$CFLAGS $(pkg-config --cflags ecore-file)" +CFLAGS="$CFLAGS $(pkg-config --cflags edje)" +CFLAGS="$CFLAGS -DPACKAGE_BIN_DIR=\"$LOCALDIR\"" +CFLAGS="$CFLAGS -DPACKAGE_LIB_DIR=\"$LOCALDIR\"" CFLAGS="$CFLAGS -DPACKAGE_DATA_DIR=\"$LOCALDIR\" $CFLAGOPTS" -#LDFLAGS="-L ../../libraries/LuaJIT-2.0.2/src -L lib -L /usr/lib -L /lib -L $E17DIR/lib" -#libs="-leo -lecore -levas -ledje -lembryo -leet -leina -lluajit -lpthread -lm" -LDFLAGS="$(pkg-config --libs-only-L luajit) -L lib -L /usr/lib -L /lib -L $E17DIR/lib" -libs="-leo -lecore -levas -ledje -lembryo -leet -leina $(pkg-config --libs-only-L luajit) -lpthread -lm" -#LDFLAGS="-L /usr/lib/lua/5.1 -L lib -L /usr/lib -L /lib -L $E17DIR/lib" -#libs="-lecore -levas -ledje -lembryo -leet -leina -llua5.1 -lpthread -lm" -# These need to be added to libs if linking staticaly, though some parts of EFL don't like that. -#-lecore_evas \ -#-lecore_file \ -#-ldl \ -#-lfontconfig \ -#-lfreetype \ -#-lexpat \ -#-lrt \ -#-lz +LDFLAGS="$(pkg-config --libs-only-L luajit) -L lib -L /usr/lib -L /lib" +libs="$(pkg-config --libs edje) $libs $(pkg-config --libs luajit)" LFLAGS="-d" EDJE_FLAGS="-id images -fd fonts" # Dunno why I needed this, not gonna work with a packaged LuaJIT anyway. #LD_RUN_PATH="../../libraries/LuaJIT-2.0.2/src:" +cd src +echo "clean" +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 # Run lemon first, flex depends on it to define the symbol values. command="../../libraries/lemon/lemon -s -T../../libraries/lemon/lempar.c LuaSL_lemon_yaccer.y" -echo $command +echo "lemon" $command command="flex -C --outfile=LuaSL_lexer.c --header-file=LuaSL_lexer.h LuaSL_lexer.l" -echo $command +echo "flex" $command command="edje_cc $EDJE_FLAGS LuaSL.edc ../LuaSL.edj" -echo $command +echo "edje_cc" $command names="LuaSL_main LuaSL_compile LuaSL_threads LuaSL_utilities LuaSL_lexer LuaSL_lemon_yaccer" @@ -77,12 +47,12 @@ objects="" for i in $names do command="gcc $CFLAGS -c -o $i.o $i.c" - echo $command + echo $i $command objects="$objects $i.o" done command="gcc $CFLAGS -o ../LuaSL $objects $LDFLAGS $libs" -echo $command +echo "LuaSL" $command names="LuaSL_test LuaSL_utilities" @@ -90,11 +60,10 @@ objects="" for i in $names do command="gcc $CFLAGS -c -o $i.o $i.c" - echo $command + echo $i $command objects="$objects $i.o" done command="gcc $CFLAGS -o ../LuaSL_test $objects $LDFLAGS $libs" -echo $command +echo "LuaSL_test" $command - diff --git a/test.sh b/test.sh index ecafc69..1b77b42 100755 --- a/test.sh +++ b/test.sh @@ -8,7 +8,12 @@ wd=$(pwd) echo "_______________ TESTING extantz _______________" cd $wd/ClientHamr/extantz -./extantz & +./test.sh & +sleep 1 + +echo "_______________ TESTING GuiLua _______________" +cd $wd/ClientHamr/GuiLua +./test.sh & sleep 1 echo "_______________ TESTING LuaSL _______________" -- cgit v1.1