cleanup scons building script

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1065 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong@gmail.com
2010-11-20 12:31:00 +00:00
parent 2fce1a91e2
commit 10732a76e9
36 changed files with 716 additions and 1010 deletions

View File

@@ -1,36 +1,13 @@
# for module compile
Import('env')
Import('rtconfig')
# for module compiling
import os
Import('RTT_ROOT')
# build each components
objs = ''
objs = []
list = os.listdir(os.path.join(RTT_ROOT, 'components'))
if rtconfig.CROSS_TOOL == 'gcc':
if 'RT_USING_NEWLIB' in dir(rtconfig) and rtconfig.RT_USING_NEWLIB:
objs = objs + SConscript('libc/newlib/SConscript')
else:
rtconfig.RT_USING_MINILIBC = True
objs = objs + SConscript('libc/minilibc/SConscript')
if 'RT_USING_PTHREAD' in dir(rtconfig) and rtconfig.RT_USING_PTHREAD:
objs = objs + SConscript('pthreads/SConscript')
if 'RT_USING_FINSH' in dir(rtconfig) and rtconfig.RT_USING_FINSH:
objs = objs + SConscript('finsh/SConscript')
if 'RT_USING_DFS' in dir(rtconfig) and rtconfig.RT_USING_DFS:
objs = objs + SConscript('dfs/SConscript')
if 'RT_USING_LWIP' in dir(rtconfig) and rtconfig.RT_USING_LWIP:
objs = objs + SConscript('net/lwip/SConscript')
if 'RT_USING_MODBUS' in dir(rtconfig) and rtconfig.RT_USING_MODBUS:
objs = objs + SConscript('net/freemodbus/SConscript')
if 'RT_USING_RTGUI' in dir(rtconfig) and rtconfig.RT_USING_RTGUI:
objs = objs + SConscript('rtgui/SConscript')
if 'RT_USING_FTK' in dir(rtconfig) and rtconfig.RT_USING_FTK:
objs = objs + SConscript('external/ftk/ftk/src/os/rt-thread/SConscript')
for d in list:
path = os.path.join(RTT_ROOT, 'components', d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(d, 'SConscript'))
Return('objs')