diff options
-rwxr-xr-x | ClientHamr/GuiLua/build.lua | 2 | ||||
-rwxr-xr-x | ClientHamr/extantz/build.lua | 2 | ||||
-rwxr-xr-x | LuaSL/build.lua | 2 | ||||
-rwxr-xr-x | build.lua | 24 |
4 files changed, 17 insertions, 13 deletions
diff --git a/ClientHamr/GuiLua/build.lua b/ClientHamr/GuiLua/build.lua index 3fcfffb..d2ffdd9 100755 --- a/ClientHamr/GuiLua/build.lua +++ b/ClientHamr/GuiLua/build.lua | |||
@@ -10,7 +10,7 @@ if 'nil' == type(dir) then | |||
10 | else | 10 | else |
11 | print("ERROR - " .. err) | 11 | print("ERROR - " .. err) |
12 | end | 12 | end |
13 | dir = readCommand('pwd') | 13 | dir = workingDir |
14 | end | 14 | end |
15 | 15 | ||
16 | LDFLAGS = '-L ' .. dir .. ' ' .. LDFLAGS | 16 | LDFLAGS = '-L ' .. dir .. ' ' .. LDFLAGS |
diff --git a/ClientHamr/extantz/build.lua b/ClientHamr/extantz/build.lua index d53449e..ca67fec 100755 --- a/ClientHamr/extantz/build.lua +++ b/ClientHamr/extantz/build.lua | |||
@@ -10,7 +10,7 @@ if 'nil' == type(dir) then | |||
10 | else | 10 | else |
11 | print("ERROR - " .. err) | 11 | print("ERROR - " .. err) |
12 | end | 12 | end |
13 | dir = readCommand('pwd') | 13 | dir = workingDir |
14 | end | 14 | end |
15 | 15 | ||
16 | CFLAGS = CFLAGS .. ' -I../../libraries/irrlicht-1.8.1/include -I/usr/X11R6/include' | 16 | CFLAGS = CFLAGS .. ' -I../../libraries/irrlicht-1.8.1/include -I/usr/X11R6/include' |
diff --git a/LuaSL/build.lua b/LuaSL/build.lua index ea2151d..6b71532 100755 --- a/LuaSL/build.lua +++ b/LuaSL/build.lua | |||
@@ -10,7 +10,7 @@ if 'nil' == type(dir) then | |||
10 | else | 10 | else |
11 | print("ERROR - " .. err) | 11 | print("ERROR - " .. err) |
12 | end | 12 | end |
13 | dir = readCommand('pwd') | 13 | dir = workingDir |
14 | end | 14 | end |
15 | 15 | ||
16 | dir = dir .. '/src' | 16 | dir = dir .. '/src' |
@@ -40,10 +40,10 @@ end | |||
40 | 40 | ||
41 | local buildSub = function (name, dir) | 41 | local buildSub = function (name, dir) |
42 | print('_______________ BUILDING ' .. name .. ' _______________') | 42 | print('_______________ BUILDING ' .. name .. ' _______________') |
43 | local build, err = loadfile(LOCALDIR .. '/' .. dir .. '/build.lua') | 43 | local build, err = loadfile(dir .. '/build.lua') |
44 | if build then | 44 | if build then |
45 | setfenv(build, getfenv(2)) | 45 | setfenv(build, getfenv(2)) |
46 | build(LOCALDIR .. '/' .. dir) | 46 | build(workingDir .. '/' .. dir) |
47 | else | 47 | else |
48 | print("ERROR - " .. err) | 48 | print("ERROR - " .. err) |
49 | end | 49 | end |
@@ -53,8 +53,9 @@ end | |||
53 | -- On the other hand, there's a more direct way to get to environment variables, it would fail to. | 53 | -- On the other hand, there's a more direct way to get to environment variables, it would fail to. |
54 | CFLAGOPTS = readCommand('echo "$CFLAGOPTS"') | 54 | CFLAGOPTS = readCommand('echo "$CFLAGOPTS"') |
55 | 55 | ||
56 | LOCALDIR = readCommand('pwd')readCommand('pwd') | 56 | workingDir = readCommand('pwd') |
57 | CFLAGS = '-g -Wall -I include -I ' .. LOCALDIR .. ' -I ../../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' | ||
58 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'luajit') | 59 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'luajit') |
59 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eo') | 60 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eo') |
60 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eet') | 61 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eet') |
@@ -63,12 +64,15 @@ CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'ecore-evas') | |||
63 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'ecore-file') | 64 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'ecore-file') |
64 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'edje') | 65 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'edje') |
65 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'elementary') | 66 | CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'elementary') |
66 | CFLAGS = CFLAGS .. ' -DPACKAGE_BIN_DIR=\\"' .. LOCALDIR .. '\\"' | 67 | -- TODO - The workingDir part of these strings gets set differently depending on who starts the build. |
67 | CFLAGS = CFLAGS .. ' -DPACKAGE_LIB_DIR=\\"' .. LOCALDIR .. '\\"' | 68 | -- Which is a problem for the PACKAGE_*_DIR defines. |
68 | CFLAGS = CFLAGS .. ' -DPACKAGE_DATA_DIR=\\"' .. LOCALDIR .. '\\"' | 69 | -- On the other hand, that part needs to be rethought anyway, coz otherwise they are locked to the build place. |
70 | CFLAGS = CFLAGS .. ' -DPACKAGE_BIN_DIR=\\"' .. workingDir .. '\\"' | ||
71 | CFLAGS = CFLAGS .. ' -DPACKAGE_LIB_DIR=\\"' .. workingDir .. '\\"' | ||
72 | CFLAGS = CFLAGS .. ' -DPACKAGE_DATA_DIR=\\"' .. workingDir .. '\\"' | ||
69 | CFLAGS = CFLAGS .. ' ' .. CFLAGOPTS | 73 | CFLAGS = CFLAGS .. ' ' .. CFLAGOPTS |
70 | 74 | ||
71 | LDFLAGS = '-L ' .. LOCALDIR .. ' ' .. pkgConfig('libs-only-L', 'luajit') .. ' -L lib -L /usr/lib -L /lib' | 75 | LDFLAGS = pkgConfig('libs-only-L', 'luajit') .. ' -L lib -L /usr/lib -L /lib' |
72 | libs = pkgConfig('libs', 'elementary') .. ' ' .. pkgConfig('libs', 'luajit') .. ' -lpthread -lm' | 76 | libs = pkgConfig('libs', 'elementary') .. ' ' .. pkgConfig('libs', 'luajit') .. ' -lpthread -lm' |
73 | LFLAGS = '-d' | 77 | LFLAGS = '-d' |
74 | EDJE_FLAGS = '-id images -fd fonts' | 78 | EDJE_FLAGS = '-id images -fd fonts' |
@@ -77,8 +81,8 @@ EDJE_FLAGS = '-id images -fd fonts' | |||
77 | if 'nil' == type(args) then | 81 | if 'nil' == type(args) then |
78 | -- Building this passes my "holding breath" test, if it can compile while I'm holding my breath, no need for make files. | 82 | -- Building this passes my "holding breath" test, if it can compile while I'm holding my breath, no need for make files. |
79 | print('_______________ BUILDING lemon _______________') | 83 | print('_______________ BUILDING lemon _______________') |
80 | removeFiles(LOCALDIR .. '/libraries/lemon', {'*.o', 'lemon'}) | 84 | removeFiles('libraries/lemon', {'*.o', 'lemon'}) |
81 | compileFiles('lemon', LOCALDIR .. '/libraries/lemon', {'lemon'}) | 85 | compileFiles('lemon', 'libraries/lemon', {'lemon'}) |
82 | print('_______________ BUILDING Irrlicht _______________') | 86 | print('_______________ BUILDING Irrlicht _______________') |
83 | -- Irrlicht is an external project that comes with make files anyway, and doesn't otherwise pass the test. | 87 | -- Irrlicht is an external project that comes with make files anyway, and doesn't otherwise pass the test. |
84 | runCommand('Irrlicht', 'libraries/irrlicht-1.8.1/source/Irrlicht', 'make') | 88 | runCommand('Irrlicht', 'libraries/irrlicht-1.8.1/source/Irrlicht', 'make') |