Skip to content

Commit 2010962

Browse files
jmartinez-silabspull[bot]
authored andcommitted
More cleanup for the openthread build targets and EFR32 (#22049)
1 parent 9ba9dd5 commit 2010962

File tree

13 files changed

+67
-62
lines changed

13 files changed

+67
-62
lines changed

examples/chef/efr32/BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ efr32_executable("chef_app") {
207207
if (chip_enable_openthread) {
208208
deps += [
209209
"${chip_root}/third_party/openthread:openthread",
210+
"${chip_root}/third_party/openthread:openthread_device",
210211
"${examples_plat_dir}:efr-matter-shell",
211212
]
212213
}

examples/light-switch-app/efr32/BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ efr32_executable("light_switch_app") {
200200
if (chip_enable_openthread) {
201201
deps += [
202202
"${chip_root}/third_party/openthread:openthread",
203+
"${chip_root}/third_party/openthread:openthread_device",
203204
"${examples_plat_dir}:efr-matter-shell",
204205
]
205206
}

examples/lighting-app/efr32/BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ efr32_executable("lighting_app") {
205205
if (chip_enable_openthread) {
206206
deps += [
207207
"${chip_root}/third_party/openthread:openthread",
208+
"${chip_root}/third_party/openthread:openthread_device",
208209
"${examples_plat_dir}:efr-matter-shell",
209210
]
210211
}

examples/lock-app/efr32/BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ efr32_executable("lock_app") {
202202
if (chip_enable_openthread) {
203203
deps += [
204204
"${chip_root}/third_party/openthread:openthread",
205+
"${chip_root}/third_party/openthread:openthread_device",
205206
"${examples_plat_dir}:efr-matter-shell",
206207
]
207208
}

examples/shell/shell_common/BUILD.gn

+4-11
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,10 @@ static_library("shell_common") {
5252

5353
if (chip_enable_openthread &&
5454
(current_os == "freertos" || current_os == "zephyr")) {
55-
if (chip_openthread_ftd) {
56-
public_deps += [
57-
"${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd",
58-
"${chip_root}/third_party/openthread/repo:libopenthread-ftd",
59-
]
60-
} else {
61-
public_deps += [
62-
"${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd",
63-
"${chip_root}/third_party/openthread/repo:libopenthread-mtd",
64-
]
65-
}
55+
public_deps += [
56+
"${chip_root}/third_party/openthread:openthread_cli",
57+
"${chip_root}/third_party/openthread:openthread_device",
58+
]
6659
}
6760

6861
if (chip_shell_cmd_server) {

examples/thermostat/efr32/BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ efr32_executable("thermostat_app") {
196196
if (chip_enable_openthread) {
197197
deps += [
198198
"${chip_root}/third_party/openthread:openthread",
199+
"${chip_root}/third_party/openthread:openthread_device",
199200
"${examples_plat_dir}:efr-matter-shell",
200201
]
201202
}

examples/window-app/efr32/BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ efr32_executable("window_app") {
188188
if (chip_enable_openthread) {
189189
deps += [
190190
"${chip_root}/third_party/openthread:openthread",
191+
"${chip_root}/third_party/openthread:openthread_device",
191192
"${examples_plat_dir}:efr-matter-shell",
192193
]
193194
}

src/inet/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ static_library("inet") {
107107
}
108108

109109
if (chip_system_config_use_open_thread_inet_endpoints) {
110-
public_deps += [ "${chip_root}/third_party/openthread:openthread" ]
110+
public_deps += [ "${chip_root}/third_party/openthread:openthread_device" ]
111111
}
112112

113113
if (chip_inet_config_enable_tcp_endpoint) {

src/platform/EFR32/BUILD.gn

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ static_library("EFR32") {
9898
"$dir_pw_kvs",
9999
]
100100
if (chip_enable_openthread) {
101-
public_deps += [ "${chip_root}/third_party/openthread:openthread" ]
101+
public_deps += [ "${chip_root}/third_party/openthread:openthread_device" ]
102102

103-
deps += [ "${chip_root}/third_party/silabs:openthread_cli" ]
103+
deps += [ "${chip_root}/third_party/openthread:openthread_cli" ]
104104

105105
sources += [
106106
"../OpenThread/OpenThreadUtils.cpp",

src/test_driver/efr32/BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ efr32_executable("efr32_device_tests") {
9696
if (chip_enable_openthread) {
9797
deps += [
9898
"${chip_root}/third_party/openthread:openthread",
99+
"${chip_root}/third_party/openthread:openthread_device",
99100
"${examples_plat_dir}:efr-matter-shell",
100101
]
101102
}

third_party/openthread/BUILD.gn

+19-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,27 @@ group("openthread") {
1616
"${chip_root}/third_party/openthread/platforms:libopenthread-platform",
1717
"${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils",
1818
]
19+
}
20+
}
21+
22+
group("openthread_device") {
23+
if (chip_openthread_target != "") {
24+
public_deps = [ chip_openthread_target ]
25+
} else {
26+
if (chip_openthread_ftd) {
27+
public_deps = [ "${openthread_root}:libopenthread-ftd" ]
28+
} else {
29+
public_deps = [ "${openthread_root}:libopenthread-mtd" ]
30+
}
31+
}
32+
}
33+
34+
group("openthread_cli") {
35+
if (chip_openthread_target == "") {
1936
if (chip_openthread_ftd) {
20-
public_deps += [ "${openthread_root}:libopenthread-ftd" ]
37+
public_deps = [ "${openthread_root}:libopenthread-cli-ftd" ]
2138
} else {
22-
public_deps += [ "${openthread_root}:libopenthread-mtd" ]
39+
public_deps = [ "${openthread_root}:libopenthread-cli-mtd" ]
2340
}
2441
}
2542
}

third_party/silabs/BUILD.gn

+33-45
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,6 @@ group("efr32_sdk") {
3131
public_deps = [ efr32_sdk_target ]
3232
}
3333

34-
if (chip_enable_openthread) {
35-
group("openthread_cli") {
36-
if (!use_silabs_thread_lib) {
37-
if (chip_openthread_ftd) {
38-
public_deps = [ "${sl_openthread_root}:libopenthread-cli-ftd" ]
39-
} else {
40-
public_deps = [ "${sl_openthread_root}:libopenthread-cli-mtd" ]
41-
}
42-
}
43-
}
44-
}
45-
4634
if (use_silabs_thread_lib) {
4735
config("libopenthread-platform_config") {
4836
include_dirs = [ "${sl_openthread_root}/examples/platforms" ]
@@ -74,7 +62,6 @@ if (use_silabs_thread_lib) {
7462
"RADIO_CONFIG_DMP_SUPPORT=1",
7563
"${efr32_board}=1",
7664
"${efr32_mcu}",
77-
"USE_SL_THREAD_CERT_LIB",
7865
"OPENTHREAD_CORE_CONFIG_PLATFORM_CHECK_FILE=\"openthread-core-efr32-config-check.h\"",
7966
]
8067

@@ -88,7 +75,6 @@ if (use_silabs_thread_lib) {
8875

8976
source_set("openthread_core_config_efr32") {
9077
sources = [
91-
"${sl_openthread_root}/src/cli/cli_config.h",
9278
"${sl_ot_efr32_root}/src/src/openthread-core-efr32-config-check.h",
9379
"${sl_ot_efr32_root}/src/src/openthread-core-efr32-config.h",
9480
]
@@ -102,37 +88,39 @@ if (use_silabs_thread_lib) {
10288
}
10389

10490
source_set("ot-efr32-cert") {
105-
sources = [
106-
"${sl_openthread_root}/examples/apps/cli/cli_uart.cpp",
107-
"${sl_openthread_root}/src/cli/cli.cpp",
108-
"${sl_openthread_root}/src/cli/cli.hpp",
109-
"${sl_openthread_root}/src/cli/cli_coap.cpp",
110-
"${sl_openthread_root}/src/cli/cli_coap.hpp",
111-
"${sl_openthread_root}/src/cli/cli_coap_secure.cpp",
112-
"${sl_openthread_root}/src/cli/cli_coap_secure.hpp",
113-
"${sl_openthread_root}/src/cli/cli_commissioner.cpp",
114-
"${sl_openthread_root}/src/cli/cli_commissioner.hpp",
115-
"${sl_openthread_root}/src/cli/cli_config.h",
116-
"${sl_openthread_root}/src/cli/cli_dataset.cpp",
117-
"${sl_openthread_root}/src/cli/cli_dataset.hpp",
118-
"${sl_openthread_root}/src/cli/cli_history.cpp",
119-
"${sl_openthread_root}/src/cli/cli_history.hpp",
120-
"${sl_openthread_root}/src/cli/cli_joiner.cpp",
121-
"${sl_openthread_root}/src/cli/cli_joiner.hpp",
122-
"${sl_openthread_root}/src/cli/cli_network_data.cpp",
123-
"${sl_openthread_root}/src/cli/cli_network_data.hpp",
124-
"${sl_openthread_root}/src/cli/cli_output.cpp",
125-
"${sl_openthread_root}/src/cli/cli_output.hpp",
126-
"${sl_openthread_root}/src/cli/cli_srp_client.cpp",
127-
"${sl_openthread_root}/src/cli/cli_srp_client.hpp",
128-
"${sl_openthread_root}/src/cli/cli_srp_server.cpp",
129-
"${sl_openthread_root}/src/cli/cli_srp_server.hpp",
130-
"${sl_openthread_root}/src/cli/cli_tcp.cpp",
131-
"${sl_openthread_root}/src/cli/cli_tcp.hpp",
132-
"${sl_openthread_root}/src/cli/cli_udp.cpp",
133-
"${sl_openthread_root}/src/cli/cli_udp.hpp",
134-
"${sl_openthread_root}/src/cli/x509_cert_key.hpp",
135-
]
91+
if (enable_openthread_cli) {
92+
sources = [
93+
"${sl_openthread_root}/examples/apps/cli/cli_uart.cpp",
94+
"${sl_openthread_root}/src/cli/cli.cpp",
95+
"${sl_openthread_root}/src/cli/cli.hpp",
96+
"${sl_openthread_root}/src/cli/cli_coap.cpp",
97+
"${sl_openthread_root}/src/cli/cli_coap.hpp",
98+
"${sl_openthread_root}/src/cli/cli_coap_secure.cpp",
99+
"${sl_openthread_root}/src/cli/cli_coap_secure.hpp",
100+
"${sl_openthread_root}/src/cli/cli_commissioner.cpp",
101+
"${sl_openthread_root}/src/cli/cli_commissioner.hpp",
102+
"${sl_openthread_root}/src/cli/cli_config.h",
103+
"${sl_openthread_root}/src/cli/cli_dataset.cpp",
104+
"${sl_openthread_root}/src/cli/cli_dataset.hpp",
105+
"${sl_openthread_root}/src/cli/cli_history.cpp",
106+
"${sl_openthread_root}/src/cli/cli_history.hpp",
107+
"${sl_openthread_root}/src/cli/cli_joiner.cpp",
108+
"${sl_openthread_root}/src/cli/cli_joiner.hpp",
109+
"${sl_openthread_root}/src/cli/cli_network_data.cpp",
110+
"${sl_openthread_root}/src/cli/cli_network_data.hpp",
111+
"${sl_openthread_root}/src/cli/cli_output.cpp",
112+
"${sl_openthread_root}/src/cli/cli_output.hpp",
113+
"${sl_openthread_root}/src/cli/cli_srp_client.cpp",
114+
"${sl_openthread_root}/src/cli/cli_srp_client.hpp",
115+
"${sl_openthread_root}/src/cli/cli_srp_server.cpp",
116+
"${sl_openthread_root}/src/cli/cli_srp_server.hpp",
117+
"${sl_openthread_root}/src/cli/cli_tcp.cpp",
118+
"${sl_openthread_root}/src/cli/cli_tcp.hpp",
119+
"${sl_openthread_root}/src/cli/cli_udp.cpp",
120+
"${sl_openthread_root}/src/cli/cli_udp.hpp",
121+
"${sl_openthread_root}/src/cli/x509_cert_key.hpp",
122+
]
123+
}
136124

137125
public_configs = [
138126
":openthread_efr32_config",

0 commit comments

Comments
 (0)