2022-03-11 09:17:46 +08:00
|
|
|
|
|
|
|
from building import *
|
|
|
|
import rtconfig
|
2023-03-13 11:32:51 +08:00
|
|
|
import os
|
2022-03-11 09:17:46 +08:00
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
2023-03-13 11:32:51 +08:00
|
|
|
objs = []
|
2022-03-11 09:17:46 +08:00
|
|
|
src = []
|
|
|
|
|
|
|
|
if GetDepend(['BSP_USING_RW007']):
|
|
|
|
src += Glob('drv_rw007.c')
|
|
|
|
|
|
|
|
CPPPATH = [cwd]
|
2022-03-30 10:22:27 +08:00
|
|
|
LOCAL_CFLAGS = ''
|
2022-03-11 09:17:46 +08:00
|
|
|
|
2022-08-15 22:32:27 +08:00
|
|
|
if rtconfig.PLATFORM in ['gcc', 'armclang']:
|
2022-03-30 10:22:27 +08:00
|
|
|
LOCAL_CFLAGS += ' -std=c99'
|
2022-08-15 22:32:27 +08:00
|
|
|
elif rtconfig.PLATFORM in ['armcc']:
|
2022-03-30 10:22:27 +08:00
|
|
|
LOCAL_CFLAGS += ' --c99'
|
2023-03-13 11:32:51 +08:00
|
|
|
objs = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
|
|
|
|
list = os.listdir(cwd)
|
|
|
|
for item in list:
|
|
|
|
if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
|
|
|
|
objs = objs + SConscript(os.path.join(item, 'SConscript'))
|
2022-03-11 09:17:46 +08:00
|
|
|
|
2023-03-13 11:32:51 +08:00
|
|
|
Return('objs')
|
2022-03-11 09:17:46 +08:00
|
|
|
|