-
Notifications
You must be signed in to change notification settings - Fork 7
/
SConscript
32 lines (24 loc) · 827 Bytes
/
SConscript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import os
from building import *
# get current dir path
cwd = GetCurrentDir()
# init src and inc vars
src = []
inc = []
# add lua common include
inc = inc + [cwd]
# add lua basic code
src = src + ['./lua2rtt.c']
# add group to IDE project
if GetDepend('LUA_USING_PORTING_V514'):
objs = DefineGroup('lua-5.1.4', src, depend = ['PKG_USING_LUA', 'LUA_USING_PORTING_V514'], CPPPATH = inc)
if GetDepend('LUA_USING_PORTING_V534'):
objs = DefineGroup('lua-5.3.4', src, depend = ['PKG_USING_LUA', 'LUA_USING_PORTING_V534'], CPPPATH = inc)
# traversal subscript
list = os.listdir(cwd)
if GetDepend('PKG_USING_LUA'):
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(d, 'SConscript'))
Return('objs')