diff --git a/bsp/mini2440/SConstruct b/bsp/mini2440/SConstruct index a345fc867c0bf168683f9a573e43020ab121be00..ffaee9d07788e46333043312ae82154f4dbfbd65 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 7ae26d9c15dc62b11c0ad59181556521e3ecb1d1..e97e8c6ab0920eae728892a73650f3ed2aa35eae 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 01ca5b12407a8e26c5db3c965668f1ec48af9dd2..1b5715feb460f82774f02a43aab9864c6b7e7244 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