2013-01-08 22:40:58 +08:00
|
|
|
Import('RTT_ROOT')
|
|
|
|
Import('rtconfig')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
2017-11-09 14:54:07 +08:00
|
|
|
src = []
|
|
|
|
depend = []
|
2013-01-08 22:40:58 +08:00
|
|
|
|
|
|
|
CPPPATH = [cwd + '/../include']
|
|
|
|
group = []
|
|
|
|
|
2018-09-18 18:41:33 +08:00
|
|
|
if GetDepend(['RT_USING_MTD']):
|
|
|
|
src += ['mtd.c']
|
|
|
|
depend += ['RT_USING_MTD']
|
|
|
|
|
|
|
|
if GetDepend(['MTD_USING_NOR']):
|
|
|
|
src += ['mtdnor.c']
|
|
|
|
depend += ['MTD_USING_NOR']
|
|
|
|
if GetDepend(['MTD_USING_NAND']):
|
|
|
|
src += ['mtdnand.c']
|
|
|
|
depend += ['MTD_USING_NAND']
|
|
|
|
|
2013-01-08 22:40:58 +08:00
|
|
|
if GetDepend(['RT_USING_MTD_NOR']):
|
2017-11-09 14:54:07 +08:00
|
|
|
src += ['mtd_nor.c']
|
|
|
|
depend += ['RT_USING_MTD_NOR']
|
|
|
|
|
2013-01-08 22:40:58 +08:00
|
|
|
if GetDepend(['RT_USING_MTD_NAND']):
|
2017-11-09 14:54:07 +08:00
|
|
|
src += ['mtd_nand.c']
|
|
|
|
depend += ['RT_USING_MTD_NAND']
|
|
|
|
|
|
|
|
if src:
|
|
|
|
group = DefineGroup('DeviceDrivers', src, depend = depend, CPPPATH = CPPPATH)
|
2013-01-08 22:40:58 +08:00
|
|
|
|
2017-11-09 14:54:07 +08:00
|
|
|
Return('group')
|