rt-thread-official/bsp/phytium/libraries/SConscript

77 lines
2.2 KiB
Python
Raw Normal View History

import os
from building import *
objs = []
cwd = GetCurrentDir()
STANDALONE_DIR = cwd + '/standalone'
# common source
src = Glob(STANDALONE_DIR+'/common/*.c')
path = [STANDALONE_DIR + '/common']
# arch
path += [STANDALONE_DIR + '/arch/common']
if GetDepend(['TARGET_ARMV8_AARCH32']):
src += Glob(STANDALONE_DIR+'/arch/armv8/aarch32/*.c') + Glob(STANDALONE_DIR+'/arch/armv8/aarch32/gcc/*.S')
path += [STANDALONE_DIR + '/arch/armv8/aarch32']
elif GetDepend(['TARGET_ARMV8_AARCH64']):
src += Glob(STANDALONE_DIR+'/arch/armv8/aarch64/*.c') + Glob(STANDALONE_DIR+'/arch/armv8/aarch64/gcc/*.S')
2023-01-09 10:14:23 +08:00
path += [STANDALONE_DIR + '/arch/armv8/aarch64']
# board
src += Glob(STANDALONE_DIR+'/board/common/*.c') + Glob(STANDALONE_DIR+'/board/common/*.S')
2023-01-09 10:14:23 +08:00
path += [STANDALONE_DIR + '/board/common']
if GetDepend(['TARGET_F2000_4']):
src += Glob(STANDALONE_DIR+'/board/ft2004/*.c')
2023-01-09 10:14:23 +08:00
path += [STANDALONE_DIR + '/board/ft2004']
if GetDepend(['TARGET_E2000']):
src += Glob(STANDALONE_DIR+'/board/e2000/*.c')
2023-01-09 10:14:23 +08:00
path += [STANDALONE_DIR + '/board/e2000']
if GetDepend(['TARGET_E2000Q']):
src += Glob(STANDALONE_DIR+'/board/e2000/q/*.c')
2023-01-09 10:14:23 +08:00
path += [STANDALONE_DIR + '/board/e2000/q']
if GetDepend(['TARGET_E2000D']):
src += Glob(STANDALONE_DIR+'/board/e2000/d/*.c')
2023-01-09 10:14:23 +08:00
path += [STANDALONE_DIR + '/board/e2000/d']
if GetDepend(['ARGET_E2000S']):
src += Glob(STANDALONE_DIR+'/board/e2000/s/*.c')
2023-01-09 10:14:23 +08:00
path += [STANDALONE_DIR + '/board/e2000/s']
if GetDepend(['TARGET_D2000']):
src += Glob(STANDALONE_DIR+'/board/d2000/*.c')
2023-01-09 10:14:23 +08:00
path += [STANDALONE_DIR + '/board/d2000']
# driver
## serial
if GetDepend(['ENABLE_Pl011_UART']):
src += Glob(STANDALONE_DIR+'/drivers/serial/fpl011/*.c')
2023-01-09 10:14:23 +08:00
path += [STANDALONE_DIR + '/drivers/serial/fpl011']
## gicv3
if GetDepend(['ENABLE_GICV3']):
src += Glob(STANDALONE_DIR+'/drivers/gic/fgic/*.c') + Glob(STANDALONE_DIR+'/drivers/gic/fgic/*.S')
2023-01-09 10:14:23 +08:00
path += [STANDALONE_DIR + '/drivers/gic/fgic']
# phytium ports rt-thread drivers
PORT_DRV_DIR = cwd + '/drivers'
src += Glob(PORT_DRV_DIR + '/*.S')
2023-01-09 10:14:23 +08:00
src += Glob(PORT_DRV_DIR + '/*.c')
ASFLAGS = ''
group = DefineGroup('FT_DRIVER', src, depend=[
''], CPPPATH=path, ASFLAGS = ASFLAGS)
Return('group')