Conditionally add -lrte_malloc.
librte_malloc has been deprecated by DPDK, but to allow for backwards compability, check for its existence and link with it if it exists. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I3e05a3295b6768bd6804a8ec86c301e22040df37
This commit is contained in:
parent
ecf1d7d4d4
commit
38ea764f6d
@ -118,7 +118,13 @@ DPDK_INC_DIR ?= $(DPDK_DIR)/include
|
|||||||
DPDK_LIB_DIR ?= $(DPDK_DIR)/lib
|
DPDK_LIB_DIR ?= $(DPDK_DIR)/lib
|
||||||
|
|
||||||
DPDK_INC = -I$(DPDK_INC_DIR)
|
DPDK_INC = -I$(DPDK_INC_DIR)
|
||||||
DPDK_LIB = -L$(DPDK_LIB_DIR) -lrte_eal -lrte_malloc -lrte_mempool -lrte_ring -Wl,-rpath=$(DPDK_LIB_DIR)
|
DPDK_LIB = -L$(DPDK_LIB_DIR) -lrte_eal -lrte_mempool -lrte_ring -Wl,-rpath=$(DPDK_LIB_DIR)
|
||||||
|
# librte_malloc was removed after DPDK 2.1. Link this library conditionally based on its
|
||||||
|
# existence to maintain backward compatibility.
|
||||||
|
ifneq ($(wildcard $(DPDK_DIR)/lib/librte_malloc.*),)
|
||||||
|
DPDK_LIB += -lrte_malloc
|
||||||
|
endif
|
||||||
|
|
||||||
# DPDK requires dl library for dlopen/dlclose on Linux.
|
# DPDK requires dl library for dlopen/dlclose on Linux.
|
||||||
ifeq ($(OS),Linux)
|
ifeq ($(OS),Linux)
|
||||||
DPDK_LIB += -ldl
|
DPDK_LIB += -ldl
|
||||||
|
Loading…
Reference in New Issue
Block a user