Skip to content

Commit 691c893

Browse files
authored
Spell out inet and lwip sources in GN (project-chip#31931)
* Spell out inet and lwip sources Prepare to have some scripts that force all headers/sources to be known to GN. * Fix some copy and paste issues * Another copy and paste issue fixed * Restyle
1 parent 613e287 commit 691c893

File tree

4 files changed

+44
-40
lines changed

4 files changed

+44
-40
lines changed

src/inet/BUILD.gn

+34
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,20 @@ source_set("inet_config_header") {
7272
deps = [ ":inet_buildconfig" ]
7373
}
7474

75+
source_set("impl_header") {
76+
sources = [ "InetInterfaceImpl.h" ]
77+
public_configs = [ "${chip_root}/src:includes" ]
78+
public_deps = [ "${chip_root}/src/system:system_config_header" ]
79+
}
80+
7581
static_library("inet") {
7682
output_name = "libInetLayer"
7783

84+
# EndpointState header is one of:
85+
# - src/inet/EndPointStateLwIP.h
86+
# - src/inet/EndPointStateNetworkFramework.h
87+
# - src/inet/EndPointStateOpenThread.h
88+
# - src/inet/EndPointStateSockets.h
7889
sources = [
7990
"EndPointBasis.h",
8091
"EndPointState${chip_system_config_inet}.h",
@@ -98,6 +109,7 @@ static_library("inet") {
98109
]
99110

100111
public_deps = [
112+
":impl_header",
101113
":inet_config_header",
102114
"${chip_root}/src/lib/core:types",
103115
"${chip_root}/src/lib/support",
@@ -115,6 +127,13 @@ static_library("inet") {
115127
}
116128

117129
if (chip_inet_config_enable_tcp_endpoint) {
130+
# Possible TCPEndpointImpl files:
131+
# - TCPEndPointImplLwIP.cpp
132+
# - TCPEndPointImplLwIP.h
133+
# - TCPEndPointImplOpenThread.cpp
134+
# - TCPEndPointImplOpenThread.h
135+
# - TCPEndPointImplSockets.cpp
136+
# - TCPEndPointImplSockets.h
118137
sources += [
119138
"TCPEndPoint.cpp",
120139
"TCPEndPoint.h",
@@ -125,6 +144,15 @@ static_library("inet") {
125144
}
126145

127146
if (chip_inet_config_enable_udp_endpoint) {
147+
# Possible UDPEndpointImpl files:
148+
# - UDPEndPointImplLwIP.cpp
149+
# - UDPEndPointImplLwIP.h
150+
# - UDPEndPointImplNetworkFramework.cpp
151+
# - UDPEndPointImplNetworkFramework.h
152+
# - UDPEndPointImplOpenThread.cpp
153+
# - UDPEndPointImplOpenThread.h
154+
# - UDPEndPointImplSockets.cpp
155+
# - UDPEndPointImplSockets.h
128156
sources += [
129157
"BasicPacketFilters.h",
130158
"EndpointQueueFilter.h",
@@ -134,6 +162,12 @@ static_library("inet") {
134162
"UDPEndPointImpl${chip_system_config_inet}.h",
135163
"UDPEndPointImpl.h",
136164
]
165+
166+
if (chip_system_config_inet == "Sockets") {
167+
# TODO: dependency on this one is not clear as it is only ever
168+
# enabled through CMakeLists.txt. Added here for completeness
169+
sources += [ "ZephyrSocket.h" ]
170+
}
137171
}
138172

139173
if (chip_with_nlfaultinjection) {

src/inet/tests/TestInetLayer.h

-39
This file was deleted.

src/platform/android/BUILD.gn

+4-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ static_library("android") {
8484

8585
source_set("inet") {
8686
sources = [ "InetInterfaceImpl.cpp" ]
87-
deps = [ "${chip_root}/src/lib/support" ]
87+
deps = [
88+
"${chip_root}/src/inet:impl_header",
89+
"${chip_root}/src/lib/support",
90+
]
8891
}
8992

9093
android_library("java") {

src/system/BUILD.gn

+6
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@ static_library("system") {
248248
]
249249

250250
if (chip_system_layer_impl_config_file == "") {
251+
# This includes one of:
252+
# - SystemLayerImplFreeRTOS.h
253+
# - SystemLayerImplFreeRTOS.cpp
254+
# or
255+
# - SystemLayerImplSelect.h
256+
# - SystemLayerImplSelect.cpp
251257
sources += [
252258
"SystemLayerImpl${chip_system_config_event_loop}.cpp",
253259
"SystemLayerImpl${chip_system_config_event_loop}.h",

0 commit comments

Comments
 (0)