diff options
| author | [email protected] <[email protected]> | 2010-11-20 12:31:00 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2010-11-20 12:31:00 +0000 |
| commit | 10732a76e9a3bf1ead47cf9848c6838236e4e343 (patch) | |
| tree | 7475b1f6ff77e80bd357fc551de80565c9486080 /libcpu/SConscript | |
| parent | 2fce1a91e2577f06b68151dffa15558750346d02 (diff) | |
cleanup scons building script
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1065 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'libcpu/SConscript')
| -rw-r--r-- | libcpu/SConscript | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/libcpu/SConscript b/libcpu/SConscript index bd854aa5f7..9b5d30e046 100644 --- a/libcpu/SConscript +++ b/libcpu/SConscript @@ -1,34 +1,21 @@ -Import('env') -Import('rtconfig') Import('RTT_ROOT') -Import('projects') +Import('rtconfig') +from building import * comm = rtconfig.ARCH + '/common' path = rtconfig.ARCH + '/' + rtconfig.CPU # The set of source files associated with this SConscript file. if rtconfig.PLATFORM == 'armcc': - src_local = Glob(path + '/*.c') + Glob(path + '/*_rvds.S') + Glob(comm + '/*.c') + src = Glob(path + '/*.c') + Glob(path + '/*_rvds.S') + Glob(comm + '/*.c') if rtconfig.PLATFORM == 'gcc': - src_local = Glob(path + '/*.c') + Glob(path + '/*_gcc.S') + Glob(comm + '/*.c') + Glob(path + '/*_init.S') + src = Glob(path + '/*.c') + Glob(path + '/*_gcc.S') + Glob(comm + '/*.c') + Glob(path + '/*_init.S') if rtconfig.PLATFORM == 'iar': - src_local = Glob(path + '/*.c') + Glob(path + '/*_iar.S') + Glob(comm + '/*.c') - -# group definitions -group = {} -group['name'] = rtconfig.CPU.upper() -group['src'] = File(src_local) -group['CCFLAGS'] = '' -group['CPPPATH'] = [RTT_ROOT + '/libcpu/' + rtconfig.ARCH + '/' + rtconfig.CPU, RTT_ROOT + '/libcpu/' + rtconfig.ARCH + '/common'] -group['CPPDEFINES'] = '' -group['LINKFLAGS'] = '' - -# add group to project list -projects.append(group) + src = Glob(path + '/*.c') + Glob(path + '/*_iar.S') + Glob(comm + '/*.c') -env.Append(CPPPATH = group['CPPPATH']) -obj = env.Object(group['src']) +CPPPATH = [RTT_ROOT + '/libcpu/' + rtconfig.ARCH + '/' + rtconfig.CPU, RTT_ROOT + '/libcpu/' + rtconfig.ARCH + '/common'] +group = DefineGroup(rtconfig.CPU.upper(), src, depend = [''], CPPPATH = CPPPATH) -Return('obj') +Return('group') |
