[DeviceDrivers] support using RT_USING_MTD_NOR and RT_USING_MTD_NAND at the same time

This commit is contained in:
tanek liang 2017-11-09 14:54:07 +08:00 committed by Bernard Xiong
parent ef219c20c2
commit 99e5e90c40

View File

@ -4,19 +4,20 @@ from building import *
cwd = GetCurrentDir() cwd = GetCurrentDir()
src = [] src = []
depend = []
mtd_nor = ['mtd_nor.c']
mtd_nand = ['mtd_nand.c']
CPPPATH = [cwd + '/../include'] CPPPATH = [cwd + '/../include']
group = [] group = []
if GetDepend(['RT_USING_MTD_NOR']): if GetDepend(['RT_USING_MTD_NOR']):
src = src + mtd_nor src += ['mtd_nor.c']
group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_MTD_NOR'], CPPPATH = CPPPATH) depend += ['RT_USING_MTD_NOR']
if GetDepend(['RT_USING_MTD_NAND']): if GetDepend(['RT_USING_MTD_NAND']):
src = src + mtd_nand src += ['mtd_nand.c']
group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_MTD_NAND'], CPPPATH = CPPPATH) depend += ['RT_USING_MTD_NAND']
if src:
group = DefineGroup('DeviceDrivers', src, depend = depend, CPPPATH = CPPPATH)
Return('group') Return('group')