2021-04-21 00:56:36 +08:00
|
|
|
from building import *
|
|
|
|
|
2021-04-25 21:10:31 +08:00
|
|
|
Import('rtconfig')
|
|
|
|
|
|
|
|
src = []
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
group = []
|
|
|
|
CPPPATH = [cwd]
|
2021-10-21 09:44:01 +08:00
|
|
|
CPPDEFINES = []
|
2021-04-25 21:10:31 +08:00
|
|
|
|
|
|
|
if GetDepend('RT_USING_LIBC'):
|
|
|
|
src += Glob('*.c')
|
2021-06-12 18:11:51 +08:00
|
|
|
elif GetDepend('RT_LIBC_USING_TIME'):
|
2021-10-26 12:51:32 +08:00
|
|
|
src += ['time.c']
|
2021-04-25 21:10:31 +08:00
|
|
|
|
|
|
|
if rtconfig.CROSS_TOOL == 'keil':
|
2021-10-21 09:44:01 +08:00
|
|
|
CPPDEFINES += ['__CLK_TCK=RT_TICK_PER_SECOND']
|
2021-04-21 00:56:36 +08:00
|
|
|
|
2021-06-12 18:11:51 +08:00
|
|
|
group = DefineGroup('libc', src, depend = [], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
|
2021-05-15 21:27:31 +08:00
|
|
|
|
|
|
|
list = os.listdir(cwd)
|
2021-10-25 01:08:48 +08:00
|
|
|
for item in list:
|
|
|
|
if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
|
|
|
|
group = group + SConscript(os.path.join(item, 'SConscript'))
|
2021-05-15 21:27:31 +08:00
|
|
|
|
2021-04-25 21:10:31 +08:00
|
|
|
Return('group')
|