diff --git a/components/drivers/mtd/SConscript b/components/drivers/mtd/SConscript index d798f8d63..614f7a48f 100644 --- a/components/drivers/mtd/SConscript +++ b/components/drivers/mtd/SConscript @@ -9,12 +9,14 @@ mtd_nor = ['mtd_nor.c'] mtd_nand = ['mtd_nand.c'] +CPPPATH = [cwd + '/../include'] +group = [] + if GetDepend(['RT_USING_MTD_NOR']): src = src + mtd_nor + group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_MTD_NOR'], CPPPATH = CPPPATH) if GetDepend(['RT_USING_MTD_NAND']): src = src + mtd_nand - -CPPPATH = [cwd + '/../include'] -group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH) + group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_MTD_NAND'], CPPPATH = CPPPATH) Return('group')