From 9370fb8cac991514d7da8e4f56e92e7a83a990cc Mon Sep 17 00:00:00 2001 From: destroyedlolo Date: Thu, 3 Jan 2019 12:58:47 +0100 Subject: [PATCH] Improve remake_* and add OLED support --- remake_Curse.sh | 16 ++++++++++--- remake_Curse_153.sh | 25 +++++++++++++++----- remake_NoPlug.sh | 27 +++++++++++++++++++-- remake_NoPlug_l53.sh | 28 +++++++++++++++++++--- remake_OLED.sh | 56 ++++++++++++++++++++++++++++++++++++++++++++ remake_OLED_153.sh | 55 +++++++++++++++++++++++++++++++++++++++++++ remake_Plugs.sh | 1 + remake_Plugs_153.sh | 31 +++++++++++++++++------- 8 files changed, 217 insertions(+), 22 deletions(-) create mode 100755 remake_OLED.sh create mode 100755 remake_OLED_153.sh diff --git a/remake_Curse.sh b/remake_Curse.sh index 9c8c92c6..a6362cc9 100755 --- a/remake_Curse.sh +++ b/remake_Curse.sh @@ -28,7 +28,13 @@ echo "Selene Library" echo "--------------" LFMakeMaker -v +f=Makefile --opts="\`pkg-config --cflags lua\` -Wall -fPIC" *.c -so=../../libSelene.so > Makefile -cd ../SelPlugins/Curses/ +cd ../SelPlugins/OLED/ +echo +echo "OLED plugin" +echo "-----------" +LFMakeMaker -v +f=Makefile -cc="gcc -Wall \`pkg-config --cflags lua\` -fPIC -std=c99 " *.c -so=../../../SelOLED.so > Makefile + +cd ../Curses/ echo echo "Curses plugin" echo "-------------" @@ -45,8 +51,12 @@ cd ../.. echo echo "Main source" echo "-----------" -LFMakeMaker -v +f=Makefile --opts=" -Wall \`pkg-config --cflags lua\` \`pkg-config --libs lua\` -DUSE_CURSES `$NCURSES --cflags` `$NCURSES --libs` -DPLUGIN_DIR='\"$PLUGIN_DIR\"' -L../ -L$PLUGIN_DIR -lSelene -DxDEBUG -lpaho-mqtt3c -llua -lm -ldl -Wl,--export-dynamic -lpthread" *.c -t=../Selene > Makefile - +LFMakeMaker -v +f=Makefile --opts="-isystem -Wall -DxDEBUG \ + -I$LUA_DIR/include -L$LUA_DIR/lib \ + -DUSE_CURSES `$NCURSES --cflags` `$NCURSES --libs` \ + -DPLUGIN_DIR='\"$PLUGIN_DIR\"' -L$PLUGIN_DIR -lSelene \ + -lpaho-mqtt3c -llua -lm -ldl -Wl,--export-dynamic -lpthread" \ + *.c -t=../Selene > Makefile echo echo "Don't forget if you wan to run it without installing first" diff --git a/remake_Curse_153.sh b/remake_Curse_153.sh index 91b81367..284f0f8a 100755 --- a/remake_Curse_153.sh +++ b/remake_Curse_153.sh @@ -24,18 +24,19 @@ LUA_DIR=/home/laurent/Projets/lua-5.3.4/install cd src -echo -echo "Main source" -echo "-----------" -LFMakeMaker -v +f=Makefile --opts="-isystem $LUA_DIR/include -L$LUA_DIR/lib -Wall -DUSE_CURSES `$NCURSES --cflags` `$NCURSES --libs` -DPLUGIN_DIR='\"$PLUGIN_DIR\"' -L$PLUGIN_DIR -lSelene -DxDEBUG -lpaho-mqtt3c -llua -lm -ldl -Wl,--export-dynamic -lpthread" *.c -t=../Selene > Makefile - cd SeleneLibrary echo echo "Selene Library" echo "--------------" LFMakeMaker -v +f=Makefile --opts="-isystem $LUA_DIR/include -Wall -fPIC" *.c -so=../../libSelene.so > Makefile -cd ../SelPlugins/Curses/ +cd ../SelPlugins/OLED/ +echo +echo "OLED plugin" +echo "-----------" +LFMakeMaker -v +f=Makefile -cc="gcc -Wall \`pkg-config --cflags lua\` -fPIC -std=c99 " *.c -so=../../../SelOLED.so > Makefile + +cd ../Curses/ echo echo "Curses plugin" echo "-------------" @@ -50,6 +51,18 @@ echo "DirectFB source" echo "-----------" LFMakeMaker -v +f=Makefile -cc='gcc -Wall -fPIC' *.c -so=../../../SelDirectFB.so > Makefile +cd ../.. +echo +echo "Main source" +echo "-----------" +LFMakeMaker -v +f=Makefile --opts="-isystem -Wall -DxDEBUG \ + -I$LUA_DIR/include -L$LUA_DIR/lib \ + -DUSE_CURSES `$NCURSES --cflags` `$NCURSES --libs` \ + -DPLUGIN_DIR='\"$PLUGIN_DIR\"' -L$PLUGIN_DIR -lSelene \ + -lpaho-mqtt3c -llua -lm -ldl -Wl,--export-dynamic -lpthread" \ + *.c -t=../Selene > Makefile + + echo echo echo "Don't forget" diff --git a/remake_NoPlug.sh b/remake_NoPlug.sh index 69894060..f7efc306 100755 --- a/remake_NoPlug.sh +++ b/remake_NoPlug.sh @@ -16,10 +16,33 @@ echo "Selene Library" echo "--------------" LFMakeMaker -v +f=Makefile --opts='-Wall -fPIC' *.c -so=../../libSelene.so > Makefile -cd .. +cd ../SelPlugins/OLED/ +echo +echo "OLED plugin" +echo "-----------" +LFMakeMaker -v +f=Makefile -cc="gcc -Wall \`pkg-config --cflags lua\` -fPIC -std=c99 " *.c -so=../../../SelOLED.so > Makefile + +cd ../Curses/ +echo +echo "Curses plugin" +echo "-------------" +LFMakeMaker -v +f=Makefile -cc="gcc -Wall \`pkg-config --cflags lua\` -fPIC -std=c99 " *.c -so=../../../SelCurses.so > Makefile + +cd ../DirectFB +echo +echo "DirectFB source" +echo "-----------" +echo +LFMakeMaker -v +f=Makefile -cc="gcc -Wall \`pkg-config --cflags lua\` -fPIC -std=c99 " *.c -so=../../../SelDirectFB.so > Makefile + +cd ../.. echo echo "Main source" echo "-----------" -LFMakeMaker -v +f=Makefile --opts="-Wall -DUSE_CURSES -DPLUGIN_DIR=$PLUGIN_DIR -L$PLUGIN_DIR -lSelene -DxDEBUG \`pkg-config --cflags lua\` \`pkg-config --libs lua\` -lpaho-mqtt3c -ldl -Wl,--export-dynamic -lpthread" *.c -t=../Selene > Makefile +LFMakeMaker -v +f=Makefile --opts="-isystem -Wall -DxDEBUG \ + -I$LUA_DIR/include -L$LUA_DIR/lib \ + -DPLUGIN_DIR='\"$PLUGIN_DIR\"' -L$PLUGIN_DIR -lSelene \ + -lpaho-mqtt3c -llua -lm -ldl -Wl,--export-dynamic -lpthread" \ + *.c -t=../Selene > Makefile diff --git a/remake_NoPlug_l53.sh b/remake_NoPlug_l53.sh index e80730ef..635330e7 100755 --- a/remake_NoPlug_l53.sh +++ b/remake_NoPlug_l53.sh @@ -17,15 +17,37 @@ echo "Selene Library" echo "--------------" LFMakeMaker -v +f=Makefile --opts="-isystem $LUA_DIR/include -Wall -fPIC" *.c -so=../../libSelene.so > Makefile -cd .. +cd ../SelPlugins/OLED/ +echo +echo "OLED plugin" +echo "-----------" +LFMakeMaker -v +f=Makefile -cc="gcc -Wall \`pkg-config --cflags lua\` -fPIC -std=c99 " *.c -so=../../../SelOLED.so > Makefile + +cd ../Curses/ +echo +echo "Curses plugin" +echo "-------------" +LFMakeMaker -v +f=Makefile -cc='gcc -Wall -fPIC -std=c99 ' *.c -so=../../../SelCurses.so > Makefile + +cd ../DirectFB +echo +echo "DirectFB source" +echo "-----------" +echo +LFMakeMaker -v +f=Makefile -cc='gcc -Wall -fPIC -std=c99 ' *.c -so=../../../SelDirectFB.so > Makefile +cd ../.. echo echo "Main source" echo "-----------" -LFMakeMaker -v +f=Makefile --opts="-isystem $LUA_DIR/include -L$LUA_DIR/lib -Wall -DUSE_CURSES -DPLUGIN_DIR=$PLUGIN_DIR -L$PLUGIN_DIR -lSelene -DxDEBUG -lpaho-mqtt3c -llua -lm -ldl -Wl,--export-dynamic -lpthread" *.c -t=../Selene > Makefile +LFMakeMaker -v +f=Makefile --opts="-isystem -Wall -DxDEBUG \ + -I$LUA_DIR/include -L$LUA_DIR/lib \ + -DPLUGIN_DIR='\"$PLUGIN_DIR\"' -L$PLUGIN_DIR -lSelene \ + -lpaho-mqtt3c -llua -lm -ldl -Wl,--export-dynamic -lpthread" \ + *.c -t=../Selene > Makefile echo echo -echo "Don't forget" +echo "Don't forget if you wan to run it without installing first" echo export LD_LIBRARY_PATH=$PLUGIN_DIR:$LD_LIBRARY_PATH diff --git a/remake_OLED.sh b/remake_OLED.sh new file mode 100755 index 00000000..841f7b2b --- /dev/null +++ b/remake_OLED.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +# this version compile against OS' Lua +# Only OLED plugin is compiled + +# USE_DIRECTFB - Build directFB plugin +# USE_CURSES - Build Curses plugin +# USE_OLED - Build OLED screen plugin +# DEBUG - Add debuging messages + +#PLUGIN_DIR=/usr/local/lib/Selene +PLUGIN_DIR=$( pwd ) + +cd src + +cd SeleneLibrary +echo +echo "Selene Library" +echo "--------------" +LFMakeMaker -v +f=Makefile --opts="\`pkg-config --cflags lua\` -Wall -fPIC" *.c -so=../../libSelene.so > Makefile + +cd ../SelPlugins/OLED/ +echo +echo "OLED plugin" +echo "-----------" +LFMakeMaker -v +f=Makefile -cc="gcc -Wall \`pkg-config --cflags lua\` -DUSE_OLED -fPIC -std=c99 " *.c -so=../../../SelOLED.so > Makefile + +cd ../Curses/ +echo +echo "Curses plugin" +echo "-------------" +LFMakeMaker -v +f=Makefile -cc="gcc -Wall \`pkg-config --cflags lua\` -fPIC -std=c99 " *.c -so=../../../SelCurses.so > Makefile + +cd ../DirectFB +echo +echo "DirectFB source" +echo "-----------" +echo +LFMakeMaker -v +f=Makefile -cc="gcc -Wall -fPIC -std=c99 " *.c -so=../../../SelDirectFB.so > Makefile + +cd ../.. +echo +echo "Main source" +echo "-----------" +LFMakeMaker -v +f=Makefile --opts=" -Wall -DxDEBUG \ + \`pkg-config --cflags lua\` \`pkg-config --libs lua\` \ + -DUSE_OLED -lArduiPi_OLED \ + -DPLUGIN_DIR='\"$PLUGIN_DIR\"' -L../ -L$PLUGIN_DIR -lSelene \ + -lpaho-mqtt3c -llua -lm -ldl -Wl,--export-dynamic -lpthread" \ + *.c -t=../Selene > Makefile + + +echo +echo "Don't forget if you wan to run it without installing first" +echo export LD_LIBRARY_PATH=$PLUGIN_DIR:$LD_LIBRARY_PATH + diff --git a/remake_OLED_153.sh b/remake_OLED_153.sh new file mode 100755 index 00000000..c9b7bc2c --- /dev/null +++ b/remake_OLED_153.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +# this version compile against Lua 5.3.4 + +# USE_OLED - Build OLED screen plugin +# DEBUG - Add debuging messages + +# PLUGIN_DIR=/usr/local/lib/Selene +PLUGIN_DIR=$( pwd ) + +LUA_DIR=/home/laurent/Projets/lua-5.3.4/install + +cd src + +cd SeleneLibrary +echo +echo "Selene Library" +echo "--------------" +LFMakeMaker -v +f=Makefile --opts="-isystem $LUA_DIR/include -Wall -fPIC" *.c -so=../../libSelene.so > Makefile + +cd ../SelPlugins/OLED/ +echo +echo "OLED plugin" +echo "-----------" +LFMakeMaker -v +f=Makefile -cc="gcc -Wall \`pkg-config --cflags lua\` -DUSE_OLED -fPIC -std=c99 " *.c -so=../../../SelOLED.so > Makefile + +cd ../Curses/ +echo +echo "Curses plugin" +echo "-------------" +LFMakeMaker -v +f=Makefile -cc='gcc -Wall -fPIC -std=c99 ' *.c -so=../../../SelCurses.so > Makefile + +cd ../DirectFB +echo +echo "DirectFB source" +echo "-----------" +echo +LFMakeMaker -v +f=Makefile -cc='gcc -Wall -fPIC -std=c99 ' *.c -so=../../../SelDirectFB.so > Makefile + +cd ../.. +echo +echo "Main source" +echo "-----------" +LFMakeMaker -v +f=Makefile --opts="-isystem -Wall -DxDEBUG \ + -I$LUA_DIR/include -L$LUA_DIR/lib \ + -DUSE_OLED -lArduiPi_OLED \ + -DPLUGIN_DIR='\"$PLUGIN_DIR\"' -L$PLUGIN_DIR -lSelene \ + -lpaho-mqtt3c -llua -lm -ldl -Wl,--export-dynamic -lpthread" \ + *.c -t=../Selene > Makefile + + +echo +echo "Don't forget if you wan to run it without installing first" +echo export LD_LIBRARY_PATH=$PLUGIN_DIR:$LD_LIBRARY_PATH + diff --git a/remake_Plugs.sh b/remake_Plugs.sh index 431b9efe..d1e83635 100755 --- a/remake_Plugs.sh +++ b/remake_Plugs.sh @@ -4,6 +4,7 @@ # USE_DIRECTFB - Build directFB plugin # USE_CURSES - Build Curses plugin +# USE_OLED - Build OLED screen plugin # DEBUG - Add debuging messages if which ncursesw6-config; then diff --git a/remake_Plugs_153.sh b/remake_Plugs_153.sh index 35673170..7a6d0a2a 100755 --- a/remake_Plugs_153.sh +++ b/remake_Plugs_153.sh @@ -4,6 +4,7 @@ # USE_DIRECTFB - Build directFB plugin # USE_CURSES - Build Curses plugin +# USE_OLED - Build OLED screen plugin # DEBUG - Add debuging messages if which ncursesw6-config; then @@ -24,19 +25,19 @@ LUA_DIR=/home/laurent/Projets/lua-5.3.4/install cd src - -echo -echo "Main source" -echo "-----------" -LFMakeMaker -v +f=Makefile --opts="-isystem $LUA_DIR/include -L$LUA_DIR/lib -Wall -DUSE_CURSES `$NCURSES --cflags` `$NCURSES --libs` -DUSE_DIRECTFB `directfb-config --cflags` `directfb-config --libs` -DPLUGIN_DIR='\"$PLUGIN_DIR\"' -L$PLUGIN_DIR -lSelene -DxDEBUG -lpaho-mqtt3c -llua -lm -ldl -Wl,--export-dynamic -lpthread" *.c -t=../Selene > Makefile - cd SeleneLibrary echo echo "Selene Library" echo "--------------" LFMakeMaker -v +f=Makefile --opts="-isystem $LUA_DIR/include -Wall -fPIC" *.c -so=../../libSelene.so > Makefile -cd ../SelPlugins/Curses/ +cd ../SelPlugins/OLED/ +echo +echo "OLED plugin" +echo "-----------" +LFMakeMaker -v +f=Makefile -cc="gcc -Wall \`pkg-config --cflags lua\` -DUSE_OLED -fPIC -std=c99 " *.c -so=../../../SelOLED.so > Makefile + +cd ../Curses/ echo echo "Curses plugin" echo "-------------" @@ -49,7 +50,21 @@ echo "-----------" echo LFMakeMaker -v +f=Makefile -cc='gcc -Wall -DUSE_DIRECTFB `directfb-config --cflags` -fPIC -std=c99 ' *.c -so=../../../SelDirectFB.so > Makefile +cd ../.. +echo +echo "Main source" +echo "-----------" +LFMakeMaker -v +f=Makefile --opts="-isystem -Wall -DxDEBUG \ + -I$LUA_DIR/include -L$LUA_DIR/lib \ + -DUSE_OLED -lArduiPi_OLED \ + -DUSE_CURSES `$NCURSES --cflags` `$NCURSES --libs` \ + -DUSE_DIRECTFB `directfb-config --cflags` `directfb-config --libs` \ + -DPLUGIN_DIR='\"$PLUGIN_DIR\"' -L$PLUGIN_DIR -lSelene \ + -lpaho-mqtt3c -llua -lm -ldl -Wl,--export-dynamic -lpthread" \ + *.c -t=../Selene > Makefile + + echo -echo "Don't forget" +echo "Don't forget if you wan to run it without installing first" echo export LD_LIBRARY_PATH=$PLUGIN_DIR:$LD_LIBRARY_PATH