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
This commit is contained in:
dzzxzz@gmail.com 2012-06-02 07:45:48 +00:00
parent 6f6e31720b
commit 7b6828b2b5
2 changed files with 11 additions and 0 deletions

View File

@ -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" />

View File

@ -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')