rt-thread/bsp/nuvoton/libraries/nuc980/Driver/SConscript

27 lines
960 B
Python
Raw Normal View History

# RT-Thread building script for component
Import('rtconfig')
from building import *
cwd = GetCurrentDir()
libs = []
src = Glob('Source/*.c') + Glob('Source/*.cpp')
cpppath = [cwd + '/Include']
libpath = [cwd + '/Library']
if not GetDepend('BSP_USE_STDDRIVER_SOURCE'):
2023-01-09 10:14:23 +08:00
if rtconfig.PLATFORM in ['armcc', 'armclang']:
if GetOption('target') == 'mdk4' and os.path.isfile('./Library/libstddriver_keil4.lib'):
libs += ['libstddriver_keil4']
if GetOption('target') == 'mdk5' and os.path.isfile('./Library/libstddriver_keil.lib'):
libs += ['libstddriver_keil']
elif rtconfig.PLATFORM in ['gcc'] and os.path.isfile('./Library/libstddriver_gcc.a'):
libs += ['libstddriver_gcc']
if not libs:
2023-01-09 10:14:23 +08:00
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = cpppath)
else:
2023-01-09 10:14:23 +08:00
src = []
group = DefineGroup('Libraries', src, depend = [''], CPPPATH = cpppath, LIBS = libs, LIBPATH = libpath)
Return('group')