summaryrefslogtreecommitdiff
path: root/libcpu/SConscript
diff options
context:
space:
mode:
Diffstat (limited to 'libcpu/SConscript')
-rw-r--r--libcpu/SConscript34
1 files changed, 9 insertions, 25 deletions
diff --git a/libcpu/SConscript b/libcpu/SConscript
index a42909e64c..6092707e6d 100644
--- a/libcpu/SConscript
+++ b/libcpu/SConscript
@@ -1,31 +1,15 @@
-Import('RTT_ROOT')
-Import('rtconfig')
-from building import *
-
-comm = rtconfig.ARCH + '/common'
-path = rtconfig.ARCH + '/' + rtconfig.CPU
-ASFLAGS = ''
-
-# The set of source files associated with this SConscript file.
-if rtconfig.PLATFORM == 'armcc':
- src = Glob(path + '/*.c') + Glob(path + '/*_rvds.S') + Glob(comm + '/*.c')
+# RT-Thread building script for bridge
-if rtconfig.PLATFORM == 'gcc':
- src = Glob(path + '/*.c') + Glob(path + '/*_gcc.S') + Glob(comm + '/*.c') + Glob(path + '/*_init.S')
-
-if rtconfig.PLATFORM == 'iar':
- src = Glob(path + '/*.c') + Glob(path + '/*_iar.S') + Glob(comm + '/*.c')
+import os
+from building import *
-if rtconfig.PLATFORM == 'cl':
- src = Glob(path + '/*.c')
+Import('rtconfig')
-if rtconfig.PLATFORM == 'mingw':
- src = Glob(path + '/*.c')
+cwd = GetCurrentDir()
+group = []
+list = os.listdir(cwd)
-if rtconfig.PLATFORM == 'armcc' and rtconfig.ARCH == 'arm' and rtconfig.CPU == 'arm926':
- ASFLAGS = ' --cpreproc'
-
-CPPPATH = [RTT_ROOT + '/libcpu/' + rtconfig.ARCH + '/' + rtconfig.CPU, RTT_ROOT + '/libcpu/' + rtconfig.ARCH + '/common']
-group = DefineGroup(rtconfig.CPU.upper(), src, depend = [''], CPPPATH = CPPPATH, ASFLAGS = ASFLAGS)
+if rtconfig.ARCH in list:
+ group = group + SConscript(os.path.join(rtconfig.ARCH, 'SConscript'))
Return('group')