SConscript 716 B

123456789101112131415161718192021222324252627282930
  1. from building import *
  2. Import('rtconfig')
  3. src = []
  4. cwd = GetCurrentDir()
  5. group = []
  6. CPPPATH = [cwd]
  7. if GetDepend('RT_USING_LIBC'):
  8. src += Glob('*.c')
  9. if GetDepend('RT_USING_POSIX') == False:
  10. SrcRemove(src, ['unistd.c'])
  11. elif GetDepend('RT_LIBC_USING_TIME'):
  12. src += ['time.c']
  13. if rtconfig.CROSS_TOOL == 'keil':
  14. CPPDEFINES = ['__CLK_TCK=RT_TICK_PER_SECOND']
  15. else:
  16. CPPDEFINES = []
  17. group = DefineGroup('libc', src, depend = [], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
  18. list = os.listdir(cwd)
  19. for d in list:
  20. path = os.path.join(cwd, d)
  21. if os.path.isfile(os.path.join(path, 'SConscript')):
  22. group = group + SConscript(os.path.join(d, 'SConscript'))
  23. Return('group')