SConscript 707 B

123456789101112131415161718192021222324252627282930
  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. if GetDepend('RT_USING_PIC') == True:
  10. SrcRemove(src, ['gicv3.c', 'gic.c', 'gtimer.c'])
  11. group = DefineGroup('libcpu', src, depend = [''], CPPPATH = CPPPATH)
  12. # build for sub-directory
  13. list = os.listdir(cwd)
  14. objs = []
  15. for d in list:
  16. path = os.path.join(cwd, d)
  17. if os.path.isfile(os.path.join(path, 'SConscript')):
  18. objs = objs + SConscript(os.path.join(d, 'SConscript'))
  19. group = group + objs
  20. Return('group')