summaryrefslogtreecommitdiff
path: root/libcpu/SConscript
diff options
context:
space:
mode:
authorHubretXie <[email protected]>2019-01-12 15:00:18 +0800
committerGitHub <[email protected]>2019-01-12 15:00:18 +0800
commit2f8f8f85e25b363662f08d5b37e9c6913535e979 (patch)
tree98b1b608d401dcb48d45734dcafc74e290f82c05 /libcpu/SConscript
parent0e333a3a1072ad134244fa2a3e84053b8656fbb7 (diff)
parent83b67ec3e29099bce9bdb6fc6a50becc03072d29 (diff)
Merge pull request #3 from RT-Thread/master
sync
Diffstat (limited to 'libcpu/SConscript')
-rw-r--r--libcpu/SConscript41
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')