SConscript 601 B

123456789101112131415161718192021
  1. from building import *
  2. Import('rtconfig')
  3. src = Glob('*.c')
  4. cwd = GetCurrentDir()
  5. group = []
  6. CPPPATH = [cwd]
  7. CPPDEFINES = ['RT_USING_NEWLIB']
  8. # link with libc and libm:
  9. # libm is a frequently used lib. Newlib is compiled with -ffunction-sections in
  10. # recent GCC tool chains. The linker would just link in the functions that have
  11. # been referenced. So setting this won't result in bigger text size.
  12. LIBS = ['c', 'm']
  13. if rtconfig.PLATFORM == 'gcc':
  14. group = DefineGroup('NewLIB', src, depend = ['RT_USING_LIBC'],
  15. CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES, LIBS = LIBS)
  16. Return('group')