1# SPDX-License-Identifier: Apache-2.0
2
3zephyr_syscall_header(
4  ${ZEPHYR_BASE}/include/zephyr/net/ethernet.h
5)
6
7zephyr_include_directories(${ZEPHYR_BASE}/subsys/net/l2)
8
9zephyr_library()
10zephyr_library_include_directories(. ${ZEPHYR_BASE}/subsys/net/ip)
11zephyr_library_compile_definitions_ifdef(
12  CONFIG_NEWLIB_LIBC __LINUX_ERRNO_EXTENSIONS__
13  )
14
15zephyr_library_sources_ifdef(CONFIG_NET_L2_ETHERNET      ethernet.c)
16zephyr_library_sources_ifdef(CONFIG_NET_L2_ETHERNET_MGMT ethernet_mgmt.c)
17
18if(CONFIG_NET_NATIVE)
19zephyr_library_sources_ifdef(CONFIG_NET_ARP              arp.c)
20zephyr_library_sources_ifdef(CONFIG_NET_VLAN             vlan.c)
21zephyr_library_sources_ifdef(CONFIG_NET_STATISTICS_ETHERNET ethernet_stats.c)
22zephyr_library_sources_ifdef(CONFIG_NET_ETHERNET_BRIDGE bridge.c)
23zephyr_library_sources_ifdef(CONFIG_NET_ETHERNET_BRIDGE_SHELL bridge_shell.c)
24
25if(CONFIG_NET_GPTP)
26  add_subdirectory(gptp)
27endif()
28
29if(CONFIG_NET_LLDP)
30  add_subdirectory(lldp)
31endif()
32
33if(CONFIG_NET_DSA)
34  add_subdirectory(dsa)
35endif()
36
37endif()
38