* [dpdk-dev] [PATCH 19.08 0/6] improve building examples @ 2019-05-03 13:35 Bruce Richardson 2019-05-03 13:35 ` Bruce Richardson ` (8 more replies) 0 siblings, 9 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-03 13:35 UTC (permalink / raw) To: dev; +Cc: 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. 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(-) -- 2.20.1 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH 19.08 0/6] improve building examples 2019-05-03 13:35 [dpdk-dev] [PATCH 19.08 0/6] improve building examples Bruce Richardson @ 2019-05-03 13:35 ` Bruce Richardson 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 1/6] examples: remove auto-generation of examples list Bruce Richardson ` (7 subsequent siblings) 8 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-03 13:35 UTC (permalink / raw) To: dev; +Cc: 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. 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(-) -- 2.20.1 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH 19.08 1/6] examples: remove auto-generation of examples list 2019-05-03 13:35 [dpdk-dev] [PATCH 19.08 0/6] improve building examples Bruce Richardson 2019-05-03 13:35 ` Bruce Richardson @ 2019-05-03 13:35 ` Bruce Richardson 2019-05-03 13:35 ` Bruce Richardson 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install Bruce Richardson ` (6 subsequent siblings) 8 siblings, 1 reply; 54+ messages in thread From: Bruce Richardson @ 2019-05-03 13:35 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, Luca Boccassi 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. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org> --- examples/meson.build | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/examples/meson.build b/examples/meson.build index 1a6134f12..8b6577cf7 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -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 -- 2.20.1 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH 19.08 1/6] examples: remove auto-generation of examples list 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 1/6] examples: remove auto-generation of examples list Bruce Richardson @ 2019-05-03 13:35 ` Bruce Richardson 0 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-03 13:35 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, Luca Boccassi 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. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org> --- examples/meson.build | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/examples/meson.build b/examples/meson.build index 1a6134f12..8b6577cf7 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -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 -- 2.20.1 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install 2019-05-03 13:35 [dpdk-dev] [PATCH 19.08 0/6] improve building examples Bruce Richardson 2019-05-03 13:35 ` Bruce Richardson 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 1/6] examples: remove auto-generation of examples list Bruce Richardson @ 2019-05-03 13:35 ` Bruce Richardson 2019-05-03 13:35 ` Bruce Richardson 2019-05-07 10:09 ` Luca Boccassi 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 3/6] devtools/test-meson-builds: remove dependency on clang Bruce Richardson ` (5 subsequent siblings) 8 siblings, 2 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-03 13:35 UTC (permalink / raw) To: dev; +Cc: 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 <bruce.richardson@intel.com> --- 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(-) diff --git a/examples/bbdev_app/Makefile b/examples/bbdev_app/Makefile index e8115b46a..603932ace 100644 --- a/examples/bbdev_app/Makefile +++ b/examples/bbdev_app/Makefile @@ -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 diff --git a/examples/bond/Makefile b/examples/bond/Makefile index 488eeac70..95b913dab 100644 --- a/examples/bond/Makefile +++ b/examples/bond/Makefile @@ -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 diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile index a03dfa8ee..6bc6aa167 100644 --- a/examples/cmdline/Makefile +++ b/examples/cmdline/Makefile @@ -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) diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile index 52076214b..e9c5c5d3c 100644 --- a/examples/distributor/Makefile +++ b/examples/distributor/Makefile @@ -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) diff --git a/examples/eventdev_pipeline/Makefile b/examples/eventdev_pipeline/Makefile index 0b0d1ade9..fd96080f3 100644 --- a/examples/eventdev_pipeline/Makefile +++ b/examples/eventdev_pipeline/Makefile @@ -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) diff --git a/examples/exception_path/Makefile b/examples/exception_path/Makefile index 18db85ddb..d633be4f8 100644 --- a/examples/exception_path/Makefile +++ b/examples/exception_path/Makefile @@ -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) diff --git a/examples/fips_validation/Makefile b/examples/fips_validation/Makefile index e74252e27..95b6533b9 100644 --- a/examples/fips_validation/Makefile +++ b/examples/fips_validation/Makefile @@ -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) diff --git a/examples/flow_classify/Makefile b/examples/flow_classify/Makefile index dfce1a4bd..3078c5ec7 100644 --- a/examples/flow_classify/Makefile +++ b/examples/flow_classify/Makefile @@ -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 diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile index f657c0336..ee2eb8754 100644 --- a/examples/flow_filtering/Makefile +++ b/examples/flow_filtering/Makefile @@ -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) diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile index 97d82f68a..eaf028d02 100644 --- a/examples/helloworld/Makefile +++ b/examples/helloworld/Makefile @@ -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) diff --git a/examples/ip_fragmentation/Makefile b/examples/ip_fragmentation/Makefile index 6d1a1fbba..979333af2 100644 --- a/examples/ip_fragmentation/Makefile +++ b/examples/ip_fragmentation/Makefile @@ -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) diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile index 409966afd..a224080af 100644 --- a/examples/ip_pipeline/Makefile +++ b/examples/ip_pipeline/Makefile @@ -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. diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile index 7bbc241c7..00b652e85 100644 --- a/examples/ip_reassembly/Makefile +++ b/examples/ip_reassembly/Makefile @@ -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) diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile index ac042e4ce..64379383b 100644 --- a/examples/ipsec-secgw/Makefile +++ b/examples/ipsec-secgw/Makefile @@ -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 diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile index 5a1e368fa..2758e1442 100644 --- a/examples/ipv4_multicast/Makefile +++ b/examples/ipv4_multicast/Makefile @@ -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) diff --git a/examples/kni/Makefile b/examples/kni/Makefile index 634334f86..afc8ddcbf 100644 --- a/examples/kni/Makefile +++ b/examples/kni/Makefile @@ -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) diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile index fb3c4bc00..73db78ab2 100644 --- a/examples/l2fwd-cat/Makefile +++ b/examples/l2fwd-cat/Makefile @@ -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 diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile index ed5e2c73f..88ff086e7 100644 --- a/examples/l2fwd-crypto/Makefile +++ b/examples/l2fwd-crypto/Makefile @@ -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) diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile index e14c3a2b2..064799609 100644 --- a/examples/l2fwd-jobstats/Makefile +++ b/examples/l2fwd-jobstats/Makefile @@ -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) diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile index bc851b732..1fc3337ea 100644 --- a/examples/l2fwd-keepalive/Makefile +++ b/examples/l2fwd-keepalive/Makefile @@ -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) diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile index 94d70a43e..b4cc1ae01 100644 --- a/examples/l2fwd/Makefile +++ b/examples/l2fwd/Makefile @@ -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) diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile index fc236f129..4918a63eb 100644 --- a/examples/l3fwd-acl/Makefile +++ b/examples/l3fwd-acl/Makefile @@ -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) diff --git a/examples/l3fwd-power/Makefile b/examples/l3fwd-power/Makefile index a106b0404..df7963895 100644 --- a/examples/l3fwd-power/Makefile +++ b/examples/l3fwd-power/Makefile @@ -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 diff --git a/examples/l3fwd-vf/Makefile b/examples/l3fwd-vf/Makefile index cc93603e3..1c6ec41fe 100644 --- a/examples/l3fwd-vf/Makefile +++ b/examples/l3fwd-vf/Makefile @@ -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) diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile index 8c51c7b96..3d23f3ac4 100644 --- a/examples/l3fwd/Makefile +++ b/examples/l3fwd/Makefile @@ -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) diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile index d12e04782..fd7bb204d 100644 --- a/examples/link_status_interrupt/Makefile +++ b/examples/link_status_interrupt/Makefile @@ -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) diff --git a/examples/load_balancer/Makefile b/examples/load_balancer/Makefile index d4b145ca1..807a2f99a 100644 --- a/examples/load_balancer/Makefile +++ b/examples/load_balancer/Makefile @@ -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) diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile index 474ec9571..4ef8fef26 100644 --- a/examples/packet_ordering/Makefile +++ b/examples/packet_ordering/Makefile @@ -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) diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile index f113c9d56..c94f64eb0 100644 --- a/examples/ptpclient/Makefile +++ b/examples/ptpclient/Makefile @@ -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) diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile index fbcda09b2..fab91a0ff 100644 --- a/examples/qos_meter/Makefile +++ b/examples/qos_meter/Makefile @@ -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 diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile index a25875900..e78b9fe56 100644 --- a/examples/qos_sched/Makefile +++ b/examples/qos_sched/Makefile @@ -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) diff --git a/examples/rxtx_callbacks/Makefile b/examples/rxtx_callbacks/Makefile index b937d599b..143d8383a 100644 --- a/examples/rxtx_callbacks/Makefile +++ b/examples/rxtx_callbacks/Makefile @@ -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) diff --git a/examples/service_cores/Makefile b/examples/service_cores/Makefile index 351fb7e1d..c30920076 100644 --- a/examples/service_cores/Makefile +++ b/examples/service_cores/Makefile @@ -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) diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile index 56713a524..e1de10874 100644 --- a/examples/skeleton/Makefile +++ b/examples/skeleton/Makefile @@ -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) diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile index f4b85e49b..474ce3f74 100644 --- a/examples/tep_termination/Makefile +++ b/examples/tep_termination/Makefile @@ -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 diff --git a/examples/timer/Makefile b/examples/timer/Makefile index 046348fd1..356094e72 100644 --- a/examples/timer/Makefile +++ b/examples/timer/Makefile @@ -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) diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile index 80607b79c..ee2b9d8d6 100644 --- a/examples/vhost/Makefile +++ b/examples/vhost/Makefile @@ -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 diff --git a/examples/vhost_scsi/Makefile b/examples/vhost_scsi/Makefile index 0a3450bae..61aa318fa 100644 --- a/examples/vhost_scsi/Makefile +++ b/examples/vhost_scsi/Makefile @@ -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) diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile index 6a389c776..27c618daf 100644 --- a/examples/vmdq/Makefile +++ b/examples/vmdq/Makefile @@ -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) diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile index 113bce7d1..6f76c7fd1 100644 --- a/examples/vmdq_dcb/Makefile +++ b/examples/vmdq_dcb/Makefile @@ -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) -- 2.20.1 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install Bruce Richardson @ 2019-05-03 13:35 ` Bruce Richardson 2019-05-07 10:09 ` Luca Boccassi 1 sibling, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-03 13:35 UTC (permalink / raw) To: dev; +Cc: 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 <bruce.richardson@intel.com> --- 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(-) diff --git a/examples/bbdev_app/Makefile b/examples/bbdev_app/Makefile index e8115b46a..603932ace 100644 --- a/examples/bbdev_app/Makefile +++ b/examples/bbdev_app/Makefile @@ -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 diff --git a/examples/bond/Makefile b/examples/bond/Makefile index 488eeac70..95b913dab 100644 --- a/examples/bond/Makefile +++ b/examples/bond/Makefile @@ -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 diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile index a03dfa8ee..6bc6aa167 100644 --- a/examples/cmdline/Makefile +++ b/examples/cmdline/Makefile @@ -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) diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile index 52076214b..e9c5c5d3c 100644 --- a/examples/distributor/Makefile +++ b/examples/distributor/Makefile @@ -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) diff --git a/examples/eventdev_pipeline/Makefile b/examples/eventdev_pipeline/Makefile index 0b0d1ade9..fd96080f3 100644 --- a/examples/eventdev_pipeline/Makefile +++ b/examples/eventdev_pipeline/Makefile @@ -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) diff --git a/examples/exception_path/Makefile b/examples/exception_path/Makefile index 18db85ddb..d633be4f8 100644 --- a/examples/exception_path/Makefile +++ b/examples/exception_path/Makefile @@ -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) diff --git a/examples/fips_validation/Makefile b/examples/fips_validation/Makefile index e74252e27..95b6533b9 100644 --- a/examples/fips_validation/Makefile +++ b/examples/fips_validation/Makefile @@ -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) diff --git a/examples/flow_classify/Makefile b/examples/flow_classify/Makefile index dfce1a4bd..3078c5ec7 100644 --- a/examples/flow_classify/Makefile +++ b/examples/flow_classify/Makefile @@ -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 diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile index f657c0336..ee2eb8754 100644 --- a/examples/flow_filtering/Makefile +++ b/examples/flow_filtering/Makefile @@ -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) diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile index 97d82f68a..eaf028d02 100644 --- a/examples/helloworld/Makefile +++ b/examples/helloworld/Makefile @@ -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) diff --git a/examples/ip_fragmentation/Makefile b/examples/ip_fragmentation/Makefile index 6d1a1fbba..979333af2 100644 --- a/examples/ip_fragmentation/Makefile +++ b/examples/ip_fragmentation/Makefile @@ -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) diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile index 409966afd..a224080af 100644 --- a/examples/ip_pipeline/Makefile +++ b/examples/ip_pipeline/Makefile @@ -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. diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile index 7bbc241c7..00b652e85 100644 --- a/examples/ip_reassembly/Makefile +++ b/examples/ip_reassembly/Makefile @@ -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) diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile index ac042e4ce..64379383b 100644 --- a/examples/ipsec-secgw/Makefile +++ b/examples/ipsec-secgw/Makefile @@ -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 diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile index 5a1e368fa..2758e1442 100644 --- a/examples/ipv4_multicast/Makefile +++ b/examples/ipv4_multicast/Makefile @@ -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) diff --git a/examples/kni/Makefile b/examples/kni/Makefile index 634334f86..afc8ddcbf 100644 --- a/examples/kni/Makefile +++ b/examples/kni/Makefile @@ -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) diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile index fb3c4bc00..73db78ab2 100644 --- a/examples/l2fwd-cat/Makefile +++ b/examples/l2fwd-cat/Makefile @@ -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 diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile index ed5e2c73f..88ff086e7 100644 --- a/examples/l2fwd-crypto/Makefile +++ b/examples/l2fwd-crypto/Makefile @@ -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) diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile index e14c3a2b2..064799609 100644 --- a/examples/l2fwd-jobstats/Makefile +++ b/examples/l2fwd-jobstats/Makefile @@ -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) diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile index bc851b732..1fc3337ea 100644 --- a/examples/l2fwd-keepalive/Makefile +++ b/examples/l2fwd-keepalive/Makefile @@ -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) diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile index 94d70a43e..b4cc1ae01 100644 --- a/examples/l2fwd/Makefile +++ b/examples/l2fwd/Makefile @@ -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) diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile index fc236f129..4918a63eb 100644 --- a/examples/l3fwd-acl/Makefile +++ b/examples/l3fwd-acl/Makefile @@ -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) diff --git a/examples/l3fwd-power/Makefile b/examples/l3fwd-power/Makefile index a106b0404..df7963895 100644 --- a/examples/l3fwd-power/Makefile +++ b/examples/l3fwd-power/Makefile @@ -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 diff --git a/examples/l3fwd-vf/Makefile b/examples/l3fwd-vf/Makefile index cc93603e3..1c6ec41fe 100644 --- a/examples/l3fwd-vf/Makefile +++ b/examples/l3fwd-vf/Makefile @@ -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) diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile index 8c51c7b96..3d23f3ac4 100644 --- a/examples/l3fwd/Makefile +++ b/examples/l3fwd/Makefile @@ -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) diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile index d12e04782..fd7bb204d 100644 --- a/examples/link_status_interrupt/Makefile +++ b/examples/link_status_interrupt/Makefile @@ -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) diff --git a/examples/load_balancer/Makefile b/examples/load_balancer/Makefile index d4b145ca1..807a2f99a 100644 --- a/examples/load_balancer/Makefile +++ b/examples/load_balancer/Makefile @@ -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) diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile index 474ec9571..4ef8fef26 100644 --- a/examples/packet_ordering/Makefile +++ b/examples/packet_ordering/Makefile @@ -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) diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile index f113c9d56..c94f64eb0 100644 --- a/examples/ptpclient/Makefile +++ b/examples/ptpclient/Makefile @@ -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) diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile index fbcda09b2..fab91a0ff 100644 --- a/examples/qos_meter/Makefile +++ b/examples/qos_meter/Makefile @@ -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 diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile index a25875900..e78b9fe56 100644 --- a/examples/qos_sched/Makefile +++ b/examples/qos_sched/Makefile @@ -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) diff --git a/examples/rxtx_callbacks/Makefile b/examples/rxtx_callbacks/Makefile index b937d599b..143d8383a 100644 --- a/examples/rxtx_callbacks/Makefile +++ b/examples/rxtx_callbacks/Makefile @@ -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) diff --git a/examples/service_cores/Makefile b/examples/service_cores/Makefile index 351fb7e1d..c30920076 100644 --- a/examples/service_cores/Makefile +++ b/examples/service_cores/Makefile @@ -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) diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile index 56713a524..e1de10874 100644 --- a/examples/skeleton/Makefile +++ b/examples/skeleton/Makefile @@ -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) diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile index f4b85e49b..474ce3f74 100644 --- a/examples/tep_termination/Makefile +++ b/examples/tep_termination/Makefile @@ -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 diff --git a/examples/timer/Makefile b/examples/timer/Makefile index 046348fd1..356094e72 100644 --- a/examples/timer/Makefile +++ b/examples/timer/Makefile @@ -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) diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile index 80607b79c..ee2b9d8d6 100644 --- a/examples/vhost/Makefile +++ b/examples/vhost/Makefile @@ -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 diff --git a/examples/vhost_scsi/Makefile b/examples/vhost_scsi/Makefile index 0a3450bae..61aa318fa 100644 --- a/examples/vhost_scsi/Makefile +++ b/examples/vhost_scsi/Makefile @@ -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) diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile index 6a389c776..27c618daf 100644 --- a/examples/vmdq/Makefile +++ b/examples/vmdq/Makefile @@ -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) diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile index 113bce7d1..6f76c7fd1 100644 --- a/examples/vmdq_dcb/Makefile +++ b/examples/vmdq_dcb/Makefile @@ -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) -- 2.20.1 ^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install Bruce Richardson 2019-05-03 13:35 ` Bruce Richardson @ 2019-05-07 10:09 ` Luca Boccassi 2019-05-07 10:09 ` Luca Boccassi 2019-05-07 10:50 ` Bruce Richardson 1 sibling, 2 replies; 54+ messages in thread From: Luca Boccassi @ 2019-05-07 10:09 UTC (permalink / raw) To: Bruce Richardson, dev, thomas On Fri, 2019-05-03 at 14:35 +0100, Bruce Richardson wrote: > 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 < > bruce.richardson@intel.com > > > --- > 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(-) > > diff --git a/examples/bbdev_app/Makefile > b/examples/bbdev_app/Makefile > index e8115b46a..603932ace 100644 > --- a/examples/bbdev_app/Makefile > +++ b/examples/bbdev_app/Makefile > @@ -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 Hi, Would using "--define-prefix" allow to avoid the special-sauced DPDK_PC_PREFIX variable? -- Kind regards, Luca Boccassi ^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install 2019-05-07 10:09 ` Luca Boccassi @ 2019-05-07 10:09 ` Luca Boccassi 2019-05-07 10:50 ` Bruce Richardson 1 sibling, 0 replies; 54+ messages in thread From: Luca Boccassi @ 2019-05-07 10:09 UTC (permalink / raw) To: Bruce Richardson, dev, thomas On Fri, 2019-05-03 at 14:35 +0100, Bruce Richardson wrote: > 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 < > bruce.richardson@intel.com > > > --- > 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(-) > > diff --git a/examples/bbdev_app/Makefile > b/examples/bbdev_app/Makefile > index e8115b46a..603932ace 100644 > --- a/examples/bbdev_app/Makefile > +++ b/examples/bbdev_app/Makefile > @@ -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 Hi, Would using "--define-prefix" allow to avoid the special-sauced DPDK_PC_PREFIX variable? -- Kind regards, Luca Boccassi ^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install 2019-05-07 10:09 ` Luca Boccassi 2019-05-07 10:09 ` Luca Boccassi @ 2019-05-07 10:50 ` Bruce Richardson 2019-05-07 10:50 ` Bruce Richardson 2019-05-07 13:28 ` Luca Boccassi 1 sibling, 2 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-07 10:50 UTC (permalink / raw) To: Luca Boccassi; +Cc: dev, thomas On Tue, May 07, 2019 at 11:09:51AM +0100, Luca Boccassi wrote: > On Fri, 2019-05-03 at 14:35 +0100, Bruce Richardson wrote: > > 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 < > > bruce.richardson@intel.com > > > > > --- > > 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(-) > > > > diff --git a/examples/bbdev_app/Makefile > > b/examples/bbdev_app/Makefile > > index e8115b46a..603932ace 100644 > > --- a/examples/bbdev_app/Makefile > > +++ b/examples/bbdev_app/Makefile > > @@ -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 > > Hi, > > Would using "--define-prefix" allow to avoid the special-sauced > DPDK_PC_PREFIX variable? > > -- 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 ^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install 2019-05-07 10:50 ` Bruce Richardson @ 2019-05-07 10:50 ` Bruce Richardson 2019-05-07 13:28 ` Luca Boccassi 1 sibling, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-07 10:50 UTC (permalink / raw) To: Luca Boccassi; +Cc: dev, thomas On Tue, May 07, 2019 at 11:09:51AM +0100, Luca Boccassi wrote: > On Fri, 2019-05-03 at 14:35 +0100, Bruce Richardson wrote: > > 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 < > > bruce.richardson@intel.com > > > > > --- > > 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(-) > > > > diff --git a/examples/bbdev_app/Makefile > > b/examples/bbdev_app/Makefile > > index e8115b46a..603932ace 100644 > > --- a/examples/bbdev_app/Makefile > > +++ b/examples/bbdev_app/Makefile > > @@ -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 > > Hi, > > Would using "--define-prefix" allow to avoid the special-sauced > DPDK_PC_PREFIX variable? > > -- 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 ^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install 2019-05-07 10:50 ` Bruce Richardson 2019-05-07 10:50 ` Bruce Richardson @ 2019-05-07 13:28 ` Luca Boccassi 2019-05-07 13:28 ` Luca Boccassi 2019-05-07 15:17 ` Bruce Richardson 1 sibling, 2 replies; 54+ messages in thread From: Luca Boccassi @ 2019-05-07 13:28 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, thomas On Tue, 2019-05-07 at 11:50 +0100, Bruce Richardson wrote: > On Tue, May 07, 2019 at 11:09:51AM +0100, Luca Boccassi wrote: > > On Fri, 2019-05-03 at 14:35 +0100, Bruce Richardson wrote: > > > 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 < > > > bruce.richardson@intel.com > > > > > > > > > --- > > > 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(-) > > > > > > diff --git a/examples/bbdev_app/Makefile > > > b/examples/bbdev_app/Makefile > > > index e8115b46a..603932ace 100644 > > > --- a/examples/bbdev_app/Makefile > > > +++ b/examples/bbdev_app/Makefile > > > @@ -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 > > > > Hi, > > > > Would using "--define-prefix" allow to avoid the special-sauced > > DPDK_PC_PREFIX variable? > > > > -- > > 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 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 -- Kind regards, Luca Boccassi ^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install 2019-05-07 13:28 ` Luca Boccassi @ 2019-05-07 13:28 ` Luca Boccassi 2019-05-07 15:17 ` Bruce Richardson 1 sibling, 0 replies; 54+ messages in thread From: Luca Boccassi @ 2019-05-07 13:28 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, thomas On Tue, 2019-05-07 at 11:50 +0100, Bruce Richardson wrote: > On Tue, May 07, 2019 at 11:09:51AM +0100, Luca Boccassi wrote: > > On Fri, 2019-05-03 at 14:35 +0100, Bruce Richardson wrote: > > > 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 < > > > bruce.richardson@intel.com > > > > > > > > > --- > > > 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(-) > > > > > > diff --git a/examples/bbdev_app/Makefile > > > b/examples/bbdev_app/Makefile > > > index e8115b46a..603932ace 100644 > > > --- a/examples/bbdev_app/Makefile > > > +++ b/examples/bbdev_app/Makefile > > > @@ -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 > > > > Hi, > > > > Would using "--define-prefix" allow to avoid the special-sauced > > DPDK_PC_PREFIX variable? > > > > -- > > 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 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 -- Kind regards, Luca Boccassi ^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install 2019-05-07 13:28 ` Luca Boccassi 2019-05-07 13:28 ` Luca Boccassi @ 2019-05-07 15:17 ` Bruce Richardson 2019-05-07 15:17 ` Bruce Richardson 2019-05-07 15:53 ` Luca Boccassi 1 sibling, 2 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-07 15:17 UTC (permalink / raw) To: Luca Boccassi; +Cc: dev, thomas On Tue, May 07, 2019 at 02:28:11PM +0100, Luca Boccassi wrote: > On Tue, 2019-05-07 at 11:50 +0100, Bruce Richardson wrote: > > On Tue, May 07, 2019 at 11:09:51AM +0100, Luca Boccassi wrote: > > > On Fri, 2019-05-03 at 14:35 +0100, Bruce Richardson wrote: > > > > 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 < > > > > bruce.richardson@intel.com > > > > > > > > > > > > --- > > > > 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(-) > > > > > > > > diff --git a/examples/bbdev_app/Makefile > > > > b/examples/bbdev_app/Makefile > > > > index e8115b46a..603932ace 100644 > > > > --- a/examples/bbdev_app/Makefile > > > > +++ b/examples/bbdev_app/Makefile > > > > @@ -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 > > > > > > Hi, > > > > > > Would using "--define-prefix" allow to avoid the special-sauced > > > DPDK_PC_PREFIX variable? > > > > > > -- > > > > 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 > > 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 > 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. ^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install 2019-05-07 15:17 ` Bruce Richardson @ 2019-05-07 15:17 ` Bruce Richardson 2019-05-07 15:53 ` Luca Boccassi 1 sibling, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-07 15:17 UTC (permalink / raw) To: Luca Boccassi; +Cc: dev, thomas On Tue, May 07, 2019 at 02:28:11PM +0100, Luca Boccassi wrote: > On Tue, 2019-05-07 at 11:50 +0100, Bruce Richardson wrote: > > On Tue, May 07, 2019 at 11:09:51AM +0100, Luca Boccassi wrote: > > > On Fri, 2019-05-03 at 14:35 +0100, Bruce Richardson wrote: > > > > 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 < > > > > bruce.richardson@intel.com > > > > > > > > > > > > --- > > > > 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(-) > > > > > > > > diff --git a/examples/bbdev_app/Makefile > > > > b/examples/bbdev_app/Makefile > > > > index e8115b46a..603932ace 100644 > > > > --- a/examples/bbdev_app/Makefile > > > > +++ b/examples/bbdev_app/Makefile > > > > @@ -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 > > > > > > Hi, > > > > > > Would using "--define-prefix" allow to avoid the special-sauced > > > DPDK_PC_PREFIX variable? > > > > > > -- > > > > 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 > > 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 > 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. ^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install 2019-05-07 15:17 ` Bruce Richardson 2019-05-07 15:17 ` Bruce Richardson @ 2019-05-07 15:53 ` Luca Boccassi 2019-05-07 15:53 ` Luca Boccassi 2019-05-07 16:04 ` Bruce Richardson 1 sibling, 2 replies; 54+ messages in thread From: Luca Boccassi @ 2019-05-07 15:53 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, thomas On Tue, 2019-05-07 at 16:17 +0100, Bruce Richardson wrote: > On Tue, May 07, 2019 at 02:28:11PM +0100, Luca Boccassi wrote: > > On Tue, 2019-05-07 at 11:50 +0100, Bruce Richardson wrote: > > > On Tue, May 07, 2019 at 11:09:51AM +0100, Luca Boccassi wrote: > > > > On Fri, 2019-05-03 at 14:35 +0100, Bruce Richardson wrote: > > > > > 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 < > > > > > bruce.richardson@intel.com > > > > > > > > > > > > > > > > > > > > --- > > > > > 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(-) > > > > > > > > > > diff --git a/examples/bbdev_app/Makefile > > > > > b/examples/bbdev_app/Makefile > > > > > index e8115b46a..603932ace 100644 > > > > > --- a/examples/bbdev_app/Makefile > > > > > +++ b/examples/bbdev_app/Makefile > > > > > @@ -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 > > > > > > > > Hi, > > > > > > > > Would using "--define-prefix" allow to avoid the special-sauced > > > > DPDK_PC_PREFIX variable? > > > > > > > > -- > > > > > > 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 > > > > 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 > > > > 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 -- Kind regards, Luca Boccassi ^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install 2019-05-07 15:53 ` Luca Boccassi @ 2019-05-07 15:53 ` Luca Boccassi 2019-05-07 16:04 ` Bruce Richardson 1 sibling, 0 replies; 54+ messages in thread From: Luca Boccassi @ 2019-05-07 15:53 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, thomas On Tue, 2019-05-07 at 16:17 +0100, Bruce Richardson wrote: > On Tue, May 07, 2019 at 02:28:11PM +0100, Luca Boccassi wrote: > > On Tue, 2019-05-07 at 11:50 +0100, Bruce Richardson wrote: > > > On Tue, May 07, 2019 at 11:09:51AM +0100, Luca Boccassi wrote: > > > > On Fri, 2019-05-03 at 14:35 +0100, Bruce Richardson wrote: > > > > > 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 < > > > > > bruce.richardson@intel.com > > > > > > > > > > > > > > > > > > > > --- > > > > > 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(-) > > > > > > > > > > diff --git a/examples/bbdev_app/Makefile > > > > > b/examples/bbdev_app/Makefile > > > > > index e8115b46a..603932ace 100644 > > > > > --- a/examples/bbdev_app/Makefile > > > > > +++ b/examples/bbdev_app/Makefile > > > > > @@ -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 > > > > > > > > Hi, > > > > > > > > Would using "--define-prefix" allow to avoid the special-sauced > > > > DPDK_PC_PREFIX variable? > > > > > > > > -- > > > > > > 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 > > > > 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 > > > > 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 -- Kind regards, Luca Boccassi ^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install 2019-05-07 15:53 ` Luca Boccassi 2019-05-07 15:53 ` Luca Boccassi @ 2019-05-07 16:04 ` Bruce Richardson 2019-05-07 16:04 ` Bruce Richardson 1 sibling, 1 reply; 54+ messages in thread From: Bruce Richardson @ 2019-05-07 16:04 UTC (permalink / raw) To: Luca Boccassi; +Cc: dev, thomas On Tue, May 07, 2019 at 04:53:00PM +0100, Luca Boccassi wrote: > On Tue, 2019-05-07 at 16:17 +0100, Bruce Richardson wrote: > > On Tue, May 07, 2019 at 02:28:11PM +0100, Luca Boccassi wrote: > > > On Tue, 2019-05-07 at 11:50 +0100, Bruce Richardson wrote: > > > > On Tue, May 07, 2019 at 11:09:51AM +0100, Luca Boccassi wrote: > > > > > On Fri, 2019-05-03 at 14:35 +0100, Bruce Richardson wrote: > > > > > > 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 < > > > > > > bruce.richardson@intel.com > > > > > > > > > > > > > > > > > > > > > > > > --- > > > > > > 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(-) > > > > > > > > > > > > diff --git a/examples/bbdev_app/Makefile > > > > > > b/examples/bbdev_app/Makefile > > > > > > index e8115b46a..603932ace 100644 > > > > > > --- a/examples/bbdev_app/Makefile > > > > > > +++ b/examples/bbdev_app/Makefile > > > > > > @@ -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 > > > > > > > > > > Hi, > > > > > > > > > > Would using "--define-prefix" allow to avoid the special-sauced > > > > > DPDK_PC_PREFIX variable? > > > > > > > > > > -- > > > > > > > > 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 > > > > > > 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 > > > > > > > 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 ^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install 2019-05-07 16:04 ` Bruce Richardson @ 2019-05-07 16:04 ` Bruce Richardson 0 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-07 16:04 UTC (permalink / raw) To: Luca Boccassi; +Cc: dev, thomas On Tue, May 07, 2019 at 04:53:00PM +0100, Luca Boccassi wrote: > On Tue, 2019-05-07 at 16:17 +0100, Bruce Richardson wrote: > > On Tue, May 07, 2019 at 02:28:11PM +0100, Luca Boccassi wrote: > > > On Tue, 2019-05-07 at 11:50 +0100, Bruce Richardson wrote: > > > > On Tue, May 07, 2019 at 11:09:51AM +0100, Luca Boccassi wrote: > > > > > On Fri, 2019-05-03 at 14:35 +0100, Bruce Richardson wrote: > > > > > > 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 < > > > > > > bruce.richardson@intel.com > > > > > > > > > > > > > > > > > > > > > > > > --- > > > > > > 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(-) > > > > > > > > > > > > diff --git a/examples/bbdev_app/Makefile > > > > > > b/examples/bbdev_app/Makefile > > > > > > index e8115b46a..603932ace 100644 > > > > > > --- a/examples/bbdev_app/Makefile > > > > > > +++ b/examples/bbdev_app/Makefile > > > > > > @@ -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 > > > > > > > > > > Hi, > > > > > > > > > > Would using "--define-prefix" allow to avoid the special-sauced > > > > > DPDK_PC_PREFIX variable? > > > > > > > > > > -- > > > > > > > > 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 > > > > > > 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 > > > > > > > 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 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH 19.08 3/6] devtools/test-meson-builds: remove dependency on clang 2019-05-03 13:35 [dpdk-dev] [PATCH 19.08 0/6] improve building examples Bruce Richardson ` (2 preceding siblings ...) 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install Bruce Richardson @ 2019-05-03 13:35 ` Bruce Richardson 2019-05-03 13:35 ` Bruce Richardson 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 4/6] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson ` (4 subsequent siblings) 8 siblings, 1 reply; 54+ messages in thread From: Bruce Richardson @ 2019-05-03 13:35 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson Allow the script to run with a reduced set of builds if clang, or other compilers, are missing. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- devtools/test-meson-builds.sh | 38 ++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 630a1a6fe..fe11e3c0a 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -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 -- 2.20.1 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH 19.08 3/6] devtools/test-meson-builds: remove dependency on clang 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 3/6] devtools/test-meson-builds: remove dependency on clang Bruce Richardson @ 2019-05-03 13:35 ` Bruce Richardson 0 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-03 13:35 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson Allow the script to run with a reduced set of builds if clang, or other compilers, are missing. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- devtools/test-meson-builds.sh | 38 ++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 630a1a6fe..fe11e3c0a 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -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 -- 2.20.1 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH 19.08 4/6] devtools/test-meson-builds: add testing of pkg-config file 2019-05-03 13:35 [dpdk-dev] [PATCH 19.08 0/6] improve building examples Bruce Richardson ` (3 preceding siblings ...) 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 3/6] devtools/test-meson-builds: remove dependency on clang Bruce Richardson @ 2019-05-03 13:35 ` Bruce Richardson 2019-05-03 13:35 ` Bruce Richardson 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 5/6] examples/vdpa: support building from pkg-config info Bruce Richardson ` (3 subsequent siblings) 8 siblings, 1 reply; 54+ messages in thread From: Bruce Richardson @ 2019-05-03 13:35 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, Luca Boccassi The 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. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org> --- devtools/test-meson-builds.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index fe11e3c0a..03ebc29ea 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -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 -- 2.20.1 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH 19.08 4/6] devtools/test-meson-builds: add testing of pkg-config file 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 4/6] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson @ 2019-05-03 13:35 ` Bruce Richardson 0 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-03 13:35 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson, Luca Boccassi The 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. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org> --- devtools/test-meson-builds.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index fe11e3c0a..03ebc29ea 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -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 -- 2.20.1 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH 19.08 5/6] examples/vdpa: support building from pkg-config info 2019-05-03 13:35 [dpdk-dev] [PATCH 19.08 0/6] improve building examples Bruce Richardson ` (4 preceding siblings ...) 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 4/6] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson @ 2019-05-03 13:35 ` Bruce Richardson 2019-05-03 13:35 ` Bruce Richardson 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 6/6] examples/vhost_crypto: " Bruce Richardson ` (2 subsequent siblings) 8 siblings, 1 reply; 54+ messages in thread From: Bruce Richardson @ 2019-05-03 13:35 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson 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. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- examples/vdpa/Makefile | 55 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 8 deletions(-) diff --git a/examples/vdpa/Makefile b/examples/vdpa/Makefile index 9d16d8eb5..58f439fd0 100644 --- a/examples/vdpa/Makefile +++ b/examples/vdpa/Makefile @@ -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 -- 2.20.1 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH 19.08 5/6] examples/vdpa: support building from pkg-config info 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 5/6] examples/vdpa: support building from pkg-config info Bruce Richardson @ 2019-05-03 13:35 ` Bruce Richardson 0 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-03 13:35 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson 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. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- examples/vdpa/Makefile | 55 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 8 deletions(-) diff --git a/examples/vdpa/Makefile b/examples/vdpa/Makefile index 9d16d8eb5..58f439fd0 100644 --- a/examples/vdpa/Makefile +++ b/examples/vdpa/Makefile @@ -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 -- 2.20.1 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH 19.08 6/6] examples/vhost_crypto: support building from pkg-config info 2019-05-03 13:35 [dpdk-dev] [PATCH 19.08 0/6] improve building examples Bruce Richardson ` (5 preceding siblings ...) 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 5/6] examples/vdpa: support building from pkg-config info Bruce Richardson @ 2019-05-03 13:35 ` Bruce Richardson 2019-05-03 13:35 ` Bruce Richardson 2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 0/3] Fixes for building examples Bruce Richardson 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 0/5] improve " Bruce Richardson 8 siblings, 1 reply; 54+ messages in thread From: Bruce Richardson @ 2019-05-03 13:35 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson The 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. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- examples/vhost_crypto/Makefile | 55 +++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 8 deletions(-) diff --git a/examples/vhost_crypto/Makefile b/examples/vhost_crypto/Makefile index 80af3de0c..cec85896f 100644 --- a/examples/vhost_crypto/Makefile +++ b/examples/vhost_crypto/Makefile @@ -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 -- 2.20.1 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH 19.08 6/6] examples/vhost_crypto: support building from pkg-config info 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 6/6] examples/vhost_crypto: " Bruce Richardson @ 2019-05-03 13:35 ` Bruce Richardson 0 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-03 13:35 UTC (permalink / raw) To: dev; +Cc: Bruce Richardson The 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. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- examples/vhost_crypto/Makefile | 55 +++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 8 deletions(-) diff --git a/examples/vhost_crypto/Makefile b/examples/vhost_crypto/Makefile index 80af3de0c..cec85896f 100644 --- a/examples/vhost_crypto/Makefile +++ b/examples/vhost_crypto/Makefile @@ -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 -- 2.20.1 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH v2 0/3] Fixes for building examples 2019-05-03 13:35 [dpdk-dev] [PATCH 19.08 0/6] improve building examples Bruce Richardson ` (6 preceding siblings ...) 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 6/6] examples/vhost_crypto: " Bruce Richardson @ 2019-05-17 11:46 ` Bruce Richardson 2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 1/3] examples: fix install of sample apps if setting not provided Bruce Richardson ` (3 more replies) 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 0/5] improve " Bruce Richardson 8 siblings, 4 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-17 11:46 UTC (permalink / raw) To: dev; +Cc: bluca, 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. 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(-) -- 2.21.0 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH v2 1/3] examples: fix install of sample apps if setting not provided 2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 0/3] Fixes for building examples Bruce Richardson @ 2019-05-17 11:46 ` Bruce Richardson 2019-05-17 11:54 ` Bruce Richardson 2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 2/3] examples: remove auto-generation of examples list Bruce Richardson ` (2 subsequent siblings) 3 siblings, 1 reply; 54+ messages in thread From: Bruce Richardson @ 2019-05-17 11:46 UTC (permalink / raw) To: dev; +Cc: bluca, Bruce Richardson, stable 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") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- meson.build | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 46f9c5683..9cad43481 100644 --- a/meson.build +++ b/meson.build @@ -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') -- 2.21.0 ^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/3] examples: fix install of sample apps if setting not provided 2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 1/3] examples: fix install of sample apps if setting not provided Bruce Richardson @ 2019-05-17 11:54 ` Bruce Richardson 0 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-17 11:54 UTC (permalink / raw) To: dev; +Cc: bluca, stable On Fri, May 17, 2019 at 12:46:11PM +0100, Bruce Richardson wrote: > 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") > > Cc: stable@dpdk.org > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > --- > meson.build | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/meson.build b/meson.build > index 46f9c5683..9cad43481 100644 > --- a/meson.build > +++ b/meson.build > @@ -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') Self-nak, sorry. Need to take account of an empty "examples" value inside examples/meson.build. V3 to follow soon. :-( /Bruce ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH v2 2/3] examples: remove auto-generation of examples list 2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 0/3] Fixes for building examples Bruce Richardson 2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 1/3] examples: fix install of sample apps if setting not provided Bruce Richardson @ 2019-05-17 11:46 ` Bruce Richardson 2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 3/3] examples: fix make clean when using pkg-config for building Bruce Richardson 2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 0/3] Fixes for building examples Bruce Richardson 3 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-17 11:46 UTC (permalink / raw) To: dev; +Cc: bluca, Bruce Richardson, stable 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. This also fixes an issue with Windows builds, since "sh" is not available there. Fixes: 2daf565f91b5 ("examples: install as part of ninja install") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org> --- examples/meson.build | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/examples/meson.build b/examples/meson.build index 1a6134f12..8b6577cf7 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -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 -- 2.21.0 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH v2 3/3] examples: fix make clean when using pkg-config for building 2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 0/3] Fixes for building examples Bruce Richardson 2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 1/3] examples: fix install of sample apps if setting not provided Bruce Richardson 2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 2/3] examples: remove auto-generation of examples list Bruce Richardson @ 2019-05-17 11:46 ` Bruce Richardson 2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 0/3] Fixes for building examples Bruce Richardson 3 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-17 11:46 UTC (permalink / raw) To: dev; +Cc: bluca, Bruce Richardson, stable The "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 Fixes: 22119c4591a0 ("examples: use pkg-config in makefiles") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- 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(-) diff --git a/examples/bbdev_app/Makefile b/examples/bbdev_app/Makefile index e8115b46a..af313d926 100644 --- a/examples/bbdev_app/Makefile +++ b/examples/bbdev_app/Makefile @@ -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 diff --git a/examples/bond/Makefile b/examples/bond/Makefile index 488eeac70..278b5f690 100644 --- a/examples/bond/Makefile +++ b/examples/bond/Makefile @@ -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 diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile index a03dfa8ee..03d9ed3cc 100644 --- a/examples/cmdline/Makefile +++ b/examples/cmdline/Makefile @@ -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 diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile index 52076214b..2edc0ea3d 100644 --- a/examples/distributor/Makefile +++ b/examples/distributor/Makefile @@ -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 diff --git a/examples/eventdev_pipeline/Makefile b/examples/eventdev_pipeline/Makefile index 0b0d1ade9..1d3394947 100644 --- a/examples/eventdev_pipeline/Makefile +++ b/examples/eventdev_pipeline/Makefile @@ -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 diff --git a/examples/exception_path/Makefile b/examples/exception_path/Makefile index 18db85ddb..c3ba2787c 100644 --- a/examples/exception_path/Makefile +++ b/examples/exception_path/Makefile @@ -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 diff --git a/examples/fips_validation/Makefile b/examples/fips_validation/Makefile index e74252e27..19240911a 100644 --- a/examples/fips_validation/Makefile +++ b/examples/fips_validation/Makefile @@ -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 diff --git a/examples/flow_classify/Makefile b/examples/flow_classify/Makefile index dfce1a4bd..182debcba 100644 --- a/examples/flow_classify/Makefile +++ b/examples/flow_classify/Makefile @@ -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 diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile index f657c0336..b182a2a29 100644 --- a/examples/flow_filtering/Makefile +++ b/examples/flow_filtering/Makefile @@ -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 diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile index 97d82f68a..980b011fc 100644 --- a/examples/helloworld/Makefile +++ b/examples/helloworld/Makefile @@ -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 diff --git a/examples/ip_fragmentation/Makefile b/examples/ip_fragmentation/Makefile index 6d1a1fbba..56726d688 100644 --- a/examples/ip_fragmentation/Makefile +++ b/examples/ip_fragmentation/Makefile @@ -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 diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile index 409966afd..acd93e29b 100644 --- a/examples/ip_pipeline/Makefile +++ b/examples/ip_pipeline/Makefile @@ -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 diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile index 7bbc241c7..1baec86ad 100644 --- a/examples/ip_reassembly/Makefile +++ b/examples/ip_reassembly/Makefile @@ -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 diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile index 75f2bcd00..a2d8244e8 100644 --- a/examples/ipsec-secgw/Makefile +++ b/examples/ipsec-secgw/Makefile @@ -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 diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile index 5a1e368fa..5595b9cbf 100644 --- a/examples/ipv4_multicast/Makefile +++ b/examples/ipv4_multicast/Makefile @@ -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 diff --git a/examples/kni/Makefile b/examples/kni/Makefile index 634334f86..e01703567 100644 --- a/examples/kni/Makefile +++ b/examples/kni/Makefile @@ -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 diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile index fb3c4bc00..b4f729a66 100644 --- a/examples/l2fwd-cat/Makefile +++ b/examples/l2fwd-cat/Makefile @@ -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 diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile index ed5e2c73f..3986a4c10 100644 --- a/examples/l2fwd-crypto/Makefile +++ b/examples/l2fwd-crypto/Makefile @@ -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 diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile index e14c3a2b2..4517a3d7d 100644 --- a/examples/l2fwd-jobstats/Makefile +++ b/examples/l2fwd-jobstats/Makefile @@ -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 diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile index bc851b732..56d0e0666 100644 --- a/examples/l2fwd-keepalive/Makefile +++ b/examples/l2fwd-keepalive/Makefile @@ -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 diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile index 94d70a43e..43277318f 100644 --- a/examples/l2fwd/Makefile +++ b/examples/l2fwd/Makefile @@ -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 diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile index fc236f129..b38343725 100644 --- a/examples/l3fwd-acl/Makefile +++ b/examples/l3fwd-acl/Makefile @@ -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 diff --git a/examples/l3fwd-power/Makefile b/examples/l3fwd-power/Makefile index a106b0404..8a4eee8ae 100644 --- a/examples/l3fwd-power/Makefile +++ b/examples/l3fwd-power/Makefile @@ -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 diff --git a/examples/l3fwd-vf/Makefile b/examples/l3fwd-vf/Makefile index cc93603e3..8ad2fbcbc 100644 --- a/examples/l3fwd-vf/Makefile +++ b/examples/l3fwd-vf/Makefile @@ -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 diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile index 8c51c7b96..dcc38a928 100644 --- a/examples/l3fwd/Makefile +++ b/examples/l3fwd/Makefile @@ -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 diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile index d12e04782..987724d47 100644 --- a/examples/link_status_interrupt/Makefile +++ b/examples/link_status_interrupt/Makefile @@ -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 diff --git a/examples/load_balancer/Makefile b/examples/load_balancer/Makefile index d4b145ca1..935ee1591 100644 --- a/examples/load_balancer/Makefile +++ b/examples/load_balancer/Makefile @@ -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 diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile index 474ec9571..2c3187a41 100644 --- a/examples/packet_ordering/Makefile +++ b/examples/packet_ordering/Makefile @@ -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 diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile index f113c9d56..857a679b7 100644 --- a/examples/ptpclient/Makefile +++ b/examples/ptpclient/Makefile @@ -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 diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile index fbcda09b2..7321f34f3 100644 --- a/examples/qos_meter/Makefile +++ b/examples/qos_meter/Makefile @@ -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 diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile index a25875900..7012c3d4c 100644 --- a/examples/qos_sched/Makefile +++ b/examples/qos_sched/Makefile @@ -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 diff --git a/examples/rxtx_callbacks/Makefile b/examples/rxtx_callbacks/Makefile index b937d599b..22c4013db 100644 --- a/examples/rxtx_callbacks/Makefile +++ b/examples/rxtx_callbacks/Makefile @@ -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 diff --git a/examples/service_cores/Makefile b/examples/service_cores/Makefile index 351fb7e1d..1dcd4c62e 100644 --- a/examples/service_cores/Makefile +++ b/examples/service_cores/Makefile @@ -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 diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile index 56713a524..b9cd05f2f 100644 --- a/examples/skeleton/Makefile +++ b/examples/skeleton/Makefile @@ -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 diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile index f4b85e49b..3782378d9 100644 --- a/examples/tep_termination/Makefile +++ b/examples/tep_termination/Makefile @@ -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 diff --git a/examples/timer/Makefile b/examples/timer/Makefile index 046348fd1..f49703ff4 100644 --- a/examples/timer/Makefile +++ b/examples/timer/Makefile @@ -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 diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile index 80607b79c..9c3e0ece0 100644 --- a/examples/vhost/Makefile +++ b/examples/vhost/Makefile @@ -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 diff --git a/examples/vhost_scsi/Makefile b/examples/vhost_scsi/Makefile index 0a3450bae..813ab66a8 100644 --- a/examples/vhost_scsi/Makefile +++ b/examples/vhost_scsi/Makefile @@ -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 diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile index 6a389c776..b67d1937f 100644 --- a/examples/vmdq/Makefile +++ b/examples/vmdq/Makefile @@ -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 diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile index 113bce7d1..0ddcc320b 100644 --- a/examples/vmdq_dcb/Makefile +++ b/examples/vmdq_dcb/Makefile @@ -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 -- 2.21.0 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH v3 0/3] Fixes for building examples 2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 0/3] Fixes for building examples Bruce Richardson ` (2 preceding siblings ...) 2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 3/3] examples: fix make clean when using pkg-config for building Bruce Richardson @ 2019-05-17 12:02 ` Bruce Richardson 2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 1/3] examples: fix install of sample apps if setting not provided Bruce Richardson ` (3 more replies) 3 siblings, 4 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-17 12:02 UTC (permalink / raw) To: dev; +Cc: bluca, 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 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(-) -- 2.21.0 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH v3 1/3] examples: fix install of sample apps if setting not provided 2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 0/3] Fixes for building examples Bruce Richardson @ 2019-05-17 12:02 ` Bruce Richardson 2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 2/3] examples: remove auto-generation of examples list Bruce Richardson ` (2 subsequent siblings) 3 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-17 12:02 UTC (permalink / raw) To: dev; +Cc: bluca, Bruce Richardson, stable 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") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- examples/meson.build | 4 ++++ meson.build | 7 +++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/meson.build b/examples/meson.build index 1a6134f12..1995f4dcb 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -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 diff --git a/meson.build b/meson.build index 46f9c5683..9cad43481 100644 --- a/meson.build +++ b/meson.build @@ -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') -- 2.21.0 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH v3 2/3] examples: remove auto-generation of examples list 2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 0/3] Fixes for building examples Bruce Richardson 2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 1/3] examples: fix install of sample apps if setting not provided Bruce Richardson @ 2019-05-17 12:02 ` Bruce Richardson 2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 3/3] examples: fix make clean when using pkg-config for building Bruce Richardson 2019-05-17 13:12 ` [dpdk-dev] [PATCH v3 0/3] Fixes for building examples Luca Boccassi 3 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-17 12:02 UTC (permalink / raw) To: dev; +Cc: bluca, Bruce Richardson, stable 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. This also fixes an issue with Windows builds, since "sh" is not available there. Fixes: 2daf565f91b5 ("examples: install as part of ninja install") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org> --- examples/meson.build | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/examples/meson.build b/examples/meson.build index 1995f4dcb..de35656d4 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -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 -- 2.21.0 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH v3 3/3] examples: fix make clean when using pkg-config for building 2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 0/3] Fixes for building examples Bruce Richardson 2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 1/3] examples: fix install of sample apps if setting not provided Bruce Richardson 2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 2/3] examples: remove auto-generation of examples list Bruce Richardson @ 2019-05-17 12:02 ` Bruce Richardson 2019-05-17 13:12 ` [dpdk-dev] [PATCH v3 0/3] Fixes for building examples Luca Boccassi 3 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-17 12:02 UTC (permalink / raw) To: dev; +Cc: bluca, Bruce Richardson, stable The "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 Fixes: 22119c4591a0 ("examples: use pkg-config in makefiles") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- 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(-) diff --git a/examples/bbdev_app/Makefile b/examples/bbdev_app/Makefile index e8115b46a..af313d926 100644 --- a/examples/bbdev_app/Makefile +++ b/examples/bbdev_app/Makefile @@ -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 diff --git a/examples/bond/Makefile b/examples/bond/Makefile index 488eeac70..278b5f690 100644 --- a/examples/bond/Makefile +++ b/examples/bond/Makefile @@ -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 diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile index a03dfa8ee..03d9ed3cc 100644 --- a/examples/cmdline/Makefile +++ b/examples/cmdline/Makefile @@ -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 diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile index 52076214b..2edc0ea3d 100644 --- a/examples/distributor/Makefile +++ b/examples/distributor/Makefile @@ -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 diff --git a/examples/eventdev_pipeline/Makefile b/examples/eventdev_pipeline/Makefile index 0b0d1ade9..1d3394947 100644 --- a/examples/eventdev_pipeline/Makefile +++ b/examples/eventdev_pipeline/Makefile @@ -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 diff --git a/examples/exception_path/Makefile b/examples/exception_path/Makefile index 18db85ddb..c3ba2787c 100644 --- a/examples/exception_path/Makefile +++ b/examples/exception_path/Makefile @@ -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 diff --git a/examples/fips_validation/Makefile b/examples/fips_validation/Makefile index e74252e27..19240911a 100644 --- a/examples/fips_validation/Makefile +++ b/examples/fips_validation/Makefile @@ -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 diff --git a/examples/flow_classify/Makefile b/examples/flow_classify/Makefile index dfce1a4bd..182debcba 100644 --- a/examples/flow_classify/Makefile +++ b/examples/flow_classify/Makefile @@ -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 diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile index f657c0336..b182a2a29 100644 --- a/examples/flow_filtering/Makefile +++ b/examples/flow_filtering/Makefile @@ -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 diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile index 97d82f68a..980b011fc 100644 --- a/examples/helloworld/Makefile +++ b/examples/helloworld/Makefile @@ -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 diff --git a/examples/ip_fragmentation/Makefile b/examples/ip_fragmentation/Makefile index 6d1a1fbba..56726d688 100644 --- a/examples/ip_fragmentation/Makefile +++ b/examples/ip_fragmentation/Makefile @@ -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 diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile index 409966afd..acd93e29b 100644 --- a/examples/ip_pipeline/Makefile +++ b/examples/ip_pipeline/Makefile @@ -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 diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile index 7bbc241c7..1baec86ad 100644 --- a/examples/ip_reassembly/Makefile +++ b/examples/ip_reassembly/Makefile @@ -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 diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile index 75f2bcd00..a2d8244e8 100644 --- a/examples/ipsec-secgw/Makefile +++ b/examples/ipsec-secgw/Makefile @@ -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 diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile index 5a1e368fa..5595b9cbf 100644 --- a/examples/ipv4_multicast/Makefile +++ b/examples/ipv4_multicast/Makefile @@ -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 diff --git a/examples/kni/Makefile b/examples/kni/Makefile index 634334f86..e01703567 100644 --- a/examples/kni/Makefile +++ b/examples/kni/Makefile @@ -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 diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile index fb3c4bc00..b4f729a66 100644 --- a/examples/l2fwd-cat/Makefile +++ b/examples/l2fwd-cat/Makefile @@ -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 diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile index ed5e2c73f..3986a4c10 100644 --- a/examples/l2fwd-crypto/Makefile +++ b/examples/l2fwd-crypto/Makefile @@ -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 diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile index e14c3a2b2..4517a3d7d 100644 --- a/examples/l2fwd-jobstats/Makefile +++ b/examples/l2fwd-jobstats/Makefile @@ -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 diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile index bc851b732..56d0e0666 100644 --- a/examples/l2fwd-keepalive/Makefile +++ b/examples/l2fwd-keepalive/Makefile @@ -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 diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile index 94d70a43e..43277318f 100644 --- a/examples/l2fwd/Makefile +++ b/examples/l2fwd/Makefile @@ -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 diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile index fc236f129..b38343725 100644 --- a/examples/l3fwd-acl/Makefile +++ b/examples/l3fwd-acl/Makefile @@ -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 diff --git a/examples/l3fwd-power/Makefile b/examples/l3fwd-power/Makefile index a106b0404..8a4eee8ae 100644 --- a/examples/l3fwd-power/Makefile +++ b/examples/l3fwd-power/Makefile @@ -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 diff --git a/examples/l3fwd-vf/Makefile b/examples/l3fwd-vf/Makefile index cc93603e3..8ad2fbcbc 100644 --- a/examples/l3fwd-vf/Makefile +++ b/examples/l3fwd-vf/Makefile @@ -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 diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile index 8c51c7b96..dcc38a928 100644 --- a/examples/l3fwd/Makefile +++ b/examples/l3fwd/Makefile @@ -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 diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile index d12e04782..987724d47 100644 --- a/examples/link_status_interrupt/Makefile +++ b/examples/link_status_interrupt/Makefile @@ -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 diff --git a/examples/load_balancer/Makefile b/examples/load_balancer/Makefile index d4b145ca1..935ee1591 100644 --- a/examples/load_balancer/Makefile +++ b/examples/load_balancer/Makefile @@ -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 diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile index 474ec9571..2c3187a41 100644 --- a/examples/packet_ordering/Makefile +++ b/examples/packet_ordering/Makefile @@ -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 diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile index f113c9d56..857a679b7 100644 --- a/examples/ptpclient/Makefile +++ b/examples/ptpclient/Makefile @@ -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 diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile index fbcda09b2..7321f34f3 100644 --- a/examples/qos_meter/Makefile +++ b/examples/qos_meter/Makefile @@ -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 diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile index a25875900..7012c3d4c 100644 --- a/examples/qos_sched/Makefile +++ b/examples/qos_sched/Makefile @@ -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 diff --git a/examples/rxtx_callbacks/Makefile b/examples/rxtx_callbacks/Makefile index b937d599b..22c4013db 100644 --- a/examples/rxtx_callbacks/Makefile +++ b/examples/rxtx_callbacks/Makefile @@ -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 diff --git a/examples/service_cores/Makefile b/examples/service_cores/Makefile index 351fb7e1d..1dcd4c62e 100644 --- a/examples/service_cores/Makefile +++ b/examples/service_cores/Makefile @@ -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 diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile index 56713a524..b9cd05f2f 100644 --- a/examples/skeleton/Makefile +++ b/examples/skeleton/Makefile @@ -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 diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile index f4b85e49b..3782378d9 100644 --- a/examples/tep_termination/Makefile +++ b/examples/tep_termination/Makefile @@ -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 diff --git a/examples/timer/Makefile b/examples/timer/Makefile index 046348fd1..f49703ff4 100644 --- a/examples/timer/Makefile +++ b/examples/timer/Makefile @@ -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 diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile index 80607b79c..9c3e0ece0 100644 --- a/examples/vhost/Makefile +++ b/examples/vhost/Makefile @@ -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 diff --git a/examples/vhost_scsi/Makefile b/examples/vhost_scsi/Makefile index 0a3450bae..813ab66a8 100644 --- a/examples/vhost_scsi/Makefile +++ b/examples/vhost_scsi/Makefile @@ -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 diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile index 6a389c776..b67d1937f 100644 --- a/examples/vmdq/Makefile +++ b/examples/vmdq/Makefile @@ -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 diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile index 113bce7d1..0ddcc320b 100644 --- a/examples/vmdq_dcb/Makefile +++ b/examples/vmdq_dcb/Makefile @@ -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 -- 2.21.0 ^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/3] Fixes for building examples 2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 0/3] Fixes for building examples Bruce Richardson ` (2 preceding siblings ...) 2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 3/3] examples: fix make clean when using pkg-config for building Bruce Richardson @ 2019-05-17 13:12 ` Luca Boccassi 2019-05-20 21:59 ` Thomas Monjalon 3 siblings, 1 reply; 54+ messages in thread From: Luca Boccassi @ 2019-05-17 13:12 UTC (permalink / raw) To: Bruce Richardson, dev On Fri, 2019-05-17 at 13:02 +0100, Bruce Richardson wrote: > 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 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(-) Series-acked-by: Luca Boccassi <bluca@debian.org> -- Kind regards, Luca Boccassi ^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/3] Fixes for building examples 2019-05-17 13:12 ` [dpdk-dev] [PATCH v3 0/3] Fixes for building examples Luca Boccassi @ 2019-05-20 21:59 ` Thomas Monjalon 0 siblings, 0 replies; 54+ messages in thread From: Thomas Monjalon @ 2019-05-20 21:59 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, Luca Boccassi 17/05/2019 15:12, Luca Boccassi: > On Fri, 2019-05-17 at 13:02 +0100, Bruce Richardson wrote: > > 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 building > > Series-acked-by: Luca Boccassi <bluca@debian.org> Applied, thanks ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH v2 0/5] improve building examples 2019-05-03 13:35 [dpdk-dev] [PATCH 19.08 0/6] improve building examples Bruce Richardson ` (7 preceding siblings ...) 2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 0/3] Fixes for building examples Bruce Richardson @ 2019-05-17 11:47 ` Bruce Richardson 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 1/5] examples: add support for relocated DPDK install Bruce Richardson ` (6 more replies) 8 siblings, 7 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-17 11:47 UTC (permalink / raw) To: dev; +Cc: bluca, 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 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(-) -- 2.21.0 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH v2 1/5] examples: add support for relocated DPDK install 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 0/5] improve " Bruce Richardson @ 2019-05-17 11:47 ` Bruce Richardson 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 2/5] devtools/test-meson-builds: remove dependency on clang Bruce Richardson ` (5 subsequent siblings) 6 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-17 11:47 UTC (permalink / raw) To: dev; +Cc: bluca, 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 <bruce.richardson@intel.com> --- 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(-) diff --git a/examples/bbdev_app/Makefile b/examples/bbdev_app/Makefile index af313d926..2bf97e415 100644 --- a/examples/bbdev_app/Makefile +++ b/examples/bbdev_app/Makefile @@ -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 diff --git a/examples/bond/Makefile b/examples/bond/Makefile index 278b5f690..96868f2fc 100644 --- a/examples/bond/Makefile +++ b/examples/bond/Makefile @@ -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 diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile index 03d9ed3cc..9b757316f 100644 --- a/examples/cmdline/Makefile +++ b/examples/cmdline/Makefile @@ -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) diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile index 2edc0ea3d..6aa5e7a9e 100644 --- a/examples/distributor/Makefile +++ b/examples/distributor/Makefile @@ -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) diff --git a/examples/eventdev_pipeline/Makefile b/examples/eventdev_pipeline/Makefile index 1d3394947..626d56024 100644 --- a/examples/eventdev_pipeline/Makefile +++ b/examples/eventdev_pipeline/Makefile @@ -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) diff --git a/examples/exception_path/Makefile b/examples/exception_path/Makefile index c3ba2787c..dc891b3d1 100644 --- a/examples/exception_path/Makefile +++ b/examples/exception_path/Makefile @@ -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) diff --git a/examples/fips_validation/Makefile b/examples/fips_validation/Makefile index 19240911a..f8cbba592 100644 --- a/examples/fips_validation/Makefile +++ b/examples/fips_validation/Makefile @@ -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) diff --git a/examples/flow_classify/Makefile b/examples/flow_classify/Makefile index 182debcba..aca7772b4 100644 --- a/examples/flow_classify/Makefile +++ b/examples/flow_classify/Makefile @@ -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 diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile index b182a2a29..a64a10a08 100644 --- a/examples/flow_filtering/Makefile +++ b/examples/flow_filtering/Makefile @@ -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) diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile index 980b011fc..2ab294091 100644 --- a/examples/helloworld/Makefile +++ b/examples/helloworld/Makefile @@ -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) diff --git a/examples/ip_fragmentation/Makefile b/examples/ip_fragmentation/Makefile index 56726d688..63b66ce25 100644 --- a/examples/ip_fragmentation/Makefile +++ b/examples/ip_fragmentation/Makefile @@ -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) diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile index acd93e29b..1553d705d 100644 --- a/examples/ip_pipeline/Makefile +++ b/examples/ip_pipeline/Makefile @@ -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. diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile index 1baec86ad..5af5d63bd 100644 --- a/examples/ip_reassembly/Makefile +++ b/examples/ip_reassembly/Makefile @@ -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) diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile index a2d8244e8..1bfaf3b9a 100644 --- a/examples/ipsec-secgw/Makefile +++ b/examples/ipsec-secgw/Makefile @@ -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 diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile index 5595b9cbf..a03bfadbf 100644 --- a/examples/ipv4_multicast/Makefile +++ b/examples/ipv4_multicast/Makefile @@ -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) diff --git a/examples/kni/Makefile b/examples/kni/Makefile index e01703567..46f592692 100644 --- a/examples/kni/Makefile +++ b/examples/kni/Makefile @@ -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) diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile index b4f729a66..e83d406b0 100644 --- a/examples/l2fwd-cat/Makefile +++ b/examples/l2fwd-cat/Makefile @@ -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 diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile index 3986a4c10..87d311193 100644 --- a/examples/l2fwd-crypto/Makefile +++ b/examples/l2fwd-crypto/Makefile @@ -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) diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile index 4517a3d7d..d63ece8e3 100644 --- a/examples/l2fwd-jobstats/Makefile +++ b/examples/l2fwd-jobstats/Makefile @@ -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) diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile index 56d0e0666..9b92bc238 100644 --- a/examples/l2fwd-keepalive/Makefile +++ b/examples/l2fwd-keepalive/Makefile @@ -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) diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile index 43277318f..fb352e1b7 100644 --- a/examples/l2fwd/Makefile +++ b/examples/l2fwd/Makefile @@ -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) diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile index b38343725..d12d3a987 100644 --- a/examples/l3fwd-acl/Makefile +++ b/examples/l3fwd-acl/Makefile @@ -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) diff --git a/examples/l3fwd-power/Makefile b/examples/l3fwd-power/Makefile index 8a4eee8ae..befb7555f 100644 --- a/examples/l3fwd-power/Makefile +++ b/examples/l3fwd-power/Makefile @@ -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 diff --git a/examples/l3fwd-vf/Makefile b/examples/l3fwd-vf/Makefile index 8ad2fbcbc..892ecf38b 100644 --- a/examples/l3fwd-vf/Makefile +++ b/examples/l3fwd-vf/Makefile @@ -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) diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile index dcc38a928..52976880a 100644 --- a/examples/l3fwd/Makefile +++ b/examples/l3fwd/Makefile @@ -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) diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile index 987724d47..77774eda7 100644 --- a/examples/link_status_interrupt/Makefile +++ b/examples/link_status_interrupt/Makefile @@ -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) diff --git a/examples/load_balancer/Makefile b/examples/load_balancer/Makefile index 935ee1591..09676a57c 100644 --- a/examples/load_balancer/Makefile +++ b/examples/load_balancer/Makefile @@ -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) diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile index 2c3187a41..eb01b2d5b 100644 --- a/examples/packet_ordering/Makefile +++ b/examples/packet_ordering/Makefile @@ -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) diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile index 857a679b7..019476a7a 100644 --- a/examples/ptpclient/Makefile +++ b/examples/ptpclient/Makefile @@ -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) diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile index 7321f34f3..e4d170177 100644 --- a/examples/qos_meter/Makefile +++ b/examples/qos_meter/Makefile @@ -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 diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile index 7012c3d4c..0c92c4866 100644 --- a/examples/qos_sched/Makefile +++ b/examples/qos_sched/Makefile @@ -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) diff --git a/examples/rxtx_callbacks/Makefile b/examples/rxtx_callbacks/Makefile index 22c4013db..15866ca67 100644 --- a/examples/rxtx_callbacks/Makefile +++ b/examples/rxtx_callbacks/Makefile @@ -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) diff --git a/examples/service_cores/Makefile b/examples/service_cores/Makefile index 1dcd4c62e..ae7d6478c 100644 --- a/examples/service_cores/Makefile +++ b/examples/service_cores/Makefile @@ -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) diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile index b9cd05f2f..68454a558 100644 --- a/examples/skeleton/Makefile +++ b/examples/skeleton/Makefile @@ -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) diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile index 3782378d9..be5aa9a64 100644 --- a/examples/tep_termination/Makefile +++ b/examples/tep_termination/Makefile @@ -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 diff --git a/examples/timer/Makefile b/examples/timer/Makefile index f49703ff4..d21e4c63c 100644 --- a/examples/timer/Makefile +++ b/examples/timer/Makefile @@ -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) diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile index 9c3e0ece0..5e1400678 100644 --- a/examples/vhost/Makefile +++ b/examples/vhost/Makefile @@ -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 diff --git a/examples/vhost_scsi/Makefile b/examples/vhost_scsi/Makefile index 813ab66a8..3ea37ebc6 100644 --- a/examples/vhost_scsi/Makefile +++ b/examples/vhost_scsi/Makefile @@ -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) diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile index b67d1937f..dc1bc82d0 100644 --- a/examples/vmdq/Makefile +++ b/examples/vmdq/Makefile @@ -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) diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile index 0ddcc320b..a77e78987 100644 --- a/examples/vmdq_dcb/Makefile +++ b/examples/vmdq_dcb/Makefile @@ -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) -- 2.21.0 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH v2 2/5] devtools/test-meson-builds: remove dependency on clang 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 0/5] improve " Bruce Richardson 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 1/5] examples: add support for relocated DPDK install Bruce Richardson @ 2019-05-17 11:47 ` Bruce Richardson 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 3/5] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson ` (4 subsequent siblings) 6 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-17 11:47 UTC (permalink / raw) To: dev; +Cc: bluca, Bruce Richardson Allow the script to run with a reduced set of builds if clang, or other compilers, are missing. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- devtools/test-meson-builds.sh | 38 ++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 630a1a6fe..fe11e3c0a 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -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 -- 2.21.0 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH v2 3/5] devtools/test-meson-builds: add testing of pkg-config file 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 0/5] improve " Bruce Richardson 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 1/5] examples: add support for relocated DPDK install Bruce Richardson 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 2/5] devtools/test-meson-builds: remove dependency on clang Bruce Richardson @ 2019-05-17 11:47 ` Bruce Richardson 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 4/5] examples/vdpa: support building from pkg-config info Bruce Richardson ` (3 subsequent siblings) 6 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-17 11:47 UTC (permalink / raw) To: dev; +Cc: bluca, Bruce Richardson The 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. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org> --- devtools/test-meson-builds.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index fe11e3c0a..57d1af47e 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -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 -- 2.21.0 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH v2 4/5] examples/vdpa: support building from pkg-config info 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 0/5] improve " Bruce Richardson ` (2 preceding siblings ...) 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 3/5] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson @ 2019-05-17 11:47 ` Bruce Richardson 2019-07-02 7:57 ` Thomas Monjalon 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 5/5] examples/vhost_crypto: " Bruce Richardson ` (2 subsequent siblings) 6 siblings, 1 reply; 54+ messages in thread From: Bruce Richardson @ 2019-05-17 11:47 UTC (permalink / raw) To: dev; +Cc: bluca, Bruce Richardson 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. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- examples/vdpa/Makefile | 52 +++++++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 8 deletions(-) diff --git a/examples/vdpa/Makefile b/examples/vdpa/Makefile index 9d16d8eb5..05a9b9029 100644 --- a/examples/vdpa/Makefile +++ b/examples/vdpa/Makefile @@ -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 -- 2.21.0 ^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [dpdk-dev] [PATCH v2 4/5] examples/vdpa: support building from pkg-config info 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 4/5] examples/vdpa: support building from pkg-config info Bruce Richardson @ 2019-07-02 7:57 ` Thomas Monjalon 2019-07-02 14:35 ` Bruce Richardson 0 siblings, 1 reply; 54+ messages in thread From: Thomas Monjalon @ 2019-07-02 7:57 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, bluca 17/05/2019 13:47, Bruce Richardson: > 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.c examples/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. > +build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build Better to use the real directory name as prerequisite, instead of "build". ^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [dpdk-dev] [PATCH v2 4/5] examples/vdpa: support building from pkg-config info 2019-07-02 7:57 ` Thomas Monjalon @ 2019-07-02 14:35 ` Bruce Richardson 2019-07-02 15:00 ` Thomas Monjalon 0 siblings, 1 reply; 54+ messages in thread From: Bruce Richardson @ 2019-07-02 14:35 UTC (permalink / raw) To: Thomas Monjalon; +Cc: dev, bluca On Tue, Jul 02, 2019 at 09:57:48AM +0200, Thomas Monjalon wrote: > 17/05/2019 13:47, Bruce Richardson: > > 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.c > examples/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. > > +build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build > > Better 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 ^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [dpdk-dev] [PATCH v2 4/5] examples/vdpa: support building from pkg-config info 2019-07-02 14:35 ` Bruce Richardson @ 2019-07-02 15:00 ` Thomas Monjalon 0 siblings, 0 replies; 54+ messages in thread From: Thomas Monjalon @ 2019-07-02 15:00 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, bluca 02/07/2019 16:35, Bruce Richardson: > On Tue, Jul 02, 2019 at 09:57:48AM +0200, Thomas Monjalon wrote: > > 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. OK > > > +build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build > > > > Better 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 :) ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH v2 5/5] examples/vhost_crypto: support building from pkg-config info 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 0/5] improve " Bruce Richardson ` (3 preceding siblings ...) 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 4/5] examples/vdpa: support building from pkg-config info Bruce Richardson @ 2019-05-17 11:47 ` Bruce Richardson 2019-05-17 13:14 ` [dpdk-dev] [PATCH v2 0/5] improve building examples Luca Boccassi 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 " Bruce Richardson 6 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-05-17 11:47 UTC (permalink / raw) To: dev; +Cc: bluca, Bruce Richardson The 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. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> --- examples/vhost_crypto/Makefile | 52 ++++++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 8 deletions(-) diff --git a/examples/vhost_crypto/Makefile b/examples/vhost_crypto/Makefile index 80af3de0c..f22d7b6d3 100644 --- a/examples/vhost_crypto/Makefile +++ b/examples/vhost_crypto/Makefile @@ -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 -- 2.21.0 ^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/5] improve building examples 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 0/5] improve " Bruce Richardson ` (4 preceding siblings ...) 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 5/5] examples/vhost_crypto: " Bruce Richardson @ 2019-05-17 13:14 ` Luca Boccassi 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 " Bruce Richardson 6 siblings, 0 replies; 54+ messages in thread From: Luca Boccassi @ 2019-05-17 13:14 UTC (permalink / raw) To: Bruce Richardson, dev On Fri, 2019-05-17 at 12:47 +0100, Bruce Richardson wrote: > 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 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(-) Series-acked-by: Luca Boccassi <bluca@debian.org> -- Kind regards, Luca Boccassi ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH v3 0/5] improve building examples 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 0/5] improve " Bruce Richardson ` (5 preceding siblings ...) 2019-05-17 13:14 ` [dpdk-dev] [PATCH v2 0/5] improve building examples Luca Boccassi @ 2019-07-02 14:44 ` Bruce Richardson 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 1/5] examples: add support for relocated DPDK install Bruce Richardson ` (5 more replies) 6 siblings, 6 replies; 54+ messages in thread From: Bruce Richardson @ 2019-07-02 14:44 UTC (permalink / raw) To: dev; +Cc: thomas, bluca, 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. 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(-) -- 2.21.0 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH v3 1/5] examples: add support for relocated DPDK install 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 " Bruce Richardson @ 2019-07-02 14:44 ` Bruce Richardson 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 2/5] devtools/test-meson-builds: remove dependency on clang Bruce Richardson ` (4 subsequent siblings) 5 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-07-02 14:44 UTC (permalink / raw) To: dev; +Cc: thomas, bluca, 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 <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org> --- 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(-) diff --git a/examples/bbdev_app/Makefile b/examples/bbdev_app/Makefile index af313d926..2bf97e415 100644 --- a/examples/bbdev_app/Makefile +++ b/examples/bbdev_app/Makefile @@ -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 diff --git a/examples/bond/Makefile b/examples/bond/Makefile index 278b5f690..96868f2fc 100644 --- a/examples/bond/Makefile +++ b/examples/bond/Makefile @@ -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 diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile index 03d9ed3cc..9b757316f 100644 --- a/examples/cmdline/Makefile +++ b/examples/cmdline/Makefile @@ -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) diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile index 2edc0ea3d..6aa5e7a9e 100644 --- a/examples/distributor/Makefile +++ b/examples/distributor/Makefile @@ -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) diff --git a/examples/eventdev_pipeline/Makefile b/examples/eventdev_pipeline/Makefile index 1d3394947..626d56024 100644 --- a/examples/eventdev_pipeline/Makefile +++ b/examples/eventdev_pipeline/Makefile @@ -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) diff --git a/examples/exception_path/Makefile b/examples/exception_path/Makefile index c3ba2787c..dc891b3d1 100644 --- a/examples/exception_path/Makefile +++ b/examples/exception_path/Makefile @@ -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) diff --git a/examples/fips_validation/Makefile b/examples/fips_validation/Makefile index 19240911a..f8cbba592 100644 --- a/examples/fips_validation/Makefile +++ b/examples/fips_validation/Makefile @@ -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) diff --git a/examples/flow_classify/Makefile b/examples/flow_classify/Makefile index 182debcba..aca7772b4 100644 --- a/examples/flow_classify/Makefile +++ b/examples/flow_classify/Makefile @@ -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 diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile index b182a2a29..a64a10a08 100644 --- a/examples/flow_filtering/Makefile +++ b/examples/flow_filtering/Makefile @@ -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) diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile index 980b011fc..2ab294091 100644 --- a/examples/helloworld/Makefile +++ b/examples/helloworld/Makefile @@ -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) diff --git a/examples/ip_fragmentation/Makefile b/examples/ip_fragmentation/Makefile index 56726d688..63b66ce25 100644 --- a/examples/ip_fragmentation/Makefile +++ b/examples/ip_fragmentation/Makefile @@ -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) diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile index acd93e29b..1553d705d 100644 --- a/examples/ip_pipeline/Makefile +++ b/examples/ip_pipeline/Makefile @@ -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. diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile index 1baec86ad..5af5d63bd 100644 --- a/examples/ip_reassembly/Makefile +++ b/examples/ip_reassembly/Makefile @@ -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) diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile index a2d8244e8..1bfaf3b9a 100644 --- a/examples/ipsec-secgw/Makefile +++ b/examples/ipsec-secgw/Makefile @@ -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 diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile index 5595b9cbf..a03bfadbf 100644 --- a/examples/ipv4_multicast/Makefile +++ b/examples/ipv4_multicast/Makefile @@ -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) diff --git a/examples/kni/Makefile b/examples/kni/Makefile index e01703567..46f592692 100644 --- a/examples/kni/Makefile +++ b/examples/kni/Makefile @@ -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) diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile index b4f729a66..e83d406b0 100644 --- a/examples/l2fwd-cat/Makefile +++ b/examples/l2fwd-cat/Makefile @@ -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 diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile index 3986a4c10..87d311193 100644 --- a/examples/l2fwd-crypto/Makefile +++ b/examples/l2fwd-crypto/Makefile @@ -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) diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile index 4517a3d7d..d63ece8e3 100644 --- a/examples/l2fwd-jobstats/Makefile +++ b/examples/l2fwd-jobstats/Makefile @@ -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) diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile index 56d0e0666..9b92bc238 100644 --- a/examples/l2fwd-keepalive/Makefile +++ b/examples/l2fwd-keepalive/Makefile @@ -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) diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile index 43277318f..fb352e1b7 100644 --- a/examples/l2fwd/Makefile +++ b/examples/l2fwd/Makefile @@ -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) diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile index b38343725..d12d3a987 100644 --- a/examples/l3fwd-acl/Makefile +++ b/examples/l3fwd-acl/Makefile @@ -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) diff --git a/examples/l3fwd-power/Makefile b/examples/l3fwd-power/Makefile index 2b749d5c3..359f323dc 100644 --- a/examples/l3fwd-power/Makefile +++ b/examples/l3fwd-power/Makefile @@ -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 diff --git a/examples/l3fwd-vf/Makefile b/examples/l3fwd-vf/Makefile index 8ad2fbcbc..892ecf38b 100644 --- a/examples/l3fwd-vf/Makefile +++ b/examples/l3fwd-vf/Makefile @@ -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) diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile index dcc38a928..52976880a 100644 --- a/examples/l3fwd/Makefile +++ b/examples/l3fwd/Makefile @@ -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) diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile index 987724d47..77774eda7 100644 --- a/examples/link_status_interrupt/Makefile +++ b/examples/link_status_interrupt/Makefile @@ -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) diff --git a/examples/load_balancer/Makefile b/examples/load_balancer/Makefile index 935ee1591..09676a57c 100644 --- a/examples/load_balancer/Makefile +++ b/examples/load_balancer/Makefile @@ -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) diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile index 2c3187a41..eb01b2d5b 100644 --- a/examples/packet_ordering/Makefile +++ b/examples/packet_ordering/Makefile @@ -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) diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile index 857a679b7..019476a7a 100644 --- a/examples/ptpclient/Makefile +++ b/examples/ptpclient/Makefile @@ -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) diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile index 7321f34f3..e4d170177 100644 --- a/examples/qos_meter/Makefile +++ b/examples/qos_meter/Makefile @@ -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 diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile index 7012c3d4c..0c92c4866 100644 --- a/examples/qos_sched/Makefile +++ b/examples/qos_sched/Makefile @@ -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) diff --git a/examples/rxtx_callbacks/Makefile b/examples/rxtx_callbacks/Makefile index a2fb1e3b0..2ababd2e4 100644 --- a/examples/rxtx_callbacks/Makefile +++ b/examples/rxtx_callbacks/Makefile @@ -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) diff --git a/examples/service_cores/Makefile b/examples/service_cores/Makefile index 1dcd4c62e..ae7d6478c 100644 --- a/examples/service_cores/Makefile +++ b/examples/service_cores/Makefile @@ -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) diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile index b9cd05f2f..68454a558 100644 --- a/examples/skeleton/Makefile +++ b/examples/skeleton/Makefile @@ -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) diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile index 3782378d9..be5aa9a64 100644 --- a/examples/tep_termination/Makefile +++ b/examples/tep_termination/Makefile @@ -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 diff --git a/examples/timer/Makefile b/examples/timer/Makefile index f49703ff4..d21e4c63c 100644 --- a/examples/timer/Makefile +++ b/examples/timer/Makefile @@ -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) diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile index 9c3e0ece0..5e1400678 100644 --- a/examples/vhost/Makefile +++ b/examples/vhost/Makefile @@ -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 diff --git a/examples/vhost_scsi/Makefile b/examples/vhost_scsi/Makefile index 813ab66a8..3ea37ebc6 100644 --- a/examples/vhost_scsi/Makefile +++ b/examples/vhost_scsi/Makefile @@ -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) diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile index b67d1937f..dc1bc82d0 100644 --- a/examples/vmdq/Makefile +++ b/examples/vmdq/Makefile @@ -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) diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile index 0ddcc320b..a77e78987 100644 --- a/examples/vmdq_dcb/Makefile +++ b/examples/vmdq_dcb/Makefile @@ -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) -- 2.21.0 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH v3 2/5] devtools/test-meson-builds: remove dependency on clang 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 " Bruce Richardson 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 1/5] examples: add support for relocated DPDK install Bruce Richardson @ 2019-07-02 14:44 ` Bruce Richardson 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 3/5] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson ` (3 subsequent siblings) 5 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-07-02 14:44 UTC (permalink / raw) To: dev; +Cc: thomas, bluca, Bruce Richardson Allow the script to run with a reduced set of builds if clang, or other compilers, are missing. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org> --- devtools/test-meson-builds.sh | 38 ++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 630a1a6fe..fe11e3c0a 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -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 -- 2.21.0 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH v3 3/5] devtools/test-meson-builds: add testing of pkg-config file 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 " Bruce Richardson 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 1/5] examples: add support for relocated DPDK install Bruce Richardson 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 2/5] devtools/test-meson-builds: remove dependency on clang Bruce Richardson @ 2019-07-02 14:44 ` Bruce Richardson 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 4/5] examples/vdpa: support building from pkg-config info Bruce Richardson ` (2 subsequent siblings) 5 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-07-02 14:44 UTC (permalink / raw) To: dev; +Cc: thomas, bluca, Bruce Richardson The 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. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org> --- devtools/test-meson-builds.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index fe11e3c0a..57d1af47e 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -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 -- 2.21.0 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH v3 4/5] examples/vdpa: support building from pkg-config info 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 " Bruce Richardson ` (2 preceding siblings ...) 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 3/5] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson @ 2019-07-02 14:44 ` Bruce Richardson 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 5/5] examples/vhost_crypto: " Bruce Richardson 2019-07-02 16:12 ` [dpdk-dev] [PATCH v3 0/5] improve building examples Thomas Monjalon 5 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-07-02 14:44 UTC (permalink / raw) To: dev; +Cc: thomas, bluca, Bruce Richardson 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. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org> --- examples/vdpa/Makefile | 51 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/examples/vdpa/Makefile b/examples/vdpa/Makefile index ab2bbdf76..734042380 100644 --- a/examples/vdpa/Makefile +++ b/examples/vdpa/Makefile @@ -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 -- 2.21.0 ^ permalink raw reply [flat|nested] 54+ messages in thread
* [dpdk-dev] [PATCH v3 5/5] examples/vhost_crypto: support building from pkg-config info 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 " Bruce Richardson ` (3 preceding siblings ...) 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 4/5] examples/vdpa: support building from pkg-config info Bruce Richardson @ 2019-07-02 14:44 ` Bruce Richardson 2019-07-02 16:12 ` [dpdk-dev] [PATCH v3 0/5] improve building examples Thomas Monjalon 5 siblings, 0 replies; 54+ messages in thread From: Bruce Richardson @ 2019-07-02 14:44 UTC (permalink / raw) To: dev; +Cc: thomas, bluca, Bruce Richardson The 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. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org> --- examples/vhost_crypto/Makefile | 51 +++++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/examples/vhost_crypto/Makefile b/examples/vhost_crypto/Makefile index 80af3de0c..e7958b5ba 100644 --- a/examples/vhost_crypto/Makefile +++ b/examples/vhost_crypto/Makefile @@ -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 -- 2.21.0 ^ permalink raw reply [flat|nested] 54+ messages in thread
* Re: [dpdk-dev] [PATCH v3 0/5] improve building examples 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 " Bruce Richardson ` (4 preceding siblings ...) 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 5/5] examples/vhost_crypto: " Bruce Richardson @ 2019-07-02 16:12 ` Thomas Monjalon 5 siblings, 0 replies; 54+ messages in thread From: Thomas Monjalon @ 2019-07-02 16:12 UTC (permalink / raw) To: Bruce Richardson; +Cc: dev, bluca > 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 ^ permalink raw reply [flat|nested] 54+ messages in thread
end of thread, other threads:[~2019-07-02 16:13 UTC | newest] Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-05-03 13:35 [dpdk-dev] [PATCH 19.08 0/6] improve building examples Bruce Richardson 2019-05-03 13:35 ` Bruce Richardson 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 1/6] examples: remove auto-generation of examples list Bruce Richardson 2019-05-03 13:35 ` Bruce Richardson 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 2/6] examples: add support for relocated DPDK install Bruce Richardson 2019-05-03 13:35 ` Bruce Richardson 2019-05-07 10:09 ` Luca Boccassi 2019-05-07 10:09 ` Luca Boccassi 2019-05-07 10:50 ` Bruce Richardson 2019-05-07 10:50 ` Bruce Richardson 2019-05-07 13:28 ` Luca Boccassi 2019-05-07 13:28 ` Luca Boccassi 2019-05-07 15:17 ` Bruce Richardson 2019-05-07 15:17 ` Bruce Richardson 2019-05-07 15:53 ` Luca Boccassi 2019-05-07 15:53 ` Luca Boccassi 2019-05-07 16:04 ` Bruce Richardson 2019-05-07 16:04 ` Bruce Richardson 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 3/6] devtools/test-meson-builds: remove dependency on clang Bruce Richardson 2019-05-03 13:35 ` Bruce Richardson 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 4/6] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson 2019-05-03 13:35 ` Bruce Richardson 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 5/6] examples/vdpa: support building from pkg-config info Bruce Richardson 2019-05-03 13:35 ` Bruce Richardson 2019-05-03 13:35 ` [dpdk-dev] [PATCH 19.08 6/6] examples/vhost_crypto: " Bruce Richardson 2019-05-03 13:35 ` Bruce Richardson 2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 0/3] Fixes for building examples Bruce Richardson 2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 1/3] examples: fix install of sample apps if setting not provided Bruce Richardson 2019-05-17 11:54 ` Bruce Richardson 2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 2/3] examples: remove auto-generation of examples list Bruce Richardson 2019-05-17 11:46 ` [dpdk-dev] [PATCH v2 3/3] examples: fix make clean when using pkg-config for building Bruce Richardson 2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 0/3] Fixes for building examples Bruce Richardson 2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 1/3] examples: fix install of sample apps if setting not provided Bruce Richardson 2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 2/3] examples: remove auto-generation of examples list Bruce Richardson 2019-05-17 12:02 ` [dpdk-dev] [PATCH v3 3/3] examples: fix make clean when using pkg-config for building Bruce Richardson 2019-05-17 13:12 ` [dpdk-dev] [PATCH v3 0/3] Fixes for building examples Luca Boccassi 2019-05-20 21:59 ` Thomas Monjalon 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 0/5] improve " Bruce Richardson 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 1/5] examples: add support for relocated DPDK install Bruce Richardson 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 2/5] devtools/test-meson-builds: remove dependency on clang Bruce Richardson 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 3/5] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 4/5] examples/vdpa: support building from pkg-config info Bruce Richardson 2019-07-02 7:57 ` Thomas Monjalon 2019-07-02 14:35 ` Bruce Richardson 2019-07-02 15:00 ` Thomas Monjalon 2019-05-17 11:47 ` [dpdk-dev] [PATCH v2 5/5] examples/vhost_crypto: " Bruce Richardson 2019-05-17 13:14 ` [dpdk-dev] [PATCH v2 0/5] improve building examples Luca Boccassi 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 " Bruce Richardson 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 1/5] examples: add support for relocated DPDK install Bruce Richardson 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 2/5] devtools/test-meson-builds: remove dependency on clang Bruce Richardson 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 3/5] devtools/test-meson-builds: add testing of pkg-config file Bruce Richardson 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 4/5] examples/vdpa: support building from pkg-config info Bruce Richardson 2019-07-02 14:44 ` [dpdk-dev] [PATCH v3 5/5] examples/vhost_crypto: " Bruce Richardson 2019-07-02 16:12 ` [dpdk-dev] [PATCH v3 0/5] improve building examples Thomas Monjalon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).