SConscript 833 B

1234567891011121314151617181920212223
  1. # RT-Thread building script for component
  2. Import('RTT_ROOT')
  3. from building import *
  4. cwd = GetCurrentDir()
  5. src = Glob('*.c') + Glob('*.cpp')
  6. CPPPATH = [cwd]
  7. group = []
  8. # USB driver constrain
  9. if GetDepend('BOARD_USING_USBD') and ( GetDepend('BSP_USING_OTG') or GetDepend('BSP_USING_USBH') ):
  10. print ('Sorry, wrong selection.')
  11. print ('[Hint] You already select BOARD_USING_USBD. Please de-select BSP_USING_OTG and BSP_USING_USBH.')
  12. sys.exit(1)
  13. elif GetDepend('BOARD_USING_USBH') and ( GetDepend('BSP_USING_OTG') or GetDepend('BSP_USING_USBD') ):
  14. print ('Sorry, wrong selection.')
  15. print ('[Hint] You already select BOARD_USING_USBH. Please de-select BSP_USING_OTG and BSP_USING_USBD options.')
  16. sys.exit(1)
  17. else:
  18. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
  19. Return('group')