[dpdk-dev] [PATCH 3/3] mk: do not generate LDLIBS from directory dependencies

Thomas Monjalon thomas at monjalon.net
Tue Oct 24 02:11:33 CEST 2017


12/10/2017 18:04, Olivier Matz:
> The list of libraries in LDLIBS was generated from the DEPDIRS-xyz
> variable. This is valid when the subdirectory name match the library
> name, but it's not always the case, especially for PMDs.
> 
> The patches removes this feature and explicitly adds the proper
> libraries in LDLIBS.

Some DEPDIRS are defined in conditionals.
The same conditionals must be used for LDLIBS.
See 2 fixes below:

> --- a/lib/librte_port/Makefile
> +++ b/lib/librte_port/Makefile
> @@ -38,6 +38,8 @@ LIB = librte_port.a
>  ifeq ($(CONFIG_RTE_PORT_PCAP),y)
>  LDLIBS += -lpcap
>  endif
> +LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev
> +LDLIBS += -lrte_ip_frag -lrte_sched -lrte_kni

+LDLIBS += -lrte_ip_frag -lrte_sched
+ifeq ($(CONFIG_RTE_LIBRTE_KNI),y)
+LDLIBS += -lrte_kni
+endif

> --- a/lib/librte_table/Makefile
> +++ b/lib/librte_table/Makefile
> @@ -38,6 +38,8 @@ LIB = librte_table.a
>  
>  CFLAGS += -O3
>  CFLAGS += $(WERROR_FLAGS)
> +LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_port
> +LDLIBS += -lrte_lpm -lrte_hash -lrte_acl

+LDLIBS += -lrte_lpm -lrte_hash
+ifeq ($(CONFIG_RTE_LIBRTE_ACL),y)
+LDLIBS += -lrte_acl
+endif


More information about the dev mailing list