rt-thread/bsp/raspberry-pi/raspi4-32/driver/SConscript

30 lines
802 B
Python
Raw Normal View History

2020-11-27 14:30:25 +08:00
# RT-Thread building script for component
2020-05-25 17:30:05 +08:00
from building import *
cwd = GetCurrentDir()
2020-11-29 17:31:51 +08:00
src = Glob('*.c') + Glob('*.cpp') + Glob('*.a')
2020-05-25 17:30:05 +08:00
CPPPATH = [cwd, str(Dir('#'))]
2020-11-27 14:30:25 +08:00
if not GetDepend('BSP_USING_ETH'):
SrcRemove(src, ['drv_eth.c'])
if not GetDepend('BSP_USING_SPI'):
SrcRemove(src, ['drv_spi.c'])
if not GetDepend('BSP_USING_WDT'):
SrcRemove(src, ['drv_wdt.c'])
2020-12-02 10:06:59 +08:00
if not GetDepend('BSP_USING_BULETOOTH'):
SrcRemove(src, ['drv_bluetooth.c'])
2020-11-27 14:30:25 +08:00
2020-11-20 13:38:11 +08:00
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
2020-07-04 22:32:02 +08:00
# 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
2020-05-25 17:30:05 +08:00
Return('group')