1# SPDX-License-Identifier: Apache-2.0
2
3zephyr_syscall_header(
4  ${ZEPHYR_BASE}/include/zephyr/net/socket.h
5)
6
7zephyr_library_include_directories(.)
8
9zephyr_library_sources(
10  getaddrinfo.c
11  sockets.c
12)
13
14if(NOT CONFIG_NET_SOCKETS_OFFLOAD)
15zephyr_library_sources(
16  getnameinfo.c
17  sockets_misc.c
18  )
19endif()
20
21zephyr_library_sources_ifdef(CONFIG_NET_NATIVE                     sockets_inet.c)
22zephyr_library_sources_ifdef(CONFIG_NET_SOCKETS_CAN                sockets_can.c)
23zephyr_library_sources_ifdef(CONFIG_NET_SOCKETS_PACKET             sockets_packet.c)
24zephyr_library_sources_ifdef(CONFIG_NET_SOCKETS_SOCKOPT_TLS        sockets_tls.c)
25zephyr_library_sources_ifdef(CONFIG_NET_SOCKETS_OFFLOAD            socket_offload.c)
26zephyr_library_sources_ifdef(CONFIG_NET_SOCKETS_OFFLOAD_DISPATCHER socket_dispatcher.c)
27zephyr_library_sources_ifdef(CONFIG_NET_SOCKETS_OBJ_CORE           socket_obj_core.c)
28zephyr_library_sources_ifdef(CONFIG_NET_SOCKETS_SERVICE            sockets_service.c)
29
30if(CONFIG_NET_SOCKETS_NET_MGMT)
31  zephyr_library_sources(sockets_net_mgmt.c)
32  zephyr_library_include_directories(${ZEPHYR_BASE}/subsys/net/ip)
33endif()
34
35if(CONFIG_SOCKS)
36  zephyr_library_include_directories(${ZEPHYR_BASE}/subsys/net/lib/socks)
37endif()
38
39zephyr_library_sources_ifdef(CONFIG_NET_SOCKETPAIR socketpair.c)
40
41zephyr_library_link_libraries_ifdef(CONFIG_MBEDTLS mbedTLS)
42