SConscript 827 B

1234567891011121314151617181920212223242526272829303132
  1. import os
  2. from building import *
  3. # get current dir path
  4. cwd = GetCurrentDir()
  5. # init src and inc vars
  6. src = []
  7. inc = []
  8. # add lua common include
  9. inc = inc + [cwd]
  10. # add lua basic code
  11. src = src + ['./lua2rtt.c']
  12. # add group to IDE project
  13. if GetDepend('LUA_USING_PORTING_V514'):
  14. objs = DefineGroup('lua-5.1.4', src, depend = ['PKG_USING_LUA', 'LUA_USING_PORTING_V514'], CPPPATH = inc)
  15. if GetDepend('LUA_USING_PORTING_V534'):
  16. objs = DefineGroup('lua-5.3.4', src, depend = ['PKG_USING_LUA', 'LUA_USING_PORTING_V534'], CPPPATH = inc)
  17. # traversal subscript
  18. list = os.listdir(cwd)
  19. if GetDepend('PKG_USING_LUA'):
  20. for d in list:
  21. path = os.path.join(cwd, d)
  22. if os.path.isfile(os.path.join(path, 'SConscript')):
  23. objs = objs + SConscript(os.path.join(d, 'SConscript'))
  24. Return('objs')