aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rwxr-xr-xClientHamr/GuiLua/build.lua2
-rwxr-xr-xClientHamr/extantz/build.lua2
-rwxr-xr-xLuaSL/build.lua2
-rwxr-xr-xbuild.lua24
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
14end 14end
15 15
16LDFLAGS = '-L ' .. dir .. ' ' .. LDFLAGS 16LDFLAGS = '-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
14end 14end
15 15
16CFLAGS = CFLAGS .. ' -I../../libraries/irrlicht-1.8.1/include -I/usr/X11R6/include' 16CFLAGS = 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
14end 14end
15 15
16dir = dir .. '/src' 16dir = dir .. '/src'
diff --git a/build.lua b/build.lua
index 0e88bbf..581c134 100755
--- a/build.lua
+++ b/build.lua
@@ -40,10 +40,10 @@ end
40 40
41local buildSub = function (name, dir) 41local 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.
54CFLAGOPTS = readCommand('echo "$CFLAGOPTS"') 54CFLAGOPTS = readCommand('echo "$CFLAGOPTS"')
55 55
56LOCALDIR = readCommand('pwd')readCommand('pwd') 56workingDir = readCommand('pwd')
57CFLAGS = '-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.
58CFLAGS = '-g -Wall -I include -I ../../libraries'
58CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'luajit') 59CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'luajit')
59CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eo') 60CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eo')
60CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eet') 61CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'eet')
@@ -63,12 +64,15 @@ CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'ecore-evas')
63CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'ecore-file') 64CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'ecore-file')
64CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'edje') 65CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'edje')
65CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'elementary') 66CFLAGS = CFLAGS .. ' ' .. pkgConfig('cflags', 'elementary')
66CFLAGS = CFLAGS .. ' -DPACKAGE_BIN_DIR=\\"' .. LOCALDIR .. '\\"' 67-- TODO - The workingDir part of these strings gets set differently depending on who starts the build.
67CFLAGS = CFLAGS .. ' -DPACKAGE_LIB_DIR=\\"' .. LOCALDIR .. '\\"' 68-- Which is a problem for the PACKAGE_*_DIR defines.
68CFLAGS = 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.
70CFLAGS = CFLAGS .. ' -DPACKAGE_BIN_DIR=\\"' .. workingDir .. '\\"'
71CFLAGS = CFLAGS .. ' -DPACKAGE_LIB_DIR=\\"' .. workingDir .. '\\"'
72CFLAGS = CFLAGS .. ' -DPACKAGE_DATA_DIR=\\"' .. workingDir .. '\\"'
69CFLAGS = CFLAGS .. ' ' .. CFLAGOPTS 73CFLAGS = CFLAGS .. ' ' .. CFLAGOPTS
70 74
71LDFLAGS = '-L ' .. LOCALDIR .. ' ' .. pkgConfig('libs-only-L', 'luajit') .. ' -L lib -L /usr/lib -L /lib' 75LDFLAGS = pkgConfig('libs-only-L', 'luajit') .. ' -L lib -L /usr/lib -L /lib'
72libs = pkgConfig('libs', 'elementary') .. ' ' .. pkgConfig('libs', 'luajit') .. ' -lpthread -lm' 76libs = pkgConfig('libs', 'elementary') .. ' ' .. pkgConfig('libs', 'luajit') .. ' -lpthread -lm'
73LFLAGS = '-d' 77LFLAGS = '-d'
74EDJE_FLAGS = '-id images -fd fonts' 78EDJE_FLAGS = '-id images -fd fonts'
@@ -77,8 +81,8 @@ EDJE_FLAGS = '-id images -fd fonts'
77if 'nil' == type(args) then 81if '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')