diff options
Diffstat (limited to 'build.lua')
-rwxr-xr-x | build.lua | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -16,7 +16,6 @@ pkgConfig = function (what, name) | |||
16 | end | 16 | end |
17 | 17 | ||
18 | removeFiles = function (dir, files) | 18 | removeFiles = function (dir, files) |
19 | print('clean') | ||
20 | for i, v in ipairs(files) do | 19 | for i, v in ipairs(files) do |
21 | os.execute('rm -f ' .. dir .. '/' .. v) | 20 | os.execute('rm -f ' .. dir .. '/' .. v) |
22 | end | 21 | end |
@@ -30,6 +29,10 @@ end | |||
30 | compileFiles = function (name, dir, files, extras) | 29 | compileFiles = function (name, dir, files, extras) |
31 | local objects = '' | 30 | local objects = '' |
32 | print('\n' .. name) | 31 | print('\n' .. name) |
32 | removeFiles(dir, {name}) | ||
33 | for i, v in ipairs(files) do | ||
34 | removeFiles(dir, {v .. '.o'}) | ||
35 | end | ||
33 | for i, v in ipairs(files) do | 36 | for i, v in ipairs(files) do |
34 | print(' ' .. v) | 37 | print(' ' .. v) |
35 | os.execute('cd ' .. dir .. '; gcc ' .. CFLAGS .. ' -c -o ' .. v .. '.o ' .. v .. '.c') | 38 | os.execute('cd ' .. dir .. '; gcc ' .. CFLAGS .. ' -c -o ' .. v .. '.o ' .. v .. '.c') |
@@ -81,7 +84,6 @@ EDJE_FLAGS = '-id ' .. baseDir .. '/media -fd ' .. baseDir .. '/media' | |||
81 | if 'nil' == type(args) then | 84 | if 'nil' == type(args) then |
82 | -- Building this passes my "holding breath" test, if it can compile while I'm holding my breath, no need for make files. | 85 | -- Building this passes my "holding breath" test, if it can compile while I'm holding my breath, no need for make files. |
83 | print('_______________ BUILDING lemon _______________') | 86 | print('_______________ BUILDING lemon _______________') |
84 | removeFiles('libraries/lemon', {'*.o', 'lemon'}) | ||
85 | compileFiles('lemon', 'libraries/lemon', {'lemon'}, '') | 87 | compileFiles('lemon', 'libraries/lemon', {'lemon'}, '') |
86 | print('_______________ BUILDING Irrlicht _______________') | 88 | print('_______________ BUILDING Irrlicht _______________') |
87 | -- Irrlicht is an external project that comes with make files anyway, and doesn't otherwise pass the test. | 89 | -- Irrlicht is an external project that comes with make files anyway, and doesn't otherwise pass the test. |