[kernel] 优化Sconscript脚本

This commit is contained in:
Meco Man 2022-11-14 19:26:06 -05:00 committed by Man, Jianting (Meco)
parent 6b9bdc12a9
commit d1c353f6b6
2 changed files with 4 additions and 7 deletions

View File

@ -1,6 +1,5 @@
from building import *
import rtconfig
cwd = GetCurrentDir()
src = Glob('src/*.c')

View File

@ -1,10 +1,10 @@
Import('RTT_ROOT')
Import('rtconfig')
from building import *
import os
src = Glob('*.c')
cwd = GetCurrentDir()
CPPPATH = [RTT_ROOT + '/include']
inc = [os.path.join(cwd, '..', 'include')]
if GetDepend('RT_USING_SMALL_MEM') == False:
SrcRemove(src, ['mem.c'])
@ -27,8 +27,6 @@ if GetDepend('RT_USING_DEVICE') == False:
if GetDepend('RT_USING_SMP') == False:
SrcRemove(src, ['cpu.c'])
CPPDEFINES = ['__RTTHREAD__']
group = DefineGroup('Kernel', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
group = DefineGroup('Kernel', src, depend = [''], CPPPATH = inc, CPPDEFINES = ['__RTTHREAD__'])
Return('group')