50 lines
1.3 KiB
Python
50 lines
1.3 KiB
Python
# packages/pnna/SConscript
|
|
|
|
from building import *
|
|
import os
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
src = []
|
|
|
|
src_dir = os.path.join(cwd, 'src')
|
|
|
|
for root, dirs, files in os.walk(src_dir):
|
|
if 'driver_metal_c6x' in root:
|
|
continue
|
|
|
|
for file in files:
|
|
if file.endswith('.c'):
|
|
src.append(os.path.join(root, file))
|
|
|
|
CPPPATH = [
|
|
# PNNA 公共头
|
|
os.path.join(cwd, 'include'),
|
|
|
|
# driver_rtt 相关头文件
|
|
os.path.join(cwd, 'src', 'driver_rtt', 'driver', 'inc'),
|
|
os.path.join(cwd, 'src', 'driver_rtt', 'hal', 'inc'),
|
|
os.path.join(cwd, 'src', 'driver_rtt', 'hal', 'kernel'),
|
|
os.path.join(cwd, 'src', 'driver_rtt', 'hal', 'kernel', 'rt-thread'),
|
|
os.path.join(cwd, 'src', 'driver_rtt', 'hal', 'user'),
|
|
os.path.join(cwd, 'src', 'driver_rtt', 'hal', 'user', 'rt-thread'),
|
|
os.path.join(cwd, 'src', 'driver_rtt', 'sdk', 'inc'),
|
|
]
|
|
|
|
group = DefineGroup(
|
|
'pnna',
|
|
src,
|
|
depend = ['BSP_USING_PNNA'],
|
|
CPPPATH = CPPPATH,
|
|
CPPDEFINES = ['PLATFORM_ARM_RTT', 'NDEBUG', 'LOGLEVEL=4']
|
|
)
|
|
|
|
groups = [group]
|
|
|
|
if GetDepend('BSP_USING_PNNA'):
|
|
example_sc = os.path.join(cwd, 'examples', 'SConscript')
|
|
if os.path.exists(example_sc):
|
|
groups += SConscript(example_sc)
|
|
|
|
Return('groups')
|