add group script support.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@641 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong
2010-04-18 15:27:13 +00:00
parent d307a74a60
commit 5562ddf77a
5 changed files with 91 additions and 17 deletions
+23 -5
View File
@@ -1,10 +1,28 @@
Import('env')
Import('projects')
Import('RTT_ROOT')
Import('rtconfig')
# The set of source files associated with this SConscript file.
src_local = Glob('*.c')
# group definitions
group = {}
group['name'] = 'finsh'
group['src'] = Glob('*.c')
group['CCFLAGS'] = ''
group['CPPPATH'] = [RTT_ROOT + '/components/finsh']
group['CPPDEFINES'] = ''
if rtconfig.CROSS_TOOL == 'keil':
group['LINKFLAGS'] = ' --keep __fsym_* --keep __vsym_*'
else:
group['LINKFLAGS'] = ''
env.Append(CPPPATH = RTT_ROOT + '/finsh')
# add group to project list
projects.append(group)
obj = env.Object(src_local)
Return('obj')
env.Append(CCFLAGS = group['CCFLAGS'])
env.Append(CPPPATH = group['CPPPATH'])
env.Append(CPPDEFINES = group['CPPDEFINES'])
env.Append(LINKFLAGS = group['LINKFLAGS'])
objs = env.Object(group['src'])
Return('objs')