SConscript 584 B

12345678910111213141516171819202122232425262728
  1. # RT-Thread building script for component
  2. from building import *
  3. Import('rtconfig')
  4. cwd = GetCurrentDir()
  5. src = Glob('*.c') + Glob('*.cpp') + Glob('*.S')
  6. if not GetDepend('BSP_USING_GIC'):
  7. SrcRemove(src, 'gic.c')
  8. CPPPATH = [cwd]
  9. group = DefineGroup('common', src, depend = [''], CPPPATH = CPPPATH)
  10. # build for sub-directory
  11. list = os.listdir(cwd)
  12. objs = []
  13. for d in list:
  14. path = os.path.join(cwd, d)
  15. if os.path.isfile(os.path.join(path, 'SConscript')):
  16. objs = objs + SConscript(os.path.join(d, 'SConscript'))
  17. group = group + objs
  18. Return('group')