from building import *
import rtconfig

cwd     = GetCurrentDir()
src     = []
CPPPATH = [cwd]
LOCAL_CCFLAGS = ''

if GetDepend(['FAL_USING_SFUD_PORT']):
    src += Glob('fal_flash_sfud_port.c')
    
if GetDepend(['BSP_USING_ON_CHIP_FLASH']):
	src += Glob('fal_flash_stm32f4_port.c')

if rtconfig.CROSS_TOOL == 'gcc':
    LOCAL_CCFLAGS += ' -std=c99'
elif rtconfig.CROSS_TOOL == 'keil':
    LOCAL_CCFLAGS += ' --c99'

group = DefineGroup('fal', src, depend = ['PKG_USING_FAL'], CPPPATH = CPPPATH, LOCAL_CCFLAGS = LOCAL_CCFLAGS)

Return('group')
