SConscript 538 B

12345678910111213141516171819202122
  1. from building import *
  2. Import('rtconfig')
  3. src = []
  4. cwd = GetCurrentDir()
  5. group = []
  6. LIBS = ['m'] # link libm
  7. CPPPATH = [cwd]
  8. if rtconfig.PLATFORM == 'gcc':
  9. if GetDepend('RT_USING_LIBC'):
  10. LIBS += ['c'] # link libc
  11. src += Glob('*.c')
  12. else:
  13. src += ['syscalls.c']
  14. # identify this is Newlib, and only enable POSIX.1-1990
  15. CPPDEFINES = ['RT_USING_NEWLIB', '_POSIX_C_SOURCE=1']
  16. group = DefineGroup('libc', src, depend = [], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES, LIBS = LIBS)
  17. Return('group')