SConscript 657 B

123456789101112131415161718192021
  1. # RT-Thread building script for component
  2. from building import *
  3. Import('rtconfig')
  4. cwd = GetCurrentDir()
  5. src = Glob('*.cpp') + Glob('*.c')
  6. CPPPATH = [cwd]
  7. if GetDepend('RT_USING_CPLUSPLUS11'):
  8. src += Glob('cpp11/*.cpp') + Glob('cpp11/*.c')
  9. if rtconfig.PLATFORM in ['armclang']:
  10. src += Glob('cpp11/armclang/*.cpp') + Glob('cpp11/armclang/*.c')
  11. CPPPATH += [cwd + '/cpp11/armclang']
  12. elif rtconfig.PLATFORM in ['gcc']:
  13. src += Glob('cpp11/gcc/*.cpp') + Glob('cpp11/gcc/*.c')
  14. CPPPATH += [cwd + '/cpp11/gcc']
  15. group = DefineGroup('CPlusPlus', src, depend = ['RT_USING_CPLUSPLUS'], CPPPATH = CPPPATH)
  16. Return('group')