2012-11-22 11:39:22 +08:00
|
|
|
from building import *
|
2017-10-13 12:44:54 +08:00
|
|
|
Import('rtconfig')
|
2012-11-22 11:39:22 +08:00
|
|
|
|
2017-10-13 12:44:54 +08:00
|
|
|
src = Glob('*.c') + Glob('*.cpp')
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
group = []
|
2014-10-28 11:45:43 +08:00
|
|
|
|
2012-11-22 11:39:22 +08:00
|
|
|
CPPPATH = [cwd]
|
2014-10-28 11:45:43 +08:00
|
|
|
CPPDEFINES = ['RT_USING_ARM_LIBC']
|
2012-11-22 11:39:22 +08:00
|
|
|
|
2018-05-14 21:37:11 +08:00
|
|
|
if GetDepend('RT_USING_DFS') == False:
|
|
|
|
SrcRemove(src, ['stdio.c'])
|
|
|
|
|
|
|
|
if GetDepend('RT_USING_MODULE') == False:
|
|
|
|
SrcRemove(src, ['libc_syms.c'])
|
|
|
|
|
2019-02-18 18:29:22 +08:00
|
|
|
if rtconfig.PLATFORM == 'armcc' or rtconfig.PLATFORM == 'armclang':
|
2017-10-13 12:44:54 +08:00
|
|
|
group = DefineGroup('libc', src, depend = ['RT_USING_LIBC'],
|
|
|
|
CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
|
2012-11-22 11:39:22 +08:00
|
|
|
|
|
|
|
Return('group')
|