Sconscript 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. Import('RTT_ROOT')
  2. Import('rtconfig')
  3. from building import *
  4. # get current directory
  5. cwd = GetCurrentDir()
  6. BLE_COMMON = Glob('./components/ble/common/*.c')
  7. SrcRemove(BLE_COMMON, 'ble_conn_state.c')
  8. BLE_GATT = Glob('./components/ble/nrf_ble_gatt/*.c')
  9. BLE_ADVERTISING = Glob('./components/ble/ble_advertising/*.c')
  10. BLE_SERVICE = Glob('./components/ble/ble_services/ble_nus/*.c')
  11. BLE_SRC = BLE_COMMON + BLE_GATT + BLE_SERVICE + BLE_ADVERTISING
  12. SOFTDEVICE = Glob('./components/softdevice/common/softdevice_handler/*.c')
  13. SrcRemove(SOFTDEVICE, 'softdevice_handler_appsh.c')
  14. BLE_STACK_SRC = BLE_SRC + SOFTDEVICE
  15. path = [cwd + '/components']
  16. path += [cwd + '/components/softdevice/common/softdevice_handler']
  17. path += [cwd + '/components/softdevice/s132/headers']
  18. path += [cwd + '/components/softdevice/s132/headers/nrf52']
  19. path += [cwd + '/components/ble/common']
  20. path += [cwd + '/components/ble/nrf_ble_gatt']
  21. path += [cwd + '/components/ble/ble_advertising']
  22. path += [cwd + '/components/ble/ble_services/ble_nus']
  23. CPPDEFINES = ['BLE_STACK_SUPPORT_REQD', 'NRF_SD_BLE_API_VERSION=4', 'S132', 'SOFTDEVICE_PRESENT']
  24. group = DefineGroup('BLE_STACK', BLE_STACK_SRC, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  25. Return('group')