mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-01 17:40:25 +08:00
ed1f8b3f64
This reverts commit a5f6fdc780d55f2bf2a1624815879e15c51082b5.
23 lines
538 B
Python
23 lines
538 B
Python
from building import *
|
|
Import('rtconfig')
|
|
|
|
src = []
|
|
cwd = GetCurrentDir()
|
|
group = []
|
|
LIBS = ['m'] # link libm
|
|
CPPPATH = [cwd]
|
|
|
|
if rtconfig.PLATFORM == 'gcc':
|
|
if GetDepend('RT_USING_LIBC'):
|
|
LIBS += ['c'] # link libc
|
|
src += Glob('*.c')
|
|
else:
|
|
src += ['syscalls.c']
|
|
|
|
# identify this is Newlib, and only enable POSIX.1-1990
|
|
CPPDEFINES = ['RT_USING_NEWLIB', '_POSIX_C_SOURCE=1']
|
|
|
|
group = DefineGroup('libc', src, depend = [], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES, LIBS = LIBS)
|
|
|
|
Return('group')
|