2011-06-02 12:42:57 +08:00
|
|
|
Import('RTT_ROOT')
|
2011-06-19 10:47:51 +08:00
|
|
|
Import('rtconfig')
|
2011-06-02 12:42:57 +08:00
|
|
|
from building import *
|
|
|
|
|
2012-09-20 11:17:26 +08:00
|
|
|
src = Glob('*.c')
|
2011-09-25 10:28:07 +08:00
|
|
|
|
2011-06-02 12:42:57 +08:00
|
|
|
CPPPATH = [RTT_ROOT + '/include']
|
2011-09-25 10:28:07 +08:00
|
|
|
|
2011-12-27 13:41:04 +08:00
|
|
|
if GetDepend('RT_USING_MODULE') == False:
|
2012-09-20 11:17:26 +08:00
|
|
|
SrcRemove(src, ['module.c'])
|
2011-09-25 10:28:07 +08:00
|
|
|
|
2011-12-27 13:41:04 +08:00
|
|
|
if GetDepend('RT_USING_HEAP') == False or GetDepend('RT_USING_SMALL_MEM') == False:
|
|
|
|
SrcRemove(src, ['mem.c'])
|
|
|
|
|
|
|
|
if GetDepend('RT_USING_HEAP') == False or GetDepend('RT_USING_SLAB') == False:
|
|
|
|
SrcRemove(src, ['slab.c'])
|
2011-09-25 10:28:07 +08:00
|
|
|
|
2012-06-02 15:45:48 +08:00
|
|
|
if GetDepend('RT_USING_MEMPOOL') == False:
|
|
|
|
SrcRemove(src, ['mempool.c'])
|
|
|
|
|
|
|
|
if GetDepend('RT_USING_MEMHEAP') == False:
|
|
|
|
SrcRemove(src, ['memheap.c'])
|
2012-12-29 20:29:03 +08:00
|
|
|
if GetDepend('RT_USING_MEMHEAP_AS_HEAP'):
|
|
|
|
SrcRemove(src, ['mem.c'])
|
2012-06-02 15:45:48 +08:00
|
|
|
|
2020-11-21 17:56:02 +08:00
|
|
|
if GetDepend('RT_USING_USERHEAP'):
|
2020-11-25 15:45:35 +08:00
|
|
|
SrcRemove(src, ['mem.c', 'slab.c'])
|
2020-11-21 17:56:02 +08:00
|
|
|
|
2012-06-02 15:45:48 +08:00
|
|
|
if GetDepend('RT_USING_DEVICE') == False:
|
|
|
|
SrcRemove(src, ['device.c'])
|
|
|
|
|
2019-09-28 11:56:03 +08:00
|
|
|
if GetDepend('RT_USING_SMP') == False:
|
|
|
|
SrcRemove(src, ['cpu.c'])
|
|
|
|
|
2020-11-18 20:36:42 +08:00
|
|
|
CPPDEFINES = ['__RTTHREAD__']
|
|
|
|
|
|
|
|
group = DefineGroup('Kernel', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
|
2011-06-02 12:42:57 +08:00
|
|
|
|
|
|
|
Return('group')
|