提交 5562ddf7 编写于 作者: B bernard.xiong

add group script support.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@641 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 d307a74a
......@@ -3,8 +3,26 @@ Import('env')
Import('rtconfig')
# build each components
objs = ''
if rtconfig.RT_USING_MINILIBC:
objs = objs + SConscript('libc/minilibc/SConscript')
if rtconfig.RT_USING_FINSH:
objs = objs + SConscript('finsh/SConscript')
if rtconfig.RT_USING_DFS:
objs = objs + SConscript('dfs/SConscript')
if rtconfig.RT_USING_LWIP:
objs = objs + SConscript('net/lwip/SConscript')
if rtconfig.RT_USING_RTGUI:
objs = objs + SConscript('rtgui/SConscript')
# build each modules
SConscript('hello/SConscript')
SConscript('thread/SConscript')
if rtconfig.CROSS_TOOL == 'gcc':
SConscript('hello/SConscript')
SConscript('thread/SConscript')
Return('objs')
Import('env')
Import('rtconfig')
Import('RTT_ROOT')
Import('projects')
dfs = Split("""
src/dfs_fs.c
......@@ -47,20 +48,35 @@ filesystems/yaffs2/yaffs_checkptrw.c
filesystems/yaffs2/yaffs_qsort.c
""")
# The set of source files associated with this SConscript file.
src_local = dfs
path = [RTT_ROOT + '/filesystem/dfs', RTT_ROOT + '/filesystem/dfs/include']
# The set of source files associated with this SConscript file.
path = [RTT_ROOT + '/components/dfs', RTT_ROOT + '/components/dfs/include']
if rtconfig.RT_USING_DFS_YAFFS2:
src_local = src_local + yaffs2_main + yaffs2_comm
path = path + [RTT_ROOT + '/filesystem/dfs/filesystems/yaffs2', RTT_ROOT + '/filesystem/dfs/filesystems/yaffs2/direct']
path = path + [RTT_ROOT + '/components/dfs/filesystems/yaffs2', RTT_ROOT + '/components/dfs/filesystems/yaffs2/direct']
if rtconfig.RT_USING_DFS_ELMFAT:
src_local = src_local + elmfat
path = path + [RTT_ROOT + '/filesystem/dfs/filesystems/elmfat']
# path = path + [RTT_ROOT + '/components/dfs/filesystems/elmfat']
# group definitions
group = {}
group['name'] = 'Filesystem'
group['src'] = File(src_local)
group['CCFLAGS'] = ''
group['CPPPATH'] = path
group['CPPDEFINES'] = ''
group['LINKFLAGS'] = ''
# add group to project list
projects.append(group)
env.Append(CPPPATH = path)
env.Append(CCFLAGS = group['CCFLAGS'])
env.Append(CPPPATH = group['CPPPATH'])
env.Append(CPPDEFINES = group['CPPDEFINES'])
env.Append(LINKFLAGS = group['LINKFLAGS'])
obj = env.Object(src_local)
obj = env.Object(group['src'])
Return('obj')
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')
......@@ -4,7 +4,7 @@ Import('RTT_ROOT')
# The set of source files associated with this SConscript file.
src_local = Glob('*.c')
env.Append(CPPPATH = RTT_ROOT + '/libc/minilibc')
env.Append(CPPPATH = RTT_ROOT + '/components/libc/minilibc')
obj = env.Object(src_local)
Return('obj')
Import('env')
Import('rtconfig')
Import('RTT_ROOT')
Import('projects')
src_local = Split("""
src/api/api_lib.c
......@@ -60,10 +61,31 @@ src/netif/ppp/vj.c
""")
# The set of source files associated with this SConscript file.
path = [RTT_ROOT + '/net/lwip/src', RTT_ROOT + '/net/lwip/src/include', RTT_ROOT + '/net/lwip/src/include/ipv4', RTT_ROOT + '/net/lwip/src/arch/include', RTT_ROOT + '/net/lwip/src/include/netif', RTT_ROOT + '/net/lwip/src/netif/ppp']
path = [RTT_ROOT + '/components/net/lwip/src',
RTT_ROOT + '/components/net/lwip/src/include',
RTT_ROOT + '/components/net/lwip/src/include/ipv4',
RTT_ROOT + '/components/net/lwip/src/arch/include',
RTT_ROOT + '/components/net/lwip/src/include/netif',
RTT_ROOT + '/components/net/lwip/src/netif/ppp']
env.Append(CPPPATH = path)
# group definitions
print 'LwIP group=='
group = {}
group['name'] = 'LwIP'
group['src'] = File(src_local)
group['CCFLAGS'] = ''
group['CPPPATH'] = path
group['CPPDEFINES'] = ''
group['LINKFLAGS'] = ''
obj = env.Object(src_local)
# add group to project list
projects.append(group)
env.Append(CCFLAGS = group['CCFLAGS'])
env.Append(CPPPATH = group['CPPPATH'])
env.Append(CPPDEFINES = group['CPPDEFINES'])
env.Append(LINKFLAGS = group['LINKFLAGS'])
obj = env.Object(group['src'])
Return('obj')
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册