SConscript 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. Import('rtconfig')
  2. import os
  3. from building import *
  4. #get current directory
  5. cwd = GetCurrentDir()
  6. CPPDEFINES=[]
  7. # Update include path
  8. path = [ os.path.join(cwd, 'debug_console'), os.path.join(cwd, 'touch'), os.path.join(cwd, 'usb'), os.path.join(cwd, 'dma_manager') ]
  9. # The set of source files associated with this SConscript file.
  10. src = []
  11. src += [ os.path.join(cwd, 'debug_console', 'hpm_debug_console.c') ]
  12. src += [ os.path.join(cwd, 'dma_manager', 'hpm_dma_manager.c') ]
  13. if GetDepend(['BSP_USING_TOUCH_GT911']):
  14. src += [os.path.join(cwd, 'touch', 'gt911', 'hpm_touch_gt911.c') ]
  15. src += [os.path.join(cwd, 'touch', 'gt911', 'hpm_gt911.c') ]
  16. path += [ os.path.join(cwd, 'touch', 'gt911') ]
  17. CPPDEFINES = ['CONFIG_TOUCH_GT911=1']
  18. if GetDepend(['BSP_USING_TOUCH_FT5406']):
  19. src += [ os.path.join(cwd, 'touch', 'ft5406', 'hpm_touch_ft5406.c') ]
  20. src += [ os.path.join(cwd, 'touch', 'ft5406', 'hpm_ft5406.c') ]
  21. path += [ os.path.join(cwd, 'touch', 'ft5406') ]
  22. CPPDEFINES = ['CONFIG_TOUCH_FT5406=1']
  23. if GetDepend(['BSP_USING_USB_DEVICE']):
  24. src += [ os.path.join(cwd, 'usb', 'device', 'hpm_usb_device.c') ]
  25. path += [ os.path.join(cwd, 'usb', 'device') ]
  26. if GetDepend(['BSP_USING_USB_HOST']):
  27. src += [ os.path.join(cwd, 'usb', 'host', 'hpm_usb_host.c') ]
  28. path += [ os.path.join(cwd, 'usb', 'host') ]
  29. group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES=CPPDEFINES)
  30. Return ('group')