Browse Source

[kernel] 优化Sconscript脚本

Meco Man 2 years ago
parent
commit
d1c353f6b6
2 changed files with 4 additions and 7 deletions
  1. 0 1
      components/fal/SConscript
  2. 4 6
      src/SConscript

+ 0 - 1
components/fal/SConscript

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

+ 4 - 6
src/SConscript

@@ -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')