2022-06-09 14:27:30 +08:00
|
|
|
Import('RTT_ROOT')
|
|
|
|
Import('rtconfig')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
src = Glob('*.c') + Glob('*.cpp')
|
|
|
|
CPPPATH = [cwd, str(Dir('#'))]
|
|
|
|
|
2022-08-15 22:32:27 +08:00
|
|
|
if rtconfig.PLATFORM in ['gcc']:
|
2022-06-09 14:27:30 +08:00
|
|
|
src += Glob(RTT_ROOT + '/bsp/rockchip/common/drivers/drv_cache_gcc.S')
|
2022-08-15 22:32:27 +08:00
|
|
|
elif rtconfig.PLATFORM in ['armcc', 'armclang']:
|
2022-06-09 14:27:30 +08:00
|
|
|
src += Glob(RTT_ROOT + '/bsp/rockchip/common/drivers/drv_cache_arm.s')
|
2022-08-15 22:32:27 +08:00
|
|
|
elif rtconfig.PLATFORM in ['iccarm']:
|
2022-06-09 14:27:30 +08:00
|
|
|
src += Glob(RTT_ROOT + '/bsp/rockchip/common/drivers/drv_cache_iar.s')
|
|
|
|
|
|
|
|
group = DefineGroup('driver', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
# build for sub-directory
|
|
|
|
list = os.listdir(cwd)
|
|
|
|
objs = []
|
|
|
|
|
|
|
|
for d in list:
|
|
|
|
path = os.path.join(cwd, d)
|
|
|
|
if os.path.isfile(os.path.join(path, 'SConscript')):
|
|
|
|
objs = objs + SConscript(os.path.join(d, 'SConscript'))
|
|
|
|
group = group + objs
|
|
|
|
|
|
|
|
Return('group')
|