SConscript 619 B

123456789101112131415161718192021222324252627
  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. CPPPATH = [cwd]
  7. if GetDepend('RT_USING_OFW') == False:
  8. SrcRemove(src, ['setup.c', 'cpu_psci.c', 'psci.c'])
  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')