From 7b6828b2b55b1356150f64c42403ed27f138dd07 Mon Sep 17 00:00:00 2001 From: "dzzxzz@gmail.com" Date: Sat, 2 Jun 2012 07:45:48 +0000 Subject: [PATCH] don't include the file while RTT don't define ex. if RT_USING_MEMHEAP isn't defined, then memheap.c won't be included git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2148 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- bsp/mb9bf506r/rtconfig.h | 2 ++ src/SConscript | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/bsp/mb9bf506r/rtconfig.h b/bsp/mb9bf506r/rtconfig.h index 8bded645af..c0969485bd 100644 --- a/bsp/mb9bf506r/rtconfig.h +++ b/bsp/mb9bf506r/rtconfig.h @@ -52,6 +52,8 @@ //
// #define RT_USING_MEMPOOL +// +#define RT_USING_MEMHEAP // #define RT_USING_HEAP // diff --git a/src/SConscript b/src/SConscript index afc784f75a..a8e8a0dcaa 100644 --- a/src/SConscript +++ b/src/SConscript @@ -19,6 +19,15 @@ if GetDepend('RT_USING_HEAP') == False or GetDepend('RT_USING_SMALL_MEM') == Fal if GetDepend('RT_USING_HEAP') == False or GetDepend('RT_USING_SLAB') == False: SrcRemove(src, ['slab.c']) +if GetDepend('RT_USING_MEMPOOL') == False: + SrcRemove(src, ['mempool.c']) + +if GetDepend('RT_USING_MEMHEAP') == False: + SrcRemove(src, ['memheap.c']) + +if GetDepend('RT_USING_DEVICE') == False: + SrcRemove(src, ['device.c']) + group = DefineGroup('Kernel', src, depend = [''], CPPPATH = CPPPATH, LINKFLAGS = LINKFLAGS) Return('group')