rt-thread/components/libc/compilers/gcc/newlib/SConscript

23 lines
538 B
Python
Raw Normal View History

from building import *
2017-10-13 12:44:54 +08:00
Import('rtconfig')
2021-02-23 03:21:16 +08:00
src = []
cwd = GetCurrentDir()
2017-10-13 12:44:54 +08:00
group = []
LIBS = ['m'] # link libm
CPPPATH = [cwd]
if rtconfig.PLATFORM == 'gcc':
2021-02-23 03:21:16 +08:00
if GetDepend('RT_USING_LIBC'):
LIBS += ['c'] # link libc
2021-02-23 03:21:16 +08:00
src += Glob('*.c')
else:
src += ['syscalls.c']
2021-02-23 03:21:16 +08:00
# identify this is Newlib, and only enable POSIX.1-1990
CPPDEFINES = ['RT_USING_NEWLIB', '_POSIX_C_SOURCE=1']
2021-02-23 03:21:16 +08:00
group = DefineGroup('libc', src, depend = [], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES, LIBS = LIBS)
Return('group')