2022-01-10 16:20:39 +08:00
|
|
|
from building import *
|
|
|
|
Import('rtconfig')
|
|
|
|
|
2022-01-10 17:10:14 +08:00
|
|
|
src = Glob('*.c') + Glob('*.cpp')
|
|
|
|
cwd = GetCurrentDir()
|
2022-01-10 16:20:39 +08:00
|
|
|
group = []
|
|
|
|
|
2022-01-10 17:10:14 +08:00
|
|
|
CPPPATH = [cwd]
|
2022-01-10 16:20:39 +08:00
|
|
|
CPPDEFINES = ['RT_USING_ARM_LIBC']
|
|
|
|
|
2022-01-10 17:10:14 +08:00
|
|
|
if GetDepend('RT_USING_DFS') == False:
|
|
|
|
SrcRemove(src, ['stdio.c'])
|
|
|
|
|
|
|
|
if GetDepend('RT_USING_MODULE') == False:
|
|
|
|
SrcRemove(src, ['libc_syms.c'])
|
|
|
|
|
2022-01-10 16:20:39 +08:00
|
|
|
if rtconfig.PLATFORM == 'armcc' or rtconfig.PLATFORM == 'armclang':
|
2022-01-10 17:10:14 +08:00
|
|
|
group = DefineGroup('libc', src, depend = ['RT_USING_LIBC'],
|
|
|
|
CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
|
2022-01-10 16:20:39 +08:00
|
|
|
|
|
|
|
Return('group')
|