SConscript 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. Import('RTT_ROOT')
  2. Import('rtconfig')
  3. from building import *
  4. src = []
  5. path = []
  6. cwd = GetCurrentDir()
  7. # Define wifi host driver paths
  8. whd = 'wifi-host-driver'
  9. whd_path = cwd + '/' + whd
  10. if GetDepend(['WHD_USING_WIFI6']):
  11. wifi_standard = 'COMPONENT_WIFI6'
  12. else:
  13. wifi_standard = 'COMPONENT_WIFI5'
  14. whd_src_path = whd_path + '/WHD' + '/' + wifi_standard
  15. whd_src_path_prefix = whd + '/WHD' + '/' + wifi_standard
  16. # Add the general drivers.
  17. src += Glob(whd_src_path_prefix + '/src/bus_protocols/whd_bus_common.c')
  18. src += Glob(whd_src_path_prefix + '/src/bus_protocols/whd_bus_sdio_protocol.c')
  19. src += Glob(whd_src_path_prefix + '/src/bus_protocols/whd_bus.c')
  20. # Add wifi host driver source and header files
  21. src += Glob(whd_src_path_prefix + '/src/*.c')
  22. path += [whd_src_path + '/src']
  23. path += [whd_src_path + '/inc']
  24. path += [whd_src_path + '/src/include']
  25. path += [whd_src_path + '/src/bus_protocols']
  26. path += [whd_src_path + '/resources/resource_imp']
  27. # Add wifi host driver porting source and header files
  28. src += Glob('porting/src/bsp/*.c')
  29. src += Glob('porting/src/wlan/*.c')
  30. src += Glob('porting/src/resources/*.c')
  31. if GetDepend(['WHD_PORTING_BSP']):
  32. path += [cwd + '/porting/inc/bsp']
  33. if GetDepend(['WHD_PORTING_HAL']):
  34. src += Glob('porting/src/hal/*.c')
  35. path += [cwd + '/porting/inc/hal']
  36. if GetDepend(['WHD_PORTING_RTOS']):
  37. src += Glob('porting/src/rtos/*.c')
  38. path += [cwd + '/porting/inc/rtos']
  39. # RT_USING_WIFI_HOST_DRIVER or PKG_USING_WIFI_HOST_DRIVER
  40. group = DefineGroup('whd', src, depend = ['RT_USING_WIFI_HOST_DRIVER'], CPPPATH = path)
  41. if GetDepend(['PKG_USING_WIFI_HOST_DRIVER']):
  42. group = DefineGroup('whd', src, depend = ['PKG_USING_WIFI_HOST_DRIVER'], CPPPATH = path)
  43. Return('group')