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'):
|
2020-09-09 00:53:53 +08:00
|
|
|
src += Glob('*.c')
|
|
|
|
if GetDepend('RT_USING_POSIX') == False:
|
|
|
|
SrcRemove(src, ['unistd.c'])
|
2019-08-22 15:34:50 +08:00
|
|
|
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
|
|
|
|
2020-09-08 16:29:47 +08:00
|
|
|
if not GetDepend('RT_USING_MINILIBC') and (GetDepend('RT_USING_LIBC') or GetDepend('RT_LIBC_USING_TIME')):
|
2020-09-08 13:16:49 +08:00
|
|
|
group = DefineGroup('libc', src, depend = [''], CPPPATH = CPPPATH)
|
2018-10-26 14:10:38 +08:00
|
|
|
|
|
|
|
Return('group')
|