From c501a8c75e6fce2e91d52f60a5454de5aa3ef8f1 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 20 Apr 2014 15:24:46 +1000 Subject: Convert build shell scripts to Lua, with common infrastructure. --- ClientHamr/extantz/build.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 ClientHamr/extantz/build.lua (limited to 'ClientHamr/extantz/build.lua') diff --git a/ClientHamr/extantz/build.lua b/ClientHamr/extantz/build.lua new file mode 100755 index 0000000..d53449e --- /dev/null +++ b/ClientHamr/extantz/build.lua @@ -0,0 +1,26 @@ +#!/usr/bin/env lua + +local dir = ... + +if 'nil' == type(dir) then + local build, err = loadfile('../../build.lua') + if build then + setfenv(build, getfenv(2)) + build('') + else + print("ERROR - " .. err) + end + dir = readCommand('pwd') +end + +CFLAGS = CFLAGS .. ' -I../../libraries/irrlicht-1.8.1/include -I/usr/X11R6/include' +LDFLAGS = LDFLAGS .. ' -L../../libraries/irrlicht-1.8.1/lib/Linux' +libs = libs .. ' -lIrrlicht -lGL -lbz2' + +removeFiles(dir, {'extantz', 'crappisspuke.o', 'CDemo.o', 'extantzCamera.o', 'extantz.edj'}) + +runCommand('edje_cc', dir, 'edje_cc ' .. EDJE_FLAGS .. ' extantz.edc extantz.edj') +runCommand('Irrlicht files', dir, 'g++ ' .. CFLAGS .. ' -O3 -ffast-math -c crappisspuke.cpp -o crappisspuke.o ' .. LDFLAGS) +runCommand(nil, dir, 'g++ ' .. CFLAGS .. ' -O3 -ffast-math -c CDemo.cpp -o CDemo.o ' .. LDFLAGS) +runCommand('extantz', dir, 'g++ ' .. CFLAGS .. ' -O3 -ffast-math -c extantzCamera.cpp -o extantzCamera.o ' .. LDFLAGS) +runCommand(nil, dir, 'gcc ' .. CFLAGS .. ' extantz.c crappisspuke.o CDemo.o extantzCamera.o -o extantz ' .. LDFLAGS .. ' ' .. libs .. ' && strip extantz') -- cgit v1.1