SConscript 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. from building import *
  2. cwd = GetCurrentDir()
  3. CPPPATH = [cwd + '/include']
  4. src = Split('''
  5. src/hci_transport_h4.c
  6. src/hci_transport_h4_uart.c
  7. src/chipset.c
  8. src/hm_dump.c
  9. porting/init.c
  10. examples/advertisement.c
  11. ''')
  12. # For stack choice.
  13. if GetDepend(['HM_USING_STACK']):
  14. # Use BTStack
  15. if GetDepend(['HM_USING_STACK_BTSTACK']):
  16. src += Glob('porting/btstack/*.c')
  17. CPPPATH += [cwd + '/porting/btstack']
  18. # Use NimBLE
  19. elif GetDepend(['HM_USING_STACK_NIMBLE']):
  20. src += Glob('porting/nimble/nimble.c')
  21. # For chipset choice.
  22. if GetDepend(['HM_USING_CHIPSET']):
  23. # Chipset choice
  24. if GetDepend(['HM_USING_CHIPSET_BCM']):
  25. src += ['porting/chipset/bcm.c']
  26. elif GetDepend(['HM_USING_CHIPSET_CSR8311']):
  27. src += ['porting/chipset/csr8311.c']
  28. elif GetDepend(['HM_USING_CHIPSET_ZEPHYR']):
  29. src += ['porting/chipset/zephyr.c']
  30. # For test.
  31. if GetDepend(['HM_USING_TEST']):
  32. src += [
  33. # 'tests/hci_transport_h4.c',
  34. # 'tests/chipset.c'
  35. # 'tests/npl_os.c'
  36. ]
  37. group = DefineGroup('hm', src, depend = [''], CPPPATH = CPPPATH)
  38. Return ('group')