diff options
| author | Bernard Xiong <[email protected]> | 2019-01-11 09:44:43 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-01-11 09:44:43 +0800 |
| commit | 40ca27d994184d2a65a7ec518bbf9b9a70700ea1 (patch) | |
| tree | a11db7ef7f223ffe2f95f7f47964e73f16821777 /libcpu/SConscript | |
| parent | 0720c3a3dcfafae2a40f44fa1bcfbf782513ba41 (diff) | |
| parent | 3a3c6c51f890fd4ee5fac446778c6beea24ebd26 (diff) | |
Merge pull request #2161 from RT-Thread/libcpu_SConscript
Libcpu sconscript
Diffstat (limited to 'libcpu/SConscript')
| -rw-r--r-- | libcpu/SConscript | 41 |
1 files changed, 9 insertions, 32 deletions
diff --git a/libcpu/SConscript b/libcpu/SConscript index 568da67cc9..774e7f4043 100644 --- a/libcpu/SConscript +++ b/libcpu/SConscript @@ -1,38 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') -from building import * - -arch = rtconfig.ARCH -comm = rtconfig.ARCH + '/common' -path = rtconfig.ARCH + '/' + rtconfig.CPU -src = [] -ASFLAGS = '' - -# The set of source files associated with this SConscript file. -if rtconfig.PLATFORM == 'armcc': - src += Glob(path + '/*.c') + Glob(path + '/*_rvds.S') - src += Glob(comm + '/*.c') + Glob(comm + '/*_rvds.S') - -if rtconfig.PLATFORM == 'gcc': - src += Glob(path + '/*_init.S') - src += Glob(path + '/*.c') + Glob(path + '/*_gcc.S') - src += Glob(comm + '/*.c') + Glob(comm + '/*_gcc.S') +# RT-Thread building script for bridge -if rtconfig.PLATFORM == 'iar': - src += Glob(path + '/*.c') + Glob(path + '/*_iar.S') - src += Glob(comm + '/*.c') + Glob(comm + '/*_iar.S') - -if rtconfig.PLATFORM == 'cl': - src = Glob(path + '/*.c') - -if rtconfig.PLATFORM == 'mingw': - src = Glob(path + '/*.c') +import os +from building import * -if rtconfig.PLATFORM == 'armcc' and rtconfig.ARCH == 'arm' and rtconfig.CPU == 'arm926': - ASFLAGS = ' --cpreproc' +Import('rtconfig') -CPPPATH = [RTT_ROOT + '/libcpu/' + arch + '/' + rtconfig.CPU, RTT_ROOT + '/libcpu/' + arch + '/common'] +cwd = GetCurrentDir() +group = [] +list = os.listdir(cwd) -group = DefineGroup(rtconfig.CPU.upper(), src, depend = [''], CPPPATH = CPPPATH, ASFLAGS = ASFLAGS) +if rtconfig.ARCH in list: + group = group + SConscript(os.path.join(cwd, rtconfig.ARCH, 'SConscript')) Return('group') |
