mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-10-17 08:03:45 +08:00
[libc] Build correct SConscript file.
This commit is contained in:
@@ -1,27 +1,15 @@
|
||||
# for libc component
|
||||
import os
|
||||
Import('rtconfig')
|
||||
# RT-Thread building script for bridge
|
||||
|
||||
import os
|
||||
from building import *
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
objs = []
|
||||
cwd = GetCurrentDir()
|
||||
list = os.listdir(cwd)
|
||||
|
||||
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')
|
||||
|
||||
if GetDepend('RT_USING_LIBC') and GetDepend('RT_USING_PTHREADS'):
|
||||
objs = objs + SConscript('pthreads/SConscript')
|
||||
|
||||
if GetDepend('RT_USING_MODULE') and GetDepend('RT_USING_LIBDL'):
|
||||
objs = objs + SConscript('libdl/SConscript')
|
||||
for d in list:
|
||||
path = os.path.join(cwd, d)
|
||||
if os.path.isfile(os.path.join(path, 'SConscript')):
|
||||
objs = objs + SConscript(os.path.join(d, 'SConscript'))
|
||||
|
||||
Return('objs')
|
||||
|
Reference in New Issue
Block a user