mk: move PMD libraries linking to applications
Some PMDs provide device specific APIs. Bond and xenvirt are existing samples for this. And since these are PMD libraries, there are two options on how to link them for shared library build: 1- They can be linked to all applications by default, using common rte.app.mk file. 2- They can be explicitly linked to applications that use device specific API. Currently option one is in use, this patch switches to the option two. Moves library linking to the Makefile of application Makefile that uses device specific API. This prevent these PMD libraries to be a dependency to applications that don't use these device specific APIs. Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
parent
04bdcb3255
commit
ab12f71b31
@ -61,6 +61,10 @@ SRCS-$(CONFIG_RTE_LIBRTE_IEEE1588) += ieee1588fwd.c
|
||||
|
||||
ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
|
||||
|
||||
ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y)
|
||||
LDLIBS += -lrte_pmd_bond
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_RTE_LIBRTE_IXGBE_PMD),y)
|
||||
LDLIBS += -lrte_pmd_ixgbe
|
||||
endif
|
||||
@ -69,6 +73,10 @@ ifeq ($(CONFIG_RTE_LIBRTE_I40E_PMD),y)
|
||||
LDLIBS += -lrte_pmd_i40e
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_RTE_LIBRTE_PMD_XENVIRT),y)
|
||||
LDLIBS += -lrte_pmd_xenvirt
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
CFLAGS_cmdline.o := -D_GNU_SOURCE
|
||||
|
@ -188,9 +188,6 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_RTE_LIBRTE_PMD_NULL),y)
|
||||
SRCS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += test_link_bonding_rssconf.c
|
||||
ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
|
||||
LDLIBS += -lrte_pmd_null
|
||||
endif
|
||||
endif
|
||||
|
||||
SRCS-$(CONFIG_RTE_LIBRTE_PMD_RING) += test_pmd_ring.c
|
||||
@ -224,11 +221,27 @@ DEPDIRS-y += lib drivers
|
||||
ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y)
|
||||
ifneq ($(CONFIG_RTE_LIBRTE_PMD_RING),y)
|
||||
$(error Link bonding tests require CONFIG_RTE_LIBRTE_PMD_RING=y)
|
||||
else
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
|
||||
|
||||
ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y)
|
||||
LDLIBS += -lrte_pmd_bond
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_RTE_LIBRTE_PMD_NULL),y)
|
||||
LDLIBS += -lrte_pmd_null
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_RTE_LIBRTE_PMD_RING),y)
|
||||
LDLIBS += -lrte_pmd_ring
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER),y)
|
||||
LDLIBS += -lrte_pmd_crypto_scheduler
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_RTE_APP_TEST_RESOURCE_TAR),y)
|
||||
|
@ -54,4 +54,8 @@ endif
|
||||
|
||||
CFLAGS += -O3
|
||||
|
||||
ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y)
|
||||
LDLIBS += -lrte_pmd_bond
|
||||
endif
|
||||
|
||||
include $(RTE_SDK)/mk/rte.extapp.mk
|
||||
|
@ -100,19 +100,13 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) += -lrte_eal
|
||||
_LDLIBS-$(CONFIG_RTE_LIBRTE_CMDLINE) += -lrte_cmdline
|
||||
_LDLIBS-$(CONFIG_RTE_LIBRTE_REORDER) += -lrte_reorder
|
||||
|
||||
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += -lrte_pmd_bond
|
||||
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += -lrte_pmd_xenvirt -lxenstore
|
||||
|
||||
ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y)
|
||||
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER) += -lrte_pmd_crypto_scheduler
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n)
|
||||
# plugins (link only if static libraries)
|
||||
|
||||
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += -lrte_pmd_af_packet
|
||||
_LDLIBS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += -lrte_pmd_bnx2x -lz
|
||||
_LDLIBS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += -lrte_pmd_bnxt
|
||||
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += -lrte_pmd_bond
|
||||
_LDLIBS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += -lrte_pmd_cxgbe
|
||||
_LDLIBS-$(CONFIG_RTE_LIBRTE_E1000_PMD) += -lrte_pmd_e1000
|
||||
_LDLIBS-$(CONFIG_RTE_LIBRTE_ENA_PMD) += -lrte_pmd_ena
|
||||
@ -137,6 +131,7 @@ ifeq ($(CONFIG_RTE_LIBRTE_VHOST),y)
|
||||
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_VHOST) += -lrte_pmd_vhost
|
||||
endif # $(CONFIG_RTE_LIBRTE_VHOST)
|
||||
_LDLIBS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += -lrte_pmd_vmxnet3_uio
|
||||
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += -lrte_pmd_xenvirt -lxenstore
|
||||
|
||||
ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y)
|
||||
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += -lrte_pmd_aesni_mb
|
||||
@ -153,6 +148,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_ZUC) += -lrte_pmd_zuc
|
||||
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_ZUC) += -L$(LIBSSO_ZUC_PATH)/build -lsso_zuc
|
||||
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO) += -lrte_pmd_armv8
|
||||
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO) += -L$(ARMV8_CRYPTO_LIB_PATH) -larmv8_crypto
|
||||
_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER) += -lrte_pmd_crypto_scheduler
|
||||
endif # CONFIG_RTE_LIBRTE_CRYPTODEV
|
||||
|
||||
endif # !CONFIG_RTE_BUILD_SHARED_LIBS
|
||||
|
Loading…
x
Reference in New Issue
Block a user