summaryrefslogtreecommitdiff
path: root/bsp/nuvoton/libraries/nuc980/Driver/SConscript
blob: e3ac575c7c519130afb6c49b3eae09c445a374a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# 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'):
	if rtconfig.CROSS_TOOL == 'keil':
		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.CROSS_TOOL == 'gcc' and os.path.isfile('./Library/libstddriver_gcc.a'):
		libs += ['libstddriver_gcc']

if not libs:
	group = DefineGroup('nuc980_driver', src, depend = [''], CPPPATH = cpppath)
else:
	src = []
	group = DefineGroup('nuc980_driver', src, depend = [''], CPPPATH = cpppath, LIBS = libs, LIBPATH = libpath)

Return('group')