rt-thread-official/components/libc/SConscript

28 lines
1017 B
Python
Raw Normal View History

2013-01-08 22:40:58 +08:00
# for libc component
import os
Import('rtconfig')
from building import *
2013-01-08 22:40:58 +08:00
objs = []
cwd = GetCurrentDir()
2013-01-08 22:40:58 +08:00
if GetDepend('RT_USING_LIBC'):
if os.path.isfile(os.path.join(cwd, 'newlib/SConscript')) and rtconfig.PLATFORM == 'gcc':
objs = objs + SConscript('newlib/SConscript')
elif os.path.isfile(os.path.join(cwd, 'armlibc/SConscript')) and rtconfig.PLATFORM == 'armcc':
objs = objs + SConscript('armlibc/SConscript')
elif os.path.isfile(os.path.join(cwd, 'dlib/SConscript')) and rtconfig.PLATFORM == 'iar':
objs = objs + SConscript('dlib/SConscript')
else:
if os.path.isfile(os.path.join(cwd, 'minilibc/SConscript')) and rtconfig.PLATFORM == 'gcc' and rtconfig.ARCH != 'sim':
objs = objs + SConscript('minilibc/SConscript')
2013-01-08 22:40:58 +08:00
2016-07-13 10:49:21 +08:00
if GetDepend('RT_USING_LIBC') and GetDepend('RT_USING_PTHREADS'):
objs = objs + SConscript('pthreads/SConscript')
2016-07-13 10:49:21 +08:00
if GetDepend('RT_USING_MODULE') and GetDepend('RT_USING_LIBDL'):
objs = objs + SConscript('libdl/SConscript')
2013-01-08 22:40:58 +08:00
Return('objs')