提交 7b6828b2 编写于 作者: D dzzxzz@gmail.com

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
上级 6f6e3172
......@@ -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" />
......
......@@ -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')
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册