From: Olivier Matz Date: Thu, 12 Oct 2017 16:04:21 +0000 (+0200) Subject: mk: do not generate LDLIBS from directory dependencies X-Git-Tag: spdx-start~1265 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=cbc12b0a9;p=dpdk.git mk: do not generate LDLIBS from directory dependencies 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-xyz variables become useless, remove them. Reported-by: Gage Eads Signed-off-by: Olivier Matz Reviewed-by: Gage Eads --- diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile index 6cb6466c54..4b29e3d814 100644 --- a/drivers/bus/Makefile +++ b/drivers/bus/Makefile @@ -33,9 +33,7 @@ include $(RTE_SDK)/mk/rte.vars.mk core-libs := librte_eal librte_mbuf librte_mempool librte_ring librte_ether DIRS-$(CONFIG_RTE_LIBRTE_DPAA_BUS) += dpaa -DEPDIRS-dpaa = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += fslmc -DEPDIRS-fslmc = $(core-libs) include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/drivers/bus/dpaa/Makefile b/drivers/bus/dpaa/Makefile index 61b64320ba..f672f54007 100644 --- a/drivers/bus/dpaa/Makefile +++ b/drivers/bus/dpaa/Makefile @@ -72,5 +72,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_DPAA_BUS) += \ # Link Pthread LDLIBS += -lpthread +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/bus/fslmc/Makefile b/drivers/bus/fslmc/Makefile index 37da1b0507..c08b2af9d4 100644 --- a/drivers/bus/fslmc/Makefile +++ b/drivers/bus/fslmc/Makefile @@ -52,6 +52,8 @@ CFLAGS += -I$(RTE_SDK)/drivers/bus/fslmc/mc CFLAGS += -I$(RTE_SDK)/drivers/bus/fslmc/qbman/include CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev # versioning export map EXPORT_MAP := rte_bus_fslmc_version.map diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile index d8c874029e..d551541c61 100644 --- a/drivers/crypto/Makefile +++ b/drivers/crypto/Makefile @@ -34,30 +34,17 @@ include $(RTE_SDK)/mk/rte.vars.mk core-libs := librte_eal librte_mbuf librte_mempool librte_ring librte_cryptodev DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += aesni_gcm -DEPDIRS-aesni_gcm = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += aesni_mb -DEPDIRS-aesni_mb = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO) += armv8 -DEPDIRS-armv8 = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_OPENSSL) += openssl -DEPDIRS-openssl = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat -DEPDIRS-qat = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER) += scheduler -DEPDIRS-scheduler = $(core-libs) librte_kvargs librte_reorder DIRS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += snow3g -DEPDIRS-snow3g = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_KASUMI) += kasumi -DEPDIRS-kasumi = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_ZUC) += zuc -DEPDIRS-zuc = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_MRVL_CRYPTO) += mrvl -DEPDIRS-mrvl = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += null -DEPDIRS-null = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) += dpaa2_sec -DEPDIRS-dpaa2_sec = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_DPAA_SEC) += dpaa_sec -DEPDIRS-dpaa_sec = $(core-libs) include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/drivers/crypto/aesni_gcm/Makefile b/drivers/crypto/aesni_gcm/Makefile index 6fca5e1c51..44979a4a6f 100644 --- a/drivers/crypto/aesni_gcm/Makefile +++ b/drivers/crypto/aesni_gcm/Makefile @@ -53,6 +53,8 @@ EXPORT_MAP := rte_pmd_aesni_gcm_version.map CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH) CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH)/include LDLIBS += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_cryptodev # library source files SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += aesni_gcm_pmd.c diff --git a/drivers/crypto/aesni_mb/Makefile b/drivers/crypto/aesni_mb/Makefile index e094178cef..7c7e97086d 100644 --- a/drivers/crypto/aesni_mb/Makefile +++ b/drivers/crypto/aesni_mb/Makefile @@ -53,6 +53,8 @@ EXPORT_MAP := rte_pmd_aesni_mb_version.map CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH) CFLAGS += -I$(AESNI_MULTI_BUFFER_LIB_PATH)/include LDLIBS += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_cryptodev # library source files SRCS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += rte_aesni_mb_pmd.c diff --git a/drivers/crypto/armv8/Makefile b/drivers/crypto/armv8/Makefile index 082fbf54be..8bf60e2f08 100644 --- a/drivers/crypto/armv8/Makefile +++ b/drivers/crypto/armv8/Makefile @@ -57,6 +57,8 @@ EXPORT_MAP := rte_pmd_armv8_version.map CFLAGS += -I$(ARMV8_CRYPTO_LIB_PATH) CFLAGS += -I$(ARMV8_CRYPTO_LIB_PATH)/asm/include LDLIBS += -L$(ARMV8_CRYPTO_LIB_PATH) -larmv8_crypto +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_cryptodev # library source files SRCS-$(CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO) += rte_armv8_pmd.c diff --git a/drivers/crypto/dpaa2_sec/Makefile b/drivers/crypto/dpaa2_sec/Makefile index be6c948110..3f0eadeed8 100644 --- a/drivers/crypto/dpaa2_sec/Makefile +++ b/drivers/crypto/dpaa2_sec/Makefile @@ -73,5 +73,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC) += mc/dpseci.c LDLIBS += -lrte_bus_fslmc LDLIBS += -lrte_mempool_dpaa2 +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_cryptodev include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/crypto/kasumi/Makefile b/drivers/crypto/kasumi/Makefile index b47cda0c5a..b9daf454e1 100644 --- a/drivers/crypto/kasumi/Makefile +++ b/drivers/crypto/kasumi/Makefile @@ -54,6 +54,8 @@ CFLAGS += -I$(LIBSSO_KASUMI_PATH) CFLAGS += -I$(LIBSSO_KASUMI_PATH)/include CFLAGS += -I$(LIBSSO_KASUMI_PATH)/build LDLIBS += -L$(LIBSSO_KASUMI_PATH)/build -lsso_kasumi +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_cryptodev # library source files SRCS-$(CONFIG_RTE_LIBRTE_PMD_KASUMI) += rte_kasumi_pmd.c diff --git a/drivers/crypto/null/Makefile b/drivers/crypto/null/Makefile index bc2724b39f..b368161c35 100644 --- a/drivers/crypto/null/Makefile +++ b/drivers/crypto/null/Makefile @@ -37,6 +37,8 @@ LIB = librte_pmd_null_crypto.a # build flags CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_cryptodev # library version LIBABIVER := 1 diff --git a/drivers/crypto/openssl/Makefile b/drivers/crypto/openssl/Makefile index e5fdfb59b5..85e5d8703a 100644 --- a/drivers/crypto/openssl/Makefile +++ b/drivers/crypto/openssl/Makefile @@ -45,6 +45,8 @@ EXPORT_MAP := rte_pmd_openssl_version.map # external library dependencies LDLIBS += -lcrypto +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_cryptodev # library source files SRCS-$(CONFIG_RTE_LIBRTE_PMD_OPENSSL) += rte_openssl_pmd.c diff --git a/drivers/crypto/qat/Makefile b/drivers/crypto/qat/Makefile index 7322ffe4a8..c38b80d4a3 100644 --- a/drivers/crypto/qat/Makefile +++ b/drivers/crypto/qat/Makefile @@ -43,6 +43,8 @@ CFLAGS += -O3 # external library include paths CFLAGS += -I$(SRCDIR)/qat_adf LDLIBS += -lcrypto +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_cryptodev # library source files SRCS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += qat_crypto.c diff --git a/drivers/crypto/scheduler/Makefile b/drivers/crypto/scheduler/Makefile index b045410cd1..b1a468e0ab 100644 --- a/drivers/crypto/scheduler/Makefile +++ b/drivers/crypto/scheduler/Makefile @@ -36,6 +36,8 @@ LIB = librte_pmd_crypto_scheduler.a # build flags CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_cryptodev -lrte_kvargs -lrte_reorder # library version LIBABIVER := 1 diff --git a/drivers/crypto/snow3g/Makefile b/drivers/crypto/snow3g/Makefile index ecee80dfb6..1fb0571822 100644 --- a/drivers/crypto/snow3g/Makefile +++ b/drivers/crypto/snow3g/Makefile @@ -54,6 +54,8 @@ CFLAGS += -I$(LIBSSO_SNOW3G_PATH) CFLAGS += -I$(LIBSSO_SNOW3G_PATH)/include CFLAGS += -I$(LIBSSO_SNOW3G_PATH)/build LDLIBS += -L$(LIBSSO_SNOW3G_PATH)/build -lsso_snow3g +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_cryptodev # library source files SRCS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += rte_snow3g_pmd.c diff --git a/drivers/crypto/zuc/Makefile b/drivers/crypto/zuc/Makefile index f543b4073e..9d03cf022a 100644 --- a/drivers/crypto/zuc/Makefile +++ b/drivers/crypto/zuc/Makefile @@ -54,6 +54,8 @@ CFLAGS += -I$(LIBSSO_ZUC_PATH) CFLAGS += -I$(LIBSSO_ZUC_PATH)/include CFLAGS += -I$(LIBSSO_ZUC_PATH)/build LDLIBS += -L$(LIBSSO_ZUC_PATH)/build -lsso_zuc +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_cryptodev # library source files SRCS-$(CONFIG_RTE_LIBRTE_PMD_ZUC) += rte_zuc_pmd.c diff --git a/drivers/event/Makefile b/drivers/event/Makefile index d09be74dab..c1aae81fba 100644 --- a/drivers/event/Makefile +++ b/drivers/event/Makefile @@ -34,12 +34,8 @@ include $(RTE_SDK)/mk/rte.vars.mk core-libs := librte_eal librte_eventdev DIRS-$(CONFIG_RTE_LIBRTE_PMD_SKELETON_EVENTDEV) += skeleton -DEPDIRS-skeleton = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV) += sw -DEPDIRS-sw = $(core-libs) librte_kvargs librte_ring DIRS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += octeontx -DEPDIRS-octeontx = $(core-libs) librte_mempool_octeontx DIRS-$(CONFIG_RTE_LIBRTE_PMD_DPAA2_EVENTDEV) += dpaa2 -DEPDIRS-dpaa2 = $(core-libs) librte_bus_fslmc include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/drivers/event/dpaa2/Makefile b/drivers/event/dpaa2/Makefile index 3497d09d8a..7c5c7ee796 100644 --- a/drivers/event/dpaa2/Makefile +++ b/drivers/event/dpaa2/Makefile @@ -45,6 +45,7 @@ CFLAGS += -I$(RTE_SDK)/drivers/bus/fslmc/portal CFLAGS += -I$(RTE_SDK)/drivers/mempool/dpaa2 CFLAGS += -I$(RTE_SDK)/drivers/event/dpaa2 CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linuxapp/eal +LDLIBS += -lrte_eal -lrte_eventdev -lrte_bus_fslmc # versioning export map EXPORT_MAP := rte_pmd_dpaa2_event_version.map diff --git a/drivers/event/octeontx/Makefile b/drivers/event/octeontx/Makefile index 50434a3845..7ba60737a1 100644 --- a/drivers/event/octeontx/Makefile +++ b/drivers/event/octeontx/Makefile @@ -40,6 +40,8 @@ LIB = librte_pmd_octeontx_ssovf.a CFLAGS += $(WERROR_FLAGS) CFLAGS += -I$(RTE_SDK)/drivers/mempool/octeontx/ +LDLIBS += -lrte_eal -lrte_eventdev -lrte_mempool_octeontx + EXPORT_MAP := rte_pmd_octeontx_ssovf_version.map LIBABIVER := 1 diff --git a/drivers/event/skeleton/Makefile b/drivers/event/skeleton/Makefile index e6d58711b5..e4a9f41636 100644 --- a/drivers/event/skeleton/Makefile +++ b/drivers/event/skeleton/Makefile @@ -38,6 +38,7 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_pmd_skeleton_event.a CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_eventdev EXPORT_MAP := rte_pmd_skeleton_event_version.map diff --git a/drivers/event/sw/Makefile b/drivers/event/sw/Makefile index d6c14da92f..61a108c50c 100644 --- a/drivers/event/sw/Makefile +++ b/drivers/event/sw/Makefile @@ -43,6 +43,7 @@ ifeq ($(shell test $(GCC_VERSION) -le 50 && echo 1), 1) CFLAGS += -Wno-missing-field-initializers endif endif +LDLIBS += -lrte_eal -lrte_eventdev -lrte_kvargs -lrte_ring # library version LIBABIVER := 1 diff --git a/drivers/mempool/Makefile b/drivers/mempool/Makefile index 20ad3ed60d..1c5f2003e0 100644 --- a/drivers/mempool/Makefile +++ b/drivers/mempool/Makefile @@ -33,14 +33,9 @@ include $(RTE_SDK)/mk/rte.vars.mk core-libs := librte_eal librte_mempool librte_ring DIRS-$(CONFIG_RTE_LIBRTE_DPAA_MEMPOOL) += dpaa -DEPDIRS-dpaa = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL) += dpaa2 -DEPDIRS-dpaa2 = $(core-libs) DIRS-$(CONFIG_RTE_DRIVER_MEMPOOL_RING) += ring -DEPDIRS-ring = $(core-libs) DIRS-$(CONFIG_RTE_DRIVER_MEMPOOL_STACK) += stack -DEPDIRS-stack = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL) += octeontx -DEPDIRS-octeontx = $(core-libs) librte_mbuf include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/drivers/mempool/dpaa/Makefile b/drivers/mempool/dpaa/Makefile index 25312a014e..c49b0ee37e 100644 --- a/drivers/mempool/dpaa/Makefile +++ b/drivers/mempool/dpaa/Makefile @@ -54,5 +54,6 @@ LIBABIVER := 1 SRCS-$(CONFIG_RTE_LIBRTE_DPAA_MEMPOOL) += dpaa_mempool.c LDLIBS += -lrte_bus_dpaa +LDLIBS += -lrte_eal -lrte_mempool -lrte_ring include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/mempool/dpaa2/Makefile b/drivers/mempool/dpaa2/Makefile index 1a1749687e..dd19e1003a 100644 --- a/drivers/mempool/dpaa2/Makefile +++ b/drivers/mempool/dpaa2/Makefile @@ -58,5 +58,6 @@ LIBABIVER := 1 SRCS-$(CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL) += dpaa2_hw_mempool.c LDLIBS += -lrte_bus_fslmc +LDLIBS += -lrte_eal -lrte_mempool -lrte_ring include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/mempool/octeontx/Makefile b/drivers/mempool/octeontx/Makefile index 5b2e1b88c3..4e8477bd5e 100644 --- a/drivers/mempool/octeontx/Makefile +++ b/drivers/mempool/octeontx/Makefile @@ -62,4 +62,6 @@ else CFLAGS_rte_mempool_octeontx.o += -Ofast endif +LDLIBS += -lrte_eal -lrte_mempool -lrte_ring -lrte_mbuf + include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/mempool/ring/Makefile b/drivers/mempool/ring/Makefile index b339d90782..a7889b96a1 100644 --- a/drivers/mempool/ring/Makefile +++ b/drivers/mempool/ring/Makefile @@ -37,6 +37,7 @@ LIB = librte_mempool_ring.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_mempool -lrte_ring EXPORT_MAP := rte_mempool_ring_version.map diff --git a/drivers/mempool/stack/Makefile b/drivers/mempool/stack/Makefile index 7577b23c3c..f8d6c57454 100644 --- a/drivers/mempool/stack/Makefile +++ b/drivers/mempool/stack/Makefile @@ -40,6 +40,7 @@ CFLAGS += $(WERROR_FLAGS) # Headers CFLAGS += -I$(RTE_SDK)/lib/librte_mempool +LDLIBS += -lrte_eal -lrte_mempool -lrte_ring EXPORT_MAP := rte_mempool_stack_version.map diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 012af881a2..cf3323340f 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -40,84 +40,49 @@ core-libs := librte_eal librte_mbuf librte_mempool librte_ring librte_ether core-libs += librte_net librte_kvargs DIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += af_packet -DEPDIRS-af_packet = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_ARK_PMD) += ark -DEPDIRS-ark = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_AVP_PMD) += avp -DEPDIRS-avp = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += bnx2x -DEPDIRS-bnx2x = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += bonding -DEPDIRS-bonding = $(core-libs) librte_cmdline DIRS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += cxgbe -DEPDIRS-cxgbe = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_DPAA_PMD) += dpaa -DEPDIRS-dpaa = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_DPAA2_PMD) += dpaa2 -DEPDIRS-dpaa2 = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_E1000_PMD) += e1000 -DEPDIRS-e1000 = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_ENA_PMD) += ena -DEPDIRS-ena = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic -DEPDIRS-enic = $(core-libs) librte_hash DIRS-$(CONFIG_RTE_LIBRTE_PMD_FAILSAFE) += failsafe -DEPDIRS-failsafe = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k -DEPDIRS-fm10k = $(core-libs) librte_hash DIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e -DEPDIRS-i40e = $(core-libs) librte_hash DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += ixgbe -DEPDIRS-ixgbe = $(core-libs) librte_hash DIRS-$(CONFIG_RTE_LIBRTE_LIO_PMD) += liquidio -DEPDIRS-liquidio = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += mlx4 -DEPDIRS-mlx4 = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += mlx5 -DEPDIRS-mlx5 = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_MRVL_PMD) += mrvl -DEPDIRS-mrvl = $(core-libs) librte_cfgfile DIRS-$(CONFIG_RTE_LIBRTE_NFP_PMD) += nfp -DEPDIRS-nfp = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt -DEPDIRS-bnxt = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += null -DEPDIRS-null = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_OCTEONTX_PMD) += octeontx -DEPDIRS-octeontx = $(core-libs) librte_mempool_octeontx librte_eventdev DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += pcap -DEPDIRS-pcap = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += qede -DEPDIRS-qede = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += ring -DEPDIRS-ring = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_SFC_EFX_PMD) += sfc -DEPDIRS-sfc = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2) += szedata2 -DEPDIRS-szedata2 = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_PMD_TAP) += tap -DEPDIRS-tap = $(core-libs) librte_hash DIRS-$(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD) += thunderx -DEPDIRS-thunderx = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio -DEPDIRS-virtio = $(core-libs) DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += vmxnet3 -DEPDIRS-vmxnet3 = $(core-libs) ifeq ($(CONFIG_RTE_LIBRTE_KNI),y) DIRS-$(CONFIG_RTE_LIBRTE_PMD_KNI) += kni endif -DEPDIRS-kni = $(core-libs) librte_kni ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y) DIRS-$(CONFIG_RTE_LIBRTE_PMD_SOFTNIC) += softnic endif # $(CONFIG_RTE_LIBRTE_SCHED) -DEPDIRS-softnic = $(core-libs) librte_sched ifeq ($(CONFIG_RTE_LIBRTE_VHOST),y) DIRS-$(CONFIG_RTE_LIBRTE_PMD_VHOST) += vhost endif # $(CONFIG_RTE_LIBRTE_VHOST) -DEPDIRS-vhost = $(core-libs) librte_vhost ifeq ($(CONFIG_RTE_LIBRTE_MRVL_PMD),y) ifeq ($(CONFIG_RTE_LIBRTE_CFGFILE),n) diff --git a/drivers/net/af_packet/Makefile b/drivers/net/af_packet/Makefile index 70d517c16e..b97c2a6279 100644 --- a/drivers/net/af_packet/Makefile +++ b/drivers/net/af_packet/Makefile @@ -44,6 +44,8 @@ LIBABIVER := 1 CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs # # all source are stored in SRCS-y diff --git a/drivers/net/ark/Makefile b/drivers/net/ark/Makefile index ca64b1957a..5f704152d2 100644 --- a/drivers/net/ark/Makefile +++ b/drivers/net/ark/Makefile @@ -62,5 +62,7 @@ LDLIBS += -lpthread ifdef CONFIG_RTE_EXEC_ENV_LINUXAPP LDLIBS += -ldl endif +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/net/avp/Makefile b/drivers/net/avp/Makefile index cd465aac94..a754fa06b5 100644 --- a/drivers/net/avp/Makefile +++ b/drivers/net/avp/Makefile @@ -39,6 +39,8 @@ LIB = librte_pmd_avp.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs EXPORT_MAP := rte_pmd_avp_version.map diff --git a/drivers/net/bnx2x/Makefile b/drivers/net/bnx2x/Makefile index e123106918..762d42ee31 100644 --- a/drivers/net/bnx2x/Makefile +++ b/drivers/net/bnx2x/Makefile @@ -9,6 +9,8 @@ CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) CFLAGS += -DZLIB_CONST LDLIBS += -lz +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs EXPORT_MAP := rte_pmd_bnx2x_version.map diff --git a/drivers/net/bnxt/Makefile b/drivers/net/bnxt/Makefile index 55b49b538f..7aed17e66e 100644 --- a/drivers/net/bnxt/Makefile +++ b/drivers/net/bnxt/Makefile @@ -44,6 +44,8 @@ LIBABIVER := 2 CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs EXPORT_MAP := rte_pmd_bnxt_version.map diff --git a/drivers/net/bonding/Makefile b/drivers/net/bonding/Makefile index d9a918e917..84ef4edcf2 100644 --- a/drivers/net/bonding/Makefile +++ b/drivers/net/bonding/Makefile @@ -38,6 +38,8 @@ LIB = librte_pmd_bond.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_cmdline EXPORT_MAP := rte_pmd_bond_version.map diff --git a/drivers/net/cxgbe/Makefile b/drivers/net/cxgbe/Makefile index b4666b5af0..49a49c771c 100644 --- a/drivers/net/cxgbe/Makefile +++ b/drivers/net/cxgbe/Makefile @@ -62,6 +62,8 @@ endif CFLAGS_BASE_DRIVER = endif +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs # # Add extra flags for base driver files (also known as shared code) diff --git a/drivers/net/dpaa/Makefile b/drivers/net/dpaa/Makefile index c77384c9fb..171686ecf9 100644 --- a/drivers/net/dpaa/Makefile +++ b/drivers/net/dpaa/Makefile @@ -57,5 +57,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_DPAA_PMD) += dpaa_rxtx.c LDLIBS += -lrte_bus_dpaa LDLIBS += -lrte_mempool_dpaa +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/net/dpaa2/Makefile b/drivers/net/dpaa2/Makefile index 2f551d55e3..ee9b2cceae 100644 --- a/drivers/net/dpaa2/Makefile +++ b/drivers/net/dpaa2/Makefile @@ -67,5 +67,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_DPAA2_PMD) += mc/dpkg.c LDLIBS += -lrte_bus_fslmc LDLIBS += -lrte_mempool_dpaa2 +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile index 59d96bca17..833034ef6f 100644 --- a/drivers/net/e1000/Makefile +++ b/drivers/net/e1000/Makefile @@ -38,6 +38,8 @@ LIB = librte_pmd_e1000.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs EXPORT_MAP := rte_pmd_e1000_version.map diff --git a/drivers/net/ena/Makefile b/drivers/net/ena/Makefile index bf1f5da07c..1cab5e2e4d 100644 --- a/drivers/net/ena/Makefile +++ b/drivers/net/ena/Makefile @@ -52,5 +52,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_ENA_PMD) += ena_com.c SRCS-$(CONFIG_RTE_LIBRTE_ENA_PMD) += ena_eth_com.c CFLAGS += $(INCLUDES) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/net/enic/Makefile b/drivers/net/enic/Makefile index db48ff2da8..6a99a99099 100644 --- a/drivers/net/enic/Makefile +++ b/drivers/net/enic/Makefile @@ -45,6 +45,8 @@ CFLAGS += -I$(SRCDIR)/base/ CFLAGS += -I$(SRCDIR) CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -Wno-strict-aliasing +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash VPATH += $(SRCDIR)/src diff --git a/drivers/net/failsafe/Makefile b/drivers/net/failsafe/Makefile index d516d36215..e533d54d98 100644 --- a/drivers/net/failsafe/Makefile +++ b/drivers/net/failsafe/Makefile @@ -58,5 +58,7 @@ CFLAGS += -D_XOPEN_SOURCE=700 CFLAGS += $(WERROR_FLAGS) CFLAGS += -Wno-strict-prototypes CFLAGS += -pedantic +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/net/fm10k/Makefile b/drivers/net/fm10k/Makefile index 0bc124eb18..9d02c211e8 100644 --- a/drivers/net/fm10k/Makefile +++ b/drivers/net/fm10k/Makefile @@ -76,6 +76,8 @@ CFLAGS_BASE_DRIVER += -Wno-implicit-fallthrough endif endif endif +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash # # Add extra flags for base driver source files to disable warnings in them diff --git a/drivers/net/i40e/Makefile b/drivers/net/i40e/Makefile index ddd1b12531..1ec61606f3 100644 --- a/drivers/net/i40e/Makefile +++ b/drivers/net/i40e/Makefile @@ -39,6 +39,8 @@ LIB = librte_pmd_i40e.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -DPF_DRIVER -DVF_DRIVER -DINTEGRATED_VF CFLAGS += -DX722_A0_SUPPORT +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash EXPORT_MAP := rte_pmd_i40e_version.map diff --git a/drivers/net/ixgbe/Makefile b/drivers/net/ixgbe/Makefile index 95c806d262..6a144e71cd 100644 --- a/drivers/net/ixgbe/Makefile +++ b/drivers/net/ixgbe/Makefile @@ -82,6 +82,8 @@ endif endif endif +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash # # Add extra flags for base driver files (also known as shared code) diff --git a/drivers/net/kni/Makefile b/drivers/net/kni/Makefile index 46a1ad08a1..00d099fd22 100644 --- a/drivers/net/kni/Makefile +++ b/drivers/net/kni/Makefile @@ -38,6 +38,8 @@ LIB = librte_pmd_kni.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) LDLIBS += -lpthread +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_kni EXPORT_MAP := rte_pmd_kni_version.map diff --git a/drivers/net/liquidio/Makefile b/drivers/net/liquidio/Makefile index 32c06f5b08..79120d1b23 100644 --- a/drivers/net/liquidio/Makefile +++ b/drivers/net/liquidio/Makefile @@ -40,6 +40,8 @@ LIB = librte_pmd_lio.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)/base -I$(SRCDIR) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs EXPORT_MAP := rte_pmd_lio_version.map diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile index 3b3a02047a..fc5ea3c976 100644 --- a/drivers/net/mlx4/Makefile +++ b/drivers/net/mlx4/Makefile @@ -55,6 +55,8 @@ CFLAGS += -D_DEFAULT_SOURCE CFLAGS += -D_XOPEN_SOURCE=600 CFLAGS += $(WERROR_FLAGS) LDLIBS += -libverbs -lmlx4 +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs # A few warnings cannot be avoided in external headers. CFLAGS += -Wno-error=cast-qual diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile index 2e90692eda..e78840f667 100644 --- a/drivers/net/mlx5/Makefile +++ b/drivers/net/mlx5/Makefile @@ -65,6 +65,8 @@ CFLAGS += -D_XOPEN_SOURCE=600 CFLAGS += $(WERROR_FLAGS) CFLAGS += -Wno-strict-prototypes LDLIBS += -libverbs -lmlx5 +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs # A few warnings cannot be avoided in external headers. CFLAGS += -Wno-error=cast-qual diff --git a/drivers/net/mrvl/Makefile b/drivers/net/mrvl/Makefile index 26fce18181..cd56519005 100644 --- a/drivers/net/mrvl/Makefile +++ b/drivers/net/mrvl/Makefile @@ -55,6 +55,8 @@ CFLAGS += $(WERROR_FLAGS) CFLAGS += -O3 LDLIBS += -L$(LIBMUSDK_PATH)/lib LDLIBS += -lmusdk +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_cfgfile # library source files SRCS-$(CONFIG_RTE_LIBRTE_MRVL_PMD) += mrvl_ethdev.c diff --git a/drivers/net/nfp/Makefile b/drivers/net/nfp/Makefile index 3e4c6f4051..c1e51cbee1 100644 --- a/drivers/net/nfp/Makefile +++ b/drivers/net/nfp/Makefile @@ -40,6 +40,8 @@ CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) LDLIBS += -lm +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs EXPORT_MAP := rte_pmd_nfp_version.map diff --git a/drivers/net/null/Makefile b/drivers/net/null/Makefile index 77810bcedc..c2404f4a24 100644 --- a/drivers/net/null/Makefile +++ b/drivers/net/null/Makefile @@ -38,6 +38,8 @@ LIB = librte_pmd_null.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs EXPORT_MAP := rte_pmd_null_version.map diff --git a/drivers/net/octeontx/Makefile b/drivers/net/octeontx/Makefile index 827319de50..0a8775a16c 100644 --- a/drivers/net/octeontx/Makefile +++ b/drivers/net/octeontx/Makefile @@ -61,6 +61,9 @@ CFLAGS_octeontx_rxtx.o += -fno-prefetch-loop-arrays endif CFLAGS_octeontx_rxtx.o += -O3 -Ofast +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs +LDLIBS += -lrte_mempool_octeontx LDLIBS += -lrte_eventdev include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/net/pcap/Makefile b/drivers/net/pcap/Makefile index 7ebd0bef23..9ea96700ab 100644 --- a/drivers/net/pcap/Makefile +++ b/drivers/net/pcap/Makefile @@ -40,6 +40,8 @@ LIB = librte_pmd_pcap.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) LDLIBS += -lpcap +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs EXPORT_MAP := rte_pmd_pcap_version.map diff --git a/drivers/net/qede/Makefile b/drivers/net/qede/Makefile index 83ff95474a..5e8e087e01 100644 --- a/drivers/net/qede/Makefile +++ b/drivers/net/qede/Makefile @@ -13,6 +13,8 @@ LIB = librte_pmd_qede.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs EXPORT_MAP := rte_pmd_qede_version.map diff --git a/drivers/net/ring/Makefile b/drivers/net/ring/Makefile index 7ae15ef44b..9edd7d5caa 100644 --- a/drivers/net/ring/Makefile +++ b/drivers/net/ring/Makefile @@ -38,6 +38,8 @@ LIB = librte_pmd_ring.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs EXPORT_MAP := rte_pmd_ring_version.map diff --git a/drivers/net/sfc/Makefile b/drivers/net/sfc/Makefile index 429eb43520..e097a66ff9 100644 --- a/drivers/net/sfc/Makefile +++ b/drivers/net/sfc/Makefile @@ -69,6 +69,8 @@ CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable # value is set CFLAGS_sfc_ef10_tx.o += -wd3656 endif +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs # # List of base driver object files for which diff --git a/drivers/net/softnic/Makefile b/drivers/net/softnic/Makefile index 8b848a9d29..4b15f003cd 100644 --- a/drivers/net/softnic/Makefile +++ b/drivers/net/softnic/Makefile @@ -38,6 +38,8 @@ LIB = librte_pmd_softnic.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_sched EXPORT_MAP := rte_pmd_eth_softnic_version.map diff --git a/drivers/net/szedata2/Makefile b/drivers/net/szedata2/Makefile index 0e96b922ca..f38125d3d5 100644 --- a/drivers/net/szedata2/Makefile +++ b/drivers/net/szedata2/Makefile @@ -39,6 +39,8 @@ LIB = librte_pmd_szedata2.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) LDLIBS += -lsze2 +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs EXPORT_MAP := rte_pmd_szedata2_version.map diff --git a/drivers/net/tap/Makefile b/drivers/net/tap/Makefile index b0de02843a..b5c5a35765 100644 --- a/drivers/net/tap/Makefile +++ b/drivers/net/tap/Makefile @@ -43,6 +43,8 @@ CFLAGS += -O3 CFLAGS += -I$(SRCDIR) CFLAGS += -I. CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash # # all source are stored in SRCS-y diff --git a/drivers/net/thunderx/Makefile b/drivers/net/thunderx/Makefile index a2b6caae23..183ac4b342 100644 --- a/drivers/net/thunderx/Makefile +++ b/drivers/net/thunderx/Makefile @@ -40,6 +40,8 @@ LIB = librte_pmd_thunderx_nicvf.a CFLAGS += $(WERROR_FLAGS) LDLIBS += -lm +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs EXPORT_MAP := rte_pmd_thunderx_nicvf_version.map diff --git a/drivers/net/vhost/Makefile b/drivers/net/vhost/Makefile index 258a917c7d..1085a5238f 100644 --- a/drivers/net/vhost/Makefile +++ b/drivers/net/vhost/Makefile @@ -37,6 +37,8 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_pmd_vhost.a LDLIBS += -lpthread +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_vhost CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/drivers/net/virtio/Makefile b/drivers/net/virtio/Makefile index b21b878142..156b2e8480 100644 --- a/drivers/net/virtio/Makefile +++ b/drivers/net/virtio/Makefile @@ -38,6 +38,8 @@ LIB = librte_pmd_virtio.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs EXPORT_MAP := rte_pmd_virtio_version.map diff --git a/drivers/net/vmxnet3/Makefile b/drivers/net/vmxnet3/Makefile index 84356ae221..9359a7bd3c 100644 --- a/drivers/net/vmxnet3/Makefile +++ b/drivers/net/vmxnet3/Makefile @@ -63,6 +63,8 @@ CFLAGS_BASE_DRIVER = -Wno-unused-parameter -Wno-unused-value CFLAGS_BASE_DRIVER += -Wno-strict-aliasing -Wno-format-extra-args endif +LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring +LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs VPATH += $(SRCDIR)/base diff --git a/examples/ethtool/Makefile b/examples/ethtool/Makefile index 30b42b70e9..e86d68ace6 100644 --- a/examples/ethtool/Makefile +++ b/examples/ethtool/Makefile @@ -47,6 +47,5 @@ DIRS-y += lib ethtool-app endif DEPDIRS-ethtool-app := lib -DEPDIRS-lib := librte_eal librte_ether include $(RTE_SDK)/mk/rte.extsubdir.mk diff --git a/examples/ethtool/lib/Makefile b/examples/ethtool/lib/Makefile index 266babade8..cabd82a0ef 100644 --- a/examples/ethtool/lib/Makefile +++ b/examples/ethtool/lib/Makefile @@ -59,5 +59,6 @@ ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y) LDLIBS += -lrte_pmd_ixgbe endif endif +LDLIBS += -lrte_eal -lrte_ethdev include $(RTE_SDK)/mk/rte.extlib.mk diff --git a/lib/Makefile b/lib/Makefile index 86d475f3e4..527b95b56b 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -110,11 +110,12 @@ DEPDIRS-librte_reorder := librte_eal librte_mempool librte_mbuf DIRS-$(CONFIG_RTE_LIBRTE_PDUMP) += librte_pdump DEPDIRS-librte_pdump := librte_eal librte_mempool librte_mbuf librte_ether DIRS-$(CONFIG_RTE_LIBRTE_GSO) += librte_gso -DEPDIRS-librte_gso := librte_eal librte_mbuf librte_ether librte_net librte_mempool +DEPDIRS-librte_gso := librte_eal librte_mbuf librte_ether librte_net +DEPDIRS-librte_gso += librte_mempool ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) DIRS-$(CONFIG_RTE_LIBRTE_KNI) += librte_kni endif -DEPDIRS-librte_kni:= librte_eal librte_mempool librte_mbuf librte_ether +DEPDIRS-librte_kni := librte_eal librte_mempool librte_mbuf librte_ether include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/lib/librte_acl/Makefile b/lib/librte_acl/Makefile index 59767920a1..e7e3c91d52 100644 --- a/lib/librte_acl/Makefile +++ b/lib/librte_acl/Makefile @@ -36,6 +36,7 @@ LIB = librte_acl.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) +LDLIBS += -lrte_eal EXPORT_MAP := rte_acl_version.map diff --git a/lib/librte_bitratestats/Makefile b/lib/librte_bitratestats/Makefile index a079cced76..5054b67983 100644 --- a/lib/librte_bitratestats/Makefile +++ b/lib/librte_bitratestats/Makefile @@ -35,6 +35,7 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_bitratestats.a CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 +LDLIBS += -lrte_eal -lrte_metrics -lrte_ethdev EXPORT_MAP := rte_bitratestats_version.map diff --git a/lib/librte_cmdline/Makefile b/lib/librte_cmdline/Makefile index 644f68e47e..2c48e62b74 100644 --- a/lib/librte_cmdline/Makefile +++ b/lib/librte_cmdline/Makefile @@ -54,6 +54,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_socket.c SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_parse_portlist.c CFLAGS += -D_GNU_SOURCE +LDLIBS += -lrte_eal # install includes INCS := cmdline.h cmdline_parse.h cmdline_parse_num.h cmdline_parse_ipaddr.h diff --git a/lib/librte_cryptodev/Makefile b/lib/librte_cryptodev/Makefile index 6ac331bc90..bb58ea17a6 100644 --- a/lib/librte_cryptodev/Makefile +++ b/lib/librte_cryptodev/Makefile @@ -39,6 +39,8 @@ LIBABIVER := 3 # build flags CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_mempool -lrte_ring -lrte_mbuf +LDLIBS += -lrte_kvargs # library source files SRCS-y += rte_cryptodev.c rte_cryptodev_pmd.c diff --git a/lib/librte_distributor/Makefile b/lib/librte_distributor/Makefile index b417ee7bee..fee0012134 100644 --- a/lib/librte_distributor/Makefile +++ b/lib/librte_distributor/Makefile @@ -36,6 +36,7 @@ LIB = librte_distributor.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_ethdev EXPORT_MAP := rte_distributor_version.map diff --git a/lib/librte_efd/Makefile b/lib/librte_efd/Makefile index 35bb2bd64a..b0467186a4 100644 --- a/lib/librte_efd/Makefile +++ b/lib/librte_efd/Makefile @@ -36,6 +36,7 @@ LIB = librte_efd.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) +LDLIBS += -lrte_eal -lrte_ring -lrte_hash EXPORT_MAP := rte_efd_version.map diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile index b2a93bf4ff..394cc9c053 100644 --- a/lib/librte_ether/Makefile +++ b/lib/librte_ether/Makefile @@ -38,6 +38,8 @@ LIB = librte_ethdev.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_net -lrte_eal -lrte_mempool -lrte_ring +LDLIBS += -lrte_mbuf EXPORT_MAP := rte_ethdev_version.map diff --git a/lib/librte_eventdev/Makefile b/lib/librte_eventdev/Makefile index daa4ef1d98..5ac22cde72 100644 --- a/lib/librte_eventdev/Makefile +++ b/lib/librte_eventdev/Makefile @@ -39,6 +39,7 @@ LIBABIVER := 3 # build flags CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_ring -lrte_ethdev -lrte_hash # library source files SRCS-y += rte_eventdev.c diff --git a/lib/librte_gro/Makefile b/lib/librte_gro/Makefile index 747eeec9ea..eb423ccbae 100644 --- a/lib/librte_gro/Makefile +++ b/lib/librte_gro/Makefile @@ -36,6 +36,7 @@ LIB = librte_gro.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) +LDLIBS += -lrte_eal -lrte_mbuf -lrte_ethdev -lrte_net EXPORT_MAP := rte_gro_version.map diff --git a/lib/librte_gso/Makefile b/lib/librte_gso/Makefile index e6d41df7d8..ea5ad74210 100644 --- a/lib/librte_gso/Makefile +++ b/lib/librte_gso/Makefile @@ -35,6 +35,8 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_gso.a CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 +LDLIBS += -lrte_eal -lrte_mbuf -lrte_ethdev -lrte_net +LDLIBS += -lrte_mempool EXPORT_MAP := rte_gso_version.map diff --git a/lib/librte_hash/Makefile b/lib/librte_hash/Makefile index 9cf13a0458..1655b601d8 100644 --- a/lib/librte_hash/Makefile +++ b/lib/librte_hash/Makefile @@ -36,6 +36,7 @@ LIB = librte_hash.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) +LDLIBS += -lrte_eal -lrte_ring EXPORT_MAP := rte_hash_version.map diff --git a/lib/librte_ip_frag/Makefile b/lib/librte_ip_frag/Makefile index 2a8c3e3742..aff94b8ca5 100644 --- a/lib/librte_ip_frag/Makefile +++ b/lib/librte_ip_frag/Makefile @@ -36,6 +36,8 @@ LIB = librte_ip_frag.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) +LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev +LDLIBS += -lrte_hash EXPORT_MAP := rte_ip_frag_version.map diff --git a/lib/librte_jobstats/Makefile b/lib/librte_jobstats/Makefile index 561a0678ca..d0bddd126f 100644 --- a/lib/librte_jobstats/Makefile +++ b/lib/librte_jobstats/Makefile @@ -36,6 +36,7 @@ LIB = librte_jobstats.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) +LDLIBS += -lrte_eal EXPORT_MAP := rte_jobstats_version.map diff --git a/lib/librte_kni/Makefile b/lib/librte_kni/Makefile index 70f1ca8f6e..56b197604d 100644 --- a/lib/librte_kni/Makefile +++ b/lib/librte_kni/Makefile @@ -35,6 +35,7 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_kni.a CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -fno-strict-aliasing +LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev EXPORT_MAP := rte_kni_version.map diff --git a/lib/librte_kvargs/Makefile b/lib/librte_kvargs/Makefile index 564dd31022..4eaa9334d9 100644 --- a/lib/librte_kvargs/Makefile +++ b/lib/librte_kvargs/Makefile @@ -37,6 +37,7 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_kvargs.a CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 +LDLIBS += -lrte_eal EXPORT_MAP := rte_kvargs_version.map diff --git a/lib/librte_latencystats/Makefile b/lib/librte_latencystats/Makefile index eaacbb7313..665c7b4142 100644 --- a/lib/librte_latencystats/Makefile +++ b/lib/librte_latencystats/Makefile @@ -36,6 +36,7 @@ LIB = librte_latencystats.a CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 LDLIBS += -lm LDLIBS += -lpthread +LDLIBS += -lrte_eal -lrte_metrics -lrte_ethdev -lrte_mbuf EXPORT_MAP := rte_latencystats_version.map diff --git a/lib/librte_lpm/Makefile b/lib/librte_lpm/Makefile index 32be46b3bf..2e8749e846 100644 --- a/lib/librte_lpm/Makefile +++ b/lib/librte_lpm/Makefile @@ -36,6 +36,7 @@ LIB = librte_lpm.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) +LDLIBS += -lrte_eal EXPORT_MAP := rte_lpm_version.map diff --git a/lib/librte_mbuf/Makefile b/lib/librte_mbuf/Makefile index 548273054d..f6be353669 100644 --- a/lib/librte_mbuf/Makefile +++ b/lib/librte_mbuf/Makefile @@ -35,6 +35,7 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_mbuf.a CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 +LDLIBS += -lrte_eal -lrte_mempool EXPORT_MAP := rte_mbuf_version.map diff --git a/lib/librte_member/Makefile b/lib/librte_member/Makefile index 3bac1d0abd..f4cf101e71 100644 --- a/lib/librte_member/Makefile +++ b/lib/librte_member/Makefile @@ -38,6 +38,7 @@ CFLAGS := -I$(SRCDIR) $(CFLAGS) CFLAGS += $(WERROR_FLAGS) -O3 LDLIBS += -lm +LDLIBS += -lrte_eal -lrte_hash EXPORT_MAP := rte_member_version.map diff --git a/lib/librte_mempool/Makefile b/lib/librte_mempool/Makefile index 7b5bdfee70..bafd1b9a00 100644 --- a/lib/librte_mempool/Makefile +++ b/lib/librte_mempool/Makefile @@ -35,6 +35,7 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_mempool.a CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 +LDLIBS += -lrte_eal -lrte_ring EXPORT_MAP := rte_mempool_version.map diff --git a/lib/librte_meter/Makefile b/lib/librte_meter/Makefile index 539bfddd83..bfeb5d60c1 100644 --- a/lib/librte_meter/Makefile +++ b/lib/librte_meter/Makefile @@ -40,6 +40,7 @@ CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) LDLIBS += -lm +LDLIBS += -lrte_eal EXPORT_MAP := rte_meter_version.map diff --git a/lib/librte_metrics/Makefile b/lib/librte_metrics/Makefile index d4990e839f..a6efba4a12 100644 --- a/lib/librte_metrics/Makefile +++ b/lib/librte_metrics/Makefile @@ -35,6 +35,7 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_metrics.a CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 +LDLIBS += -lrte_eal EXPORT_MAP := rte_metrics_version.map diff --git a/lib/librte_net/Makefile b/lib/librte_net/Makefile index 56727c4dfe..cdaf0c7ffd 100644 --- a/lib/librte_net/Makefile +++ b/lib/librte_net/Makefile @@ -34,6 +34,7 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_net.a CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 +LDLIBS += -lrte_mbuf -lrte_eal EXPORT_MAP := rte_net_version.map LIBABIVER := 1 diff --git a/lib/librte_pdump/Makefile b/lib/librte_pdump/Makefile index 6b21c62e59..11c3e4e93d 100644 --- a/lib/librte_pdump/Makefile +++ b/lib/librte_pdump/Makefile @@ -37,6 +37,7 @@ LIB = librte_pdump.a CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 CFLAGS += -D_GNU_SOURCE LDLIBS += -lpthread +LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev EXPORT_MAP := rte_pdump_version.map diff --git a/lib/librte_pipeline/Makefile b/lib/librte_pipeline/Makefile index 7a835fd55a..a828573807 100644 --- a/lib/librte_pipeline/Makefile +++ b/lib/librte_pipeline/Makefile @@ -38,6 +38,8 @@ LIB = librte_pipeline.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_table +LDLIBS += -lrte_port EXPORT_MAP := rte_pipeline_version.map diff --git a/lib/librte_port/Makefile b/lib/librte_port/Makefile index 76629a13a3..139dc59abb 100644 --- a/lib/librte_port/Makefile +++ b/lib/librte_port/Makefile @@ -38,6 +38,11 @@ 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 +ifeq ($(CONFIG_RTE_LIBRTE_KNI),y) +LDLIBS += -lrte_kni +endif CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/lib/librte_power/Makefile b/lib/librte_power/Makefile index 06cd10e866..1b1491d720 100644 --- a/lib/librte_power/Makefile +++ b/lib/librte_power/Makefile @@ -35,6 +35,7 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_power.a CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -fno-strict-aliasing +LDLIBS += -lrte_eal EXPORT_MAP := rte_power_version.map diff --git a/lib/librte_reorder/Makefile b/lib/librte_reorder/Makefile index 4e44e72f03..5d38d712de 100644 --- a/lib/librte_reorder/Makefile +++ b/lib/librte_reorder/Makefile @@ -36,6 +36,7 @@ LIB = librte_reorder.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) +LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf EXPORT_MAP := rte_reorder_version.map diff --git a/lib/librte_ring/Makefile b/lib/librte_ring/Makefile index 3e2f4b873d..e34d9d951c 100644 --- a/lib/librte_ring/Makefile +++ b/lib/librte_ring/Makefile @@ -35,6 +35,7 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_ring.a CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 +LDLIBS += -lrte_eal EXPORT_MAP := rte_ring_version.map diff --git a/lib/librte_sched/Makefile b/lib/librte_sched/Makefile index e509447f72..04785f7206 100644 --- a/lib/librte_sched/Makefile +++ b/lib/librte_sched/Makefile @@ -43,6 +43,8 @@ CFLAGS_rte_red.o := -D_GNU_SOURCE LDLIBS += -lm LDLIBS += -lrt +LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_net +LDLIBS += -lrte_timer EXPORT_MAP := rte_sched_version.map diff --git a/lib/librte_table/Makefile b/lib/librte_table/Makefile index 8ddc8804f3..7dfa0c7417 100644 --- a/lib/librte_table/Makefile +++ b/lib/librte_table/Makefile @@ -38,6 +38,11 @@ LIB = librte_table.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_port +LDLIBS += -lrte_lpm -lrte_hash +ifeq ($(CONFIG_RTE_LIBRTE_ACL),y) +LDLIBS += -lrte_acl +endif EXPORT_MAP := rte_table_version.map diff --git a/lib/librte_timer/Makefile b/lib/librte_timer/Makefile index 03a15390e6..eb9c5624de 100644 --- a/lib/librte_timer/Makefile +++ b/lib/librte_timer/Makefile @@ -35,6 +35,7 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_timer.a CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 +LDLIBS += -lrte_eal EXPORT_MAP := rte_timer_version.map diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile index e1084aba57..be182798a9 100644 --- a/lib/librte_vhost/Makefile +++ b/lib/librte_vhost/Makefile @@ -45,6 +45,7 @@ LDLIBS += -lpthread ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y) LDLIBS += -lnuma endif +LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev # all source are stored in SRCS-y SRCS-$(CONFIG_RTE_LIBRTE_VHOST) := fd_man.c iotlb.c socket.c vhost.c \ diff --git a/mk/rte.extsubdir.mk b/mk/rte.extsubdir.mk index d21791b0c3..e2ef0132a5 100644 --- a/mk/rte.extsubdir.mk +++ b/mk/rte.extsubdir.mk @@ -52,7 +52,6 @@ $(DIRS-y): BASE_OUTPUT=$(BASE_OUTPUT) \ CUR_SUBDIR=$(CUR_SUBDIR)/$(@) \ S=$(CURDIR)/$(@) \ - DEPDIRS="$(DEPDIRS-$@)" \ $(filter-out $(DIRS-y),$(MAKECMDGOALS)) define depdirs_rule diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk index 4767ce4f22..d0979a528b 100644 --- a/mk/rte.lib.mk +++ b/mk/rte.lib.mk @@ -90,13 +90,6 @@ else _CPU_LDFLAGS := $(CPU_LDFLAGS) endif -# Translate DEPDIRS into LDLIBS -# Ignore (sub)directory dependencies which do not provide an actual library -_IGNORE_DIRS = librte_eal/% librte_compat -_DEPDIRS = $(filter-out $(_IGNORE_DIRS),$(DEPDIRS)) -_LDDIRS = $(subst librte_ether,librte_ethdev,$(_DEPDIRS)) -LDLIBS += $(subst lib,-l,$(_LDDIRS)) - O_TO_A = $(AR) crDs $(LIB) $(OBJS-y) O_TO_A_STR = $(subst ','\'',$(O_TO_A)) #'# fix syntax highlight O_TO_A_DISP = $(if $(V),"$(O_TO_A_STR)"," AR $(@)") diff --git a/mk/rte.subdir.mk b/mk/rte.subdir.mk index 92f5de4c89..6c393eb797 100644 --- a/mk/rte.subdir.mk +++ b/mk/rte.subdir.mk @@ -62,8 +62,7 @@ build: _postbuild $(DIRS-y): @[ -d $(CURDIR)/$@ ] || mkdir -p $(CURDIR)/$@ @echo "== Build $S/$@" - @$(MAKE) S=$S/$@ -f $(SRCDIR)/$@/Makefile -C $(CURDIR)/$@ \ - DEPDIRS="$(DEPDIRS-$@)" all + @$(MAKE) S=$S/$@ -f $(SRCDIR)/$@/Makefile -C $(CURDIR)/$@ all .PHONY: clean clean: _postclean