diff options
| author | bernard.xiong <[email protected]> | 2011-03-09 08:02:39 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2011-03-09 08:02:39 +0000 |
| commit | 5691af99927236132ef91cc910104bf42ca46726 (patch) | |
| tree | f53cfcc9f5260973bcfbce52c87a0481307be991 /components/external/lua | |
| parent | ba9c0b87cd67ae1e123aa8935a32d04ca3be79f5 (diff) | |
add lua library.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1321 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/external/lua')
| -rw-r--r-- | components/external/lua/SConscript | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/components/external/lua/SConscript b/components/external/lua/SConscript new file mode 100644 index 0000000000..47d8919d43 --- /dev/null +++ b/components/external/lua/SConscript @@ -0,0 +1,61 @@ +Import('RTT_ROOT')
+Import('rtconfig')
+
+from building import *
+import os
+
+LUA_VERSION = '5.1.4'
+LUA_PATH = 'lua-' + LUA_VERSION
+
+if GetDepend('RT_USING_LUA') and not os.path.exists(LUA_PATH):
+ print '================ERROR============================'
+ print 'Please get lua dist and put them under lua folder'
+ print '================================================='
+ exit(0)
+
+# core source files
+core_src = Split('''
+lapi.c
+lcode.c
+ldebug.c
+ldo.c
+ldump.c
+lfunc.c
+lgc.c
+llex.c
+lmem.c
+lobject.c
+lopcodes.c
+lparser.c
+lstate.c
+lstring.c
+ltable.c
+ltm.c
+lundump.c
+lvm.c
+lzio.c
+''')
+
+# library source files
+lib_src = Split('''
+lauxlib.c
+lbaselib.c
+ldblib.c
+liolib.c
+lmathlib.c
+loslib.c
+ltablib.c
+lstrlib.c
+loadlib.c
+linit.c
+''')
+
+src = core_src + lib_src
+
+for item in range(len(src)):
+ src[item] = LUA_PATH + '/src/' + src[item]
+
+CPPPATH = [RTT_ROOT + '/components/external/lua/' + LUA_PATH + '/src']
+group = DefineGroup('lua', src, depend = ['RT_USING_LUA'], CPPPATH = CPPPATH)
+
+Return('group')
|
