rt-thread-official/bsp/nuvoton/libraries/m2354/rtt_port/SConscript

24 lines
833 B
Python

# RT-Thread building script for component
Import('RTT_ROOT')
from building import *
cwd = GetCurrentDir()
src = Glob('*.c') + Glob('*.cpp')
CPPPATH = [cwd]
group = []
# USB driver constrain
if GetDepend('BOARD_USING_USBD') and ( GetDepend('BSP_USING_OTG') or GetDepend('BSP_USING_USBH') ):
print ('Sorry, wrong selection.')
print ('[Hint] You already select BOARD_USING_USBD. Please de-select BSP_USING_OTG and BSP_USING_USBH.')
sys.exit(1)
elif GetDepend('BOARD_USING_USBH') and ( GetDepend('BSP_USING_OTG') or GetDepend('BSP_USING_USBD') ):
print ('Sorry, wrong selection.')
print ('[Hint] You already select BOARD_USING_USBH. Please de-select BSP_USING_OTG and BSP_USING_USBD options.')
sys.exit(1)
else:
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
Return('group')