提交 2b82674a 编写于 作者: W Wayne Lin

Shrink package size.

上级 f9825299
......@@ -3,24 +3,26 @@ Import('rtconfig')
from building import *
cwd = GetCurrentDir()
src = []
libs = ['']
libpath = [cwd + '/lib']
libs = []
src = Glob('*src/*.c') + Glob('src/*.cpp')
cpppath = [cwd + '/inc']
libpath = [cwd + '/lib']
if GetDepend('BSP_USE_STDDRIVER_SOURCE'):
src = Glob('*src/*.c') + Glob('src/*.cpp')
group = DefineGroup('m480_stddriver', src, depend = [''], CPPPATH = cpppath)
else:
if not GetDepend('BSP_USE_STDDRIVER_SOURCE'):
if rtconfig.CROSS_TOOL == 'keil':
if GetOption('target') == 'mdk4':
libs += ['libstddriver_keil4']
if GetOption('target') == 'mdk5':
if GetOption('target') == 'mdk5' and os.path.isfile('./lib/libstddriver_keil.lib'):
libs += ['libstddriver_keil']
elif rtconfig.CROSS_TOOL == 'gcc':
elif GetOption('target') == 'mdk4' and os.path.isfile('./lib/libstddriver_keil4.lib'):
libs += ['libstddriver_keil4']
elif rtconfig.CROSS_TOOL == 'gcc' and os.path.isfile('./lib/libstddriver_gcc.a'):
libs += ['libstddriver_gcc']
else:
libs += ['libstddriver_iar']
elif os.path.isfile('./lib/libstddriver_iar.a'):
libs += ['libstddriver_iar']
if not libs:
group = DefineGroup('m480_stddriver', src, depend = [''], CPPPATH = cpppath)
else:
src = []
group = DefineGroup('m480_stddriver', src, depend = [''], CPPPATH = cpppath, LIBS = libs, LIBPATH = libpath)
Return('group')
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册