-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSConscript
49 lines (38 loc) · 1.13 KB
/
SConscript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from building import *
cwd = GetCurrentDir()
CPPPATH = [cwd + '/include']
src = Split('''
src/hci_transport_h4.c
src/hci_transport_h4_uart.c
src/chipset.c
src/hm_dump.c
porting/init.c
examples/advertisement.c
''')
# For stack choice.
if GetDepend(['HM_USING_STACK']):
# Use BTStack
if GetDepend(['HM_USING_STACK_BTSTACK']):
src += Glob('porting/btstack/*.c')
CPPPATH += [cwd + '/porting/btstack']
# Use NimBLE
elif GetDepend(['HM_USING_STACK_NIMBLE']):
src += Glob('porting/nimble/nimble.c')
# For chipset choice.
if GetDepend(['HM_USING_CHIPSET']):
# Chipset choice
if GetDepend(['HM_USING_CHIPSET_BCM']):
src += ['porting/chipset/bcm.c']
elif GetDepend(['HM_USING_CHIPSET_CSR8311']):
src += ['porting/chipset/csr8311.c']
elif GetDepend(['HM_USING_CHIPSET_ZEPHYR']):
src += ['porting/chipset/zephyr.c']
# For test.
if GetDepend(['HM_USING_TEST']):
src += [
# 'tests/hci_transport_h4.c',
# 'tests/chipset.c'
# 'tests/npl_os.c'
]
group = DefineGroup('hm', src, depend = [''], CPPPATH = CPPPATH)
Return ('group')