1import os 2from building import * 3 4objs = [] 5cwd = GetCurrentDir() 6 7# add general drivers 8src = [] 9path = [cwd] 10 11if GetDepend(['BSP_USING_ETH']): 12 src += Glob('phy_reset.c') 13 14if GetDepend(['BSP_USING_QSPI_FLASH']): 15 src += Glob('drv_qspi_flash.c') 16 17if GetDepend(['BSP_USING_SDCARD']): 18 src += Glob('sdcard_port.c') 19 20 21CPPDEFINES = ['STM32F767xx'] 22group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) 23 24list = os.listdir(cwd) 25for item in list: 26 if os.path.isfile(os.path.join(cwd, item, 'SConscript')): 27 group = group + SConscript(os.path.join(item, 'SConscript')) 28 29Return('group') 30