improve building examples
cover improve building examples
This patchset adds support for testing a number of examples using the DPDK pkgconfig file, allowing us to check that the file works. It also includes some more general cleanups for the examples, including adding support for building from pkg-config to a couple of examples which were missing that.
This patchset includes some work that was previously discussed on-list:
https://mails.dpdk.org/archives/dev/2019-April/131041.html
Bruce Richardson (6):
examples: remove auto-generation of examples list
examples: add support for relocated DPDK install devtools/test-meson-builds: remove dependency on clang devtools/test-meson-builds: add testing of pkg-config file examples/vdpa: support building from pkg-config info examples/vhost_crypto: support building from pkg-config info
devtools/test-meson-builds.sh | 61 +++++++++++++++++-------- examples/bbdev_app/Makefile | 13 ++++-- examples/bond/Makefile | 13 ++++-- examples/cmdline/Makefile | 13 ++++-- examples/distributor/Makefile | 13 ++++-- examples/eventdev_pipeline/Makefile | 13 ++++-- examples/exception_path/Makefile | 13 ++++-- examples/fips_validation/Makefile | 13 ++++-- examples/flow_classify/Makefile | 13 ++++-- examples/flow_filtering/Makefile | 13 ++++-- examples/helloworld/Makefile | 13 ++++-- examples/ip_fragmentation/Makefile | 13 ++++-- examples/ip_pipeline/Makefile | 13 ++++-- examples/ip_reassembly/Makefile | 13 ++++-- examples/ipsec-secgw/Makefile | 13 ++++-- examples/ipv4_multicast/Makefile | 13 ++++-- examples/kni/Makefile | 13 ++++-- examples/l2fwd-cat/Makefile | 13 ++++-- examples/l2fwd-crypto/Makefile | 13 ++++-- examples/l2fwd-jobstats/Makefile | 13 ++++-- examples/l2fwd-keepalive/Makefile | 13 ++++-- examples/l2fwd/Makefile | 13 ++++-- examples/l3fwd-acl/Makefile | 13 ++++-- examples/l3fwd-power/Makefile | 13 ++++-- examples/l3fwd-vf/Makefile | 13 ++++-- examples/l3fwd/Makefile | 13 ++++-- examples/link_status_interrupt/Makefile | 13 ++++-- examples/load_balancer/Makefile | 13 ++++-- examples/meson.build | 31 +++++++++++-- examples/packet_ordering/Makefile | 13 ++++-- examples/ptpclient/Makefile | 13 ++++-- examples/qos_meter/Makefile | 13 ++++-- examples/qos_sched/Makefile | 13 ++++-- examples/rxtx_callbacks/Makefile | 13 ++++-- examples/service_cores/Makefile | 13 ++++-- examples/skeleton/Makefile | 13 ++++-- examples/tep_termination/Makefile | 13 ++++-- examples/timer/Makefile | 13 ++++-- examples/vdpa/Makefile | 55 ++++++++++++++++++---- examples/vhost/Makefile | 13 ++++-- examples/vhost_crypto/Makefile | 55 ++++++++++++++++++---- examples/vhost_scsi/Makefile | 13 ++++-- examples/vmdq/Makefile | 13 ++++-- examples/vmdq_dcb/Makefile | 13 ++++-- 44 files changed, 525 insertions(+), 197 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/6 examples: remove auto-generation of examples list
The examples/meson.build file scanned the filesystem to find all examples to build (for examples=all option) and install. However, using run_command and scanning the filesystem prevented ninja from properly detecting the addition or removal of any examples - one had to recreate the build directory from scratch to guarantee correct detection of all examples. This patch replaces this generated list with a static list of examples, thereby allowing proper tracking by ninja/meson, but at the cost of having to update this file when a new example is added or removed.
--- examples/meson.build | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-)
examples/meson.build +28 -3
@@ -8,9 +8,34 @@ endif execinfo = cc.find_library('execinfo', required: false) -all_examples = run_command('sh', '-c', - 'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done' - ).stdout().split() +# list of all example apps. Keep 1-3 per line, in alphabetical order. +all_examples = [ + 'bbdev_app', 'bond', + 'bpf', 'cmdline', + 'distributor', 'ethtool', + 'eventdev_pipeline', 'exception_path', + 'fips_validation', 'flow_classify', + 'flow_filtering', 'helloworld', + 'ip_fragmentation', 'ip_pipeline', + 'ip_reassembly', 'ipsec-secgw', + 'ipv4_multicast', 'kni', + 'l2fwd', 'l2fwd-cat', + 'l2fwd-crypto', 'l2fwd-jobstats', + 'l2fwd-keepalive', 'l3fwd', + 'l3fwd-acl', 'l3fwd-power', + 'l3fwd-vf', 'link_status_interrupt', + 'load_balancer', 'multi_process', + 'netmap_compat', 'packet_ordering', + 'performance-thread', 'ptpclient', + 'qos_meter', 'qos_sched', + 'quota_watermark', 'rxtx_callbacks', + 'server_node_efd', 'service_cores', + 'skeleton', 'tep_termination', + 'timer', 'vdpa', + 'vhost', 'vhost_crypto', + 'vhost_scsi', 'vm_power_manager', + 'vmdq', 'vmdq_dcb', +] # install all example code on install - irrespective of whether the example in # question is to be built as part of this build or not. foreach ex:all_examples
Signature · 1 line
2.20.1
PATCH 2/6 examples: add support for relocated DPDK install
In reply to Bruce RichardsonFor testing of DPDK, we want to override the prefix given by the pkg-config file, so that we can get correct paths for DPDK installed in an unusual location.
--- examples/bbdev_app/Makefile | 13 +++++++++---- examples/bond/Makefile | 13 +++++++++---- examples/cmdline/Makefile | 13 +++++++++---- examples/distributor/Makefile | 13 +++++++++---- examples/eventdev_pipeline/Makefile | 13 +++++++++---- examples/exception_path/Makefile | 13 +++++++++---- examples/fips_validation/Makefile | 13 +++++++++---- examples/flow_classify/Makefile | 13 +++++++++---- examples/flow_filtering/Makefile | 13 +++++++++---- examples/helloworld/Makefile | 13 +++++++++---- examples/ip_fragmentation/Makefile | 13 +++++++++---- examples/ip_pipeline/Makefile | 13 +++++++++---- examples/ip_reassembly/Makefile | 13 +++++++++---- examples/ipsec-secgw/Makefile | 13 +++++++++---- examples/ipv4_multicast/Makefile | 13 +++++++++---- examples/kni/Makefile | 13 +++++++++---- examples/l2fwd-cat/Makefile | 13 +++++++++---- examples/l2fwd-crypto/Makefile | 13 +++++++++---- examples/l2fwd-jobstats/Makefile | 13 +++++++++---- examples/l2fwd-keepalive/Makefile | 13 +++++++++---- examples/l2fwd/Makefile | 13 +++++++++---- examples/l3fwd-acl/Makefile | 13 +++++++++---- examples/l3fwd-power/Makefile | 13 +++++++++---- examples/l3fwd-vf/Makefile | 13 +++++++++---- examples/l3fwd/Makefile | 13 +++++++++---- examples/link_status_interrupt/Makefile | 13 +++++++++---- examples/load_balancer/Makefile | 13 +++++++++---- examples/packet_ordering/Makefile | 13 +++++++++---- examples/ptpclient/Makefile | 13 +++++++++---- examples/qos_meter/Makefile | 13 +++++++++---- examples/qos_sched/Makefile | 13 +++++++++---- examples/rxtx_callbacks/Makefile | 13 +++++++++---- examples/service_cores/Makefile | 13 +++++++++---- examples/skeleton/Makefile | 13 +++++++++---- examples/tep_termination/Makefile | 13 +++++++++---- examples/timer/Makefile | 13 +++++++++---- examples/vhost/Makefile | 13 +++++++++---- examples/vhost_scsi/Makefile | 13 +++++++++---- examples/vmdq/Makefile | 13 +++++++++---- examples/vmdq_dcb/Makefile | 13 +++++++++---- 40 files changed, 360 insertions(+), 160 deletions(-)
examples/bbdev_app/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/bond/Makefile +9 -4
@@ -20,10 +20,15 @@ static: build/$(APP)-static LDFLAGS += -lrte_pmd_bond -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/cmdline/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/distributor/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/eventdev_pipeline/Makefile +9 -4
@@ -20,10 +20,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/exception_path/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/fips_validation/Makefile +9 -4
@@ -27,10 +27,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/flow_classify/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/flow_filtering/Makefile +9 -4
@@ -16,10 +16,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/helloworld/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ip_fragmentation/Makefile +9 -4
@@ -19,10 +19,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ip_pipeline/Makefile +9 -4
@@ -31,10 +31,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -I.
examples/ip_reassembly/Makefile +9 -4
@@ -19,10 +19,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ipsec-secgw/Makefile +9 -4
@@ -29,10 +29,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/ipv4_multicast/Makefile +9 -4
@@ -19,10 +19,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/kni/Makefile +9 -4
@@ -18,11 +18,16 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-cat/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) LDFLAGS += -lpqos
examples/l2fwd-crypto/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-jobstats/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-keepalive/Makefile +9 -4
@@ -20,10 +20,15 @@ static: build/$(APP)-static LDFLAGS += -pthread -lrt -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l3fwd-acl/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l3fwd-power/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/l3fwd-vf/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l3fwd/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/link_status_interrupt/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/load_balancer/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/packet_ordering/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ptpclient/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/qos_meter/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/qos_sched/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/rxtx_callbacks/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/service_cores/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/skeleton/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/tep_termination/Makefile +9 -4
@@ -20,10 +20,15 @@ static: build/$(APP)-static LDFLAGS += -pthread -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -Wno-deprecated-declarations
examples/timer/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/vhost/Makefile +9 -4
@@ -20,10 +20,15 @@ static: build/$(APP)-static LDFLAGS += -pthread -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/vhost_scsi/Makefile +9 -4
@@ -21,10 +21,15 @@ static: build/$(APP)-static CFLAGS += -D_FILE_OFFSET_BITS=64 LDFLAGS += -pthread -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/vmdq/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/vmdq_dcb/Makefile +9 -4
@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.20.1
Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install
Quoted 75 lines · Bruce Richardson
For testing of DPDK, we want to override the prefix given by the pkg-config file, so that we can get correct paths for DPDK installed in an unusual location.
Signed-off-by: Bruce Richardson <
[email protected]Quoted 1 line
--- examples/bbdev_app/Makefile | 13 +++++++++---- examples/bond/Makefile | 13 +++++++++---- examples/cmdline/Makefile | 13 +++++++++---- examples/distributor/Makefile | 13 +++++++++---- examples/eventdev_pipeline/Makefile | 13 +++++++++---- examples/exception_path/Makefile | 13 +++++++++---- examples/fips_validation/Makefile | 13 +++++++++---- examples/flow_classify/Makefile | 13 +++++++++---- examples/flow_filtering/Makefile | 13 +++++++++---- examples/helloworld/Makefile | 13 +++++++++---- examples/ip_fragmentation/Makefile | 13 +++++++++---- examples/ip_pipeline/Makefile | 13 +++++++++---- examples/ip_reassembly/Makefile | 13 +++++++++---- examples/ipsec-secgw/Makefile | 13 +++++++++---- examples/ipv4_multicast/Makefile | 13 +++++++++---- examples/kni/Makefile | 13 +++++++++---- examples/l2fwd-cat/Makefile | 13 +++++++++---- examples/l2fwd-crypto/Makefile | 13 +++++++++---- examples/l2fwd-jobstats/Makefile | 13 +++++++++---- examples/l2fwd-keepalive/Makefile | 13 +++++++++---- examples/l2fwd/Makefile | 13 +++++++++---- examples/l3fwd-acl/Makefile | 13 +++++++++---- examples/l3fwd-power/Makefile | 13 +++++++++---- examples/l3fwd-vf/Makefile | 13 +++++++++---- examples/l3fwd/Makefile | 13 +++++++++---- examples/link_status_interrupt/Makefile | 13 +++++++++---- examples/load_balancer/Makefile | 13 +++++++++---- examples/packet_ordering/Makefile | 13 +++++++++---- examples/ptpclient/Makefile | 13 +++++++++---- examples/qos_meter/Makefile | 13 +++++++++---- examples/qos_sched/Makefile | 13 +++++++++---- examples/rxtx_callbacks/Makefile | 13 +++++++++---- examples/service_cores/Makefile | 13 +++++++++---- examples/skeleton/Makefile | 13 +++++++++---- examples/tep_termination/Makefile | 13 +++++++++---- examples/timer/Makefile | 13 +++++++++---- examples/vhost/Makefile | 13 +++++++++---- examples/vhost_scsi/Makefile | 13 +++++++++---- examples/vmdq/Makefile | 13 +++++++++---- examples/vmdq_dcb/Makefile | 13 +++++++++---- 40 files changed, 360 insertions(+), 160 deletions(-)examples/bbdev_app/Makefile +9
-4@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
Quoted 1 line
CFLAGS += -DALLOW_EXPERIMENTAL_API
Hi,
Would using "--define-prefix" allow to avoid the special-sauced DPDK_PC_PREFIX variable?
Signature · 2 lines
Kind regards, Luca Boccassi
Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install
Quoted 76 lines · Luca Boccassi
Quoted 75 lines · Bruce Richardson
For testing of DPDK, we want to override the prefix given by the pkg-config file, so that we can get correct paths for DPDK installed in an unusual location.
Signed-off-by: Bruce Richardson <
[email protected]Quoted 1 line
--- examples/bbdev_app/Makefile | 13 +++++++++---- examples/bond/Makefile | 13 +++++++++---- examples/cmdline/Makefile | 13 +++++++++---- examples/distributor/Makefile | 13 +++++++++---- examples/eventdev_pipeline/Makefile | 13 +++++++++---- examples/exception_path/Makefile | 13 +++++++++---- examples/fips_validation/Makefile | 13 +++++++++---- examples/flow_classify/Makefile | 13 +++++++++---- examples/flow_filtering/Makefile | 13 +++++++++---- examples/helloworld/Makefile | 13 +++++++++---- examples/ip_fragmentation/Makefile | 13 +++++++++---- examples/ip_pipeline/Makefile | 13 +++++++++---- examples/ip_reassembly/Makefile | 13 +++++++++---- examples/ipsec-secgw/Makefile | 13 +++++++++---- examples/ipv4_multicast/Makefile | 13 +++++++++---- examples/kni/Makefile | 13 +++++++++---- examples/l2fwd-cat/Makefile | 13 +++++++++---- examples/l2fwd-crypto/Makefile | 13 +++++++++---- examples/l2fwd-jobstats/Makefile | 13 +++++++++---- examples/l2fwd-keepalive/Makefile | 13 +++++++++---- examples/l2fwd/Makefile | 13 +++++++++---- examples/l3fwd-acl/Makefile | 13 +++++++++---- examples/l3fwd-power/Makefile | 13 +++++++++---- examples/l3fwd-vf/Makefile | 13 +++++++++---- examples/l3fwd/Makefile | 13 +++++++++---- examples/link_status_interrupt/Makefile | 13 +++++++++---- examples/load_balancer/Makefile | 13 +++++++++---- examples/packet_ordering/Makefile | 13 +++++++++---- examples/ptpclient/Makefile | 13 +++++++++---- examples/qos_meter/Makefile | 13 +++++++++---- examples/qos_sched/Makefile | 13 +++++++++---- examples/rxtx_callbacks/Makefile | 13 +++++++++---- examples/service_cores/Makefile | 13 +++++++++---- examples/skeleton/Makefile | 13 +++++++++---- examples/tep_termination/Makefile | 13 +++++++++---- examples/timer/Makefile | 13 +++++++++---- examples/vhost/Makefile | 13 +++++++++---- examples/vhost_scsi/Makefile | 13 +++++++++---- examples/vmdq/Makefile | 13 +++++++++---- examples/vmdq_dcb/Makefile | 13 +++++++++---- 40 files changed, 360 insertions(+), 160 deletions(-)examples/bbdev_app/Makefile +9
-4@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
Quoted 8 lines
Quoted 1 line
CFLAGS += -DALLOW_EXPERIMENTAL_API
Hi,
Would using "--define-prefix" allow to avoid the special-sauced
DPDK_PC_PREFIXvariable?
Perhaps I'm missing something, but I'm not seeing how, since the code above is already using the --define-variable flag. Swapping one pkg-config flag for another isn't likely to change the flow. Whatever way things work, we need an environment variable to pull in the path change. Since one doesn't seem to be available for pkg-config directly, we need a DPDK special-sauced one.
/Bruce
Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install
Quoted 100 lines · Bruce Richardson
Quoted 78 lines · Luca Boccassi
Quoted 77 lines · Bruce Richardson
For testing of DPDK, we want to override the prefix given by the pkg-config file, so that we can get correct paths for DPDK installed
in an unusual location.Signed-off-by: Bruce Richardson <
[email protected]--- examples/bbdev_app/Makefile | 13 +++++++++---- examples/bond/Makefile | 13 +++++++++---- examples/cmdline/Makefile | 13 +++++++++---- examples/distributor/Makefile | 13 +++++++++---- examples/eventdev_pipeline/Makefile | 13 +++++++++---- examples/exception_path/Makefile | 13 +++++++++---- examples/fips_validation/Makefile | 13 +++++++++---- examples/flow_classify/Makefile | 13 +++++++++---- examples/flow_filtering/Makefile | 13 +++++++++---- examples/helloworld/Makefile | 13 +++++++++---- examples/ip_fragmentation/Makefile | 13 +++++++++---- examples/ip_pipeline/Makefile | 13 +++++++++---- examples/ip_reassembly/Makefile | 13 +++++++++---- examples/ipsec-secgw/Makefile | 13 +++++++++---- examples/ipv4_multicast/Makefile | 13 +++++++++---- examples/kni/Makefile | 13 +++++++++---- examples/l2fwd-cat/Makefile | 13 +++++++++---- examples/l2fwd-crypto/Makefile | 13 +++++++++---- examples/l2fwd-jobstats/Makefile | 13 +++++++++---- examples/l2fwd-keepalive/Makefile | 13 +++++++++---- examples/l2fwd/Makefile | 13 +++++++++---- examples/l3fwd-acl/Makefile | 13 +++++++++---- examples/l3fwd-power/Makefile | 13 +++++++++---- examples/l3fwd-vf/Makefile | 13 +++++++++---- examples/l3fwd/Makefile | 13 +++++++++---- examples/link_status_interrupt/Makefile | 13 +++++++++---- examples/load_balancer/Makefile | 13 +++++++++---- examples/packet_ordering/Makefile | 13 +++++++++---- examples/ptpclient/Makefile | 13 +++++++++---- examples/qos_meter/Makefile | 13 +++++++++---- examples/qos_sched/Makefile | 13 +++++++++---- examples/rxtx_callbacks/Makefile | 13 +++++++++---- examples/service_cores/Makefile | 13 +++++++++---- examples/skeleton/Makefile | 13 +++++++++---- examples/tep_termination/Makefile | 13 +++++++++---- examples/timer/Makefile | 13 +++++++++---- examples/vhost/Makefile | 13 +++++++++---- examples/vhost_scsi/Makefile | 13 +++++++++---- examples/vmdq/Makefile | 13 +++++++++---- examples/vmdq_dcb/Makefile | 13 +++++++++---- 40 files changed, 360 insertions(+), 160 deletions(-)examples/bbdev_app/Makefile +9
-4@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)Quoted 8 lines
Quoted 1 line
CFLAGS += -DALLOW_EXPERIMENTAL_API
Hi,
Would using "--define-prefix" allow to avoid the special-sauced
DPDK_PC_PREFIXvariable?Perhaps I'm missing something, but I'm not seeing how, since the code above
is already using the --define-variable flag. Swapping one pkg-config flag
for another isn't likely to change the flow. Whatever way things work, we
need an environment variable to pull in the path change. Since one doesn't
seem to be available for pkg-config directly, we need a DPDK special- sauced
one.
Quoted 1 line
/Bruce
I think PKG_CONFIG_PATH is a more common and more well-understood flag to use - using define-prefix should allow to use that instead
Signature · 2 lines
Kind regards, Luca Boccassi
Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install
Quoted 101 lines · Luca Boccassi
Quoted 100 lines · Bruce Richardson
Quoted 78 lines · Luca Boccassi
Quoted 77 lines · Bruce Richardson
For testing of DPDK, we want to override the prefix given by the pkg-config file, so that we can get correct paths for DPDK installed
in an unusual location.Signed-off-by: Bruce Richardson <
[email protected]--- examples/bbdev_app/Makefile | 13 +++++++++---- examples/bond/Makefile | 13 +++++++++---- examples/cmdline/Makefile | 13 +++++++++---- examples/distributor/Makefile | 13 +++++++++---- examples/eventdev_pipeline/Makefile | 13 +++++++++---- examples/exception_path/Makefile | 13 +++++++++---- examples/fips_validation/Makefile | 13 +++++++++---- examples/flow_classify/Makefile | 13 +++++++++---- examples/flow_filtering/Makefile | 13 +++++++++---- examples/helloworld/Makefile | 13 +++++++++---- examples/ip_fragmentation/Makefile | 13 +++++++++---- examples/ip_pipeline/Makefile | 13 +++++++++---- examples/ip_reassembly/Makefile | 13 +++++++++---- examples/ipsec-secgw/Makefile | 13 +++++++++---- examples/ipv4_multicast/Makefile | 13 +++++++++---- examples/kni/Makefile | 13 +++++++++---- examples/l2fwd-cat/Makefile | 13 +++++++++---- examples/l2fwd-crypto/Makefile | 13 +++++++++---- examples/l2fwd-jobstats/Makefile | 13 +++++++++---- examples/l2fwd-keepalive/Makefile | 13 +++++++++---- examples/l2fwd/Makefile | 13 +++++++++---- examples/l3fwd-acl/Makefile | 13 +++++++++---- examples/l3fwd-power/Makefile | 13 +++++++++---- examples/l3fwd-vf/Makefile | 13 +++++++++---- examples/l3fwd/Makefile | 13 +++++++++---- examples/link_status_interrupt/Makefile | 13 +++++++++---- examples/load_balancer/Makefile | 13 +++++++++---- examples/packet_ordering/Makefile | 13 +++++++++---- examples/ptpclient/Makefile | 13 +++++++++---- examples/qos_meter/Makefile | 13 +++++++++---- examples/qos_sched/Makefile | 13 +++++++++---- examples/rxtx_callbacks/Makefile | 13 +++++++++---- examples/service_cores/Makefile | 13 +++++++++---- examples/skeleton/Makefile | 13 +++++++++---- examples/tep_termination/Makefile | 13 +++++++++---- examples/timer/Makefile | 13 +++++++++---- examples/vhost/Makefile | 13 +++++++++---- examples/vhost_scsi/Makefile | 13 +++++++++---- examples/vmdq/Makefile | 13 +++++++++---- examples/vmdq_dcb/Makefile | 13 +++++++++---- 40 files changed, 360 insertions(+), 160 deletions(-)examples/bbdev_app/Makefile +9
-4@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)Quoted 8 lines
Quoted 1 line
CFLAGS += -DALLOW_EXPERIMENTAL_API
Hi,
Would using "--define-prefix" allow to avoid the special-sauced
DPDK_PC_PREFIXvariable?Perhaps I'm missing something, but I'm not seeing how, since the code above
is already using the --define-variable flag. Swapping one pkg-config flag
for another isn't likely to change the flow. Whatever way things work, we
need an environment variable to pull in the path change. Since one doesn't
seem to be available for pkg-config directly, we need a DPDK special- sauced
one.
Quoted 5 lines
Quoted 1 line
/Bruce
I think
PKG_CONFIG_PATHis a more common and more well-understood flag to use - using define-prefix should allow to use that instead
Yes, except pkg-config-path only gives the path to the pkg-config file, it doesn't affect the prefixes in the file itself, and it's the latter we need to modify.
Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install
Quoted 117 lines · Bruce Richardson
Quoted 109 lines · Luca Boccassi
Quoted 108 lines · Bruce Richardson
Quoted 82 lines · Luca Boccassi
Quoted 81 lines · Bruce Richardson
For testing of DPDK, we want to override the prefix given by the
pkg-config file, so that we can get correct paths for DPDK installed
in an unusual location.Signed-off-by: Bruce Richardson <
[email protected]--- examples/bbdev_app/Makefile | 13 +++++++++---- examples/bond/Makefile | 13 +++++++++---- examples/cmdline/Makefile | 13 +++++++++---- examples/distributor/Makefile | 13 +++++++++---- examples/eventdev_pipeline/Makefile | 13 +++++++++---- examples/exception_path/Makefile | 13 +++++++++---- examples/fips_validation/Makefile | 13 +++++++++---- examples/flow_classify/Makefile | 13 +++++++++---- examples/flow_filtering/Makefile | 13 +++++++++---- examples/helloworld/Makefile | 13 +++++++++---- examples/ip_fragmentation/Makefile | 13 +++++++++---- examples/ip_pipeline/Makefile | 13 +++++++++---- examples/ip_reassembly/Makefile | 13 +++++++++---- examples/ipsec-secgw/Makefile | 13 +++++++++---- examples/ipv4_multicast/Makefile | 13 +++++++++---- examples/kni/Makefile | 13 +++++++++---- examples/l2fwd-cat/Makefile | 13 +++++++++---- examples/l2fwd-crypto/Makefile | 13 +++++++++---- examples/l2fwd-jobstats/Makefile | 13 +++++++++---- examples/l2fwd-keepalive/Makefile | 13 +++++++++---- examples/l2fwd/Makefile | 13 +++++++++---- examples/l3fwd-acl/Makefile | 13 +++++++++---- examples/l3fwd-power/Makefile | 13 +++++++++---- examples/l3fwd-vf/Makefile | 13 +++++++++---- examples/l3fwd/Makefile | 13 +++++++++---- examples/link_status_interrupt/Makefile | 13 +++++++++---- examples/load_balancer/Makefile | 13 +++++++++---- examples/packet_ordering/Makefile | 13 +++++++++---- examples/ptpclient/Makefile | 13 +++++++++---- examples/qos_meter/Makefile | 13 +++++++++---- examples/qos_sched/Makefile | 13 +++++++++---- examples/rxtx_callbacks/Makefile | 13 +++++++++---- examples/service_cores/Makefile | 13 +++++++++---- examples/skeleton/Makefile | 13 +++++++++---- examples/tep_termination/Makefile | 13 +++++++++---- examples/timer/Makefile | 13 +++++++++---- examples/vhost/Makefile | 13 +++++++++---- examples/vhost_scsi/Makefile | 13 +++++++++---- examples/vmdq/Makefile | 13 +++++++++---- examples/vmdq_dcb/Makefile | 13 +++++++++---- 40 files changed, 360 insertions(+), 160 deletions(-)examples/bbdev_app/Makefile +0
-4@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs
libdpdk)examples/bbdev_app/Makefile +9
-0+PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs
libdpdk)Quoted 8 lines
Quoted 1 line
CFLAGS += -DALLOW_EXPERIMENTAL_API
Hi,
Would using "--define-prefix" allow to avoid the special-sauced
DPDK_PC_PREFIXvariable?Perhaps I'm missing something, but I'm not seeing how, since the code
above
is already using the --define-variable flag. Swapping one pkg- config
flag
for another isn't likely to change the flow. Whatever way things work, we
need an environment variable to pull in the path change. Since one
doesn't
seem to be available for pkg-config directly, we need a DPDK special-
sauced
one.Quoted 6 lines
Quoted 1 line
/Bruce
I think
PKG_CONFIG_PATHis a more common and more well-understood flag
to use - using define-prefix should allow to use that instead
Quoted 5 lines
Yes, except pkg-config-path only gives the path to the pkg-config file, it
doesn't affect the prefixes in the file itself, and it's the latter we need
to modify.
Using --define-prefix will automatically adjust the prefixes based on the path:
$ grep prefix /tmp/test/usr/local/lib/x86_64-linux-gnu/pkgconfig/libdpdk.pc
prefix=/usr/local
libdir=${prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include$ PKG_CONFIG_PATH=/tmp/test/usr/local/lib/x86_64-linux-gnu/pkgconfig pkg-config --cflags --libs libdpdk -include rte_config.h -march=native -I/usr/local/include -I/usr/include/libnl3 -L/usr/local/lib/x86_64-linux-gnu -lrte_telemetry -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_ipsec -lrte_vhost -lrte_stack -lrte_security -lrte_sched -lrte_reorder -lrte_rawdev -lrte_pdump -lrte_power -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag -lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_ring -lrte_cmdline -lrte_eal -lrte_kvargs
$ PKG_CONFIG_PATH=/tmp/test/usr/local/lib/x86_64-linux-gnu/pkgconfig pkg-config --define-prefix --cflags --libs libdpdk -include rte_config.h -march=native -I/tmp/test/usr/local/lib/include -I/usr/lib/include -I/usr/lib/include/libnl3 -I/usr/lib/include -L/tmp/test/usr/local/lib/lib/x86_64-linux-gnu -lrte_telemetry -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table -lrte_port -lrte_ipsec -lrte_vhost -lrte_stack -lrte_security -lrte_sched -lrte_reorder -lrte_rawdev -lrte_pdump -lrte_power -lrte_member -lrte_lpm -lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag -lrte_gso -lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev -lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev -lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_pci -lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_ring -lrte_cmdline -lrte_eal -lrte_kvargs
Signature · 2 lines
Kind regards, Luca Boccassi
Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install
Quoted 118 lines · Luca Boccassi
Quoted 117 lines · Bruce Richardson
Quoted 115 lines · Luca Boccassi
Quoted 108 lines · Bruce Richardson
Quoted 82 lines · Luca Boccassi
Quoted 81 lines · Bruce Richardson
For testing of DPDK, we want to override the prefix given by the
pkg-config file, so that we can get correct paths for DPDK installed
in an unusual location.Signed-off-by: Bruce Richardson <
[email protected]--- examples/bbdev_app/Makefile | 13 +++++++++---- examples/bond/Makefile | 13 +++++++++---- examples/cmdline/Makefile | 13 +++++++++---- examples/distributor/Makefile | 13 +++++++++---- examples/eventdev_pipeline/Makefile | 13 +++++++++---- examples/exception_path/Makefile | 13 +++++++++---- examples/fips_validation/Makefile | 13 +++++++++---- examples/flow_classify/Makefile | 13 +++++++++---- examples/flow_filtering/Makefile | 13 +++++++++---- examples/helloworld/Makefile | 13 +++++++++---- examples/ip_fragmentation/Makefile | 13 +++++++++---- examples/ip_pipeline/Makefile | 13 +++++++++---- examples/ip_reassembly/Makefile | 13 +++++++++---- examples/ipsec-secgw/Makefile | 13 +++++++++---- examples/ipv4_multicast/Makefile | 13 +++++++++---- examples/kni/Makefile | 13 +++++++++---- examples/l2fwd-cat/Makefile | 13 +++++++++---- examples/l2fwd-crypto/Makefile | 13 +++++++++---- examples/l2fwd-jobstats/Makefile | 13 +++++++++---- examples/l2fwd-keepalive/Makefile | 13 +++++++++---- examples/l2fwd/Makefile | 13 +++++++++---- examples/l3fwd-acl/Makefile | 13 +++++++++---- examples/l3fwd-power/Makefile | 13 +++++++++---- examples/l3fwd-vf/Makefile | 13 +++++++++---- examples/l3fwd/Makefile | 13 +++++++++---- examples/link_status_interrupt/Makefile | 13 +++++++++---- examples/load_balancer/Makefile | 13 +++++++++---- examples/packet_ordering/Makefile | 13 +++++++++---- examples/ptpclient/Makefile | 13 +++++++++---- examples/qos_meter/Makefile | 13 +++++++++---- examples/qos_sched/Makefile | 13 +++++++++---- examples/rxtx_callbacks/Makefile | 13 +++++++++---- examples/service_cores/Makefile | 13 +++++++++---- examples/skeleton/Makefile | 13 +++++++++---- examples/tep_termination/Makefile | 13 +++++++++---- examples/timer/Makefile | 13 +++++++++---- examples/vhost/Makefile | 13 +++++++++---- examples/vhost_scsi/Makefile | 13 +++++++++---- examples/vmdq/Makefile | 13 +++++++++---- examples/vmdq_dcb/Makefile | 13 +++++++++---- 40 files changed, 360 insertions(+), 160 deletions(-)examples/bbdev_app/Makefile +0
-4@@ -18,10 +18,15 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs
libdpdk)examples/bbdev_app/Makefile +9
-0+PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs
libdpdk)Quoted 8 lines
Quoted 1 line
CFLAGS += -DALLOW_EXPERIMENTAL_API
Hi,
Would using "--define-prefix" allow to avoid the special-sauced
DPDK_PC_PREFIXvariable?Perhaps I'm missing something, but I'm not seeing how, since the code
above
is already using the --define-variable flag. Swapping one pkg- config
flag
for another isn't likely to change the flow. Whatever way things work, we
need an environment variable to pull in the path change. Since one
doesn't
seem to be available for pkg-config directly, we need a DPDK special-
sauced
one.Quoted 1 line
/Bruce
I think
PKG_CONFIG_PATHis a more common and more well-understood flag
to use - using define-prefix should allow to use that instead
Quoted 9 lines
Quoted 5 lines
Yes, except pkg-config-path only gives the path to the pkg-config file, it
doesn't affect the prefixes in the file itself, and it's the latter we need
to modify.Using --define-prefix will automatically adjust the prefixes based on the path:
Sorry, I misunderstood what it did - I thought it required the prefix as parameter, so yes, it looks like a good fit here.
/Bruce
PATCH 3/6 devtools/test-meson-builds: remove dependency on clang
In reply to Bruce RichardsonAllow the script to run with a reduced set of builds if clang, or other compilers, are missing.
--- devtools/test-meson-builds.sh | 38 ++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 18 deletions(-)
devtools/test-meson-builds.sh +20 -18
@@ -28,23 +28,25 @@ build () # <directory> <meson options> { builddir=$1 shift - if [ ! -f "$builddir/build.ninja" ] ; then - options="--werror -Dexamples=all $*" - echo "$MESON $options $srcdir $builddir" - $MESON $options $srcdir $builddir - unset CC - fi - if [ -n "$TEST_MESON_BUILD_VERY_VERBOSE" ] ; then - # for full output from ninja use "-v" - echo "$ninja_cmd -v -C $builddir" - $ninja_cmd -v -C $builddir - elif [ -n "$TEST_MESON_BUILD_VERBOSE" ] ; then - # for keeping the history of short cmds, pipe through cat - echo "$ninja_cmd -C $builddir | cat" - $ninja_cmd -C $builddir | cat - else - echo "$ninja_cmd -C $builddir" - $ninja_cmd -C $builddir + if command -v $CC >/dev/null 2>&1 ; then + if [ ! -f "$builddir/build.ninja" ] ; then + options="--werror -Dexamples=all $*" + echo "$MESON $options $srcdir $builddir" + $MESON $options $srcdir $builddir + unset CC + fi + if [ -n "$TEST_MESON_BUILD_VERY_VERBOSE" ] ; then + # for full output from ninja use "-v" + echo "$ninja_cmd -v -C $builddir" + $ninja_cmd -v -C $builddir + elif [ -n "$TEST_MESON_BUILD_VERBOSE" ] ; then + # for keeping the history of short cmds, pipe through cat + echo "$ninja_cmd -C $builddir | cat" + $ninja_cmd -C $builddir | cat + else + echo "$ninja_cmd -C $builddir" + $ninja_cmd -C $builddir + fi fi }
@@ -80,7 +82,7 @@ build build-x86-default -Dmachine=$default_machine $use_shared c=aarch64-linux-gnu-gcc if command -v $c >/dev/null 2>&1 ; then # compile the general v8a also for clang to increase coverage - export CC="ccache clang" + export CC="clang" build build-arm64-host-clang $use_shared \ --cross-file $srcdir/config/arm/arm64_armv8_linux_gcc
Signature · 1 line
2.20.1
PATCH 4/6 devtools/test-meson-builds: add testing of pkg-config file
In reply to Bruce RichardsonThe pkg-config file generated as part of the build of DPDK should allow applications to be built with an installed DPDK. We can test this as part of the build by doing an install of DPDK to a temporary directory within the build folder, and by then compiling up a few sample apps using make working off that directory.
--- devtools/test-meson-builds.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
devtools/test-meson-builds.sh +23 -0
@@ -15,6 +15,11 @@ srcdir=$(dirname $(readlink -f $0))/.. MESON=${MESON:-meson} use_shared="--default-library=shared" +if command -v gmake >/dev/null 2>&1 ; then + MAKE=gmake +else + MAKE=make +fi if command -v ninja >/dev/null 2>&1 ; then ninja_cmd=ninja elif command -v ninja-build >/dev/null 2>&1 ; then
@@ -92,3 +97,21 @@ if command -v $c >/dev/null 2>&1 ; then $use_shared --cross-file $f done fi + +# Test installation of the x86-default target, to be used for checking +# the sample apps build using the pkg-config file for cflags and libs +build_path=build-x86-default +export DESTDIR=$(pwd)/$build_path/install-root +$ninja_cmd -C $build_path install + +pc_file=$(find $DESTDIR -name libdpdk.pc) +export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH + +# Pkg-config paths need to be relative to the destination dir not globally +# this value is picked up by our example makefiles +export DPDK_PC_PREFIX=$DESTDIR/usr/local + +for example in cmdline helloworld l2fwd l3fwd skeleton timer; do + echo "## Building $example" + $MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example +done
Signature · 1 line
2.20.1
PATCH 5/6 examples/vdpa: support building from pkg-config info
In reply to Bruce RichardsonThe vdpa example app did not check for a libdpdk pkg-config file and attempt to build using that. Add support for that method of compile to align the app with the other examples.
--- examples/vdpa/Makefile | 55 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 8 deletions(-)
examples/vdpa/Makefile +47 -8
@@ -1,6 +1,50 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel Corporation +# binary name +APP = vdpa + +# all source are stored in SRCS-y +SRCS-y := main.c +CFLAGS += -DALLOW_EXPERIMENTAL_API + +# Build using pkg-config variables if possible +$(shell pkg-config --exists libdpdk) +ifeq ($(.SHELLSTATUS),0) + +all: shared +.PHONY: shared static +shared: build/$(APP)-shared + ln -sf $(APP)-shared build/$(APP) +static: build/$(APP)-static + ln -sf $(APP)-static build/$(APP) + +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) + +build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build + $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED) + +build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build + $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC) + +build: + @mkdir -p $@ + +.PHONY: clean +clean: + rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared + rmdir --ignore-fail-on-non-empty build + +else + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif
@@ -16,17 +60,12 @@ please change the definition of the RTE_TARGET environment variable) all: else -# binary name -APP = vdpa - -# all source are stored in SRCS-y -SRCS-y := main.c - 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 +endif # linuxapp + +endif # pkg-config
Signature · 1 line
2.20.1
PATCH 6/6 examples/vhost_crypto: support building from pkg-config info
In reply to Bruce RichardsonThe vhost_crypto example app did not check for a libdpdk pkg-config file and attempt to build using that. Add support for that method of compile to align the app with the other examples.
--- examples/vhost_crypto/Makefile | 55 +++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 8 deletions(-)
examples/vhost_crypto/Makefile +47 -8
@@ -1,6 +1,50 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017-2018 Intel Corporation +# binary name +APP = vhost-crypto + +# all source are stored in SRCS-y +SRCS-y := main.c +CFLAGS += -DALLOW_EXPERIMENTAL_API + +# Build using pkg-config variables if possible +$(shell pkg-config --exists libdpdk) +ifeq ($(.SHELLSTATUS),0) + +all: shared +.PHONY: shared static +shared: build/$(APP)-shared + ln -sf $(APP)-shared build/$(APP) +static: build/$(APP)-static + ln -sf $(APP)-static build/$(APP) + +PKGCONF=pkg-config +ifneq ($(DPDK_PC_PREFIX),) + PKGCONF += --define-variable=prefix=$(DPDK_PC_PREFIX) +endif + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) + +build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build + $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED) + +build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build + $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC) + +build: + @mkdir -p $@ + +.PHONY: clean +clean: + rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared + rmdir --ignore-fail-on-non-empty build + +else + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif
@@ -16,16 +60,11 @@ please change the definition of the RTE_TARGET environment variable) all: else -# binary name -APP = vhost-crypto - -# all source are stored in SRCS-y -SRCS-y := main.c - -CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O2 -D_FILE_OFFSET_BITS=64 CFLAGS += $(WERROR_FLAGS) include $(RTE_SDK)/mk/rte.extapp.mk -endif +endif # Linux + +endif # pkg-config
Signature · 1 line
2.20.1
v2 cover Fixes for building examples
In reply to Bruce RichardsonA small set of fixes for building examples, that was previously part of the larger set, but pulled out separately for easier apply.
Bruce Richardson (3):
examples: fix install of sample apps if setting not provided
examples: remove auto-generation of examples list
examples: fix make clean when using pkg-config for building
examples/bbdev_app/Makefile | 2 +- examples/bond/Makefile | 2 +- examples/cmdline/Makefile | 2 +- examples/distributor/Makefile | 2 +- examples/eventdev_pipeline/Makefile | 2 +- examples/exception_path/Makefile | 2 +- examples/fips_validation/Makefile | 2 +- examples/flow_classify/Makefile | 2 +- examples/flow_filtering/Makefile | 2 +- examples/helloworld/Makefile | 2 +- examples/ip_fragmentation/Makefile | 2 +- examples/ip_pipeline/Makefile | 2 +- examples/ip_reassembly/Makefile | 2 +- examples/ipsec-secgw/Makefile | 2 +- examples/ipv4_multicast/Makefile | 2 +- examples/kni/Makefile | 2 +- examples/l2fwd-cat/Makefile | 2 +- examples/l2fwd-crypto/Makefile | 2 +- examples/l2fwd-jobstats/Makefile | 2 +- examples/l2fwd-keepalive/Makefile | 2 +- examples/l2fwd/Makefile | 2 +- examples/l3fwd-acl/Makefile | 2 +- examples/l3fwd-power/Makefile | 2 +- examples/l3fwd-vf/Makefile | 2 +- examples/l3fwd/Makefile | 2 +- examples/link_status_interrupt/Makefile | 2 +- examples/load_balancer/Makefile | 2 +- examples/meson.build | 31 ++++++++++++++++++++++--- examples/packet_ordering/Makefile | 2 +- examples/ptpclient/Makefile | 2 +- examples/qos_meter/Makefile | 2 +- examples/qos_sched/Makefile | 2 +- examples/rxtx_callbacks/Makefile | 2 +- examples/service_cores/Makefile | 2 +- examples/skeleton/Makefile | 2 +- examples/tep_termination/Makefile | 2 +- examples/timer/Makefile | 2 +- examples/vhost/Makefile | 2 +- examples/vhost_scsi/Makefile | 2 +- examples/vmdq/Makefile | 2 +- examples/vmdq_dcb/Makefile | 2 +- meson.build | 7 +++--- 42 files changed, 71 insertions(+), 47 deletions(-)
Signature · 1 line
2.21.0
PATCH v2 1/3 examples: fix install of sample apps if setting not provided
While the examples were being installed into the appropriate install path when processing the examples/meson.build file, that file was only processed if the "examples" meson parameter was non-empty. Since we now do more than just build the examples, we need to unconditionally process the file.
--- meson.build | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
meson.build +3 -4
@@ -42,10 +42,9 @@ subdir('app') # build docs subdir('doc') -# build any examples explicitly requested - useful for developers -if get_option('examples') != '' - subdir('examples') -endif +# build any examples explicitly requested - useful for developers - and +# install any example code into the appropriate install path +subdir('examples') # build kernel modules if enabled if get_option('enable_kmods')
Signature · 1 line
2.21.0
Re: [dpdk-dev] [PATCH v2 1/3] examples: fix install of sample apps if setting not provided
Quoted 21 lines · Bruce Richardson
While the examples were being installed into the appropriate install path when processing the examples/meson.build file, that file was only processed if the "examples" meson parameter was non-empty. Since we now do more than just build the examples, we need to unconditionally process the file.
Fixes 2daf565f91b5 ("examples: install as part of ninja install")Signed-off-by Bruce Richardson <[email protected]>--- meson.build | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)meson.build +0
-0@@ -42,10 +42,9 @@ subdir('app') # build docs subdir('doc')
meson.build subdir('app') · line 50
Quoted 10 lines
meson.build +3
-4-# build any examples explicitly requested - useful for developers -if get_option('examples') != '' - subdir('examples') -endif +# build any examples explicitly requested - useful for developers - and +# install any example code into the appropriate install path +subdir('examples') # build kernel modules if enabled if get_option('enable_kmods')
Self-nak, sorry. Need to take account of an empty "examples" value inside examples/meson.build.
V3 to follow soon. :-(
/Bruce
PATCH v2 2/3 examples: remove auto-generation of examples list
In reply to Bruce RichardsonThe examples/meson.build file scanned the filesystem to find all examples to build (for examples=all option) and install. However, using run_command and scanning the filesystem prevented ninja from properly detecting the addition or removal of any examples - one had to recreate the build directory from scratch to guarantee correct detection of all examples. This patch replaces this generated list with a static list of examples, thereby allowing proper tracking by ninja/meson, but at the cost of having to update this file when a new example is added or removed.
This also fixes an issue with Windows builds, since "sh" is not available there.
--- examples/meson.build | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-)
examples/meson.build +28 -3
@@ -8,9 +8,34 @@ endif execinfo = cc.find_library('execinfo', required: false) -all_examples = run_command('sh', '-c', - 'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done' - ).stdout().split() +# list of all example apps. Keep 1-3 per line, in alphabetical order. +all_examples = [ + 'bbdev_app', 'bond', + 'bpf', 'cmdline', + 'distributor', 'ethtool', + 'eventdev_pipeline', 'exception_path', + 'fips_validation', 'flow_classify', + 'flow_filtering', 'helloworld', + 'ip_fragmentation', 'ip_pipeline', + 'ip_reassembly', 'ipsec-secgw', + 'ipv4_multicast', 'kni', + 'l2fwd', 'l2fwd-cat', + 'l2fwd-crypto', 'l2fwd-jobstats', + 'l2fwd-keepalive', 'l3fwd', + 'l3fwd-acl', 'l3fwd-power', + 'l3fwd-vf', 'link_status_interrupt', + 'load_balancer', 'multi_process', + 'netmap_compat', 'packet_ordering', + 'performance-thread', 'ptpclient', + 'qos_meter', 'qos_sched', + 'quota_watermark', 'rxtx_callbacks', + 'server_node_efd', 'service_cores', + 'skeleton', 'tep_termination', + 'timer', 'vdpa', + 'vhost', 'vhost_crypto', + 'vhost_scsi', 'vm_power_manager', + 'vmdq', 'vmdq_dcb', +] # install all example code on install - irrespective of whether the example in # question is to be built as part of this build or not. foreach ex:all_examples
Signature · 1 line
2.21.0
PATCH v2 3/3 examples: fix make clean when using pkg-config for building
In reply to Bruce RichardsonThe "make clean" command had a number of issues:
- the "--ignore-fail-on-non-empty" flag is not present on BSD
- the call to remove the build folder would fail if there was no build folder present.
These are fixed by only removing the build folder if it exists, and by using -p flag to rmdir in place of --ignore-fail-on-non-empty
--- examples/bbdev_app/Makefile | 2 +- examples/bond/Makefile | 2 +- examples/cmdline/Makefile | 2 +- examples/distributor/Makefile | 2 +- examples/eventdev_pipeline/Makefile | 2 +- examples/exception_path/Makefile | 2 +- examples/fips_validation/Makefile | 2 +- examples/flow_classify/Makefile | 2 +- examples/flow_filtering/Makefile | 2 +- examples/helloworld/Makefile | 2 +- examples/ip_fragmentation/Makefile | 2 +- examples/ip_pipeline/Makefile | 2 +- examples/ip_reassembly/Makefile | 2 +- examples/ipsec-secgw/Makefile | 2 +- examples/ipv4_multicast/Makefile | 2 +- examples/kni/Makefile | 2 +- examples/l2fwd-cat/Makefile | 2 +- examples/l2fwd-crypto/Makefile | 2 +- examples/l2fwd-jobstats/Makefile | 2 +- examples/l2fwd-keepalive/Makefile | 2 +- examples/l2fwd/Makefile | 2 +- examples/l3fwd-acl/Makefile | 2 +- examples/l3fwd-power/Makefile | 2 +- examples/l3fwd-vf/Makefile | 2 +- examples/l3fwd/Makefile | 2 +- examples/link_status_interrupt/Makefile | 2 +- examples/load_balancer/Makefile | 2 +- examples/packet_ordering/Makefile | 2 +- examples/ptpclient/Makefile | 2 +- examples/qos_meter/Makefile | 2 +- examples/qos_sched/Makefile | 2 +- examples/rxtx_callbacks/Makefile | 2 +- examples/service_cores/Makefile | 2 +- examples/skeleton/Makefile | 2 +- examples/tep_termination/Makefile | 2 +- examples/timer/Makefile | 2 +- examples/vhost/Makefile | 2 +- examples/vhost_scsi/Makefile | 2 +- examples/vmdq/Makefile | 2 +- examples/vmdq_dcb/Makefile | 2 +- 40 files changed, 40 insertions(+), 40 deletions(-)
examples/bbdev_app/Makefile +1 -1
@@ -37,7 +37,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/bond/Makefile +1 -1
@@ -39,7 +39,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/cmdline/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/distributor/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/eventdev_pipeline/Makefile +1 -1
@@ -37,7 +37,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/exception_path/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/fips_validation/Makefile +1 -1
@@ -44,7 +44,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/flow_classify/Makefile +1 -1
@@ -37,7 +37,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/flow_filtering/Makefile +1 -1
@@ -33,7 +33,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/helloworld/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/ip_fragmentation/Makefile +1 -1
@@ -36,7 +36,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/ip_pipeline/Makefile +1 -1
@@ -55,7 +55,7 @@ build: .PHONY: clean clean: rm -f build/$(APP)* build/*.o - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/ip_reassembly/Makefile +1 -1
@@ -36,7 +36,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/ipsec-secgw/Makefile +1 -1
@@ -48,7 +48,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/ipv4_multicast/Makefile +1 -1
@@ -36,7 +36,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/kni/Makefile +1 -1
@@ -36,7 +36,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/l2fwd-cat/Makefile +1 -1
@@ -37,7 +37,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/l2fwd-crypto/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/l2fwd-jobstats/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/l2fwd-keepalive/Makefile +1 -1
@@ -37,7 +37,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/l2fwd/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/l3fwd-acl/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/l3fwd-power/Makefile +1 -1
@@ -37,7 +37,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/l3fwd-vf/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/l3fwd/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/link_status_interrupt/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/load_balancer/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/packet_ordering/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/ptpclient/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/qos_meter/Makefile +1 -1
@@ -37,7 +37,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/qos_sched/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/rxtx_callbacks/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/service_cores/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/skeleton/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/tep_termination/Makefile +1 -1
@@ -39,7 +39,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/timer/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/vhost/Makefile +1 -1
@@ -39,7 +39,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/vhost_scsi/Makefile +1 -1
@@ -38,7 +38,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/vmdq/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/vmdq_dcb/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
Signature · 1 line
2.21.0
v3 cover Fixes for building examples
In reply to Bruce RichardsonA small set of fixes for building examples, that was previously part of the larger set, but pulled out separately for easier apply.
V3: changed patch 1, to properly quit processing examples/meson.build
if the examples list was empty.
Bruce Richardson (3):
examples: fix install of sample apps if setting not provided
examples: remove auto-generation of examples list
examples: fix make clean when using pkg-config for building
examples/bbdev_app/Makefile | 2 +- examples/bond/Makefile | 2 +- examples/cmdline/Makefile | 2 +- examples/distributor/Makefile | 2 +- examples/eventdev_pipeline/Makefile | 2 +- examples/exception_path/Makefile | 2 +- examples/fips_validation/Makefile | 2 +- examples/flow_classify/Makefile | 2 +- examples/flow_filtering/Makefile | 2 +- examples/helloworld/Makefile | 2 +- examples/ip_fragmentation/Makefile | 2 +- examples/ip_pipeline/Makefile | 2 +- examples/ip_reassembly/Makefile | 2 +- examples/ipsec-secgw/Makefile | 2 +- examples/ipv4_multicast/Makefile | 2 +- examples/kni/Makefile | 2 +- examples/l2fwd-cat/Makefile | 2 +- examples/l2fwd-crypto/Makefile | 2 +- examples/l2fwd-jobstats/Makefile | 2 +- examples/l2fwd-keepalive/Makefile | 2 +- examples/l2fwd/Makefile | 2 +- examples/l3fwd-acl/Makefile | 2 +- examples/l3fwd-power/Makefile | 2 +- examples/l3fwd-vf/Makefile | 2 +- examples/l3fwd/Makefile | 2 +- examples/link_status_interrupt/Makefile | 2 +- examples/load_balancer/Makefile | 2 +- examples/meson.build | 35 ++++++++++++++++++++++--- examples/packet_ordering/Makefile | 2 +- examples/ptpclient/Makefile | 2 +- examples/qos_meter/Makefile | 2 +- examples/qos_sched/Makefile | 2 +- examples/rxtx_callbacks/Makefile | 2 +- examples/service_cores/Makefile | 2 +- examples/skeleton/Makefile | 2 +- examples/tep_termination/Makefile | 2 +- examples/timer/Makefile | 2 +- examples/vhost/Makefile | 2 +- examples/vhost_scsi/Makefile | 2 +- examples/vmdq/Makefile | 2 +- examples/vmdq_dcb/Makefile | 2 +- meson.build | 7 +++-- 42 files changed, 75 insertions(+), 47 deletions(-)
Signature · 1 line
2.21.0
PATCH v3 1/3 examples: fix install of sample apps if setting not provided
While the examples were being installed into the appropriate install path when processing the examples/meson.build file, that file was only processed if the "examples" meson parameter was non-empty. Since we now do more than just build the examples, we need to unconditionally process the file.
--- examples/meson.build | 4 ++++ meson.build | 7 +++---- 2 files changed, 7 insertions(+), 4 deletions(-)
examples/meson.build +4 -0
@@ -19,6 +19,10 @@ foreach ex:all_examples exclude_files: 'meson.build') endforeach +if get_option('examples') == '' + subdir_done() +endif + if get_option('examples').to_lower() == 'all' examples = all_examples allow_skips = true # don't flag an error if we can't build an app
meson.build +3 -4
@@ -42,10 +42,9 @@ subdir('app') # build docs subdir('doc') -# build any examples explicitly requested - useful for developers -if get_option('examples') != '' - subdir('examples') -endif +# build any examples explicitly requested - useful for developers - and +# install any example code into the appropriate install path +subdir('examples') # build kernel modules if enabled if get_option('enable_kmods')
Signature · 1 line
2.21.0
PATCH v3 2/3 examples: remove auto-generation of examples list
In reply to Bruce RichardsonThe examples/meson.build file scanned the filesystem to find all examples to build (for examples=all option) and install. However, using run_command and scanning the filesystem prevented ninja from properly detecting the addition or removal of any examples - one had to recreate the build directory from scratch to guarantee correct detection of all examples. This patch replaces this generated list with a static list of examples, thereby allowing proper tracking by ninja/meson, but at the cost of having to update this file when a new example is added or removed.
This also fixes an issue with Windows builds, since "sh" is not available there.
--- examples/meson.build | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-)
examples/meson.build +28 -3
@@ -8,9 +8,34 @@ endif execinfo = cc.find_library('execinfo', required: false) -all_examples = run_command('sh', '-c', - 'cd $MESON_SOURCE_ROOT/$MESON_SUBDIR && for d in * ; do if [ -d $d ] ; then echo $d ; fi ; done' - ).stdout().split() +# list of all example apps. Keep 1-3 per line, in alphabetical order. +all_examples = [ + 'bbdev_app', 'bond', + 'bpf', 'cmdline', + 'distributor', 'ethtool', + 'eventdev_pipeline', 'exception_path', + 'fips_validation', 'flow_classify', + 'flow_filtering', 'helloworld', + 'ip_fragmentation', 'ip_pipeline', + 'ip_reassembly', 'ipsec-secgw', + 'ipv4_multicast', 'kni', + 'l2fwd', 'l2fwd-cat', + 'l2fwd-crypto', 'l2fwd-jobstats', + 'l2fwd-keepalive', 'l3fwd', + 'l3fwd-acl', 'l3fwd-power', + 'l3fwd-vf', 'link_status_interrupt', + 'load_balancer', 'multi_process', + 'netmap_compat', 'packet_ordering', + 'performance-thread', 'ptpclient', + 'qos_meter', 'qos_sched', + 'quota_watermark', 'rxtx_callbacks', + 'server_node_efd', 'service_cores', + 'skeleton', 'tep_termination', + 'timer', 'vdpa', + 'vhost', 'vhost_crypto', + 'vhost_scsi', 'vm_power_manager', + 'vmdq', 'vmdq_dcb', +] # install all example code on install - irrespective of whether the example in # question is to be built as part of this build or not. foreach ex:all_examples
Signature · 1 line
2.21.0
PATCH v3 3/3 examples: fix make clean when using pkg-config for building
In reply to Bruce RichardsonThe "make clean" command had a number of issues:
- the "--ignore-fail-on-non-empty" flag is not present on BSD
- the call to remove the build folder would fail if there was no build folder present.
These are fixed by only removing the build folder if it exists, and by using -p flag to rmdir in place of --ignore-fail-on-non-empty
--- examples/bbdev_app/Makefile | 2 +- examples/bond/Makefile | 2 +- examples/cmdline/Makefile | 2 +- examples/distributor/Makefile | 2 +- examples/eventdev_pipeline/Makefile | 2 +- examples/exception_path/Makefile | 2 +- examples/fips_validation/Makefile | 2 +- examples/flow_classify/Makefile | 2 +- examples/flow_filtering/Makefile | 2 +- examples/helloworld/Makefile | 2 +- examples/ip_fragmentation/Makefile | 2 +- examples/ip_pipeline/Makefile | 2 +- examples/ip_reassembly/Makefile | 2 +- examples/ipsec-secgw/Makefile | 2 +- examples/ipv4_multicast/Makefile | 2 +- examples/kni/Makefile | 2 +- examples/l2fwd-cat/Makefile | 2 +- examples/l2fwd-crypto/Makefile | 2 +- examples/l2fwd-jobstats/Makefile | 2 +- examples/l2fwd-keepalive/Makefile | 2 +- examples/l2fwd/Makefile | 2 +- examples/l3fwd-acl/Makefile | 2 +- examples/l3fwd-power/Makefile | 2 +- examples/l3fwd-vf/Makefile | 2 +- examples/l3fwd/Makefile | 2 +- examples/link_status_interrupt/Makefile | 2 +- examples/load_balancer/Makefile | 2 +- examples/packet_ordering/Makefile | 2 +- examples/ptpclient/Makefile | 2 +- examples/qos_meter/Makefile | 2 +- examples/qos_sched/Makefile | 2 +- examples/rxtx_callbacks/Makefile | 2 +- examples/service_cores/Makefile | 2 +- examples/skeleton/Makefile | 2 +- examples/tep_termination/Makefile | 2 +- examples/timer/Makefile | 2 +- examples/vhost/Makefile | 2 +- examples/vhost_scsi/Makefile | 2 +- examples/vmdq/Makefile | 2 +- examples/vmdq_dcb/Makefile | 2 +- 40 files changed, 40 insertions(+), 40 deletions(-)
examples/bbdev_app/Makefile +1 -1
@@ -37,7 +37,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/bond/Makefile +1 -1
@@ -39,7 +39,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/cmdline/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/distributor/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/eventdev_pipeline/Makefile +1 -1
@@ -37,7 +37,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/exception_path/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/fips_validation/Makefile +1 -1
@@ -44,7 +44,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/flow_classify/Makefile +1 -1
@@ -37,7 +37,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/flow_filtering/Makefile +1 -1
@@ -33,7 +33,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/helloworld/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/ip_fragmentation/Makefile +1 -1
@@ -36,7 +36,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/ip_pipeline/Makefile +1 -1
@@ -55,7 +55,7 @@ build: .PHONY: clean clean: rm -f build/$(APP)* build/*.o - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/ip_reassembly/Makefile +1 -1
@@ -36,7 +36,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/ipsec-secgw/Makefile +1 -1
@@ -48,7 +48,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/ipv4_multicast/Makefile +1 -1
@@ -36,7 +36,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/kni/Makefile +1 -1
@@ -36,7 +36,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/l2fwd-cat/Makefile +1 -1
@@ -37,7 +37,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/l2fwd-crypto/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/l2fwd-jobstats/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/l2fwd-keepalive/Makefile +1 -1
@@ -37,7 +37,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/l2fwd/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/l3fwd-acl/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/l3fwd-power/Makefile +1 -1
@@ -37,7 +37,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/l3fwd-vf/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/l3fwd/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/link_status_interrupt/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/load_balancer/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/packet_ordering/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/ptpclient/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/qos_meter/Makefile +1 -1
@@ -37,7 +37,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/qos_sched/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/rxtx_callbacks/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/service_cores/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else
examples/skeleton/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/tep_termination/Makefile +1 -1
@@ -39,7 +39,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/timer/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/vhost/Makefile +1 -1
@@ -39,7 +39,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/vhost_scsi/Makefile +1 -1
@@ -38,7 +38,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/vmdq/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
examples/vmdq_dcb/Makefile +1 -1
@@ -35,7 +35,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else # Build using legacy build system
Signature · 1 line
2.21.0
Re: [dpdk-dev] [PATCH v3 0/3] Fixes for building examples
In reply to Bruce RichardsonQuoted 48 lines · Bruce Richardson
A small set of fixes for building examples, that was previously part of
the larger set, but pulled out separately for easier apply.V3: changed patch 1, to properly quit processing examples/meson.build
if the examples list was empty.Bruce Richardson (3):
examples: fix install of sample apps if setting not provided
examples: remove auto-generation of examples list
examples: fix make clean when using pkg-config for buildingexamples/bbdev_app/Makefile | 2 +- examples/bond/Makefile | 2 +- examples/cmdline/Makefile | 2 +- examples/distributor/Makefile | 2 +- examples/eventdev_pipeline/Makefile | 2 +- examples/exception_path/Makefile | 2 +- examples/fips_validation/Makefile | 2 +- examples/flow_classify/Makefile | 2 +- examples/flow_filtering/Makefile | 2 +- examples/helloworld/Makefile | 2 +- examples/ip_fragmentation/Makefile | 2 +- examples/ip_pipeline/Makefile | 2 +- examples/ip_reassembly/Makefile | 2 +- examples/ipsec-secgw/Makefile | 2 +- examples/ipv4_multicast/Makefile | 2 +- examples/kni/Makefile | 2 +- examples/l2fwd-cat/Makefile | 2 +- examples/l2fwd-crypto/Makefile | 2 +- examples/l2fwd-jobstats/Makefile | 2 +- examples/l2fwd-keepalive/Makefile | 2 +- examples/l2fwd/Makefile | 2 +- examples/l3fwd-acl/Makefile | 2 +- examples/l3fwd-power/Makefile | 2 +- examples/l3fwd-vf/Makefile | 2 +- examples/l3fwd/Makefile | 2 +- examples/link_status_interrupt/Makefile | 2 +- examples/load_balancer/Makefile | 2 +- examples/meson.build | 35 ++++++++++++++++++++++- -- examples/packet_ordering/Makefile | 2 +- examples/ptpclient/Makefile | 2 +- examples/qos_meter/Makefile | 2 +- examples/qos_sched/Makefile | 2 +- examples/rxtx_callbacks/Makefile | 2 +- examples/service_cores/Makefile | 2 +- examples/skeleton/Makefile | 2 +-
Quoted 8 lines
examples/tep_termination/Makefile | 2 +- examples/timer/Makefile | 2 +- examples/vhost/Makefile | 2 +- examples/vhost_scsi/Makefile | 2 +- examples/vmdq/Makefile | 2 +- examples/vmdq_dcb/Makefile | 2 +- meson.build | 7 +++-- 42 files changed, 75 insertions(+), 47 deletions(-)
Signature · 2 lines
Kind regards, Luca Boccassi
Thomas Monjalon
AppliedRe: [dpdk-dev] [PATCH v3 0/3] Fixes for building examples
17/05/2019 15:12, Luca Boccassi:
Quoted 8 lines · Bruce Richardson
Quoted 7 lines
A small set of fixes for building examples, that was previously part of
the larger set, but pulled out separately for easier apply.V3: changed patch 1, to properly quit processing examples/meson.build
if the examples list was empty.
Quoted 6 lines
Quoted 4 lines
Bruce Richardson (3):
examples: fix install of sample apps if setting not provided
examples: remove auto-generation of examples list
examples: fix make clean when using pkg-config for buildingSeries-acked-by Luca Boccassi <[email protected]>
Applied, thanks
v2 cover improve building examples
In reply to Bruce RichardsonThis patchset adds support for testing a number of examples using the DPDK pkgconfig file, allowing us to check that the file works. It also includes some more general cleanups for the examples, including adding support for building from pkg-config to a couple of examples which were missing that.
V2: separated out a few bug-fixes into a separate set from this one
changed to use --define-prefix flag for pkgconfig rather than a custom environment variable.
Bruce Richardson (5):
examples: add support for relocated DPDK install devtools/test-meson-builds: remove dependency on clang devtools/test-meson-builds: add testing of pkg-config file examples/vdpa: support building from pkg-config info examples/vhost_crypto: support building from pkg-config info
devtools/test-meson-builds.sh | 57 +++++++++++++++++-------- examples/bbdev_app/Makefile | 10 +++-- examples/bond/Makefile | 10 +++-- examples/cmdline/Makefile | 10 +++-- examples/distributor/Makefile | 10 +++-- examples/eventdev_pipeline/Makefile | 10 +++-- examples/exception_path/Makefile | 10 +++-- examples/fips_validation/Makefile | 10 +++-- examples/flow_classify/Makefile | 10 +++-- examples/flow_filtering/Makefile | 10 +++-- examples/helloworld/Makefile | 10 +++-- examples/ip_fragmentation/Makefile | 10 +++-- examples/ip_pipeline/Makefile | 10 +++-- examples/ip_reassembly/Makefile | 10 +++-- examples/ipsec-secgw/Makefile | 10 +++-- examples/ipv4_multicast/Makefile | 10 +++-- examples/kni/Makefile | 10 +++-- examples/l2fwd-cat/Makefile | 10 +++-- examples/l2fwd-crypto/Makefile | 10 +++-- examples/l2fwd-jobstats/Makefile | 10 +++-- examples/l2fwd-keepalive/Makefile | 10 +++-- examples/l2fwd/Makefile | 10 +++-- examples/l3fwd-acl/Makefile | 10 +++-- examples/l3fwd-power/Makefile | 10 +++-- examples/l3fwd-vf/Makefile | 10 +++-- examples/l3fwd/Makefile | 10 +++-- examples/link_status_interrupt/Makefile | 10 +++-- examples/load_balancer/Makefile | 10 +++-- examples/packet_ordering/Makefile | 10 +++-- examples/ptpclient/Makefile | 10 +++-- examples/qos_meter/Makefile | 10 +++-- examples/qos_sched/Makefile | 10 +++-- examples/rxtx_callbacks/Makefile | 10 +++-- examples/service_cores/Makefile | 10 +++-- examples/skeleton/Makefile | 10 +++-- examples/tep_termination/Makefile | 10 +++-- examples/timer/Makefile | 10 +++-- examples/vdpa/Makefile | 52 ++++++++++++++++++---- examples/vhost/Makefile | 10 +++-- examples/vhost_crypto/Makefile | 52 ++++++++++++++++++---- examples/vhost_scsi/Makefile | 10 +++-- examples/vmdq/Makefile | 10 +++-- examples/vmdq_dcb/Makefile | 10 +++-- 43 files changed, 367 insertions(+), 194 deletions(-)
Signature · 1 line
2.21.0
PATCH v2 1/5 examples: add support for relocated DPDK install
For testing of DPDK, we want to override the prefix given by the pkg-config file, so that we can get correct paths for DPDK installed in an unusual location.
--- examples/bbdev_app/Makefile | 10 ++++++---- examples/bond/Makefile | 10 ++++++---- examples/cmdline/Makefile | 10 ++++++---- examples/distributor/Makefile | 10 ++++++---- examples/eventdev_pipeline/Makefile | 10 ++++++---- examples/exception_path/Makefile | 10 ++++++---- examples/fips_validation/Makefile | 10 ++++++---- examples/flow_classify/Makefile | 10 ++++++---- examples/flow_filtering/Makefile | 10 ++++++---- examples/helloworld/Makefile | 10 ++++++---- examples/ip_fragmentation/Makefile | 10 ++++++---- examples/ip_pipeline/Makefile | 10 ++++++---- examples/ip_reassembly/Makefile | 10 ++++++---- examples/ipsec-secgw/Makefile | 10 ++++++---- examples/ipv4_multicast/Makefile | 10 ++++++---- examples/kni/Makefile | 10 ++++++---- examples/l2fwd-cat/Makefile | 10 ++++++---- examples/l2fwd-crypto/Makefile | 10 ++++++---- examples/l2fwd-jobstats/Makefile | 10 ++++++---- examples/l2fwd-keepalive/Makefile | 10 ++++++---- examples/l2fwd/Makefile | 10 ++++++---- examples/l3fwd-acl/Makefile | 10 ++++++---- examples/l3fwd-power/Makefile | 10 ++++++---- examples/l3fwd-vf/Makefile | 10 ++++++---- examples/l3fwd/Makefile | 10 ++++++---- examples/link_status_interrupt/Makefile | 10 ++++++---- examples/load_balancer/Makefile | 10 ++++++---- examples/packet_ordering/Makefile | 10 ++++++---- examples/ptpclient/Makefile | 10 ++++++---- examples/qos_meter/Makefile | 10 ++++++---- examples/qos_sched/Makefile | 10 ++++++---- examples/rxtx_callbacks/Makefile | 10 ++++++---- examples/service_cores/Makefile | 10 ++++++---- examples/skeleton/Makefile | 10 ++++++---- examples/tep_termination/Makefile | 10 ++++++---- examples/timer/Makefile | 10 ++++++---- examples/vhost/Makefile | 10 ++++++---- examples/vhost_scsi/Makefile | 10 ++++++---- examples/vmdq/Makefile | 10 ++++++---- examples/vmdq_dcb/Makefile | 10 ++++++---- 40 files changed, 240 insertions(+), 160 deletions(-)
examples/bbdev_app/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/bond/Makefile +6 -4
@@ -20,10 +20,12 @@ static: build/$(APP)-static LDFLAGS += -lrte_pmd_bond -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/cmdline/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/distributor/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/eventdev_pipeline/Makefile +6 -4
@@ -20,10 +20,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/exception_path/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/fips_validation/Makefile +6 -4
@@ -27,10 +27,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/flow_classify/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/flow_filtering/Makefile +6 -4
@@ -16,10 +16,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/helloworld/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ip_fragmentation/Makefile +6 -4
@@ -19,10 +19,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ip_pipeline/Makefile +6 -4
@@ -31,10 +31,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -I.
examples/ip_reassembly/Makefile +6 -4
@@ -19,10 +19,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ipsec-secgw/Makefile +6 -4
@@ -29,10 +29,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/ipv4_multicast/Makefile +6 -4
@@ -19,10 +19,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/kni/Makefile +6 -4
@@ -18,11 +18,13 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-cat/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) LDFLAGS += -lpqos
examples/l2fwd-crypto/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-jobstats/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-keepalive/Makefile +6 -4
@@ -20,10 +20,12 @@ static: build/$(APP)-static LDFLAGS += -pthread -lrt -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l3fwd-acl/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l3fwd-power/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/l3fwd-vf/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l3fwd/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/link_status_interrupt/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/load_balancer/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/packet_ordering/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ptpclient/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/qos_meter/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/qos_sched/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/rxtx_callbacks/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/service_cores/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/skeleton/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/tep_termination/Makefile +6 -4
@@ -20,10 +20,12 @@ static: build/$(APP)-static LDFLAGS += -pthread -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -Wno-deprecated-declarations
examples/timer/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/vhost/Makefile +6 -4
@@ -20,10 +20,12 @@ static: build/$(APP)-static LDFLAGS += -pthread -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/vhost_scsi/Makefile +6 -4
@@ -21,10 +21,12 @@ static: build/$(APP)-static CFLAGS += -D_FILE_OFFSET_BITS=64 LDFLAGS += -pthread -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/vmdq/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/vmdq_dcb/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.21.0
PATCH v2 2/5 devtools/test-meson-builds: remove dependency on clang
In reply to Bruce RichardsonAllow the script to run with a reduced set of builds if clang, or other compilers, are missing.
--- devtools/test-meson-builds.sh | 38 ++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 18 deletions(-)
devtools/test-meson-builds.sh +20 -18
@@ -28,23 +28,25 @@ build () # <directory> <meson options> { builddir=$1 shift - if [ ! -f "$builddir/build.ninja" ] ; then - options="--werror -Dexamples=all $*" - echo "$MESON $options $srcdir $builddir" - $MESON $options $srcdir $builddir - unset CC - fi - if [ -n "$TEST_MESON_BUILD_VERY_VERBOSE" ] ; then - # for full output from ninja use "-v" - echo "$ninja_cmd -v -C $builddir" - $ninja_cmd -v -C $builddir - elif [ -n "$TEST_MESON_BUILD_VERBOSE" ] ; then - # for keeping the history of short cmds, pipe through cat - echo "$ninja_cmd -C $builddir | cat" - $ninja_cmd -C $builddir | cat - else - echo "$ninja_cmd -C $builddir" - $ninja_cmd -C $builddir + if command -v $CC >/dev/null 2>&1 ; then + if [ ! -f "$builddir/build.ninja" ] ; then + options="--werror -Dexamples=all $*" + echo "$MESON $options $srcdir $builddir" + $MESON $options $srcdir $builddir + unset CC + fi + if [ -n "$TEST_MESON_BUILD_VERY_VERBOSE" ] ; then + # for full output from ninja use "-v" + echo "$ninja_cmd -v -C $builddir" + $ninja_cmd -v -C $builddir + elif [ -n "$TEST_MESON_BUILD_VERBOSE" ] ; then + # for keeping the history of short cmds, pipe through cat + echo "$ninja_cmd -C $builddir | cat" + $ninja_cmd -C $builddir | cat + else + echo "$ninja_cmd -C $builddir" + $ninja_cmd -C $builddir + fi fi }
@@ -80,7 +82,7 @@ build build-x86-default -Dmachine=$default_machine $use_shared c=aarch64-linux-gnu-gcc if command -v $c >/dev/null 2>&1 ; then # compile the general v8a also for clang to increase coverage - export CC="ccache clang" + export CC="clang" build build-arm64-host-clang $use_shared \ --cross-file $srcdir/config/arm/arm64_armv8_linux_gcc
Signature · 1 line
2.21.0
PATCH v2 3/5 devtools/test-meson-builds: add testing of pkg-config file
In reply to Bruce RichardsonThe pkg-config file generated as part of the build of DPDK should allow applications to be built with an installed DPDK. We can test this as part of the build by doing an install of DPDK to a temporary directory within the build folder, and by then compiling up a few sample apps using make working off that directory.
--- devtools/test-meson-builds.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
devtools/test-meson-builds.sh +19 -0
@@ -15,6 +15,11 @@ srcdir=$(dirname $(readlink -f $0))/.. MESON=${MESON:-meson} use_shared="--default-library=shared" +if command -v gmake >/dev/null 2>&1 ; then + MAKE=gmake +else + MAKE=make +fi if command -v ninja >/dev/null 2>&1 ; then ninja_cmd=ninja elif command -v ninja-build >/dev/null 2>&1 ; then
@@ -92,3 +97,17 @@ if command -v $c >/dev/null 2>&1 ; then $use_shared --cross-file $f done fi + +# Test installation of the x86-default target, to be used for checking +# the sample apps build using the pkg-config file for cflags and libs +build_path=build-x86-default +export DESTDIR=$(pwd)/$build_path/install-root +$ninja_cmd -C $build_path install + +pc_file=$(find $DESTDIR -name libdpdk.pc) +export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH + +for example in cmdline helloworld l2fwd l3fwd skeleton timer; do + echo "## Building $example" + $MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example clean all +done
Signature · 1 line
2.21.0
PATCH v2 4/5 examples/vdpa: support building from pkg-config info
In reply to Bruce RichardsonThe vdpa example app did not check for a libdpdk pkg-config file and attempt to build using that. Add support for that method of compile to align the app with the other examples.
--- examples/vdpa/Makefile | 52 +++++++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 8 deletions(-)
examples/vdpa/Makefile +44 -8
@@ -1,6 +1,47 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel Corporation +# binary name +APP = vdpa + +# all source are stored in SRCS-y +SRCS-y := main.c +CFLAGS += -DALLOW_EXPERIMENTAL_API + +# Build using pkg-config variables if possible +$(shell pkg-config --exists libdpdk) +ifeq ($(.SHELLSTATUS),0) + +all: shared +.PHONY: shared static +shared: build/$(APP)-shared + ln -sf $(APP)-shared build/$(APP) +static: build/$(APP)-static + ln -sf $(APP)-static build/$(APP) + +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) + +build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build + $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED) + +build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build + $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC) + +build: + @mkdir -p $@ + +.PHONY: clean +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
@@ -16,17 +57,12 @@ please change the definition of the RTE_TARGET environment variable) all: else -# binary name -APP = vdpa - -# all source are stored in SRCS-y -SRCS-y := main.c - 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 +endif # linuxapp + +endif # pkg-config
Signature · 1 line
2.21.0
Re: [dpdk-dev] [PATCH v2 4/5] examples/vdpa: support building from pkg-config info
17/05/2019 13:47, Bruce Richardson:
Quoted 3 lines
The vdpa example app did not check for a libdpdk pkg-config file and attempt to build using that. Add support for that method of compile to align the app with the other examples.
I see an issue with the experimental tag:
clang -Wp,-MD,./.main.o.d.tmp -m64 -pthread -fPIC -Ilib/librte_eal/linux/eal/include -march=native -DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3 -DRTE_MACHINE_CPUFLAG_SSSE3 -DRTE_MACHINE_CPUFLAG_SSE4_1 -DRTE_MACHINE_CPUFLAG_SSE4_2 -DRTE_MACHINE_CPUFLAG_AES -DRTE_MACHINE_CPUFLAG_PCLMULQDQ -DRTE_MACHINE_CPUFLAG_AVX -DRTE_MACHINE_CPUFLAG_RDRAND -DRTE_MACHINE_CPUFLAG_RDSEED -DRTE_MACHINE_CPUFLAG_FSGSBASE -DRTE_MACHINE_CPUFLAG_F16C -DRTE_MACHINE_CPUFLAG_AVX2 -Ix86_64-native-linux-clang+shared+next+debug+ASSERT/examples/vdpa/x86_64-native-linux-clang+shared+next+debug+ASSERT/include -Ix86_64-native-linux-clang+shared+next+debug+ASSERT/include -include x86_64-native-linux-clang+shared+next+debug+ASSERT/include/rte_config.h -D_GNU_SOURCE -O2 -D_FILE_OFFSET_BITS=64 -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wpointer-arith -Wnested-externs -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef -Wwrite-strings -Wdeprecated -Werror -Wno-missing-field-initializers -Wno-address-of-packed-member -D_GNU_SOURCE -o main.o -c examples/vdpa/main.cexamples/vdpa/main.c:172:8: error: 'rte_vhost_driver_attach_vdpa_device' is deprecated: Symbol is not yet part of stable ABI [-Werror,-Wdeprecated-declarations]
It seems "CFLAGS += -DALLOW_EXPERIMENTAL_API"
is reset by the call to pkg-config.
Quoted 1 line
+build/$(APP)-shared: $(SRCS-y)
Makefile$(PC_FILE) | build
Better to use the real directory name as prerequisite, instead of "build".
Re: [dpdk-dev] [PATCH v2 4/5] examples/vdpa: support building from pkg-config info
Quoted 5 lines · Thomas Monjalon
17/05/2019 13:47, Bruce Richardson:
Quoted 3 lines
The vdpa example app did not check for a libdpdk pkg-config file and attempt to build using that. Add support for that method of compile to align the app with the other examples.
Quoted 8 lines
I see an issue with the experimental tag:
clang -Wp,-MD,./.main.o.d.tmp -m64 -pthread -fPIC -Ilib/librte_eal/linux/eal/include -march=native -DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3 -DRTE_MACHINE_CPUFLAG_SSSE3 -DRTE_MACHINE_CPUFLAG_SSE4_1 -DRTE_MACHINE_CPUFLAG_SSE4_2 -DRTE_MACHINE_CPUFLAG_AES -DRTE_MACHINE_CPUFLAG_PCLMULQDQ -DRTE_MACHINE_CPUFLAG_AVX -DRTE_MACHINE_CPUFLAG_RDRAND -DRTE_MACHINE_CPUFLAG_RDSEED -DRTE_MACHINE_CPUFLAG_FSGSBASE -DRTE_MACHINE_CPUFLAG_F16C -DRTE_MACHINE_CPUFLAG_AVX2 -Ix86_64-native-linux-clang+shared+next+debug+ASSERT/examples/vdpa/x86_64-native-linux-clang+shared+next+debug+ASSERT/include -Ix86_64-native-linux-clang+shared+next+debug+ASSERT/include -include
x86_64-native-linux-clang+shared+next+debug+ASSERT/include/rte_config.h-D_GNU_SOURCE -O2 -D_FILE_OFFSET_BITS=64 -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wpointer-arith -Wnested-externs -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef -Wwrite-strings -Wdeprecated -Werror -Wno-missing-field-initializers -Wno-address-of-packed-member -D_GNU_SOURCE -o main.o -cexamples/vdpa/main.cexamples/vdpa/main.c:172:8: error: 'rte_vhost_driver_attach_vdpa_device' is deprecated: Symbol is not yet part of stable ABI [-Werror,-Wdeprecated-declarations]It seems "CFLAGS += -DALLOW_EXPERIMENTAL_API"
is reset by the call to pkg-config.
No, it's not, it's reset by the call to the DPDK make build system in the other leg of the code. I'll fix this in the Makefile in v3.
Quoted 5 lines
Quoted 1 line
+build/$(APP)-shared: $(SRCS-y)
Makefile$(PC_FILE) | buildBetter to use the real directory name as prerequisite, instead of "build".
Not sure what you mean here, build is the name of the directory. [This is also consistent with what is done in all the other example makefiles. If it needs updating, then it should be done as a general patch to all examples in 19.11 release timeframe.]
/Bruce
Re: [dpdk-dev] [PATCH v2 4/5] examples/vdpa: support building from pkg-config info
02/07/2019 16:35, Bruce Richardson:
Quoted 7 lines · Thomas Monjalon
Quoted 3 lines
It seems "CFLAGS += -DALLOW_EXPERIMENTAL_API"
is reset by the call to pkg-config.No, it's not, it's reset by the call to the DPDK make build system in the other leg of the code. I'll fix this in the
Makefilein v3.
OK
Quoted 9 lines
Quoted 5 lines
Quoted 1 line
+build/$(APP)-shared: $(SRCS-y)
Makefile$(PC_FILE) | buildBetter to use the real directory name as prerequisite, instead of "build".
Not sure what you mean here, build is the name of the directory. [This is also consistent with what is done in all the other example makefiles. If it needs updating, then it should be done as a general patch to all examples in 19.11 release timeframe.]
Ah my bad, I overlooked it :)
PATCH v2 5/5 examples/vhost_crypto: support building from pkg-config info
In reply to Bruce RichardsonThe vhost_crypto example app did not check for a libdpdk pkg-config file and attempt to build using that. Add support for that method of compile to align the app with the other examples.
--- examples/vhost_crypto/Makefile | 52 ++++++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 8 deletions(-)
examples/vhost_crypto/Makefile +44 -8
@@ -1,6 +1,47 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017-2018 Intel Corporation +# binary name +APP = vhost-crypto + +# all source are stored in SRCS-y +SRCS-y := main.c +CFLAGS += -DALLOW_EXPERIMENTAL_API + +# Build using pkg-config variables if possible +$(shell pkg-config --exists libdpdk) +ifeq ($(.SHELLSTATUS),0) + +all: shared +.PHONY: shared static +shared: build/$(APP)-shared + ln -sf $(APP)-shared build/$(APP) +static: build/$(APP)-static + ln -sf $(APP)-static build/$(APP) + +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) + +build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build + $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED) + +build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build + $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC) + +build: + @mkdir -p $@ + +.PHONY: clean +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
@@ -16,16 +57,11 @@ please change the definition of the RTE_TARGET environment variable) all: else -# binary name -APP = vhost-crypto - -# all source are stored in SRCS-y -SRCS-y := main.c - -CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O2 -D_FILE_OFFSET_BITS=64 CFLAGS += $(WERROR_FLAGS) include $(RTE_SDK)/mk/rte.extapp.mk -endif +endif # Linux + +endif # pkg-config
Signature · 1 line
2.21.0
Quoted 57 lines · Bruce Richardson
This patchset adds support for testing a number of examples using the DPDK pkgconfig file, allowing us to check that the file works. It also
includes some more general cleanups for the examples, including adding
support for building from pkg-config to a couple of examples which were
missing that.V2: separated out a few bug-fixes into a separate set from this one
changed to use --define-prefix flag for pkgconfig rather than a custom environment variable.Bruce Richardson (5):
examples: add support for relocated DPDK install devtools/test-meson-builds: remove dependency on clang devtools/test-meson-builds: add testing of pkg-config file examples/vdpa: support building from pkg-config info examples/vhost_crypto: support building from pkg-config infodevtools/test-meson-builds.sh | 57 +++++++++++++++++---- ---- examples/bbdev_app/Makefile | 10 +++-- examples/bond/Makefile | 10 +++-- examples/cmdline/Makefile | 10 +++-- examples/distributor/Makefile | 10 +++-- examples/eventdev_pipeline/Makefile | 10 +++-- examples/exception_path/Makefile | 10 +++-- examples/fips_validation/Makefile | 10 +++-- examples/flow_classify/Makefile | 10 +++-- examples/flow_filtering/Makefile | 10 +++-- examples/helloworld/Makefile | 10 +++-- examples/ip_fragmentation/Makefile | 10 +++-- examples/ip_pipeline/Makefile | 10 +++-- examples/ip_reassembly/Makefile | 10 +++-- examples/ipsec-secgw/Makefile | 10 +++-- examples/ipv4_multicast/Makefile | 10 +++-- examples/kni/Makefile | 10 +++-- examples/l2fwd-cat/Makefile | 10 +++-- examples/l2fwd-crypto/Makefile | 10 +++-- examples/l2fwd-jobstats/Makefile | 10 +++-- examples/l2fwd-keepalive/Makefile | 10 +++-- examples/l2fwd/Makefile | 10 +++-- examples/l3fwd-acl/Makefile | 10 +++-- examples/l3fwd-power/Makefile | 10 +++-- examples/l3fwd-vf/Makefile | 10 +++-- examples/l3fwd/Makefile | 10 +++-- examples/link_status_interrupt/Makefile | 10 +++-- examples/load_balancer/Makefile | 10 +++-- examples/packet_ordering/Makefile | 10 +++-- examples/ptpclient/Makefile | 10 +++-- examples/qos_meter/Makefile | 10 +++-- examples/qos_sched/Makefile | 10 +++-- examples/rxtx_callbacks/Makefile | 10 +++-- examples/service_cores/Makefile | 10 +++-- examples/skeleton/Makefile | 10 +++-- examples/tep_termination/Makefile | 10 +++--
Quoted 8 lines
examples/timer/Makefile | 10 +++-- examples/vdpa/Makefile | 52 ++++++++++++++++++---- examples/vhost/Makefile | 10 +++-- examples/vhost_crypto/Makefile | 52 ++++++++++++++++++---- examples/vhost_scsi/Makefile | 10 +++-- examples/vmdq/Makefile | 10 +++-- examples/vmdq_dcb/Makefile | 10 +++-- 43 files changed, 367 insertions(+), 194 deletions(-)
Signature · 2 lines
Kind regards, Luca Boccassi
v3 cover improve building examples
In reply to Bruce RichardsonThis patchset adds support for testing a number of examples using the DPDK pkgconfig file, allowing us to check that the file works. It also includes some more general cleanups for the examples, including adding support for building from pkg-config to a couple of examples which were missing that.
V3:
* fix missing -DUSE_EXPERIMENTAL_API cflag when building using "make examples"
V2:
* separated out a few bug-fixes into a separate set from this one
* changed to use --define-prefix flag for pkgconfig rather than a custom environment variable.
Bruce Richardson (5):
examples: add support for relocated DPDK install devtools/test-meson-builds: remove dependency on clang devtools/test-meson-builds: add testing of pkg-config file examples/vdpa: support building from pkg-config info examples/vhost_crypto: support building from pkg-config info
devtools/test-meson-builds.sh | 57 +++++++++++++++++-------- examples/bbdev_app/Makefile | 10 +++-- examples/bond/Makefile | 10 +++-- examples/cmdline/Makefile | 10 +++-- examples/distributor/Makefile | 10 +++-- examples/eventdev_pipeline/Makefile | 10 +++-- examples/exception_path/Makefile | 10 +++-- examples/fips_validation/Makefile | 10 +++-- examples/flow_classify/Makefile | 10 +++-- examples/flow_filtering/Makefile | 10 +++-- examples/helloworld/Makefile | 10 +++-- examples/ip_fragmentation/Makefile | 10 +++-- examples/ip_pipeline/Makefile | 10 +++-- examples/ip_reassembly/Makefile | 10 +++-- examples/ipsec-secgw/Makefile | 10 +++-- examples/ipv4_multicast/Makefile | 10 +++-- examples/kni/Makefile | 10 +++-- examples/l2fwd-cat/Makefile | 10 +++-- examples/l2fwd-crypto/Makefile | 10 +++-- examples/l2fwd-jobstats/Makefile | 10 +++-- examples/l2fwd-keepalive/Makefile | 10 +++-- examples/l2fwd/Makefile | 10 +++-- examples/l3fwd-acl/Makefile | 10 +++-- examples/l3fwd-power/Makefile | 10 +++-- examples/l3fwd-vf/Makefile | 10 +++-- examples/l3fwd/Makefile | 10 +++-- examples/link_status_interrupt/Makefile | 10 +++-- examples/load_balancer/Makefile | 10 +++-- examples/packet_ordering/Makefile | 10 +++-- examples/ptpclient/Makefile | 10 +++-- examples/qos_meter/Makefile | 10 +++-- examples/qos_sched/Makefile | 10 +++-- examples/rxtx_callbacks/Makefile | 10 +++-- examples/service_cores/Makefile | 10 +++-- examples/skeleton/Makefile | 10 +++-- examples/tep_termination/Makefile | 10 +++-- examples/timer/Makefile | 10 +++-- examples/vdpa/Makefile | 51 +++++++++++++++++++--- examples/vhost/Makefile | 10 +++-- examples/vhost_crypto/Makefile | 51 +++++++++++++++++++--- examples/vhost_scsi/Makefile | 10 +++-- examples/vmdq/Makefile | 10 +++-- examples/vmdq_dcb/Makefile | 10 +++-- 43 files changed, 367 insertions(+), 192 deletions(-)
Signature · 1 line
2.21.0
PATCH v3 1/5 examples: add support for relocated DPDK install
For testing of DPDK, we want to override the prefix given by the pkg-config file, so that we can get correct paths for DPDK installed in an unusual location.
--- examples/bbdev_app/Makefile | 10 ++++++---- examples/bond/Makefile | 10 ++++++---- examples/cmdline/Makefile | 10 ++++++---- examples/distributor/Makefile | 10 ++++++---- examples/eventdev_pipeline/Makefile | 10 ++++++---- examples/exception_path/Makefile | 10 ++++++---- examples/fips_validation/Makefile | 10 ++++++---- examples/flow_classify/Makefile | 10 ++++++---- examples/flow_filtering/Makefile | 10 ++++++---- examples/helloworld/Makefile | 10 ++++++---- examples/ip_fragmentation/Makefile | 10 ++++++---- examples/ip_pipeline/Makefile | 10 ++++++---- examples/ip_reassembly/Makefile | 10 ++++++---- examples/ipsec-secgw/Makefile | 10 ++++++---- examples/ipv4_multicast/Makefile | 10 ++++++---- examples/kni/Makefile | 10 ++++++---- examples/l2fwd-cat/Makefile | 10 ++++++---- examples/l2fwd-crypto/Makefile | 10 ++++++---- examples/l2fwd-jobstats/Makefile | 10 ++++++---- examples/l2fwd-keepalive/Makefile | 10 ++++++---- examples/l2fwd/Makefile | 10 ++++++---- examples/l3fwd-acl/Makefile | 10 ++++++---- examples/l3fwd-power/Makefile | 10 ++++++---- examples/l3fwd-vf/Makefile | 10 ++++++---- examples/l3fwd/Makefile | 10 ++++++---- examples/link_status_interrupt/Makefile | 10 ++++++---- examples/load_balancer/Makefile | 10 ++++++---- examples/packet_ordering/Makefile | 10 ++++++---- examples/ptpclient/Makefile | 10 ++++++---- examples/qos_meter/Makefile | 10 ++++++---- examples/qos_sched/Makefile | 10 ++++++---- examples/rxtx_callbacks/Makefile | 10 ++++++---- examples/service_cores/Makefile | 10 ++++++---- examples/skeleton/Makefile | 10 ++++++---- examples/tep_termination/Makefile | 10 ++++++---- examples/timer/Makefile | 10 ++++++---- examples/vhost/Makefile | 10 ++++++---- examples/vhost_scsi/Makefile | 10 ++++++---- examples/vmdq/Makefile | 10 ++++++---- examples/vmdq_dcb/Makefile | 10 ++++++---- 40 files changed, 240 insertions(+), 160 deletions(-)
examples/bbdev_app/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/bond/Makefile +6 -4
@@ -20,10 +20,12 @@ static: build/$(APP)-static LDFLAGS += -lrte_pmd_bond -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/cmdline/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/distributor/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/eventdev_pipeline/Makefile +6 -4
@@ -20,10 +20,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/exception_path/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/fips_validation/Makefile +6 -4
@@ -27,10 +27,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/flow_classify/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/flow_filtering/Makefile +6 -4
@@ -16,10 +16,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/helloworld/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ip_fragmentation/Makefile +6 -4
@@ -19,10 +19,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ip_pipeline/Makefile +6 -4
@@ -31,10 +31,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -I.
examples/ip_reassembly/Makefile +6 -4
@@ -19,10 +19,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ipsec-secgw/Makefile +6 -4
@@ -29,10 +29,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/ipv4_multicast/Makefile +6 -4
@@ -19,10 +19,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/kni/Makefile +6 -4
@@ -18,11 +18,13 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-cat/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) LDFLAGS += -lpqos
examples/l2fwd-crypto/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-jobstats/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd-keepalive/Makefile +6 -4
@@ -20,10 +20,12 @@ static: build/$(APP)-static LDFLAGS += -pthread -lrt -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l2fwd/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l3fwd-acl/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l3fwd-power/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/l3fwd-vf/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/l3fwd/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/link_status_interrupt/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/load_balancer/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/packet_ordering/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/ptpclient/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/qos_meter/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/qos_sched/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/rxtx_callbacks/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/service_cores/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/skeleton/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/tep_termination/Makefile +6 -4
@@ -20,10 +20,12 @@ static: build/$(APP)-static LDFLAGS += -pthread -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -Wno-deprecated-declarations
examples/timer/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/vhost/Makefile +6 -4
@@ -20,10 +20,12 @@ static: build/$(APP)-static LDFLAGS += -pthread -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/vhost_scsi/Makefile +6 -4
@@ -21,10 +21,12 @@ static: build/$(APP)-static CFLAGS += -D_FILE_OFFSET_BITS=64 LDFLAGS += -pthread -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/vmdq/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
examples/vmdq_dcb/Makefile +6 -4
@@ -18,10 +18,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
Signature · 1 line
2.21.0
PATCH v3 2/5 devtools/test-meson-builds: remove dependency on clang
In reply to Bruce RichardsonAllow the script to run with a reduced set of builds if clang, or other compilers, are missing.
--- devtools/test-meson-builds.sh | 38 ++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 18 deletions(-)
devtools/test-meson-builds.sh +20 -18
@@ -28,23 +28,25 @@ build () # <directory> <meson options> { builddir=$1 shift - if [ ! -f "$builddir/build.ninja" ] ; then - options="--werror -Dexamples=all $*" - echo "$MESON $options $srcdir $builddir" - $MESON $options $srcdir $builddir - unset CC - fi - if [ -n "$TEST_MESON_BUILD_VERY_VERBOSE" ] ; then - # for full output from ninja use "-v" - echo "$ninja_cmd -v -C $builddir" - $ninja_cmd -v -C $builddir - elif [ -n "$TEST_MESON_BUILD_VERBOSE" ] ; then - # for keeping the history of short cmds, pipe through cat - echo "$ninja_cmd -C $builddir | cat" - $ninja_cmd -C $builddir | cat - else - echo "$ninja_cmd -C $builddir" - $ninja_cmd -C $builddir + if command -v $CC >/dev/null 2>&1 ; then + if [ ! -f "$builddir/build.ninja" ] ; then + options="--werror -Dexamples=all $*" + echo "$MESON $options $srcdir $builddir" + $MESON $options $srcdir $builddir + unset CC + fi + if [ -n "$TEST_MESON_BUILD_VERY_VERBOSE" ] ; then + # for full output from ninja use "-v" + echo "$ninja_cmd -v -C $builddir" + $ninja_cmd -v -C $builddir + elif [ -n "$TEST_MESON_BUILD_VERBOSE" ] ; then + # for keeping the history of short cmds, pipe through cat + echo "$ninja_cmd -C $builddir | cat" + $ninja_cmd -C $builddir | cat + else + echo "$ninja_cmd -C $builddir" + $ninja_cmd -C $builddir + fi fi }
@@ -80,7 +82,7 @@ build build-x86-default -Dmachine=$default_machine $use_shared c=aarch64-linux-gnu-gcc if command -v $c >/dev/null 2>&1 ; then # compile the general v8a also for clang to increase coverage - export CC="ccache clang" + export CC="clang" build build-arm64-host-clang $use_shared \ --cross-file $srcdir/config/arm/arm64_armv8_linux_gcc
Signature · 1 line
2.21.0
PATCH v3 3/5 devtools/test-meson-builds: add testing of pkg-config file
In reply to Bruce RichardsonThe pkg-config file generated as part of the build of DPDK should allow applications to be built with an installed DPDK. We can test this as part of the build by doing an install of DPDK to a temporary directory within the build folder, and by then compiling up a few sample apps using make working off that directory.
--- devtools/test-meson-builds.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
devtools/test-meson-builds.sh +19 -0
@@ -15,6 +15,11 @@ srcdir=$(dirname $(readlink -f $0))/.. MESON=${MESON:-meson} use_shared="--default-library=shared" +if command -v gmake >/dev/null 2>&1 ; then + MAKE=gmake +else + MAKE=make +fi if command -v ninja >/dev/null 2>&1 ; then ninja_cmd=ninja elif command -v ninja-build >/dev/null 2>&1 ; then
@@ -92,3 +97,17 @@ if command -v $c >/dev/null 2>&1 ; then $use_shared --cross-file $f done fi + +# Test installation of the x86-default target, to be used for checking +# the sample apps build using the pkg-config file for cflags and libs +build_path=build-x86-default +export DESTDIR=$(pwd)/$build_path/install-root +$ninja_cmd -C $build_path install + +pc_file=$(find $DESTDIR -name libdpdk.pc) +export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH + +for example in cmdline helloworld l2fwd l3fwd skeleton timer; do + echo "## Building $example" + $MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example clean all +done
Signature · 1 line
2.21.0
PATCH v3 4/5 examples/vdpa: support building from pkg-config info
In reply to Bruce RichardsonThe vdpa example app did not check for a libdpdk pkg-config file and attempt to build using that. Add support for that method of compile to align the app with the other examples.
--- examples/vdpa/Makefile | 51 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 7 deletions(-)
examples/vdpa/Makefile +44 -7
@@ -1,6 +1,47 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel Corporation +# binary name +APP = vdpa + +# all source are stored in SRCS-y +SRCS-y := main.c +CFLAGS += -DALLOW_EXPERIMENTAL_API + +# Build using pkg-config variables if possible +$(shell pkg-config --exists libdpdk) +ifeq ($(.SHELLSTATUS),0) + +all: shared +.PHONY: shared static +shared: build/$(APP)-shared + ln -sf $(APP)-shared build/$(APP) +static: build/$(APP)-static + ln -sf $(APP)-static build/$(APP) + +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) + +build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build + $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED) + +build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build + $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC) + +build: + @mkdir -p $@ + +.PHONY: clean +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
@@ -16,12 +57,6 @@ please change the definition of the RTE_TARGET environment variable) all: else -# binary name -APP = vdpa - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += -O2 -D_FILE_OFFSET_BITS=64 CFLAGS += $(WERROR_FLAGS) CFLAGS += -D_GNU_SOURCE
@@ -29,4 +64,6 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API include $(RTE_SDK)/mk/rte.extapp.mk -endif +endif # linuxapp + +endif # pkg-config
Signature · 1 line
2.21.0
PATCH v3 5/5 examples/vhost_crypto: support building from pkg-config info
In reply to Bruce RichardsonThe vhost_crypto example app did not check for a libdpdk pkg-config file and attempt to build using that. Add support for that method of compile to align the app with the other examples.
--- examples/vhost_crypto/Makefile | 51 +++++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 7 deletions(-)
examples/vhost_crypto/Makefile +44 -7
@@ -1,6 +1,47 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017-2018 Intel Corporation +# binary name +APP = vhost-crypto + +# all source are stored in SRCS-y +SRCS-y := main.c +CFLAGS += -DALLOW_EXPERIMENTAL_API + +# Build using pkg-config variables if possible +$(shell pkg-config --exists libdpdk) +ifeq ($(.SHELLSTATUS),0) + +all: shared +.PHONY: shared static +shared: build/$(APP)-shared + ln -sf $(APP)-shared build/$(APP) +static: build/$(APP)-static + ln -sf $(APP)-static build/$(APP) + +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) + +build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build + $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED) + +build/$(APP)-static: $(SRCS-y) Makefile $(PC_FILE) | build + $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_STATIC) + +build: + @mkdir -p $@ + +.PHONY: clean +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
@@ -16,16 +57,12 @@ please change the definition of the RTE_TARGET environment variable) all: else -# binary name -APP = vhost-crypto - -# all source are stored in SRCS-y -SRCS-y := main.c - CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O2 -D_FILE_OFFSET_BITS=64 CFLAGS += $(WERROR_FLAGS) include $(RTE_SDK)/mk/rte.extapp.mk -endif +endif # Linux + +endif # pkg-config
Signature · 1 line
2.21.0
Thomas Monjalon
AppliedQuoted 6 lines
Bruce Richardson (5):
examples: add support for relocated DPDK install devtools/test-meson-builds: remove dependency on clang devtools/test-meson-builds: add testing of pkg-config file examples/vdpa: support building from pkg-config info examples/vhost_crypto: support building from pkg-config info
Applied, thanks