From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 905A5A04B0; Fri, 7 Aug 2020 14:37:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E02DA1C0AC; Fri, 7 Aug 2020 14:37:40 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id C916B29D6 for ; Fri, 7 Aug 2020 14:37:37 +0200 (CEST) IronPort-SDR: mnpUGCIXxXX6z34kLcZdI1voytbCC0xbbQmwSCadScXKj8DaQM+lMHkBKr1ACwbRUdtm0sQDlw ULCnggQ6DLdA== X-IronPort-AV: E=McAfee;i="6000,8403,9705"; a="152298255" X-IronPort-AV: E=Sophos;i="5.75,445,1589266800"; d="scan'208";a="152298255" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2020 05:37:37 -0700 IronPort-SDR: dP9Ns7NR9ZCHdfsIPV7J5h8wJUpDhk0RXe7cocyS1dUU6PhhsLrdK8+3OkVC26966v6wgBh0uN smDycZEraegQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,445,1589266800"; d="scan'208";a="367914410" Received: from silpixa00399953.ir.intel.com (HELO silpixa00399953.ger.corp.intel.com) ([10.237.222.53]) by orsmga001.jf.intel.com with ESMTP; 07 Aug 2020 05:37:35 -0700 From: Ciara Power To: dev@dpdk.org Cc: bruce.richardson@intel.com, thomas@monjalon.net, Ciara Power Date: Fri, 7 Aug 2020 13:29:51 +0100 Message-Id: <20200807123009.21266-2-ciara.power@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200807123009.21266-1-ciara.power@intel.com> References: <20200807123009.21266-1-ciara.power@intel.com> Subject: [dpdk-dev] [PATCH 20.11 01/19] examples: remove legacy sections of makefiles X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The example app makefiles contained sections using the legacy method of compiling with make. These are no longer needed, and are removed, leaving only the section that uses pkg-config for the make build. Signed-off-by: Ciara Power --- examples/bbdev_app/Makefile | 23 ++------------- examples/bond/Makefile | 34 ++-------------------- examples/cmdline/Makefile | 29 ++----------------- examples/distributor/Makefile | 30 ++----------------- examples/eventdev_pipeline/Makefile | 23 ++------------- examples/fips_validation/Makefile | 34 ++-------------------- examples/flow_classify/Makefile | 29 ++----------------- examples/flow_filtering/Makefile | 23 ++------------- examples/helloworld/Makefile | 23 ++------------- examples/ioat/Makefile | 22 ++------------ examples/ip_fragmentation/Makefile | 29 ++----------------- examples/ip_pipeline/Makefile | 36 ++--------------------- examples/ip_reassembly/Makefile | 29 ++----------------- examples/ipsec-secgw/Makefile | 36 ++--------------------- examples/ipv4_multicast/Makefile | 29 ++----------------- examples/kni/Makefile | 27 ++---------------- examples/l2fwd-cat/Makefile | 38 ++----------------------- examples/l2fwd-crypto/Makefile | 28 ++---------------- examples/l2fwd-event/Makefile | 22 ++------------ examples/l2fwd-jobstats/Makefile | 23 ++------------- examples/l2fwd-keepalive/Makefile | 23 ++------------- examples/l2fwd/Makefile | 23 ++------------- examples/l3fwd-acl/Makefile | 28 ++---------------- examples/l3fwd-graph/Makefile | 23 ++------------- examples/l3fwd-power/Makefile | 36 ++--------------------- examples/l3fwd/Makefile | 23 ++------------- examples/link_status_interrupt/Makefile | 22 ++------------ examples/ntb/Makefile | 32 ++------------------- examples/packet_ordering/Makefile | 22 ++------------ examples/ptpclient/Makefile | 28 ++---------------- examples/qos_meter/Makefile | 28 ++---------------- examples/qos_sched/Makefile | 31 ++------------------ examples/rxtx_callbacks/Makefile | 31 ++------------------ examples/service_cores/Makefile | 28 ++---------------- examples/skeleton/Makefile | 29 ++----------------- examples/tep_termination/Makefile | 27 ++---------------- examples/timer/Makefile | 28 ++---------------- examples/vdpa/Makefile | 32 ++------------------- examples/vhost/Makefile | 30 ++----------------- examples/vhost_blk/Makefile | 31 ++------------------ examples/vhost_crypto/Makefile | 31 ++------------------ examples/vmdq/Makefile | 23 ++------------- examples/vmdq_dcb/Makefile | 31 ++------------------ 43 files changed, 129 insertions(+), 1078 deletions(-) diff --git a/examples/bbdev_app/Makefile b/examples/bbdev_app/Makefile index 3c8eb75a4e..9675c6d096 100644 --- a/examples/bbdev_app/Makefile +++ b/examples/bbdev_app/Makefile @@ -8,7 +8,9 @@ APP = bbdev SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -39,22 +41,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += -DALLOW_EXPERIMENTAL_API -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif diff --git a/examples/bond/Makefile b/examples/bond/Makefile index 4e4289e151..cec55dd879 100644 --- a/examples/bond/Makefile +++ b/examples/bond/Makefile @@ -8,7 +8,9 @@ APP = bond_app SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -41,33 +43,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += $(WERROR_FLAGS) - -# workaround for a gcc bug with noreturn attribute -# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 -ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) -CFLAGS_main.o += -Wno-return-type -endif - -CFLAGS += -O3 -CFLAGS += -DALLOW_EXPERIMENTAL_API - -ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) -LDLIBS += -lrte_pmd_bond -endif - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile index 7325097722..96dde832cf 100644 --- a/examples/cmdline/Makefile +++ b/examples/cmdline/Makefile @@ -8,7 +8,9 @@ APP = cmdline SRCS-y := main.c commands.c parse_obj_list.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -37,28 +39,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -# binary name -APP = cmdline - -# all source are stored in SRCS-y -SRCS-y := main.c commands.c parse_obj_list.c - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile index 6e3fef9813..0dd23762e5 100644 --- a/examples/distributor/Makefile +++ b/examples/distributor/Makefile @@ -8,7 +8,9 @@ APP = distributor_app SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -37,29 +39,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -# workaround for a gcc bug with noreturn attribute -# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 -ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) -CFLAGS_main.o += -Wno-return-type -endif - -EXTRA_CFLAGS += -O3 -Wfatal-errors - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif diff --git a/examples/eventdev_pipeline/Makefile b/examples/eventdev_pipeline/Makefile index 95a8d0884a..bbcf694fd0 100644 --- a/examples/eventdev_pipeline/Makefile +++ b/examples/eventdev_pipeline/Makefile @@ -10,7 +10,9 @@ SRCS-y += pipeline_worker_generic.c SRCS-y += pipeline_worker_tx.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -39,22 +41,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += -DALLOW_EXPERIMENTAL_API -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif diff --git a/examples/fips_validation/Makefile b/examples/fips_validation/Makefile index b44ca2ee62..fddb56ca15 100644 --- a/examples/fips_validation/Makefile +++ b/examples/fips_validation/Makefile @@ -18,7 +18,9 @@ SRCS-y += fips_validation_xts.c SRCS-y += main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -47,33 +49,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -INC += $(sort $(wildcard *.h)) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += $(WERROR_FLAGS) - -# workaround for a gcc bug with noreturn attribute -# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 -ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) -CFLAGS_main.o += -Wno-return-type -endif - -CFLAGS += -DALLOW_EXPERIMENTAL_API -CFLAGS += -I$(SRCDIR) -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif diff --git a/examples/flow_classify/Makefile b/examples/flow_classify/Makefile index 161d576b60..7402487dcf 100644 --- a/examples/flow_classify/Makefile +++ b/examples/flow_classify/Makefile @@ -8,7 +8,9 @@ APP = flow_classify SRCS-y := flow_classify.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -39,28 +41,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += -DALLOW_EXPERIMENTAL_API -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) - -# workaround for a gcc bug with noreturn attribute -# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 -ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) -CFLAGS_main.o += -Wno-return-type -endif - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile index 010a1383e2..3a3b243884 100644 --- a/examples/flow_filtering/Makefile +++ b/examples/flow_filtering/Makefile @@ -6,7 +6,9 @@ APP = flow SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -35,22 +37,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile index 94a1074cf6..d3784c11f3 100644 --- a/examples/helloworld/Makefile +++ b/examples/helloworld/Makefile @@ -8,7 +8,9 @@ APP = helloworld SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -37,22 +39,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif diff --git a/examples/ioat/Makefile b/examples/ioat/Makefile index 86308854ea..ee03337ca4 100644 --- a/examples/ioat/Makefile +++ b/examples/ioat/Makefile @@ -8,7 +8,9 @@ APP = ioatfwd SRCS-y := ioatfwd.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -37,21 +39,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -include $(RTE_SDK)/mk/rte.extapp.mk -endif diff --git a/examples/ip_fragmentation/Makefile b/examples/ip_fragmentation/Makefile index 3f4db3f59d..e3baedc18e 100644 --- a/examples/ip_fragmentation/Makefile +++ b/examples/ip_fragmentation/Makefile @@ -9,7 +9,9 @@ APP = ip_fragmentation SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -39,28 +41,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -# workaround for a gcc bug with noreturn attribute -# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 -ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) -CFLAGS_main.o += -Wno-return-type -endif - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile index 1116bb6c18..e4e86830a6 100644 --- a/examples/ip_pipeline/Makefile +++ b/examples/ip_pipeline/Makefile @@ -21,7 +21,9 @@ SRCS-y += tmgr.c SRCS-y += cryptodev.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -57,35 +59,3 @@ build: clean: rm -f build/$(APP)* build/*.o test -d build && rmdir -p build || true - -else - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -ifneq ($(CONFIG_RTE_EXEC_ENV_LINUX),y) -$(info This application can only operate in a linux environment, \ -please change the definition of the RTE_TARGET environment variable) -all: -clean: -else - -INC += $(sort $(wildcard *.h)) - -SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) := $(SRCS-y) - -CFLAGS += -DALLOW_EXPERIMENTAL_API -CFLAGS += -I$(SRCDIR) -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif -endif diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile index be9e541bd6..1350de9ebe 100644 --- a/examples/ip_reassembly/Makefile +++ b/examples/ip_reassembly/Makefile @@ -9,7 +9,9 @@ APP = ip_reassembly SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -38,28 +40,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -# workaround for a gcc bug with noreturn attribute -# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 -ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) -CFLAGS_main.o += -Wno-return-type -endif - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile index b5ccbca858..5f85dbbc02 100644 --- a/examples/ipsec-secgw/Makefile +++ b/examples/ipsec-secgw/Makefile @@ -23,7 +23,9 @@ SRCS-y += flow.c CFLAGS += -gdwarf-2 # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -54,35 +56,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -ifneq ($(MAKECMDGOALS),clean) -ifneq ($(CONFIG_RTE_LIBRTE_IPSEC),y) -$(error "RTE_LIBRTE_IPSEC is required to build ipsec-secgw") -endif -endif - -CFLAGS += -DALLOW_EXPERIMENTAL_API -CFLAGS += -O3 -gdwarf-2 -CFLAGS += $(WERROR_FLAGS) -ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y) -CFLAGS_sa.o += -diag-disable=vec -endif - -ifeq ($(DEBUG),1) -CFLAGS += -DIPSEC_DEBUG -fstack-protector-all -O0 -endif - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile index 0ed78c1cc2..aa2fda5e8a 100644 --- a/examples/ipv4_multicast/Makefile +++ b/examples/ipv4_multicast/Makefile @@ -9,7 +9,9 @@ APP = ipv4_multicast SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -38,28 +40,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -# workaround for a gcc bug with noreturn attribute -# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 -ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) -CFLAGS_main.o += -Wno-return-type -endif - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif diff --git a/examples/kni/Makefile b/examples/kni/Makefile index 8fcb67c619..71402fa744 100644 --- a/examples/kni/Makefile +++ b/examples/kni/Makefile @@ -8,7 +8,9 @@ APP = kni SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -38,26 +40,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -ifneq ($(CONFIG_RTE_EXEC_ENV_LINUX),y) -$(error This application can only operate in a linux environment, \ -please change the definition of the RTE_TARGET environment variable) -endif - -CFLAGS += -O3 -CFLAGS += -DALLOW_EXPERIMENTAL_API -CFLAGS += $(WERROR_FLAGS) - -include $(RTE_SDK)/mk/rte.extapp.mk -endif diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile index d767a10d7d..4dce18226c 100644 --- a/examples/l2fwd-cat/Makefile +++ b/examples/l2fwd-cat/Makefile @@ -8,7 +8,9 @@ APP = l2fwd-cat SRCS-y := l2fwd-cat.c cat.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -39,37 +41,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -ifeq ($(PQOS_INSTALL_PATH),) -$(error "Please define PQOS_INSTALL_PATH environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -# workaround for a gcc bug with noreturn attribute -# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 -ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) -CFLAGS_main.o += -Wno-return-type -endif - -EXTRA_CFLAGS += -O3 -g -Wfatal-errors - -CFLAGS += -I$(PQOS_INSTALL_PATH)/../include - -LDLIBS += -L$(PQOS_INSTALL_PATH) -LDLIBS += -lpqos - -include $(RTE_SDK)/mk/rte.extapp.mk -endif diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile index cdbb91a1e6..b008f887cb 100644 --- a/examples/l2fwd-crypto/Makefile +++ b/examples/l2fwd-crypto/Makefile @@ -8,7 +8,9 @@ APP = l2fwd-crypto SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -37,27 +39,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += -DALLOW_EXPERIMENTAL_API -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) - -ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),y) -ifeq ($(CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER),y) -LDLIBS += -lrte_pmd_crypto_scheduler -endif -endif - -include $(RTE_SDK)/mk/rte.extapp.mk -endif diff --git a/examples/l2fwd-event/Makefile b/examples/l2fwd-event/Makefile index ddee388ae6..a7249995c7 100644 --- a/examples/l2fwd-event/Makefile +++ b/examples/l2fwd-event/Makefile @@ -14,7 +14,9 @@ SRCS-y += l2fwd_event_generic.c SRCS-y += l2fwd_event_internal_port.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -43,21 +45,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -include $(RTE_SDK)/mk/rte.extapp.mk -endif diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile index bdb83c3e1c..292f35bee7 100644 --- a/examples/l2fwd-jobstats/Makefile +++ b/examples/l2fwd-jobstats/Makefile @@ -8,7 +8,9 @@ APP = l2fwd-jobstats SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -37,22 +39,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -include $(RTE_SDK)/mk/rte.extapp.mk -endif diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile index 9fd9db4974..26b50263aa 100644 --- a/examples/l2fwd-keepalive/Makefile +++ b/examples/l2fwd-keepalive/Makefile @@ -8,7 +8,9 @@ APP = l2fwd-keepalive SRCS-y := main.c shm.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -39,22 +41,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API -LDFLAGS += -lrt - -include $(RTE_SDK)/mk/rte.extapp.mk -endif diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile index 15105ac57e..6a74c7464a 100644 --- a/examples/l2fwd/Makefile +++ b/examples/l2fwd/Makefile @@ -8,7 +8,9 @@ APP = l2fwd SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -39,22 +41,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -# Add flag to allow experimental API as l2fwd uses rte_ethdev_set_ptype API -CFLAGS += -DALLOW_EXPERIMENTAL_API - -include $(RTE_SDK)/mk/rte.extapp.mk -endif diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile index 6644a2cf1e..a095408f51 100644 --- a/examples/l3fwd-acl/Makefile +++ b/examples/l3fwd-acl/Makefile @@ -8,7 +8,9 @@ APP = l3fwd-acl SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -37,27 +39,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -# workaround for a gcc bug with noreturn attribute -# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 -ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) -CFLAGS_main.o += -Wno-return-type -endif - -include $(RTE_SDK)/mk/rte.extapp.mk -endif diff --git a/examples/l3fwd-graph/Makefile b/examples/l3fwd-graph/Makefile index f3cf275ece..782a261d6b 100644 --- a/examples/l3fwd-graph/Makefile +++ b/examples/l3fwd-graph/Makefile @@ -8,7 +8,9 @@ APP = l3fwd-graph SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -37,22 +39,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += -DALLOW_EXPERIMENTAL_API -CFLAGS += -I$(SRCDIR) -CFLAGS += -O3 $(USER_FLAGS) -CFLAGS += $(WERROR_FLAGS) - -include $(RTE_SDK)/mk/rte.extapp.mk -endif diff --git a/examples/l3fwd-power/Makefile b/examples/l3fwd-power/Makefile index ac1ccdcf61..29635b325a 100644 --- a/examples/l3fwd-power/Makefile +++ b/examples/l3fwd-power/Makefile @@ -8,7 +8,9 @@ APP = l3fwd-power SRCS-y := main.c perf_core.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -39,35 +41,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -ifneq ($(CONFIG_RTE_EXEC_ENV_LINUX),y) -$(info This application can only operate in a linux environment, \ -please change the definition of the RTE_TARGET environment variable) -all: -else - -CFLAGS += -DALLOW_EXPERIMENTAL_API -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -LDLIBS += -lm -lrte_telemetry - -# workaround for a gcc bug with noreturn attribute -# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 -ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) -CFLAGS_main.o += -Wno-return-type -endif - -include $(RTE_SDK)/mk/rte.extapp.mk -endif -endif diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile index b25a515813..52403b2bb4 100644 --- a/examples/l3fwd/Makefile +++ b/examples/l3fwd/Makefile @@ -9,7 +9,9 @@ SRCS-y := main.c l3fwd_lpm.c l3fwd_em.c l3fwd_event.c SRCS-y += l3fwd_event_generic.c l3fwd_event_internal_port.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -38,22 +40,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += -I$(SRCDIR) -CFLAGS += -O3 $(USER_FLAGS) -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -include $(RTE_SDK)/mk/rte.extapp.mk -endif diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile index f16916faa9..da2e328d68 100644 --- a/examples/link_status_interrupt/Makefile +++ b/examples/link_status_interrupt/Makefile @@ -8,7 +8,9 @@ APP = link_status_interrupt SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -37,21 +39,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -include $(RTE_SDK)/mk/rte.extapp.mk -endif diff --git a/examples/ntb/Makefile b/examples/ntb/Makefile index 81ec6017f5..ccec63c125 100644 --- a/examples/ntb/Makefile +++ b/examples/ntb/Makefile @@ -8,8 +8,9 @@ APP = ntb_fwd SRCS-y := ntb_fwd.c # Build using pkg-config variables if possible -$(shell pkg-config --exists libdpdk) -ifeq ($(.SHELLSTATUS),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -42,30 +43,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared rmdir --ignore-fail-on-non-empty build - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, can be overridden by command line or environment -RTE_TARGET ?= x86_64-native-linuxapp-gcc - -include $(RTE_SDK)/mk/rte.vars.mk - -ifneq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y) -$(info This application can only operate in a linuxapp environment, \ -please change the definition of the RTE_TARGET environment variable) -all: -else - -CFLAGS += -D_FILE_OFFSET_BITS=64 -CFLAGS += -O2 -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif -endif diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile index f99b69dc25..480495eeba 100644 --- a/examples/packet_ordering/Makefile +++ b/examples/packet_ordering/Makefile @@ -8,7 +8,9 @@ APP = packet_ordering SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -37,21 +39,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -include $(RTE_SDK)/mk/rte.extapp.mk -endif diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile index a9555fc66a..501bc67173 100644 --- a/examples/ptpclient/Makefile +++ b/examples/ptpclient/Makefile @@ -8,7 +8,9 @@ APP = ptpclient SRCS-y := ptpclient.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -37,27 +39,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -# workaround for a gcc bug with noreturn attribute -# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 -ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) -CFLAGS_main.o += -Wno-return-type -endif - -include $(RTE_SDK)/mk/rte.extapp.mk -endif diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile index 165e07ee25..8eabb8f8c9 100644 --- a/examples/qos_meter/Makefile +++ b/examples/qos_meter/Makefile @@ -8,7 +8,9 @@ APP = qos_meter SRCS-y := main.c rte_policer.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -39,27 +41,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -# workaround for a gcc bug with noreturn attribute -# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 -ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) -CFLAGS_main.o += -Wno-return-type -endif - -include $(RTE_SDK)/mk/rte.extapp.mk -endif diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile index 0dd7d91055..7961c60120 100644 --- a/examples/qos_sched/Makefile +++ b/examples/qos_sched/Makefile @@ -8,7 +8,9 @@ APP = qos_sched SRCS-y := main.c args.c init.c app_thread.c cfg_file.c cmdline.c stats.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -37,30 +39,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -ifneq ($(CONFIG_RTE_EXEC_ENV_LINUX),y) -$(info This application can only operate in a linux environment, \ -please change the definition of the RTE_TARGET environment variable) -all: -clean: -else - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif -endif diff --git a/examples/rxtx_callbacks/Makefile b/examples/rxtx_callbacks/Makefile index 10e5f14d5c..3e982665c8 100644 --- a/examples/rxtx_callbacks/Makefile +++ b/examples/rxtx_callbacks/Makefile @@ -8,7 +8,9 @@ APP = rxtx_callbacks SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -37,30 +39,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += $(WERROR_FLAGS) - -# rte_eth_read_clock is experimental -CFLAGS += -DALLOW_EXPERIMENTAL_API - -# workaround for a gcc bug with noreturn attribute -# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 -ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) -CFLAGS_main.o += -Wno-return-type -endif - -EXTRA_CFLAGS += -O3 -g -Wfatal-errors - -include $(RTE_SDK)/mk/rte.extapp.mk -endif diff --git a/examples/service_cores/Makefile b/examples/service_cores/Makefile index e742d88f61..456981afa5 100644 --- a/examples/service_cores/Makefile +++ b/examples/service_cores/Makefile @@ -8,7 +8,9 @@ APP = service_cores SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -37,27 +39,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -# workaround for a gcc bug with noreturn attribute -# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 -ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) -CFLAGS_main.o += -Wno-return-type -endif - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile index 5f5acf7159..059dc2112b 100644 --- a/examples/skeleton/Makefile +++ b/examples/skeleton/Makefile @@ -8,7 +8,9 @@ APP = basicfwd SRCS-y := basicfwd.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -37,28 +39,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -# workaround for a gcc bug with noreturn attribute -# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 -ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) -CFLAGS_main.o += -Wno-return-type -endif - -EXTRA_CFLAGS += -O3 -g -Wfatal-errors - -include $(RTE_SDK)/mk/rte.extapp.mk -endif diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile index 548ca3cee3..65218c504a 100644 --- a/examples/tep_termination/Makefile +++ b/examples/tep_termination/Makefile @@ -8,7 +8,9 @@ APP = tep_termination SRCS-y := main.c vxlan_setup.c vxlan.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -41,26 +43,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -ifneq ($(CONFIG_RTE_EXEC_ENV_LINUX),y) -$(error This application can only operate in a linux environment, \ -please change the definition of the RTE_TARGET environment variable) -endif - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -Wno-deprecated-declarations - -include $(RTE_SDK)/mk/rte.extapp.mk -endif diff --git a/examples/timer/Makefile b/examples/timer/Makefile index b40b65995e..64c4016aa6 100644 --- a/examples/timer/Makefile +++ b/examples/timer/Makefile @@ -8,7 +8,9 @@ APP = timer SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -37,27 +39,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += -O3 -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -# workaround for a gcc bug with noreturn attribute -# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 -ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) -CFLAGS_main.o += -Wno-return-type -endif - -include $(RTE_SDK)/mk/rte.extapp.mk -endif diff --git a/examples/vdpa/Makefile b/examples/vdpa/Makefile index bc0b6793e6..8dfa0ceff2 100644 --- a/examples/vdpa/Makefile +++ b/examples/vdpa/Makefile @@ -9,7 +9,9 @@ SRCS-y := main.c CFLAGS += -DALLOW_EXPERIMENTAL_API # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -38,31 +40,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -ifneq ($(CONFIG_RTE_EXEC_ENV_LINUX),y) -$(info This application can only operate in a linux environment, \ -please change the definition of the RTE_TARGET environment variable) -all: -else - -CFLAGS += -O2 -D_FILE_OFFSET_BITS=64 -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -D_GNU_SOURCE -CFLAGS += -DALLOW_EXPERIMENTAL_API - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif # linuxapp - -endif # pkg-config diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile index ef6f3550f3..98f13176dd 100644 --- a/examples/vhost/Makefile +++ b/examples/vhost/Makefile @@ -8,7 +8,9 @@ APP = vhost-switch SRCS-y := main.c virtio_net.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -41,29 +43,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -ifneq ($(CONFIG_RTE_EXEC_ENV_LINUX),y) -$(info This application can only operate in a linux environment, \ -please change the definition of the RTE_TARGET environment variable) -all: -else - -CFLAGS += -DALLOW_EXPERIMENTAL_API -CFLAGS += -O2 -D_FILE_OFFSET_BITS=64 -CFLAGS += $(WERROR_FLAGS) - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif -endif diff --git a/examples/vhost_blk/Makefile b/examples/vhost_blk/Makefile index 3952791784..6caa40c674 100644 --- a/examples/vhost_blk/Makefile +++ b/examples/vhost_blk/Makefile @@ -8,8 +8,9 @@ APP = vhost-blk SRCS-y := blk.c vhost_blk.c vhost_blk_compat.c # Build using pkg-config variables if possible -$(shell pkg-config --exists libdpdk) -ifeq ($(.SHELLSTATUS),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -42,29 +43,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -ifneq ($(CONFIG_RTE_EXEC_ENV_LINUX),y) -$(info This application can only operate in a linux environment, \ -please change the definition of the RTE_TARGET environment variable) -all: -else - -CFLAGS += -DALLOW_EXPERIMENTAL_API -CFLAGS += -O2 -D_FILE_OFFSET_BITS=64 -CFLAGS += $(WERROR_FLAGS) - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif -endif diff --git a/examples/vhost_crypto/Makefile b/examples/vhost_crypto/Makefile index 28e3e4de74..d93c1dd424 100644 --- a/examples/vhost_crypto/Makefile +++ b/examples/vhost_crypto/Makefile @@ -9,7 +9,9 @@ SRCS-y := main.c CFLAGS += -DALLOW_EXPERIMENTAL_API # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -38,30 +40,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -ifneq ($(CONFIG_RTE_EXEC_ENV_LINUX),y) -$(info This application can only operate in a linux environment, \ -please change the definition of the RTE_TARGET environment variable) -all: -else - -CFLAGS += -DALLOW_EXPERIMENTAL_API -CFLAGS += -O2 -D_FILE_OFFSET_BITS=64 -CFLAGS += $(WERROR_FLAGS) - -include $(RTE_SDK)/mk/rte.extapp.mk - -endif # Linux - -endif # pkg-config diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile index b73373d3f5..c162e7c4e1 100644 --- a/examples/vmdq/Makefile +++ b/examples/vmdq/Makefile @@ -8,7 +8,9 @@ APP = vmdq_app SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -37,22 +39,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -EXTRA_CFLAGS += -O3 - -include $(RTE_SDK)/mk/rte.extapp.mk -endif diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile index 8d8baf729b..e9b29e2abd 100644 --- a/examples/vmdq_dcb/Makefile +++ b/examples/vmdq_dcb/Makefile @@ -8,7 +8,9 @@ APP = vmdq_dcb_app SRCS-y := main.c # Build using pkg-config variables if possible -ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) +ifneq ($(shell pkg-config --exists libdpdk && echo 0),0) + $(error "no installation of DPDK found") +endif all: shared .PHONY: shared static @@ -37,30 +39,3 @@ build: clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared test -d build && rmdir -p build || true - -else # Build using legacy build system - -ifeq ($(RTE_SDK),) -$(error "Please define RTE_SDK environment variable") -endif - -# Default target, detect a build directory, by looking for a path with a .config -RTE_TARGET ?= $(notdir $(abspath $(dir $(firstword $(wildcard $(RTE_SDK)/*/.config))))) - -include $(RTE_SDK)/mk/rte.vars.mk - -CFLAGS += $(WERROR_FLAGS) -CFLAGS += -DALLOW_EXPERIMENTAL_API - -# workaround for a gcc bug with noreturn attribute -# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 -ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) -CFLAGS_main.o += -Wno-return-type -endif -ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y) -CFLAGS_main.o += -diag-disable=vec -endif -EXTRA_CFLAGS += -O3 -g - -include $(RTE_SDK)/mk/rte.extapp.mk -endif -- 2.17.1