diff options
author | David Walter Seikel | 2014-04-21 17:53:25 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-04-21 17:53:25 +1000 |
commit | e9447ecc19114cee9550c7aaea89a4d3de3cfa3f (patch) | |
tree | 8f99cefa904c2ee80ac83abea394a54cf51bea0b /build.lua | |
parent | Added LumbrJack (logging) and Runnr (Lua function / script runner). (diff) | |
download | SledjHamr-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 '')
-rwxr-xr-x | build.lua | 22 |
1 files changed, 14 insertions, 8 deletions
@@ -49,13 +49,20 @@ local buildSub = function (name, dir) | |||
49 | end | 49 | end |
50 | end | 50 | end |
51 | 51 | ||
52 | |||
53 | workingDir = readCommand('pwd') | ||
54 | baseDir = workingDir | ||
55 | if 'number' == type(args) then | ||
56 | for i = 1, args do | ||
57 | baseDir = string.gsub(baseDir, '(.*)/.-$', '%1') | ||
58 | end | ||
59 | end | ||
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. |
54 | CFLAGOPTS = readCommand('echo "$CFLAGOPTS"') | 63 | CFLAGOPTS = readCommand('echo "$CFLAGOPTS"') |
55 | 64 | ||
56 | workingDir = readCommand('pwd') | 65 | CFLAGS = '-g -Wall -I include -I ' .. baseDir .. '/libraries' |
57 | -- TODO - -I ../../libraries will be wrong for somethings, but right now those things don't care. | ||
58 | CFLAGS = '-g -Wall -I include -I ../../libraries' | ||
59 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'luajit') | 66 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'luajit') |
60 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eo') | 67 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eo') |
61 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eet') | 68 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eet') |
@@ -72,8 +79,8 @@ CFLAGS = CFLAGS .. ' -DPACKAGE_LIB_DIR=\\"' .. workingDir .. '\\"' | |||
72 | CFLAGS = CFLAGS .. ' -DPACKAGE_DATA_DIR=\\"' .. workingDir .. '\\"' | 79 | CFLAGS = CFLAGS .. ' -DPACKAGE_DATA_DIR=\\"' .. workingDir .. '\\"' |
73 | CFLAGS = CFLAGS .. ' ' .. CFLAGOPTS | 80 | CFLAGS = CFLAGS .. ' ' .. CFLAGOPTS |
74 | 81 | ||
75 | LDFLAGS = pkgConfig('libs-only-L', 'luajit') .. ' -L lib -L /usr/lib -L /lib' | 82 | LDFLAGS = '-L ' .. baseDir .. '/libraries ' .. pkgConfig('libs-only-L', 'luajit') .. ' -L /usr/lib -L /lib' |
76 | libs = pkgConfig('libs', 'elementary') .. ' ' .. pkgConfig('libs', 'luajit') .. ' -lpthread -lm' | 83 | libs = '-lLumbrJack -lRunnr ' .. pkgConfig('libs', 'elementary') .. ' ' .. pkgConfig('libs', 'luajit') .. ' -lpthread -lm' |
77 | LFLAGS = '-d' | 84 | LFLAGS = '-d' |
78 | EDJE_FLAGS = '-id images -fd fonts' | 85 | EDJE_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') |