Commit f7d0ae5e authored by Torsten Rasmussen's avatar Torsten Rasmussen Committed by Christopher Friedt
Browse files

drivers: ethernet: remove dedicated drivers__ethernet__native_posix lib



Fixes: #38403

The two eth_native_posix.c and eth_native_posix_adapt.c are now added
to the common drivers__ethernet Zephyr library.

Instead of creating a dedicated library for just two files those files
are now added to the common ethernet library, see also #8826.
Instead, the dedicated compile definitions required for those files are
specified using COMPILE_DEFINITIONS on the source files.

This also avoids the following warning as the ethernet library is no
longer empty.

> No SOURCES given to Zephyr library: drivers__ethernet
>
> Excluding target from build.

Signed-off-by: default avatarTorsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
parent a084ec54
Loading
Loading
Loading
Loading
+6 −10
Original line number Diff line number Diff line
@@ -26,16 +26,12 @@ zephyr_library_sources_ifdef(CONFIG_ETH_SAM_GMAC eth_sam_gmac.c)
zephyr_library_sources_ifdef(CONFIG_DSA_KSZ8XXX		dsa_ksz8xxx.c)

if(CONFIG_ETH_NATIVE_POSIX)
	zephyr_library_named(drivers__ethernet__native_posix)
	zephyr_library_compile_definitions(
		NO_POSIX_CHEATS
		_BSD_SOURCE
		_DEFAULT_SOURCE
		)
	zephyr_library_sources(
		eth_native_posix.c
		eth_native_posix_adapt.c
  set(native_posix_source_files eth_native_posix.c eth_native_posix_adapt.c)
  set_source_files_properties(${native_posix_source_files}
    PROPERTIES COMPILE_DEFINITIONS
    "NO_POSIX_CHEATS;_BSD_SOURCE;_DEFAULT_SOURCE"
  )
  zephyr_library_sources(${native_posix_source_files})
endif()

add_subdirectory(phy)