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