2021-05-12 19:15:17 +08:00
|
|
|
|
# RT-Thread building script for component
|
|
|
|
|
|
2022-06-03 10:01:15 +08:00
|
|
|
|
import os
|
2021-05-12 19:15:17 +08:00
|
|
|
|
Import('RTT_ROOT')
|
|
|
|
|
from building import *
|
|
|
|
|
|
2022-06-03 10:01:15 +08:00
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
objs = []
|
|
|
|
|
list = os.listdir(cwd)
|
2021-05-12 19:15:17 +08:00
|
|
|
|
src = Glob('*.c') + Glob('*.cpp')
|
|
|
|
|
CPPPATH = [cwd]
|
|
|
|
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
|
|
|
|
|
2022-06-03 10:01:15 +08:00
|
|
|
|
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'))
|
|
|
|
|
|
|
|
|
|
objs += group
|
|
|
|
|
|
|
|
|
|
Return('objs')
|