diff --git a/dpdkbuild/Makefile b/dpdkbuild/Makefile index 59a2eb3ef..63def05d0 100644 --- a/dpdkbuild/Makefile +++ b/dpdkbuild/Makefile @@ -40,11 +40,12 @@ DPDK_FRAMEWORK = n DPDK_OPTS = DPDK_CFLAGS = -# We commented out this build option in our DPDK fork, but DPDK makefiles check -# its value specifically against 'n' to set linking flags properly. Set it here -# to 'n' for now. -# TODO allow DPDK to be built as shared library +ifeq ($(CONFIG_SHARED),y) +DPDK_OPTS += CONFIG_RTE_BUILD_SHARED_LIB=y +DPDK_LDFLAGS+= -rpath $(SPDK_ROOT_DIR)/dpdk/build/lib +else DPDK_OPTS += CONFIG_RTE_BUILD_SHARED_LIB=n +endif ifeq ($(CONFIG_CRYPTO),y) DPDK_FRAMEWORK = y