From 712aacd36744da94182fe2c9e8c0b05f55b3e565 Mon Sep 17 00:00:00 2001 From: "qiuyiuestc@gmail.com" Date: Mon, 23 May 2011 01:46:59 +0000 Subject: [PATCH] update rtconfig.h and SConstruct git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1424 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- bsp/mini2440/SConstruct | 16 ++++------------ bsp/mini2440/rtconfig.h | 8 ++++---- tools/building.py | 6 ++++-- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/bsp/mini2440/SConstruct b/bsp/mini2440/SConstruct index a345fc867c..ffaee9d077 100644 --- a/bsp/mini2440/SConstruct +++ b/bsp/mini2440/SConstruct @@ -23,25 +23,17 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH) Export('RTT_ROOT') Export('rtconfig') -if rtconfig.PLATFORM == 'gcc': - start_obj = 'build/libcpu/' + rtconfig.ARCH + '/' + rtconfig.CPU + '/start_gcc.o', -elif rtconfig.PLATFORM == 'armcc': - start_obj = 'build/libcpu/' + rtconfig.ARCH + '/' + rtconfig.CPU + '/start_rvds.o', - # prepare building environment -libs = PrepareBuilding(env, RTT_ROOT) +objs = PrepareBuilding(env, RTT_ROOT) if GetDepend('RT_USING_RTGUI'): - libs = libs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0) + objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0) # libc testsuite -# libs = libs + SConscript(RTT_ROOT + '/examples/libc/SConscript', variant_dir='build/examples/libc', duplicate=0) +# objs = objs + SConscript(RTT_ROOT + '/examples/libc/SConscript', variant_dir='build/examples/libc', duplicate=0) # build program -if GetDepend('RT_USING_NEWLIB'): - env.Program(target = TARGET, source = [start_obj, 'build/components/libc/newlib/syscalls.o', 'build/components/libc/newlib/libc.o'], LIBS = libs) -else: - env.Program(target = TARGET, source = start_obj, LIBS = libs) +env.Program(TARGET, objs) # end building EndBuilding(TARGET) diff --git a/bsp/mini2440/rtconfig.h b/bsp/mini2440/rtconfig.h index 7ae26d9c15..e97e8c6ab0 100644 --- a/bsp/mini2440/rtconfig.h +++ b/bsp/mini2440/rtconfig.h @@ -82,8 +82,8 @@ /* SECTION: a runtime libc library */ /* a runtime libc library */ -/* #define RT_USING_NEWLIB */ -/* #define RT_USING_PTHREADS */ +#define RT_USING_NEWLIB +#define RT_USING_PTHREADS /* SECTION: C++ support */ /* Using C++ support */ @@ -99,12 +99,12 @@ #define RT_DFS_ELM_MAX_LFN 128 /* #define RT_USING_DFS_YAFFS2 */ /* #define RT_USING_DFS_UFFS */ -/* #define RT_USING_DFS_DEVFS */ +#define RT_USING_DFS_DEVFS /* #define RT_USING_DFS_NFS */ #define RT_NFS_HOST_EXPORT "192.168.1.5:/" -/* #define DFS_USING_WORKDIR */ +#define DFS_USING_WORKDIR /* the max number of mounted filesystem */ #define DFS_FILESYSTEMS_MAX 4 diff --git a/tools/building.py b/tools/building.py index 01ca5b1240..1b5715feb4 100644 --- a/tools/building.py +++ b/tools/building.py @@ -343,8 +343,10 @@ def DefineGroup(name, src, depend, **parameters): if group.has_key('LINKFLAGS'): Env.Append(LINKFLAGS = group['LINKFLAGS']) - objs = Env.Object(group['src']) - objs = Env.Library(name, objs) + objs = Env.Object(group['src']) + + if group.has_key('LIBRARY'): + objs = Env.Library(name, objs) return objs -- GitLab