rt-thread-official/components/drivers/spi/SConscript

41 lines
1.1 KiB
Python
Raw Normal View History

2013-01-08 22:40:58 +08:00
from building import *
import rtconfig
2013-01-08 22:40:58 +08:00
2014-07-31 14:42:37 +08:00
cwd = GetCurrentDir()
src = ['spi_core.c', 'spi_dev.c']
CPPPATH = [cwd, cwd + '/../include']
LOCAL_CCFLAGS = ''
2014-07-31 14:42:37 +08:00
if GetDepend('RT_USING_QSPI'):
src += ['qspi_core.c']
2014-07-31 14:42:37 +08:00
src_device = []
if GetDepend('RT_USING_SPI_WIFI'):
src_device += ['spi_wifi_rw009.c']
if GetDepend('RT_USING_ENC28J60'):
src_device += ['enc28j60.c']
if GetDepend('RT_USING_SPI_MSD'):
src_device += ['spi_msd.c']
if GetDepend('RT_USING_SFUD'):
src_device += ['spi_flash_sfud.c', 'sfud/src/sfud.c']
CPPPATH += [cwd + '/sfud/inc']
if GetDepend('RT_SFUD_USING_SFDP'):
src_device += ['sfud/src/sfud_sfdp.c']
2021-12-22 00:39:08 +08:00
if rtconfig.CROSS_TOOL == 'gcc' or rtconfig.CROSS_TOOL == 'clang':
LOCAL_CCFLAGS += ' -std=c99'
elif rtconfig.CROSS_TOOL == 'keil':
2021-01-11 20:07:12 +08:00
if rtconfig.PLATFORM == 'armcc':
LOCAL_CCFLAGS += ' --c99'
elif rtconfig.PLATFORM == 'armclang':
LOCAL_CCFLAGS += ' -std=c99'
2014-07-31 14:42:37 +08:00
src += src_device
group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_SPI'], CPPPATH = CPPPATH, LOCAL_CCFLAGS = LOCAL_CCFLAGS)
2013-01-08 22:40:58 +08:00
Return('group')