ソースを参照

增加SConscript脚本

mysterywolf 5 年 前
コミット
3f34a4f3a0
3 ファイル変更37 行追加0 行削除
  1. 4 0
      ChangeLog.md
  2. 22 0
      SConscript
  3. 11 0
      uCOS-II/SConscript

+ 4 - 0
ChangeLog.md

@@ -109,6 +109,10 @@
 - 整理`ucos_ii.h`宏定义,并精简了其他文件的宏定义,删除了没有必要的宏定义
 - 调整keil工程文件结构和顺序
 
+### 2020-11-29
+
+- 增加SConscript脚本
+
 
 
 # Release

+ 22 - 0
SConscript

@@ -0,0 +1,22 @@
+import os
+import shutil
+from building import * 
+
+# get current dir path
+cwd = GetCurrentDir()
+
+# traversal subscript
+objs = []
+list = os.listdir(cwd)
+for d in list:
+    path = os.path.join(cwd, d)
+    if os.path.isfile(os.path.join(path, 'SConscript')):
+        objs = objs + SConscript(os.path.join(d, 'SConscript'))
+
+#delate non-used files
+try:
+    shutil.rmtree(os.path.join(cwd,'rt-thread-3.1.3'))
+except:
+    pass
+    
+Return('objs')

+ 11 - 0
uCOS-II/SConscript

@@ -0,0 +1,11 @@
+Import('rtconfig')
+from building import *
+
+cwd = GetCurrentDir()
+src	= Glob('*.c')
+
+CPPPATH = [cwd]
+
+group = DefineGroup('uCOS-II', src, depend = ['PKG_USING_UCOSII_WRAPPER'], CPPPATH = CPPPATH)
+
+Return('group')