summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Matz <olivier.matz@6wind.com>2017-10-12 18:04:21 +0200
committerThomas Monjalon <thomas@monjalon.net>2017-10-24 02:14:57 +0200
commitcbc12b0a96f5751ab2ed10001f44d39211e3bd45 (patch)
treee2b7751e155544617bf3298cf03491eb501dfc42
parent4761b145b1e87f8521277e29e7718ab0384d0d62 (diff)
downloaddpdk-cbc12b0a96f5751ab2ed10001f44d39211e3bd45.zip
dpdk-cbc12b0a96f5751ab2ed10001f44d39211e3bd45.tar.gz
dpdk-cbc12b0a96f5751ab2ed10001f44d39211e3bd45.tar.xz
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 <gage.eads@intel.com> Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: Gage Eads <gage.eads@intel.com>
-rw-r--r--drivers/bus/Makefile2
-rw-r--r--drivers/bus/dpaa/Makefile2
-rw-r--r--drivers/bus/fslmc/Makefile2
-rw-r--r--drivers/crypto/Makefile13
-rw-r--r--drivers/crypto/aesni_gcm/Makefile2
-rw-r--r--drivers/crypto/aesni_mb/Makefile2
-rw-r--r--drivers/crypto/armv8/Makefile2
-rw-r--r--drivers/crypto/dpaa2_sec/Makefile2
-rw-r--r--drivers/crypto/kasumi/Makefile2
-rw-r--r--drivers/crypto/null/Makefile2
-rw-r--r--drivers/crypto/openssl/Makefile2
-rw-r--r--drivers/crypto/qat/Makefile2
-rw-r--r--drivers/crypto/scheduler/Makefile2
-rw-r--r--drivers/crypto/snow3g/Makefile2
-rw-r--r--drivers/crypto/zuc/Makefile2
-rw-r--r--drivers/event/Makefile4
-rw-r--r--drivers/event/dpaa2/Makefile1
-rw-r--r--drivers/event/octeontx/Makefile2
-rw-r--r--drivers/event/skeleton/Makefile1
-rw-r--r--drivers/event/sw/Makefile1
-rw-r--r--drivers/mempool/Makefile5
-rw-r--r--drivers/mempool/dpaa/Makefile1
-rw-r--r--drivers/mempool/dpaa2/Makefile1
-rw-r--r--drivers/mempool/octeontx/Makefile2
-rw-r--r--drivers/mempool/ring/Makefile1
-rw-r--r--drivers/mempool/stack/Makefile1
-rw-r--r--drivers/net/Makefile35
-rw-r--r--drivers/net/af_packet/Makefile2
-rw-r--r--drivers/net/ark/Makefile2
-rw-r--r--drivers/net/avp/Makefile2
-rw-r--r--drivers/net/bnx2x/Makefile2
-rw-r--r--drivers/net/bnxt/Makefile2
-rw-r--r--drivers/net/bonding/Makefile2
-rw-r--r--drivers/net/cxgbe/Makefile2
-rw-r--r--drivers/net/dpaa/Makefile2
-rw-r--r--drivers/net/dpaa2/Makefile2
-rw-r--r--drivers/net/e1000/Makefile2
-rw-r--r--drivers/net/ena/Makefile2
-rw-r--r--drivers/net/enic/Makefile2
-rw-r--r--drivers/net/failsafe/Makefile2
-rw-r--r--drivers/net/fm10k/Makefile2
-rw-r--r--drivers/net/i40e/Makefile2
-rw-r--r--drivers/net/ixgbe/Makefile2
-rw-r--r--drivers/net/kni/Makefile2
-rw-r--r--drivers/net/liquidio/Makefile2
-rw-r--r--drivers/net/mlx4/Makefile2
-rw-r--r--drivers/net/mlx5/Makefile2
-rw-r--r--drivers/net/mrvl/Makefile2
-rw-r--r--drivers/net/nfp/Makefile2
-rw-r--r--drivers/net/null/Makefile2
-rw-r--r--drivers/net/octeontx/Makefile3
-rw-r--r--drivers/net/pcap/Makefile2
-rw-r--r--drivers/net/qede/Makefile2
-rw-r--r--drivers/net/ring/Makefile2
-rw-r--r--drivers/net/sfc/Makefile2
-rw-r--r--drivers/net/softnic/Makefile2
-rw-r--r--drivers/net/szedata2/Makefile2
-rw-r--r--drivers/net/tap/Makefile2
-rw-r--r--drivers/net/thunderx/Makefile2
-rw-r--r--drivers/net/vhost/Makefile2
-rw-r--r--drivers/net/virtio/Makefile2
-rw-r--r--drivers/net/vmxnet3/Makefile2
-rw-r--r--examples/ethtool/Makefile1
-rw-r--r--examples/ethtool/lib/Makefile1
-rw-r--r--lib/Makefile5
-rw-r--r--lib/librte_acl/Makefile1
-rw-r--r--lib/librte_bitratestats/Makefile1
-rw-r--r--lib/librte_cmdline/Makefile1
-rw-r--r--lib/librte_cryptodev/Makefile2
-rw-r--r--lib/librte_distributor/Makefile1
-rw-r--r--lib/librte_efd/Makefile1
-rw-r--r--lib/librte_ether/Makefile2
-rw-r--r--lib/librte_eventdev/Makefile1
-rw-r--r--lib/librte_gro/Makefile1
-rw-r--r--lib/librte_gso/Makefile2
-rw-r--r--lib/librte_hash/Makefile1
-rw-r--r--lib/librte_ip_frag/Makefile2
-rw-r--r--lib/librte_jobstats/Makefile1
-rw-r--r--lib/librte_kni/Makefile1
-rw-r--r--lib/librte_kvargs/Makefile1
-rw-r--r--lib/librte_latencystats/Makefile1
-rw-r--r--lib/librte_lpm/Makefile1
-rw-r--r--lib/librte_mbuf/Makefile1
-rw-r--r--lib/librte_member/Makefile1
-rw-r--r--lib/librte_mempool/Makefile1
-rw-r--r--lib/librte_meter/Makefile1
-rw-r--r--lib/librte_metrics/Makefile1
-rw-r--r--lib/librte_net/Makefile1
-rw-r--r--lib/librte_pdump/Makefile1
-rw-r--r--lib/librte_pipeline/Makefile2
-rw-r--r--lib/librte_port/Makefile5
-rw-r--r--lib/librte_power/Makefile1
-rw-r--r--lib/librte_reorder/Makefile1
-rw-r--r--lib/librte_ring/Makefile1
-rw-r--r--lib/librte_sched/Makefile2
-rw-r--r--lib/librte_table/Makefile5
-rw-r--r--lib/librte_timer/Makefile1
-rw-r--r--lib/librte_vhost/Makefile1
-rw-r--r--mk/rte.extsubdir.mk1
-rw-r--r--mk/rte.lib.mk7
-rw-r--r--mk/rte.subdir.mk3
101 files changed, 160 insertions, 72 deletions
diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile
index 6cb6466..4b29e3d 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 61b6432..f672f54 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 37da1b0..c08b2af 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 d8c8740..d551541 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 6fca5e1..44979a4 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 e094178..7c7e970 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 082fbf5..8bf60e2 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 be6c948..3f0eade 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 b47cda0..b9daf45 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 bc2724b..b368161 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 e5fdfb5..85e5d87 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 7322ffe..c38b80d 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 b045410..b1a468e 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 ecee80d..1fb0571 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 f543b40..9d03cf0 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 d09be74..c1aae81 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 3497d09..7c5c7ee 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 50434a3..7ba6073 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 e6d5871..e4a9f41 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 d6c14da..61a108c 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 20ad3ed..1c5f200 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 25312a0..c49b0ee 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 1a17496..dd19e10 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 5b2e1b8..4e8477b 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 b339d90..a7889b9 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 7577b23..f8d6c57 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 012af88..cf33233 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 70d517c..b97c2a6 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 ca64b19..5f70415 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 cd465aa..a754fa0 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 e123106..762d42e 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 55b49b5..7aed17e 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 d9a918e..84ef4ed 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 b4666b5..49a49c7 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 c77384c..171686e 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 2f551d5..ee9b2cc 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 59d96bc..833034e 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 bf1f5da..1cab5e2 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 db48ff2..6a99a99 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 d516d36..e533d54 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 0bc124e..9d02c21 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 ddd1b12..1ec6160 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 95c806d..6a144e7 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 46a1ad0..00d099f 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 32c06f5..79120d1 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 3b3a020..fc5ea3c 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 2e90692..e78840f 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 26fce18..cd56519 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 3e4c6f4..c1e51cb 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 77810bc..c2404f4 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 827319d..0a8775a 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 7ebd0be..9ea9670 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 83ff954..5e8e087 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 7ae15ef..9edd7d5 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 429eb43..e097a66 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 8b848a9..4b15f00 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 0e96b92..f38125d 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 b0de028..b5c5a35 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 a2b6caa..183ac4b 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 258a917..1085a52 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 b21b878..156b2e8 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 84356ae..9359a7b 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 30b42b7..e86d68a 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 266baba..cabd82a 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 86d475f..527b95b 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 5976792..e7e3c91 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 a079cce..5054b67 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 644f68e..2c48e62 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 6ac331b..bb58ea1 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 b417ee7..fee0012 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 35bb2bd..b046718 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 b2a93bf..394cc9c 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 daa4ef1..5ac22cd 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 747eeec..eb423cc 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 e6d41df..ea5ad74 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 9cf13a0..1655b60 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 2a8c3e3..aff94b8 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 561a067..d0bddd1 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 70f1ca8..56b1976 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 564dd31..4eaa933 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 eaacbb7..665c7b4 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 32be46b..2e8749e 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 5482730..f6be353 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 3bac1d0..f4cf101 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 7b5bdfe..bafd1b9 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 539bfdd..bfeb5d6 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 d4990e8..a6efba4 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 56727c4..cdaf0c7 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 6b21c62..11c3e4e 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 7a835fd..a828573 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 76629a1..139dc59 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 06cd10e..1b1491d 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 4e44e72..5d38d71 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 3e2f4b8..e34d9d9 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 e509447..04785f7 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 8ddc880..7dfa0c7 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 03a1539..eb9c562 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 e1084ab..be18279 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 d21791b..e2ef013 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 4767ce4..d0979a5 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 92f5de4..6c393eb 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