29 lines
824 B
Python
29 lines
824 B
Python
Import('RTT_ROOT')
|
|
Import('rtconfig')
|
|
from building import *
|
|
|
|
cwd = GetCurrentDir()
|
|
src = Glob('*.c') + Glob('*.cpp')
|
|
CPPPATH = [cwd, str(Dir('#'))]
|
|
|
|
if rtconfig.CROSS_TOOL == 'gcc':
|
|
src += Glob(RTT_ROOT + '/bsp/rockchip/common/drivers/drv_cache_gcc.S')
|
|
elif rtconfig.CROSS_TOOL == 'keil':
|
|
src += Glob(RTT_ROOT + '/bsp/rockchip/common/drivers/drv_cache_arm.s')
|
|
elif rtconfig.CROSS_TOOL == 'iar':
|
|
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')
|