SConscript 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. Import('RTT_ROOT')
  2. Import('rtconfig')
  3. from building import *
  4. comm = rtconfig.ARCH + '/common'
  5. path = rtconfig.ARCH + '/' + rtconfig.CPU
  6. ASFLAGS = ''
  7. # The set of source files associated with this SConscript file.
  8. if rtconfig.PLATFORM == 'armcc':
  9. src = Glob(path + '/*.c') + Glob(path + '/*_rvds.S') + Glob(comm + '/*.c')
  10. if rtconfig.PLATFORM == 'gcc':
  11. src = Glob(path + '/*.c') + Glob(path + '/*_gcc.S') + Glob(comm + '/*.c') + Glob(path + '/*_init.S')
  12. if rtconfig.PLATFORM == 'iar':
  13. src = Glob(path + '/*.c') + Glob(path + '/*_iar.S') + Glob(comm + '/*.c')
  14. if rtconfig.PLATFORM == 'cl':
  15. src = Glob(path + '/*.c')
  16. if rtconfig.PLATFORM == 'mingw':
  17. src = Glob(path + '/*.c')
  18. if rtconfig.PLATFORM == 'armcc' and rtconfig.ARCH == 'arm' and rtconfig.CPU == 'arm926':
  19. ASFLAGS = ' --cpreproc'
  20. CPPPATH = [RTT_ROOT + '/libcpu/' + rtconfig.ARCH + '/' + rtconfig.CPU, RTT_ROOT + '/libcpu/' + rtconfig.ARCH + '/common']
  21. group = DefineGroup(rtconfig.CPU.upper(), src, depend = [''], CPPPATH = CPPPATH, ASFLAGS = ASFLAGS)
  22. Return('group')