From 57d5ce26e8bca43631f9e71607f0cfbb254906ac Mon Sep 17 00:00:00 2001 From: Heinrich Kuhn Date: Wed, 18 Aug 2021 16:38:53 +0200 Subject: 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 Signed-off-by: Simon Horman Change-Id: I6ebffa2199993fd6eb46c2f31961fe7dc38e727c --- VNFs/DPPD-PROX/Makefile | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'VNFs/DPPD-PROX/Makefile') 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 -- cgit 1.2.3-korg