SConscript 824 B

12345678910111213141516171819202122232425262728
  1. Import('RTT_ROOT')
  2. Import('rtconfig')
  3. from building import *
  4. cwd = GetCurrentDir()
  5. src = Glob('*.c') + Glob('*.cpp')
  6. CPPPATH = [cwd, str(Dir('#'))]
  7. if rtconfig.CROSS_TOOL == 'gcc':
  8. src += Glob(RTT_ROOT + '/bsp/rockchip/common/drivers/drv_cache_gcc.S')
  9. elif rtconfig.CROSS_TOOL == 'keil':
  10. src += Glob(RTT_ROOT + '/bsp/rockchip/common/drivers/drv_cache_arm.s')
  11. elif rtconfig.CROSS_TOOL == 'iar':
  12. src += Glob(RTT_ROOT + '/bsp/rockchip/common/drivers/drv_cache_iar.s')
  13. group = DefineGroup('driver', 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')