Skip to content

Commit

Permalink
Improve remake_* and add OLED support
Browse files Browse the repository at this point in the history
  • Loading branch information
destroyedlolo committed Jan 3, 2019
1 parent 88fae3c commit 9370fb8
Show file tree
Hide file tree
Showing 8 changed files with 217 additions and 22 deletions.
16 changes: 13 additions & 3 deletions remake_Curse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "-------------"
Expand All @@ -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"
Expand Down
25 changes: 19 additions & 6 deletions remake_Curse_153.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "-------------"
Expand All @@ -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"
Expand Down
27 changes: 25 additions & 2 deletions remake_NoPlug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

28 changes: 25 additions & 3 deletions remake_NoPlug_l53.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

56 changes: 56 additions & 0 deletions remake_OLED.sh
Original file line number Diff line number Diff line change
@@ -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

55 changes: 55 additions & 0 deletions remake_OLED_153.sh
Original file line number Diff line number Diff line change
@@ -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

1 change: 1 addition & 0 deletions remake_Plugs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
31 changes: 23 additions & 8 deletions remake_Plugs_153.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 "-------------"
Expand All @@ -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

0 comments on commit 9370fb8

Please sign in to comment.