加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
SConscript 755 Bytes
一键复制 编辑 原始数据 按行查看 历史
肖一多 提交于 2022-06-23 00:11 . first commit
# for module compiling
import os
Import('RTT_ROOT')
Import('rtconfig')
from building import *
cwd = GetCurrentDir()
src = []
CPPPATH = []
list = os.listdir(cwd)
if rtconfig.PLATFORM == 'iar':
print("\nThe current project does not support iar build\n")
Return('group')
elif rtconfig.PLATFORM == 'gcc':
CPPPATH = [cwd]
src = Glob('./src/*.c')
elif rtconfig.PLATFORM == 'armclang':
if GetOption('target') != 'mdk5':
CPPPATH = [cwd]
src = Glob('./src/*.c')
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
group = group + SConscript(os.path.join(d, 'SConscript'))
Return('group')
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化