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:
parent
6f6e31720b
commit
7b6828b2b5
|
@ -52,6 +52,8 @@
|
||||||
// <section name="MM" description="Memory Management" default="always" >
|
// <section name="MM" description="Memory Management" default="always" >
|
||||||
// <bool name="RT_USING_MEMPOOL" description="Using Memory Pool Management in the system" default="true" />
|
// <bool name="RT_USING_MEMPOOL" description="Using Memory Pool Management in the system" default="true" />
|
||||||
#define RT_USING_MEMPOOL
|
#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" />
|
// <bool name="RT_USING_HEAP" description="Using Dynamic Heap Management in the system" default="true" />
|
||||||
#define RT_USING_HEAP
|
#define RT_USING_HEAP
|
||||||
// <bool name="RT_USING_SMALL_MEM" description="Optimizing for small memory" default="false" />
|
// <bool name="RT_USING_SMALL_MEM" description="Optimizing for small memory" default="false" />
|
||||||
|
|
|
@ -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:
|
if GetDepend('RT_USING_HEAP') == False or GetDepend('RT_USING_SLAB') == False:
|
||||||
SrcRemove(src, ['slab.c'])
|
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)
|
group = DefineGroup('Kernel', src, depend = [''], CPPPATH = CPPPATH, LINKFLAGS = LINKFLAGS)
|
||||||
|
|
||||||
Return('group')
|
Return('group')
|
||||||
|
|
Loading…
Reference in New Issue