mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-28 10:00:24 +00:00
modify building script for components.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@642 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
Import('env')
|
||||
Import('rtconfig')
|
||||
Import('RTT_ROOT')
|
||||
Import('projects')
|
||||
|
||||
comm = rtconfig.ARCH + '/common'
|
||||
path = rtconfig.ARCH + '/' + rtconfig.CPU
|
||||
@@ -15,7 +16,19 @@ if rtconfig.PLATFORM == 'gcc':
|
||||
if rtconfig.PLATFORM == 'iar':
|
||||
src_local = Glob(path + '/*.c') + Glob(path + '/*_iar.S') + Glob(comm + '/*.c')
|
||||
|
||||
env.Append(CPPPATH = [RTT_ROOT + '/libcpu/' + rtconfig.ARCH + '/' + rtconfig.CPU])
|
||||
obj = env.Object(src_local)
|
||||
# group definitions
|
||||
group = {}
|
||||
group['name'] = rtconfig.CPU.upper()
|
||||
group['src'] = File(src_local)
|
||||
group['CCFLAGS'] = ''
|
||||
group['CPPPATH'] = [RTT_ROOT + '/libcpu/' + rtconfig.ARCH + '/' + rtconfig.CPU]
|
||||
group['CPPDEFINES'] = ''
|
||||
group['LINKFLAGS'] = ''
|
||||
|
||||
# add group to project list
|
||||
projects.append(group)
|
||||
|
||||
env.Append(CPPPATH = group['CPPPATH'])
|
||||
obj = env.Object(group['src'])
|
||||
|
||||
Return('obj')
|
||||
|
||||
Reference in New Issue
Block a user