summaryrefslogtreecommitdiff
path: root/scripting/SConscript
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2011-05-20 14:11:40 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2011-05-20 14:11:40 +0200
commit3bb33734a92e86024488adf88dc2a368c8c952b2 (patch)
treeaee8ab7832b7fef021668d94cbaf7d21d6c9c839 /scripting/SConscript
parent7b22d822f9871222fbbe401c9c79d6a624d21331 (diff)
Basic lua implementation.
Diffstat (limited to 'scripting/SConscript')
-rw-r--r--scripting/SConscript22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripting/SConscript b/scripting/SConscript
new file mode 100644
index 0000000..eaf9f21
--- /dev/null
+++ b/scripting/SConscript
@@ -0,0 +1,22 @@
+Import('env')
+
+def tolua_generator(source, target, env, for_signature):
+ name = str(source[0]).rsplit('/', 1)[-1].rsplit('.' , 1)[0]
+ return 'tolua++ -o %s -H %s -n %s %s' % (target[1], target[2], name, source[0])
+
+def tolua_emitter(target, source, env):
+ target.append('tolua_%s.cpp' % target[0])
+ target.append('tolua_%s.h' % target[0])
+ return target, source
+
+tolua_bld = Builder(
+ generator = tolua_generator,
+ emitter = tolua_emitter,
+ src_suffix = '.pkg',
+)
+
+env.Append(BUILDERS = {'tolua': tolua_bld})
+
+env.tolua('test')
+
+# vim: syn=python