from building import *
import os

cwd = GetCurrentDir()
src = Split('''
stm32_sfud_port.c
''')

path = []
CPPDEFINES = []

path += [cwd + '/../..' '/SFUD/sfud/inc']

src += ['../../SFUD/sfud/src/sfud.c']
src += ['../../SFUD/sfud/src/sfud_sfdp.c']

group = DefineGroup('sfud', src, depend = ['BOARD_USING_SFUD'], 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')
