1# SPDX-License-Identifier: Apache-2.0 2 3zephyr_library() 4zephyr_library_property(ALLOW_EMPTY TRUE) 5zephyr_library_include_directories(${ZEPHYR_BASE}/subsys/net/l2) 6 7zephyr_library_sources_ifdef(CONFIG_ETH_DRIVER_RAW_MODE 8 eth_raw.c 9 ) 10 11zephyr_library_sources_ifdef(CONFIG_ETH_GECKO 12 eth_gecko.c 13 phy_gecko.c 14 ) 15 16zephyr_library_sources_ifdef(CONFIG_ETH_XLNX_GEM 17 eth_xlnx_gem.c 18 phy_xlnx_gem.c 19 ) 20 21zephyr_library_sources_ifdef(CONFIG_ETH_DWMAC eth_dwmac.c) 22zephyr_library_sources_ifdef(CONFIG_ETH_DWMAC_STM32H7X eth_dwmac_stm32h7x.c) 23zephyr_library_sources_ifdef(CONFIG_ETH_DWMAC_MMU eth_dwmac_mmu.c) 24 25zephyr_library_sources_ifdef(CONFIG_ETH_E1000 eth_e1000.c) 26zephyr_library_sources_ifdef(CONFIG_ETH_ENC28J60 eth_enc28j60.c) 27zephyr_library_sources_ifdef(CONFIG_ETH_ENC424J600 eth_enc424j600.c) 28zephyr_library_sources_ifdef(CONFIG_ETH_ESP32 eth_esp32.c) 29zephyr_library_sources_ifdef(CONFIG_DSA_KSZ8XXX dsa_ksz8xxx.c) 30zephyr_library_sources_ifdef(CONFIG_ETH_LITEX_LITEETH eth_litex_liteeth.c) 31zephyr_library_sources_ifdef(CONFIG_ETH_SMSC911X eth_smsc911x.c) 32zephyr_library_sources_ifdef(CONFIG_ETH_STELLARIS eth_stellaris.c) 33zephyr_library_sources_ifdef(CONFIG_ETH_STM32_HAL eth_stm32_hal.c) 34zephyr_library_sources_ifdef(CONFIG_ETH_W5500 eth_w5500.c) 35zephyr_library_sources_ifdef(CONFIG_ETH_SAM_GMAC eth_sam_gmac.c) 36zephyr_library_sources_ifdef(CONFIG_ETH_CYCLONEV eth_cyclonev.c) 37zephyr_library_sources_ifdef(CONFIG_SLIP_TAP eth_slip_tap.c) 38zephyr_library_sources_ifdef(CONFIG_ETH_SMSC91X eth_smsc91x.c) 39zephyr_library_sources_ifdef(CONFIG_ETH_IVSHMEM eth_ivshmem.c eth_ivshmem_queue.c) 40zephyr_library_sources_ifdef(CONFIG_ETH_ADIN2111 eth_adin2111.c) 41zephyr_library_sources_ifdef(CONFIG_ETH_LAN865X eth_lan865x.c oa_tc6.c) 42zephyr_library_sources_ifdef(CONFIG_ETH_XMC4XXX eth_xmc4xxx.c) 43zephyr_library_sources_ifdef(CONFIG_ETH_TEST eth_test.c) 44zephyr_library_sources_ifdef(CONFIG_ETH_RENESAS_RA eth_renesas_ra.c) 45zephyr_library_sources_ifdef(CONFIG_ETH_LAN9250 eth_lan9250.c) 46 47if(CONFIG_ETH_NXP_S32_NETC) 48 zephyr_library_sources(eth_nxp_s32_netc.c) 49 zephyr_library_sources_ifdef(CONFIG_DT_HAS_NXP_S32_NETC_PSI_ENABLED eth_nxp_s32_netc_psi.c) 50 zephyr_library_sources_ifdef(CONFIG_DT_HAS_NXP_S32_NETC_VSI_ENABLED eth_nxp_s32_netc_vsi.c) 51endif() 52 53if(CONFIG_ETH_NXP_IMX_NETC) 54 zephyr_library_sources(eth_nxp_imx_netc.c) 55 zephyr_library_sources(eth_nxp_imx_netc_psi.c) 56endif() 57 58zephyr_library_sources_ifdef(CONFIG_ETH_NXP_S32_GMAC eth_nxp_s32_gmac.c) 59zephyr_library_sources_ifdef(CONFIG_ETH_NUMAKER eth_numaker.c) 60 61if(CONFIG_ETH_NATIVE_POSIX) 62 if (CONFIG_NATIVE_APPLICATION) 63 set(native_posix_source_files eth_native_posix.c eth_native_posix_adapt.c) 64 set_source_files_properties(${native_posix_source_files} 65 PROPERTIES COMPILE_DEFINITIONS 66 "NO_POSIX_CHEATS;_BSD_SOURCE;_DEFAULT_SOURCE" 67 ) 68 zephyr_library_sources(${native_posix_source_files}) 69 else() 70 zephyr_library_sources(eth_native_posix.c) 71 target_sources(native_simulator INTERFACE eth_native_posix_adapt.c) 72 endif() 73endif() 74 75add_subdirectory(phy) 76add_subdirectory(eth_nxp_enet_qos) 77add_subdirectory(nxp_enet) 78add_subdirectory(dwc_xgmac) 79