-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSConscript
More file actions
90 lines (75 loc) · 3.21 KB
/
SConscript
File metadata and controls
90 lines (75 loc) · 3.21 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Import('RTT_ROOT')
Import('rtconfig')
from building import *
cwd = GetCurrentDir()
# add the general drivers.
src = Split("""
""")
# add esp-hosted common source and header files
src += Glob('esp-hosted/common/proto/*.c')
src += Glob('esp-hosted/host/common/*.c')
path = [cwd + '/esp-hosted/host']
path += [cwd + '/esp-hosted/common/proto']
path += [cwd + '/esp-hosted/common/include']
# add protobuf source and header files
src += Glob('esp-hosted/common/protobuf-c/protobuf-c/*.c')
path += [cwd + '/esp-hosted/common/protobuf-c']
# add host api source and header files
src += Glob('esp-hosted/host/api/src/*.c')
path += [cwd + '/esp-hosted/host/api/include']
# add components source and header files
src += Glob('porting/components/log/*.c')
src += Glob('porting/components/utils/*.c')
src += Glob('porting/components/esp_wifi/*.c')
src += Glob('porting/components/esp_wifi_remote/*.c')
path += [cwd + '/porting/components/log']
path += [cwd + '/porting/components/utils']
path += [cwd + '/porting/components/esp_wifi/include']
path += [cwd + '/porting/components/esp_netif/include']
# add host drivers source and header files
src += Glob('esp-hosted/host/drivers/mempool/*.c')
src += Glob('esp-hosted/host/drivers/rpc/core/*.c')
src += Glob('esp-hosted/host/drivers/rpc/slaveif/*.c')
src += Glob('esp-hosted/host/drivers/rpc/wrap/*.c')
src += Glob('esp-hosted/host/drivers/serial/*.c')
src += Glob('esp-hosted/host/drivers/transport/*.c')
src += Glob('esp-hosted/host/drivers/transport/spi/*.c')
src += Glob('esp-hosted/host/drivers/virtual_serial_if/*.c')
path += [cwd + '/esp-hosted/host/drivers/mempool']
path += [cwd + '/esp-hosted/host/drivers/rpc/core']
path += [cwd + '/esp-hosted/host/drivers/rpc/slaveif']
path += [cwd + '/esp-hosted/host/drivers/rpc/wrap']
path += [cwd + '/esp-hosted/host/drivers/serial']
path += [cwd + '/esp-hosted/host/drivers/transport']
path += [cwd + '/esp-hosted/host/drivers//transport/spi']
path += [cwd + '/esp-hosted/host/drivers/virtual_serial_if']
# add host utils source and header files
src += Glob('esp-hosted/host/utils/*.c')
path += [cwd + '/esp-hosted/host/utils']
# add host port source and header files
src += Glob('porting/port/source/*.c')
path += [cwd + '/porting/port/include']
# add ota source and header files
src += Glob('porting/ota/*.c')
path += [cwd + '/porting/ota']
# add bt source and header files
if GetDepend(['ESP_HOSTED_BT_USING_VHCI_DEVICE_DRIVER']):
# add vhci device driver source and header files
src += Glob('porting/bt/vhci_dev.c')
src += Glob('porting/bt/vhci/*.c')
path += [cwd + '/porting/bt/vhci']
elif GetDepend(['ESP_HOSTED_BT_USING_NIMBLE_STACK']):
# add nimble hci driver source and header files
src += Glob('porting/bt/vhci_drv.c')
else:
# empty implementation
src += Glob('porting/bt/vhci_drv.c')
path += [cwd + '/esp-hosted/host/drivers/bt']
# add host wlan source files
src += Glob('porting/wlan/*.c')
CPPDEFINES = ['']
# RT_USING_ESP_HOSTED or PKG_USING_ESP_HOSTED
group = DefineGroup('esp-hosted', src, depend = ['RT_USING_ESP_HOSTED'], CPPPATH = path, CPPDEFINES = CPPDEFINES)
if GetDepend(['PKG_USING_ESP_HOSTED']):
group = DefineGroup('esp-hosted', src, depend = ['PKG_USING_ESP_HOSTED'], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')