2018-10-26 14:10:38 +08:00
|
|
|
from building import *
|
|
|
|
|
|
|
|
Import('rtconfig')
|
|
|
|
|
2019-08-22 15:34:50 +08:00
|
|
|
src = []
|
2018-10-26 14:10:38 +08:00
|
|
|
cwd = GetCurrentDir()
|
|
|
|
group = []
|
|
|
|
CPPPATH = [cwd]
|
|
|
|
|
2019-08-22 15:34:50 +08:00
|
|
|
if GetDepend('RT_USING_LIBC'):
|
|
|
|
src += Glob('*.c')
|
|
|
|
else:
|
2020-09-08 11:12:56 +08:00
|
|
|
if GetDepend('RT_LIBC_USING_TIME') and not GetDepend('RT_USING_MINILIBC'):
|
2019-08-22 15:34:50 +08:00
|
|
|
src += ['time.c']
|
|
|
|
|
2020-09-08 10:52:02 +08:00
|
|
|
if GetDepend('RT_USING_POSIX') == False:
|
|
|
|
SrcRemove(src, ['unistd.c'])
|
|
|
|
|
2020-09-08 13:16:49 +08:00
|
|
|
if not GetDepend('RT_USING_MINILIBC') and GetDepend('RT_USING_LIBC'):
|
|
|
|
group = DefineGroup('libc', src, depend = [''], CPPPATH = CPPPATH)
|
2018-10-26 14:10:38 +08:00
|
|
|
|
|
|
|
Return('group')
|