SConscript 791 B

1234567891011121314151617181920212223242526
  1. from building import *
  2. Import('rtconfig')
  3. src = []
  4. cwd = GetCurrentDir()
  5. group = []
  6. CPPPATH = [cwd + '/include']
  7. CPPDEFINES = []
  8. if rtconfig.PLATFORM in ['armcc', 'armclang']:
  9. CPPDEFINES += ['__CLK_TCK=RT_TICK_PER_SECOND']
  10. elif rtconfig.PLATFORM in ['iccarm']:
  11. CPPDEFINES += ['CLOCKS_PER_SEC=RT_TICK_PER_SECOND'] # forcly revert to 1 by IAR
  12. elif rtconfig.PLATFORM in ['gcc'] and rtconfig.CPU in ['posix']:
  13. CPPDEFINES += ['_GNU_SOURCE'] # linux x86 platform gcc use!
  14. src += Glob('*.c')
  15. group = DefineGroup('Compiler', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
  16. list = os.listdir(cwd)
  17. for item in list:
  18. if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
  19. group = group + SConscript(os.path.join(item, 'SConscript'))
  20. Return('group')