import os from building import * objs = [] cwd = GetCurrentDir() # add general drivers src = [] path = [cwd] if GetDepend(['BSP_USING_SPI_FLASH']): src += Glob('drv_spi_flash.c') if GetDepend(['BSP_USING_QSPI_FLASH']): src += Glob('drv_qspi_flash.c') if GetDepend('BSP_USING_LCD_SPI'): src = src + ['drv_lcd_spi.c'] src = src + ['st7735/lcd.c'] src = src + ['st7735/st7735.c'] src = src + ['st7735/st7735_reg.c'] src = src + ['st7735/logo.c'] path += [cwd + '/st7735'] CPPDEFINES = ['STM32H750xx'] group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) list = os.listdir(cwd) for item in list: if os.path.isfile(os.path.join(cwd, item, 'SConscript')): group = group + SConscript(os.path.join(item, 'SConscript')) Return('group')