1# SPDX-License-Identifier: Apache-2.0 2 3zephyr_library() 4zephyr_library_property(ALLOW_EMPTY TRUE) 5 6zephyr_library_sources_ifdef(CONFIG_ETH_GECKO 7 eth_gecko.c 8 phy_gecko.c 9 ) 10 11zephyr_library_sources_ifdef(CONFIG_ETH_XLNX_GEM 12 eth_xlnx_gem.c 13 phy_xlnx_gem.c 14 ) 15 16zephyr_library_sources_ifdef(CONFIG_ETH_DWMAC eth_dwmac.c) 17zephyr_library_sources_ifdef(CONFIG_ETH_DWMAC_STM32H7X eth_dwmac_stm32h7x.c) 18zephyr_library_sources_ifdef(CONFIG_ETH_DWMAC_MMU eth_dwmac_mmu.c) 19 20zephyr_library_sources_ifdef(CONFIG_ETH_E1000 eth_e1000.c) 21zephyr_library_sources_ifdef(CONFIG_ETH_ENC28J60 eth_enc28j60.c) 22zephyr_library_sources_ifdef(CONFIG_ETH_ENC424J600 eth_enc424j600.c) 23zephyr_library_sources_ifdef(CONFIG_ETH_ESP32 eth_esp32.c) 24zephyr_library_sources_ifdef(CONFIG_DSA_KSZ8XXX dsa_ksz8xxx.c) 25zephyr_library_sources_ifdef(CONFIG_ETH_LITEETH eth_liteeth.c) 26zephyr_library_sources_ifdef(CONFIG_ETH_MCUX eth_mcux.c) 27zephyr_library_sources_ifdef(CONFIG_ETH_SMSC911X eth_smsc911x.c) 28zephyr_library_sources_ifdef(CONFIG_ETH_STELLARIS eth_stellaris.c) 29zephyr_library_sources_ifdef(CONFIG_ETH_STM32_HAL eth_stm32_hal.c) 30zephyr_library_sources_ifdef(CONFIG_ETH_W5500 eth_w5500.c) 31zephyr_library_sources_ifdef(CONFIG_ETH_SAM_GMAC eth_sam_gmac.c) 32zephyr_library_sources_ifdef(CONFIG_ETH_CYCLONEV eth_cyclonev.c) 33zephyr_library_sources_ifdef(CONFIG_SLIP_TAP eth_slip_tap.c) 34zephyr_library_sources_ifdef(CONFIG_ETH_SMSC91X eth_smsc91x.c) 35zephyr_library_sources_ifdef(CONFIG_ETH_IVSHMEM eth_ivshmem.c eth_ivshmem_queue.c) 36zephyr_library_sources_ifdef(CONFIG_ETH_ADIN2111 eth_adin2111.c) 37zephyr_library_sources_ifdef(CONFIG_ETH_LAN865X eth_lan865x.c oa_tc6.c) 38zephyr_library_sources_ifdef(CONFIG_ETH_NXP_ENET eth_nxp_enet.c) 39zephyr_library_sources_ifdef(CONFIG_ETH_XMC4XXX eth_xmc4xxx.c) 40 41if(CONFIG_ETH_NXP_S32_NETC) 42 zephyr_library_sources(eth_nxp_s32_netc.c) 43 zephyr_library_sources_ifdef(CONFIG_DT_HAS_NXP_S32_NETC_PSI_ENABLED eth_nxp_s32_netc_psi.c) 44 zephyr_library_sources_ifdef(CONFIG_DT_HAS_NXP_S32_NETC_VSI_ENABLED eth_nxp_s32_netc_vsi.c) 45endif() 46 47zephyr_library_sources_ifdef(CONFIG_ETH_NXP_S32_GMAC eth_nxp_s32_gmac.c) 48zephyr_library_sources_ifdef(CONFIG_ETH_NUMAKER eth_numaker.c) 49 50if(CONFIG_ETH_NATIVE_POSIX) 51 if (CONFIG_NATIVE_APPLICATION) 52 set(native_posix_source_files eth_native_posix.c eth_native_posix_adapt.c) 53 set_source_files_properties(${native_posix_source_files} 54 PROPERTIES COMPILE_DEFINITIONS 55 "NO_POSIX_CHEATS;_BSD_SOURCE;_DEFAULT_SOURCE" 56 ) 57 zephyr_library_sources(${native_posix_source_files}) 58 else() 59 zephyr_library_sources(eth_native_posix.c) 60 target_sources(native_simulator INTERFACE eth_native_posix_adapt.c) 61 endif() 62endif() 63 64add_subdirectory(phy) 65