diff --git a/src/inet/BUILD.gn b/src/inet/BUILD.gn index 09a6e569d5b1e0..94d6c253660491 100644 --- a/src/inet/BUILD.gn +++ b/src/inet/BUILD.gn @@ -72,9 +72,20 @@ source_set("inet_config_header") { deps = [ ":inet_buildconfig" ] } +source_set("impl_header") { + sources = [ "InetInterfaceImpl.h" ] + public_configs = [ "${chip_root}/src:includes" ] + public_deps = [ "${chip_root}/src/system:system_config_header" ] +} + static_library("inet") { output_name = "libInetLayer" + # EndpointState header is one of: + # - src/inet/EndPointStateLwIP.h + # - src/inet/EndPointStateNetworkFramework.h + # - src/inet/EndPointStateOpenThread.h + # - src/inet/EndPointStateSockets.h sources = [ "EndPointBasis.h", "EndPointState${chip_system_config_inet}.h", @@ -98,6 +109,7 @@ static_library("inet") { ] public_deps = [ + ":impl_header", ":inet_config_header", "${chip_root}/src/lib/core:types", "${chip_root}/src/lib/support", @@ -115,6 +127,13 @@ static_library("inet") { } if (chip_inet_config_enable_tcp_endpoint) { + # Possible TCPEndpointImpl files: + # - TCPEndPointImplLwIP.cpp + # - TCPEndPointImplLwIP.h + # - TCPEndPointImplOpenThread.cpp + # - TCPEndPointImplOpenThread.h + # - TCPEndPointImplSockets.cpp + # - TCPEndPointImplSockets.h sources += [ "TCPEndPoint.cpp", "TCPEndPoint.h", @@ -125,6 +144,15 @@ static_library("inet") { } if (chip_inet_config_enable_udp_endpoint) { + # Possible UDPEndpointImpl files: + # - UDPEndPointImplLwIP.cpp + # - UDPEndPointImplLwIP.h + # - UDPEndPointImplNetworkFramework.cpp + # - UDPEndPointImplNetworkFramework.h + # - UDPEndPointImplOpenThread.cpp + # - UDPEndPointImplOpenThread.h + # - UDPEndPointImplSockets.cpp + # - UDPEndPointImplSockets.h sources += [ "BasicPacketFilters.h", "EndpointQueueFilter.h", @@ -134,6 +162,12 @@ static_library("inet") { "UDPEndPointImpl${chip_system_config_inet}.h", "UDPEndPointImpl.h", ] + + if (chip_system_config_inet == "Sockets") { + # TODO: dependency on this one is not clear as it is only ever + # enabled through CMakeLists.txt. Added here for completeness + sources += [ "ZephyrSocket.h" ] + } } if (chip_with_nlfaultinjection) { diff --git a/src/inet/tests/TestInetLayer.h b/src/inet/tests/TestInetLayer.h deleted file mode 100644 index 1c13b7dec78a83..00000000000000 --- a/src/inet/tests/TestInetLayer.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * This file declares test entry points for CHIP Internet (inet) - * layer library unit tests. - * - */ - -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -int TestInetAddress(void); -int TestInetBuffer(void); -int TestInetErrorStr(void); -int TestInetTimer(void); -int TestInetEndPoint(void); -int TestInetLayerDNS(void); -#ifdef __cplusplus -} -#endif diff --git a/src/platform/android/BUILD.gn b/src/platform/android/BUILD.gn index bd9f3cd8316220..a6e1fd6b524816 100644 --- a/src/platform/android/BUILD.gn +++ b/src/platform/android/BUILD.gn @@ -84,7 +84,10 @@ static_library("android") { source_set("inet") { sources = [ "InetInterfaceImpl.cpp" ] - deps = [ "${chip_root}/src/lib/support" ] + deps = [ + "${chip_root}/src/inet:impl_header", + "${chip_root}/src/lib/support", + ] } android_library("java") { diff --git a/src/system/BUILD.gn b/src/system/BUILD.gn index 5953dc6a0ffdd0..1389bddc3ca4c0 100644 --- a/src/system/BUILD.gn +++ b/src/system/BUILD.gn @@ -248,6 +248,12 @@ static_library("system") { ] if (chip_system_layer_impl_config_file == "") { + # This includes one of: + # - SystemLayerImplFreeRTOS.h + # - SystemLayerImplFreeRTOS.cpp + # or + # - SystemLayerImplSelect.h + # - SystemLayerImplSelect.cpp sources += [ "SystemLayerImpl${chip_system_config_event_loop}.cpp", "SystemLayerImpl${chip_system_config_event_loop}.h",