diff options
| author | bernard <[email protected]> | 2017-10-13 12:44:54 +0800 |
|---|---|---|
| committer | bernard <[email protected]> | 2017-10-13 12:44:54 +0800 |
| commit | 8bdf993bfc38f9b652a7af60cb071c708ad7dea6 (patch) | |
| tree | e9a17b508d1e348b4b5cfa0b18016a29514e3fc1 /components/libc/SConscript | |
| parent | 444915d1eac7eb1059a1a5b02eb8c0393ce4a79c (diff) | |
[libc] Build correct SConscript file.
Diffstat (limited to 'components/libc/SConscript')
| -rw-r--r-- | components/libc/SConscript | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/components/libc/SConscript b/components/libc/SConscript index aa86bdee86..4c815c49b8 100644 --- a/components/libc/SConscript +++ b/components/libc/SConscript @@ -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() - -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') +list = os.listdir(cwd) -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') |
