summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author[email protected] <[email protected]>2012-06-02 07:45:48 +0000
committer[email protected] <[email protected]>2012-06-02 07:45:48 +0000
commit7b6828b2b55b1356150f64c42403ed27f138dd07 (patch)
tree494fd68b7ffc9f02cb2a086890aaadd5e4b1784d
parent6f6e31720b27da54e217348515c1b455516f31af (diff)
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
-rw-r--r--bsp/mb9bf506r/rtconfig.h2
-rw-r--r--src/SConscript9
2 files changed, 11 insertions, 0 deletions
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 @@
// <section name="MM" description="Memory Management" default="always" >
// <bool name="RT_USING_MEMPOOL" description="Using Memory Pool Management in the system" default="true" />
#define RT_USING_MEMPOOL
+// <bool name="RT_USING_MEMHEAP" description="Using Memory Heap Management in the system" default="true" />
+#define RT_USING_MEMHEAP
// <bool name="RT_USING_HEAP" description="Using Dynamic Heap Management in the system" default="true" />
#define RT_USING_HEAP
// <bool name="RT_USING_SMALL_MEM" description="Optimizing for small memory" default="false" />
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')