SConscript 688 B

123456789101112131415161718192021222324252627
  1. # for module compiling
  2. import os
  3. Import('RTT_ROOT')
  4. Import('rtconfig')
  5. from building import *
  6. cwd = GetCurrentDir()
  7. src = []
  8. CPPPATH = []
  9. list = os.listdir(cwd)
  10. if rtconfig.PLATFORM in ['iccarm']:
  11. print("\nThe current project does not support IAR build\n")
  12. Return('group')
  13. elif rtconfig.PLATFORM in ['gcc', 'armclang']:
  14. if GetOption('target') != 'mdk5':
  15. CPPPATH = [cwd]
  16. src = Glob('./src/*.c')
  17. group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)
  18. for d in list:
  19. path = os.path.join(cwd, d)
  20. if os.path.isfile(os.path.join(path, 'SConscript')):
  21. group = group + SConscript(os.path.join(d, 'SConscript'))
  22. Return('group')