[dpdk-dev] [PATCH v4 02/31] examples: remove legacy sections of makefiles
Thomas Monjalon
thomas at monjalon.net
Tue Sep 8 00:06:42 CEST 2020
From: Ciara Power <ciara.power at intel.com>
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 <ciara.power at intel.com>
Acked-by: Nicolas Chautru <nicolas.chautru at intel.com>
---
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..2f156736d1 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..4e560f574c 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..d8f51fb39b 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..4116064581 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..05c6f865ad 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..7ba9bcfea6 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..4c215daf1b 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..0577e52985 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..2eef6e4527 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..9645c27d2f 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..f6baf635bb 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..d25e39a464 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..479b802907 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..5e6cb51eac 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..fb1ebdd433 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..fa9fa85319 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..c5f82fb548 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..4953ee2b95 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..109b7caa4e 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..d3ff2d3ee9 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..c327efab36 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..b180deb862 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..eeb6288dae 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..368ac21147 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..d69854c9f8 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..d87eafcd0c 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..b9b02124a4 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..4675570fd2 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..e8d6c57b72 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..86059d8b28 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..7a53818296 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..408074a9f5 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..bac3015d34 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..beb7ea0b82 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..ca52abba42 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..443bcb190e 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..0f6523afa6 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..c4b2184ead 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..cec59d0e0f 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..792591386e 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..27abd91998 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..de527281eb 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..9c9049d85e 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.28.0
More information about the dev
mailing list