summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/Makefile
diff options
context:
space:
mode:
authorHeinrich Kuhn <heinrich.kuhn@corigine.com>2021-08-18 16:38:53 +0200
committerLuc Provoost <luc.provoost@intel.com>2021-09-09 07:55:38 +0000
commit57d5ce26e8bca43631f9e71607f0cfbb254906ac (patch)
tree6d8962527e6b4a9bbfc8f010c9ee8eab59bb6866 /VNFs/DPPD-PROX/Makefile
parent43cff53a4970d161e547c73a97bfbd33a1149d49 (diff)
Add support for building Prox with Meson
DPDK has deprecated the use of the make system in versions 20.11 and beyond. Following the deprecation it is non-trivial to keep using make to build projects that depend on DPDK. A cleaner solution is to adopt Meson as a building framework. This commit adds support for Meson in Prox. The meson.build file mirrors the functionality that is available in the current Makefile. The make build system will exit if it detects that DPDK was built using meson (testing for the RTE_TARGET directory) Signed-off-by: Heinrich Kuhn <heinrich.kuhn@corigine.com> Signed-off-by: Simon Horman <simon.horman@corigine.com> Change-Id: I6ebffa2199993fd6eb46c2f31961fe7dc38e727c
Diffstat (limited to 'VNFs/DPPD-PROX/Makefile')
-rw-r--r--VNFs/DPPD-PROX/Makefile19
1 files changed, 18 insertions, 1 deletions
diff --git a/VNFs/DPPD-PROX/Makefile b/VNFs/DPPD-PROX/Makefile
index 60cea67f..a659c03f 100644
--- a/VNFs/DPPD-PROX/Makefile
+++ b/VNFs/DPPD-PROX/Makefile
@@ -15,12 +15,28 @@
##
ifeq ($(RTE_SDK),)
-$(error "Please define RTE_SDK environment variable")
+define err_msg
+
+Please define RTE_SDK environment variable.
+If DPDK was built with Meson, please use meson to build Prox too.
+***
+endef
+$(error $(err_msg))
endif
# Default target, can be overriden by command line or environment
RTE_TARGET ?= x86_64-native-linuxapp-gcc
+ifeq ($(wildcard $(RTE_SDK)/$(RTE_TARGET)/.),)
+define err_msg
+
+Could not find build target: $(RTE_TARGET)
+Perhaps DPDK was built using meson?
+***
+endef
+$(error $(err_msg))
+endif
+
rte_version_h := $(RTE_SDK)/$(RTE_TARGET)/include/rte_version.h
rte_config_h := $(RTE_SDK)/$(RTE_TARGET)/include/rte_config.h
rte_ver_part = $(shell sed -n -e 's/^\#define\s*$1\s*\(.*\)$$/\1/p' $(rte_version_h))
@@ -56,6 +72,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
# binary name
APP = prox
CFLAGS += -DPROGRAM_NAME=\"$(APP)\"
+CFLAGS += -DCOMPILED_WITH_MAKE
CFLAGS += -O2 -g
CFLAGS += -fno-stack-protector -Wno-deprecated-declarations