SConscript 1.9 KB

1234567891011121314151617181920212223242526272829303132333435
  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_HSUSBD') and ( GetDepend('BSP_USING_USBD') or GetDepend('BSP_USING_HSUSBH') or GetDepend('BSP_USING_HSOTG') ):
  10. print 'Sorry, wrong selection.'
  11. print '[Hint] You already select BOARD_USING_HSUSBD. Please de-select BSP_USING_USBD, BSP_USING_HSUSBH and BSP_USING_HSOTG options.'
  12. sys.exit(1)
  13. elif GetDepend('BOARD_USING_HSUSBD_USBH') and ( GetDepend('BSP_USING_USBD') or GetDepend('BSP_USING_HSUSBH') or GetDepend('BSP_USING_HSOTG') ):
  14. print 'Sorry, wrong selection.'
  15. print '[Hint] You already select BOARD_USING_HSUSBD_USBH. Please de-select BSP_USING_USBD, BSP_USING_HSUSBH and BSP_USING_HSOTG options.'
  16. sys.exit(1)
  17. elif GetDepend('BOARD_USING_HSUSBH') and ( GetDepend('BSP_USING_USBH') or GetDepend('BSP_USING_HSUSBD') or GetDepend('BSP_USING_HSOTG') ):
  18. print 'Sorry, wrong selection.'
  19. print '[Hint] You already select BOARD_USING_HSUSBH. Please de-select BSP_USING_USBH, BSP_USING_HSUSBD and BSP_USING_HSOTG options.'
  20. sys.exit(1)
  21. elif GetDepend('BOARD_USING_HSUSBH_USBD') and ( GetDepend('BSP_USING_USBH') or GetDepend('BSP_USING_HSUSBD') or GetDepend('BSP_USING_HSOTG') ):
  22. print 'Sorry, wrong selection.'
  23. print '[Hint] You already select BOARD_USING_HSUSBH_USBD. Please de-select BSP_USING_USBH, BSP_USING_HSUSBD and BSP_USING_HSOTG options.'
  24. sys.exit(1)
  25. elif GetDepend('BOARD_USING_HSOTG') and ( GetDepend('BSP_USING_USBD') or GetDepend('BSP_USING_USBH') ):
  26. print 'Sorry, wrong selection.'
  27. print '[Hint] You already select BOARD_USING_HSOTG. Please de-select BSP_USING_USBD and BSP_USING_USBH options.'
  28. sys.exit(1)
  29. else:
  30. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
  31. Return('group')