aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/build.lua
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-04-21 17:53:25 +1000
committerDavid Walter Seikel2014-04-21 17:53:25 +1000
commite9447ecc19114cee9550c7aaea89a4d3de3cfa3f (patch)
tree8f99cefa904c2ee80ac83abea394a54cf51bea0b /build.lua
parentAdded LumbrJack (logging) and Runnr (Lua function / script runner). (diff)
downloadSledjHamr-e9447ecc19114cee9550c7aaea89a4d3de3cfa3f.zip
SledjHamr-e9447ecc19114cee9550c7aaea89a4d3de3cfa3f.tar.gz
SledjHamr-e9447ecc19114cee9550c7aaea89a4d3de3cfa3f.tar.bz2
SledjHamr-e9447ecc19114cee9550c7aaea89a4d3de3cfa3f.tar.xz
Move LumbrJack and Runnr to the libraries directory, and use them from GuiLua.
Diffstat (limited to 'build.lua')
-rwxr-xr-xbuild.lua22
1 files changed, 14 insertions, 8 deletions
diff --git a/build.lua b/build.lua
index c6b0748..c7177fa 100755
--- a/build.lua
+++ b/build.lua
@@ -49,13 +49,20 @@ local buildSub = function (name, dir)
49 end 49 end
50end 50end
51 51
52
53workingDir = readCommand('pwd')
54baseDir = workingDir
55if 'number' == type(args) then
56 for i = 1, args do
57 baseDir = string.gsub(baseDir, '(.*)/.-$', '%1')
58 end
59end
60
52-- Likely this will fail, coz Lua likes to strip out environmont variables. 61-- Likely this will fail, coz Lua likes to strip out environmont variables.
53-- On the other hand, there's a more direct way to get to environment variables, it would fail to. 62-- On the other hand, there's a more direct way to get to environment variables, it would fail to.
54CFLAGOPTS = readCommand('echo "$CFLAGOPTS"') 63CFLAGOPTS = readCommand('echo "$CFLAGOPTS"')
55 64
56workingDir = readCommand('pwd') 65CFLAGS = '-g -Wall -I include -I ' .. baseDir .. '/libraries'
57-- TODO - -I ../../libraries will be wrong for somethings, but right now those things don't care.
58CFLAGS = '-g -Wall -I include -I ../../libraries'
59CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'luajit') 66CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'luajit')
60CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eo') 67CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eo')
61CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eet') 68CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eet')
@@ -72,8 +79,8 @@ CFLAGS = CFLAGS .. ' -DPACKAGE_LIB_DIR=\\"' .. workingDir .. '\\"'
72CFLAGS = CFLAGS .. ' -DPACKAGE_DATA_DIR=\\"' .. workingDir .. '\\"' 79CFLAGS = CFLAGS .. ' -DPACKAGE_DATA_DIR=\\"' .. workingDir .. '\\"'
73CFLAGS = CFLAGS .. ' ' .. CFLAGOPTS 80CFLAGS = CFLAGS .. ' ' .. CFLAGOPTS
74 81
75LDFLAGS = pkgConfig('libs-only-L', 'luajit') .. ' -L lib -L /usr/lib -L /lib' 82LDFLAGS = '-L ' .. baseDir .. '/libraries ' .. pkgConfig('libs-only-L', 'luajit') .. ' -L /usr/lib -L /lib'
76libs = pkgConfig('libs', 'elementary') .. ' ' .. pkgConfig('libs', 'luajit') .. ' -lpthread -lm' 83libs = '-lLumbrJack -lRunnr ' .. pkgConfig('libs', 'elementary') .. ' ' .. pkgConfig('libs', 'luajit') .. ' -lpthread -lm'
77LFLAGS = '-d' 84LFLAGS = '-d'
78EDJE_FLAGS = '-id images -fd fonts' 85EDJE_FLAGS = '-id images -fd fonts'
79 86
@@ -85,9 +92,8 @@ if 'nil' == type(args) then
85 compileFiles('lemon', 'libraries/lemon', {'lemon'}) 92 compileFiles('lemon', 'libraries/lemon', {'lemon'})
86 print('_______________ BUILDING Irrlicht _______________') 93 print('_______________ BUILDING Irrlicht _______________')
87 -- Irrlicht is an external project that comes with make files anyway, and doesn't otherwise pass the test. 94 -- Irrlicht is an external project that comes with make files anyway, and doesn't otherwise pass the test.
88 runCommand('Irrlicht', 'libraries/irrlicht-1.8.1/source/Irrlicht', 'make') 95 runCommand('Irrlicht','libraries/irrlicht-1.8.1/source/Irrlicht', 'make')
89 buildSub('LumbrJack', 'LumbrJack') 96 buildSub('libraries', 'libraries')
90 buildSub('Runnr', 'Runnr')
91 buildSub('LuaSL', 'LuaSL') 97 buildSub('LuaSL', 'LuaSL')
92 buildSub('GuiLua', 'ClientHamr/GuiLua') 98 buildSub('GuiLua', 'ClientHamr/GuiLua')
93 buildSub('extantz', 'ClientHamr/extantz') 99 buildSub('extantz', 'ClientHamr/extantz')