mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-08 15:11:08 +08:00
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1882 bbd45198-f89e-11dd-88c7-29a3b14d5316
25 lines
677 B
Python
25 lines
677 B
Python
Import('RTT_ROOT')
|
|
Import('rtconfig')
|
|
from building import *
|
|
|
|
src = Glob('*.c')
|
|
|
|
CPPPATH = [RTT_ROOT + '/include']
|
|
if rtconfig.CROSS_TOOL == 'keil' and GetDepend('RT_USING_MODULE') == True:
|
|
LINKFLAGS = ' --keep __rtmsym_* '
|
|
else:
|
|
LINKFLAGS = ''
|
|
|
|
if GetDepend('RT_USING_MODULE') == False:
|
|
SrcRemove(src, ['rtm.c', 'module.c'])
|
|
|
|
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'])
|
|
|
|
group = DefineGroup('Kernel', src, depend = [''], CPPPATH = CPPPATH, LINKFLAGS = LINKFLAGS)
|
|
|
|
Return('group')
|