SConscript 801 B

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