Skip to contentSkip to conversation

examples: allow pkg-config to override

PATCH In review [email protected] 3 participants 5 messages May 5, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 examples: allow pkg-config to override

From: Jerin Jacob <[email protected]>

In the cross-compilation environment, it possible to have different package config such as aarch64-linux-gnu-pkg-config. Use PKGCONF variable to detect the libdpdk availability.

---
 examples/bbdev_app/Makefile                                | 6 +++---
 examples/bond/Makefile                                     | 6 +++---
 examples/cmdline/Makefile                                  | 6 +++---
 examples/distributor/Makefile                              | 6 +++---
 examples/ethtool/ethtool-app/Makefile                      | 6 +++---
 examples/ethtool/lib/Makefile                              | 6 +++---
 examples/eventdev_pipeline/Makefile                        | 6 +++---
 examples/fips_validation/Makefile                          | 6 +++---
 examples/flow_classify/Makefile                            | 6 +++---
 examples/flow_filtering/Makefile                           | 6 +++---
 examples/helloworld/Makefile                               | 6 +++---
 examples/ioat/Makefile                                     | 6 +++---
 examples/ip_fragmentation/Makefile                         | 6 +++---
 examples/ip_pipeline/Makefile                              | 6 +++---
 examples/ip_reassembly/Makefile                            | 6 +++---
 examples/ipsec-secgw/Makefile                              | 6 +++---
 examples/ipv4_multicast/Makefile                           | 6 +++---
 examples/kni/Makefile                                      | 6 +++---
 examples/l2fwd-cat/Makefile                                | 6 +++---
 examples/l2fwd-crypto/Makefile                             | 6 +++---
 examples/l2fwd-event/Makefile                              | 6 +++---
 examples/l2fwd-jobstats/Makefile                           | 6 +++---
 examples/l2fwd-keepalive/Makefile                          | 6 +++---
 examples/l2fwd-keepalive/ka-agent/Makefile                 | 6 +++---
 examples/l2fwd/Makefile                                    | 6 +++---
 examples/l3fwd-acl/Makefile                                | 6 +++---
 examples/l3fwd-graph/Makefile                              | 6 +++---
 examples/l3fwd-power/Makefile                              | 6 +++---
 examples/l3fwd/Makefile                                    | 6 +++---
 examples/link_status_interrupt/Makefile                    | 6 +++---
 examples/multi_process/client_server_mp/mp_client/Makefile | 6 +++---
 examples/multi_process/client_server_mp/mp_server/Makefile | 6 +++---
 examples/multi_process/hotplug_mp/Makefile                 | 6 +++---
 examples/multi_process/simple_mp/Makefile                  | 6 +++---
 examples/multi_process/symmetric_mp/Makefile               | 6 +++---
 examples/ntb/Makefile                                      | 6 +++---
 examples/packet_ordering/Makefile                          | 6 +++---
 examples/performance-thread/l3fwd-thread/Makefile          | 5 +++--
 examples/performance-thread/pthread_shim/Makefile          | 6 +++---
 examples/pipeline/Makefile                                 | 6 +++---
 examples/ptpclient/Makefile                                | 6 +++---
 examples/qos_meter/Makefile                                | 6 +++---
 examples/qos_sched/Makefile                                | 6 +++---
 examples/rxtx_callbacks/Makefile                           | 6 +++---
 examples/server_node_efd/node/Makefile                     | 6 +++---
 examples/server_node_efd/server/Makefile                   | 6 +++---
 examples/service_cores/Makefile                            | 6 +++---
 examples/skeleton/Makefile                                 | 6 +++---
 examples/timer/Makefile                                    | 6 +++---
 examples/vdpa/Makefile                                     | 6 +++---
 examples/vhost/Makefile                                    | 6 +++---
 examples/vhost_blk/Makefile                                | 6 +++---
 examples/vhost_crypto/Makefile                             | 6 +++---
 examples/vm_power_manager/Makefile                         | 6 +++---
 examples/vm_power_manager/guest_cli/Makefile               | 6 +++---
 examples/vmdq/Makefile                                     | 6 +++---
 examples/vmdq_dcb/Makefile                                 | 6 +++---
 57 files changed, 171 insertions(+), 170 deletions(-)
examples/bbdev_app/Makefile +3 -3
index 03bf1edb10..86ac8a4009 100644
@@ -7,8 +7,10 @@ APP = bbdev
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/bond/Makefile +3 -3
index 313a5389ee..ad711a5bee 100644
@@ -7,8 +7,10 @@ APP = bond_app
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ static: build/$(APP)-static
 
 LDFLAGS += -lrte_net_bond
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/cmdline/Makefile +3 -3
index 0b6a3c6dd5..8a2d3b4b5a 100644
@@ -7,8 +7,10 @@ APP = cmdline
 # all source are stored in SRCS-y
 SRCS-y := main.c commands.c parse_obj_list.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/distributor/Makefile +3 -3
index 9630fea3f8..d4d43fbfca 100644
@@ -7,8 +7,10 @@ APP = distributor_app
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/ethtool/ethtool-app/Makefile +3 -3
index 685afbdf3c..5b4f02d4b9 100644
@@ -12,8 +12,10 @@ LDFLAGS += -L../lib/build
 LDFLAGS_STATIC = -l:librte_ethtool.a
 LDFLAGS_SHARED = -lrte_ethtool
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -24,8 +26,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED += $(shell $(PKGCONF) --libs libdpdk)
examples/ethtool/lib/Makefile +3 -3
index b4af9b0c91..a33040e66a 100644
@@ -2,15 +2,15 @@
 # Copyright(c) 2015-2020 Intel Corporation
 
 
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+PKGCONF ?= pkg-config
+
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 ifneq ($(shell uname),Linux)
 $(error This application can only operate in a linux environment)
 endif
 
-PKGCONF ?= pkg-config
-
 # library name
 LIB = librte_ethtool.so
 LIB_STATIC = librte_ethtool.a
examples/eventdev_pipeline/Makefile +3 -3
index 5cf88ca41a..962ff96368 100644
@@ -9,8 +9,10 @@ SRCS-y := main.c
 SRCS-y += pipeline_worker_generic.c
 SRCS-y += pipeline_worker_tx.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/fips_validation/Makefile +3 -3
index 1cc33450c1..ff3cd4a87a 100644
@@ -17,8 +17,10 @@ SRCS-y += fips_dev_self_test.c
 SRCS-y += fips_validation_xts.c
 SRCS-y += main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -29,8 +31,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/flow_classify/Makefile +3 -3
index 1caa93a9ba..539bf9682b 100644
@@ -7,8 +7,10 @@ APP = flow_classify
 # all source are stored in SRCS-y
 SRCS-y := flow_classify.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/flow_filtering/Makefile +3 -3
index b0cdeab3ac..411297597e 100644
@@ -5,8 +5,10 @@ APP = flow
 
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -17,8 +19,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/helloworld/Makefile +3 -3
index 1b4dfcdde9..2a6a2f1527 100644
@@ -7,8 +7,10 @@ APP = helloworld
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/ioat/Makefile +3 -3
index c82ba17582..178fc8778c 100644
@@ -7,8 +7,10 @@ APP = ioatfwd
 # all source are stored in SRCS-y
 SRCS-y := ioatfwd.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/ip_fragmentation/Makefile +3 -3
index b5b546e200..48ac67be5e 100644
@@ -8,8 +8,10 @@ APP = ip_fragmentation
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -20,8 +22,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/ip_pipeline/Makefile +3 -3
index 96f492a5ea..785c7ee38c 100644
@@ -20,8 +20,10 @@ SRCS-y += thread.c
 SRCS-y += tmgr.c
 SRCS-y += cryptodev.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -32,8 +34,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/ip_reassembly/Makefile +3 -3
index f9d0e5a6c3..f940cbfd05 100644
@@ -8,8 +8,10 @@ APP = ip_reassembly
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -20,8 +22,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/ipsec-secgw/Makefile +3 -3
index 55a7ac6d85..89af54bd37 100644
@@ -22,8 +22,10 @@ SRCS-y += flow.c
 
 CFLAGS += -gdwarf-2
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -34,8 +36,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/ipv4_multicast/Makefile +3 -3
index 614b177057..971fa4ef0c 100644
@@ -8,8 +8,10 @@ APP = ipv4_multicast
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -20,8 +22,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/kni/Makefile +3 -3
index f87e93dcf8..753cb96f5f 100644
@@ -7,8 +7,10 @@ APP = kni
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/l2fwd-cat/Makefile +3 -3
index 85066612bc..23a09550a4 100644
@@ -7,8 +7,10 @@ APP = l2fwd-cat
 # all source are stored in SRCS-y
 SRCS-y := l2fwd-cat.c cat.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/l2fwd-crypto/Makefile +3 -3
index 8d44e95ed7..1657f3c351 100644
@@ -7,8 +7,10 @@ APP = l2fwd-crypto
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/l2fwd-event/Makefile +3 -3
index 1570b1f839..4d041ba3db 100644
@@ -13,8 +13,10 @@ SRCS-y += l2fwd_common.c
 SRCS-y += l2fwd_event_generic.c
 SRCS-y += l2fwd_event_internal_port.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -25,8 +27,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/l2fwd-jobstats/Makefile +3 -3
index 1a8842c64f..ec498169da 100644
@@ -7,8 +7,10 @@ APP = l2fwd-jobstats
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/l2fwd-keepalive/Makefile +3 -3
index bcc075f0d9..5b6e3e3905 100644
@@ -7,8 +7,10 @@ APP = l2fwd-keepalive
 # all source are stored in SRCS-y
 SRCS-y := main.c shm.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ static: build/$(APP)-static
 
 LDFLAGS += -pthread -lrt
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/l2fwd-keepalive/ka-agent/Makefile +3 -3
index ef4950f239..22aa6af511 100644
@@ -9,8 +9,10 @@ SRCS-y := main.c
 
 CFLAGS += -I..
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -23,8 +25,6 @@ static: build/$(APP)-static
 
 LDFLAGS += -lpthread -lrt
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/l2fwd/Makefile +3 -3
index 44bc9ef4d3..79c9dc0f25 100644
@@ -7,8 +7,10 @@ APP = l2fwd
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 # Add flag to allow experimental API as l2fwd uses rte_ethdev_set_ptype API
examples/l3fwd-acl/Makefile +3 -3
index 49ad698117..85fd2c47a1 100644
@@ -7,8 +7,10 @@ APP = l3fwd-acl
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/l3fwd-graph/Makefile +3 -3
index 9622e2358b..f64ccc6d59 100644
@@ -7,8 +7,10 @@ APP = l3fwd-graph
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/l3fwd-power/Makefile +3 -3
index 50edc34e6a..0a6aa5a3a4 100644
@@ -7,8 +7,10 @@ APP = l3fwd-power
 # all source are stored in SRCS-y
 SRCS-y := main.c perf_core.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/l3fwd/Makefile +3 -3
index 2381a215f0..0badedb499 100644
@@ -8,8 +8,10 @@ APP = l3fwd
 SRCS-y := main.c l3fwd_lpm.c l3fwd_fib.c l3fwd_em.c l3fwd_event.c
 SRCS-y += l3fwd_event_generic.c l3fwd_event_internal_port.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -20,8 +22,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 # Added for 'rte_eth_link_to_str()'
examples/link_status_interrupt/Makefile +3 -3
index 583a847364..c892d828d5 100644
@@ -7,8 +7,10 @@ APP = link_status_interrupt
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/multi_process/client_server_mp/mp_client/Makefile +3 -3
index 2c389f35b7..26e774fd5c 100644
@@ -9,8 +9,10 @@ SRCS-y := client.c
 
 CFLAGS += -I../shared
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/multi_process/client_server_mp/mp_server/Makefile +3 -3
index bc04ab733e..c564286d4b 100644
@@ -9,8 +9,10 @@ SRCS-y := main.c init.c args.c
 
 CFLAGS += -I../shared
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/multi_process/hotplug_mp/Makefile +3 -3
index 75ae8eb9a7..6b20d6e49a 100644
@@ -7,8 +7,10 @@ APP = hotplug_mp
 # all source are stored in SRCS-y
 SRCS-y := main.c commands.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/multi_process/simple_mp/Makefile +3 -3
index 675e8c3f9f..1d0a260e64 100644
@@ -7,8 +7,10 @@ APP = simple_mp
 # all source are stored in SRCS-y
 SRCS-y := main.c mp_commands.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/multi_process/symmetric_mp/Makefile +3 -3
index 5a671e54af..e76acb89b2 100644
@@ -7,8 +7,10 @@ APP = symmetric_mp
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/ntb/Makefile +3 -3
index 8e1f52f17f..d9b6e53090 100644
@@ -7,8 +7,10 @@ APP = ntb_fwd
 # all source are stored in SRCS-y
 SRCS-y := ntb_fwd.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 CFLAGS += -D_FILE_OFFSET_BITS=64
 LDFLAGS += -pthread
 
examples/packet_ordering/Makefile +3 -3
index dcf583ec06..47b64888ef 100644
@@ -7,8 +7,10 @@ APP = packet_ordering
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/performance-thread/l3fwd-thread/Makefile +3 -2
index 4f518358d0..14ce9c0eb2 100644
@@ -17,10 +17,12 @@ $(error "Cannot generate statically-linked binaries with this version of pkg-con
 endif
 endif
 
+PKGCONF ?= pkg-config
+
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -31,7 +33,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
examples/performance-thread/pthread_shim/Makefile +3 -3
index 5aa401dc49..5acf74fff3 100644
@@ -21,8 +21,10 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -D_GNU_SOURCE
 LDFLAGS += "-Wl,--copy-dt-needed-entries"
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -35,8 +37,6 @@ static: build/$(APP)-static
 
 LDFLAGS += -lpthread
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/pipeline/Makefile +3 -3
index fcba51fd4d..c19df3a489 100644
@@ -11,8 +11,10 @@ SRCS-y += main.c
 SRCS-y += obj.c
 SRCS-y += thread.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -23,8 +25,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/ptpclient/Makefile +3 -3
index f0d38c5c49..909bb65257 100644
@@ -7,8 +7,10 @@ APP = ptpclient
 # all source are stored in SRCS-y
 SRCS-y := ptpclient.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/qos_meter/Makefile +3 -3
index 1772c75a1e..de5b435166 100644
@@ -7,8 +7,10 @@ APP = qos_meter
 # all source are stored in SRCS-y
 SRCS-y := main.c rte_policer.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/qos_sched/Makefile +3 -3
index 8187542eb1..346d66d41e 100644
@@ -7,8 +7,10 @@ APP = qos_sched
 # all source are stored in SRCS-y
 SRCS-y := main.c args.c init.c app_thread.c cfg_file.c cmdline.c stats.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/rxtx_callbacks/Makefile +3 -3
index 4296b19f67..f980b033cb 100644
@@ -7,8 +7,10 @@ APP = rxtx_callbacks
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/server_node_efd/node/Makefile +3 -3
index 56550e6fe1..115e2da7a0 100644
@@ -9,8 +9,10 @@ SRCS-y := node.c
 
 CFLAGS += -I../shared
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/server_node_efd/server/Makefile +3 -3
index 50e18e150e..8eb75fe352 100644
@@ -9,8 +9,10 @@ SRCS-y := main.c init.c args.c
 
 CFLAGS += -I../shared
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/service_cores/Makefile +3 -3
index df0284bd01..8cc00cf02c 100644
@@ -7,8 +7,10 @@ APP = service_cores
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/skeleton/Makefile +3 -3
index bbd2dc181c..026ee48a88 100644
@@ -7,8 +7,10 @@ APP = basicfwd
 # all source are stored in SRCS-y
 SRCS-y := basicfwd.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/timer/Makefile +3 -3
index 4c0a0f62f9..a74f3c3254 100644
@@ -7,8 +7,10 @@ APP = timer
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/vdpa/Makefile +3 -3
index 470ca57dfc..d974db4f40 100644
@@ -8,8 +8,10 @@ APP = vdpa
 SRCS-y := main.c
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -20,8 +22,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/vhost/Makefile +3 -3
index 145b3f79a4..587ea2ab47 100644
@@ -7,8 +7,10 @@ APP = vhost-switch
 # all source are stored in SRCS-y
 SRCS-y := main.c virtio_net.c ioat.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ static: build/$(APP)-static
 
 LDFLAGS += -pthread
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/vhost_blk/Makefile +3 -3
index 2fe199454a..79fcee6131 100644
@@ -7,8 +7,10 @@ APP = vhost-blk
 # all source are stored in SRCS-y
 SRCS-y := blk.c vhost_blk.c vhost_blk_compat.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 LDFLAGS += -pthread
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
examples/vhost_crypto/Makefile +3 -3
index ce6f046244..84de8431a6 100644
@@ -8,8 +8,10 @@ APP = vhost-crypto
 SRCS-y := main.c
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -20,8 +22,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/vm_power_manager/Makefile +3 -3
index 2fff8dadda..d2f83f0da1 100644
@@ -1,8 +1,10 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2010-2020 Intel Corporation
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -25,8 +27,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/vm_power_manager/guest_cli/Makefile +3 -3
index e9dff47534..17b52f23b8 100644
@@ -7,8 +7,10 @@ APP = guest_vm_power_mgr
 # all source are stored in SRCS-y
 SRCS-y := main.c vm_power_cli_guest.c parse.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/vmdq/Makefile +3 -3
index 8edda6cd63..34c7778ec0 100644
@@ -7,8 +7,10 @@ APP = vmdq_app
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/vmdq_dcb/Makefile +3 -3
index b5d2efa4af..d784586f6a 100644
@@ -7,8 +7,10 @@ APP = vmdq_dcb_app
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
Signature · 1 line
2.31.1
#1 lore raw
Quoted 8 lines · On Wed, May 05, 2021 at 04:49:44PM +0530, [email protected] wrote:

From: Jerin Jacob <[email protected]>

In the cross-compilation environment, it possible to have different package config such as aarch64-linux-gnu-pkg-config. Use PKGCONF variable to detect the libdpdk availability.

---

+1 to the change, but on the commit log side, this looks more like a bugfix where the PKGCONF value is set too far down the file rather than adding a new feature. The support for overriding pkg-config is meant to be already there, and test-meson-builds.sh already sets PKGCONF in the environment to override it.

/Bruce

#2 lore raw

PATCH v2 1/1 examples: fix pkg-config override sequence

In reply to [email protected]

From: Jerin Jacob <[email protected]>

Move pkg-config override to beginning in the Makefile to allow use PKGCONF variable to detect the libdpdk availability.

Fixes fda34680eb9a ("examples: remove legacy sections of makefiles")

---

v2: Update the git comments to express as fix(Bruce)

 examples/bbdev_app/Makefile                                | 6 +++---
 examples/bond/Makefile                                     | 6 +++---
 examples/cmdline/Makefile                                  | 6 +++---
 examples/distributor/Makefile                              | 6 +++---
 examples/ethtool/ethtool-app/Makefile                      | 6 +++---
 examples/ethtool/lib/Makefile                              | 6 +++---
 examples/eventdev_pipeline/Makefile                        | 6 +++---
 examples/fips_validation/Makefile                          | 6 +++---
 examples/flow_classify/Makefile                            | 6 +++---
 examples/flow_filtering/Makefile                           | 6 +++---
 examples/helloworld/Makefile                               | 6 +++---
 examples/ioat/Makefile                                     | 6 +++---
 examples/ip_fragmentation/Makefile                         | 6 +++---
 examples/ip_pipeline/Makefile                              | 6 +++---
 examples/ip_reassembly/Makefile                            | 6 +++---
 examples/ipsec-secgw/Makefile                              | 6 +++---
 examples/ipv4_multicast/Makefile                           | 6 +++---
 examples/kni/Makefile                                      | 6 +++---
 examples/l2fwd-cat/Makefile                                | 6 +++---
 examples/l2fwd-crypto/Makefile                             | 6 +++---
 examples/l2fwd-event/Makefile                              | 6 +++---
 examples/l2fwd-jobstats/Makefile                           | 6 +++---
 examples/l2fwd-keepalive/Makefile                          | 6 +++---
 examples/l2fwd-keepalive/ka-agent/Makefile                 | 6 +++---
 examples/l2fwd/Makefile                                    | 6 +++---
 examples/l3fwd-acl/Makefile                                | 6 +++---
 examples/l3fwd-graph/Makefile                              | 6 +++---
 examples/l3fwd-power/Makefile                              | 6 +++---
 examples/l3fwd/Makefile                                    | 6 +++---
 examples/link_status_interrupt/Makefile                    | 6 +++---
 examples/multi_process/client_server_mp/mp_client/Makefile | 6 +++---
 examples/multi_process/client_server_mp/mp_server/Makefile | 6 +++---
 examples/multi_process/hotplug_mp/Makefile                 | 6 +++---
 examples/multi_process/simple_mp/Makefile                  | 6 +++---
 examples/multi_process/symmetric_mp/Makefile               | 6 +++---
 examples/ntb/Makefile                                      | 6 +++---
 examples/packet_ordering/Makefile                          | 6 +++---
 examples/performance-thread/l3fwd-thread/Makefile          | 5 +++--
 examples/performance-thread/pthread_shim/Makefile          | 6 +++---
 examples/pipeline/Makefile                                 | 6 +++---
 examples/ptpclient/Makefile                                | 6 +++---
 examples/qos_meter/Makefile                                | 6 +++---
 examples/qos_sched/Makefile                                | 6 +++---
 examples/rxtx_callbacks/Makefile                           | 6 +++---
 examples/server_node_efd/node/Makefile                     | 6 +++---
 examples/server_node_efd/server/Makefile                   | 6 +++---
 examples/service_cores/Makefile                            | 6 +++---
 examples/skeleton/Makefile                                 | 6 +++---
 examples/timer/Makefile                                    | 6 +++---
 examples/vdpa/Makefile                                     | 6 +++---
 examples/vhost/Makefile                                    | 6 +++---
 examples/vhost_blk/Makefile                                | 6 +++---
 examples/vhost_crypto/Makefile                             | 6 +++---
 examples/vm_power_manager/Makefile                         | 6 +++---
 examples/vm_power_manager/guest_cli/Makefile               | 6 +++---
 examples/vmdq/Makefile                                     | 6 +++---
 examples/vmdq_dcb/Makefile                                 | 6 +++---
 57 files changed, 171 insertions(+), 170 deletions(-)
examples/bbdev_app/Makefile +3 -3
index 03bf1edb10..86ac8a4009 100644
@@ -7,8 +7,10 @@ APP = bbdev
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/bond/Makefile +3 -3
index 313a5389ee..ad711a5bee 100644
@@ -7,8 +7,10 @@ APP = bond_app
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ static: build/$(APP)-static
 
 LDFLAGS += -lrte_net_bond
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/cmdline/Makefile +3 -3
index 0b6a3c6dd5..8a2d3b4b5a 100644
@@ -7,8 +7,10 @@ APP = cmdline
 # all source are stored in SRCS-y
 SRCS-y := main.c commands.c parse_obj_list.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/distributor/Makefile +3 -3
index 9630fea3f8..d4d43fbfca 100644
@@ -7,8 +7,10 @@ APP = distributor_app
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/ethtool/ethtool-app/Makefile +3 -3
index 685afbdf3c..5b4f02d4b9 100644
@@ -12,8 +12,10 @@ LDFLAGS += -L../lib/build
 LDFLAGS_STATIC = -l:librte_ethtool.a
 LDFLAGS_SHARED = -lrte_ethtool
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -24,8 +26,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED += $(shell $(PKGCONF) --libs libdpdk)
examples/ethtool/lib/Makefile +3 -3
index b4af9b0c91..a33040e66a 100644
@@ -2,15 +2,15 @@
 # Copyright(c) 2015-2020 Intel Corporation
 
 
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+PKGCONF ?= pkg-config
+
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 ifneq ($(shell uname),Linux)
 $(error This application can only operate in a linux environment)
 endif
 
-PKGCONF ?= pkg-config
-
 # library name
 LIB = librte_ethtool.so
 LIB_STATIC = librte_ethtool.a
examples/eventdev_pipeline/Makefile +3 -3
index 5cf88ca41a..962ff96368 100644
@@ -9,8 +9,10 @@ SRCS-y := main.c
 SRCS-y += pipeline_worker_generic.c
 SRCS-y += pipeline_worker_tx.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/fips_validation/Makefile +3 -3
index 1cc33450c1..ff3cd4a87a 100644
@@ -17,8 +17,10 @@ SRCS-y += fips_dev_self_test.c
 SRCS-y += fips_validation_xts.c
 SRCS-y += main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -29,8 +31,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/flow_classify/Makefile +3 -3
index 1caa93a9ba..539bf9682b 100644
@@ -7,8 +7,10 @@ APP = flow_classify
 # all source are stored in SRCS-y
 SRCS-y := flow_classify.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/flow_filtering/Makefile +3 -3
index b0cdeab3ac..411297597e 100644
@@ -5,8 +5,10 @@ APP = flow
 
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -17,8 +19,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/helloworld/Makefile +3 -3
index 1b4dfcdde9..2a6a2f1527 100644
@@ -7,8 +7,10 @@ APP = helloworld
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/ioat/Makefile +3 -3
index c82ba17582..178fc8778c 100644
@@ -7,8 +7,10 @@ APP = ioatfwd
 # all source are stored in SRCS-y
 SRCS-y := ioatfwd.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/ip_fragmentation/Makefile +3 -3
index b5b546e200..48ac67be5e 100644
@@ -8,8 +8,10 @@ APP = ip_fragmentation
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -20,8 +22,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/ip_pipeline/Makefile +3 -3
index 96f492a5ea..785c7ee38c 100644
@@ -20,8 +20,10 @@ SRCS-y += thread.c
 SRCS-y += tmgr.c
 SRCS-y += cryptodev.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -32,8 +34,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/ip_reassembly/Makefile +3 -3
index f9d0e5a6c3..f940cbfd05 100644
@@ -8,8 +8,10 @@ APP = ip_reassembly
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -20,8 +22,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/ipsec-secgw/Makefile +3 -3
index 55a7ac6d85..89af54bd37 100644
@@ -22,8 +22,10 @@ SRCS-y += flow.c
 
 CFLAGS += -gdwarf-2
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -34,8 +36,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/ipv4_multicast/Makefile +3 -3
index 614b177057..971fa4ef0c 100644
@@ -8,8 +8,10 @@ APP = ipv4_multicast
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -20,8 +22,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/kni/Makefile +3 -3
index f87e93dcf8..753cb96f5f 100644
@@ -7,8 +7,10 @@ APP = kni
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 CFLAGS += -DALLOW_EXPERIMENTAL_API
examples/l2fwd-cat/Makefile +3 -3
index 85066612bc..23a09550a4 100644
@@ -7,8 +7,10 @@ APP = l2fwd-cat
 # all source are stored in SRCS-y
 SRCS-y := l2fwd-cat.c cat.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/l2fwd-crypto/Makefile +3 -3
index 8d44e95ed7..1657f3c351 100644
@@ -7,8 +7,10 @@ APP = l2fwd-crypto
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/l2fwd-event/Makefile +3 -3
index 1570b1f839..4d041ba3db 100644
@@ -13,8 +13,10 @@ SRCS-y += l2fwd_common.c
 SRCS-y += l2fwd_event_generic.c
 SRCS-y += l2fwd_event_internal_port.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -25,8 +27,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/l2fwd-jobstats/Makefile +3 -3
index 1a8842c64f..ec498169da 100644
@@ -7,8 +7,10 @@ APP = l2fwd-jobstats
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/l2fwd-keepalive/Makefile +3 -3
index bcc075f0d9..5b6e3e3905 100644
@@ -7,8 +7,10 @@ APP = l2fwd-keepalive
 # all source are stored in SRCS-y
 SRCS-y := main.c shm.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ static: build/$(APP)-static
 
 LDFLAGS += -pthread -lrt
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/l2fwd-keepalive/ka-agent/Makefile +3 -3
index ef4950f239..22aa6af511 100644
@@ -9,8 +9,10 @@ SRCS-y := main.c
 
 CFLAGS += -I..
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -23,8 +25,6 @@ static: build/$(APP)-static
 
 LDFLAGS += -lpthread -lrt
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/l2fwd/Makefile +3 -3
index 44bc9ef4d3..79c9dc0f25 100644
@@ -7,8 +7,10 @@ APP = l2fwd
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 # Add flag to allow experimental API as l2fwd uses rte_ethdev_set_ptype API
examples/l3fwd-acl/Makefile +3 -3
index 49ad698117..85fd2c47a1 100644
@@ -7,8 +7,10 @@ APP = l3fwd-acl
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/l3fwd-graph/Makefile +3 -3
index 9622e2358b..f64ccc6d59 100644
@@ -7,8 +7,10 @@ APP = l3fwd-graph
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/l3fwd-power/Makefile +3 -3
index 50edc34e6a..0a6aa5a3a4 100644
@@ -7,8 +7,10 @@ APP = l3fwd-power
 # all source are stored in SRCS-y
 SRCS-y := main.c perf_core.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/l3fwd/Makefile +3 -3
index 2381a215f0..0badedb499 100644
@@ -8,8 +8,10 @@ APP = l3fwd
 SRCS-y := main.c l3fwd_lpm.c l3fwd_fib.c l3fwd_em.c l3fwd_event.c
 SRCS-y += l3fwd_event_generic.c l3fwd_event_internal_port.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -20,8 +22,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 # Added for 'rte_eth_link_to_str()'
examples/link_status_interrupt/Makefile +3 -3
index 583a847364..c892d828d5 100644
@@ -7,8 +7,10 @@ APP = link_status_interrupt
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/multi_process/client_server_mp/mp_client/Makefile +3 -3
index 2c389f35b7..26e774fd5c 100644
@@ -9,8 +9,10 @@ SRCS-y := client.c
 
 CFLAGS += -I../shared
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/multi_process/client_server_mp/mp_server/Makefile +3 -3
index bc04ab733e..c564286d4b 100644
@@ -9,8 +9,10 @@ SRCS-y := main.c init.c args.c
 
 CFLAGS += -I../shared
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/multi_process/hotplug_mp/Makefile +3 -3
index 75ae8eb9a7..6b20d6e49a 100644
@@ -7,8 +7,10 @@ APP = hotplug_mp
 # all source are stored in SRCS-y
 SRCS-y := main.c commands.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/multi_process/simple_mp/Makefile +3 -3
index 675e8c3f9f..1d0a260e64 100644
@@ -7,8 +7,10 @@ APP = simple_mp
 # all source are stored in SRCS-y
 SRCS-y := main.c mp_commands.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/multi_process/symmetric_mp/Makefile +3 -3
index 5a671e54af..e76acb89b2 100644
@@ -7,8 +7,10 @@ APP = symmetric_mp
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/ntb/Makefile +3 -3
index 8e1f52f17f..d9b6e53090 100644
@@ -7,8 +7,10 @@ APP = ntb_fwd
 # all source are stored in SRCS-y
 SRCS-y := ntb_fwd.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 CFLAGS += -D_FILE_OFFSET_BITS=64
 LDFLAGS += -pthread
 
examples/packet_ordering/Makefile +3 -3
index dcf583ec06..47b64888ef 100644
@@ -7,8 +7,10 @@ APP = packet_ordering
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/performance-thread/l3fwd-thread/Makefile +3 -2
index 4f518358d0..14ce9c0eb2 100644
@@ -17,10 +17,12 @@ $(error "Cannot generate statically-linked binaries with this version of pkg-con
 endif
 endif
 
+PKGCONF ?= pkg-config
+
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -31,7 +33,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
examples/performance-thread/pthread_shim/Makefile +3 -3
index 5aa401dc49..5acf74fff3 100644
@@ -21,8 +21,10 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -D_GNU_SOURCE
 LDFLAGS += "-Wl,--copy-dt-needed-entries"
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -35,8 +37,6 @@ static: build/$(APP)-static
 
 LDFLAGS += -lpthread
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/pipeline/Makefile +3 -3
index fcba51fd4d..c19df3a489 100644
@@ -11,8 +11,10 @@ SRCS-y += main.c
 SRCS-y += obj.c
 SRCS-y += thread.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -23,8 +25,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/ptpclient/Makefile +3 -3
index f0d38c5c49..909bb65257 100644
@@ -7,8 +7,10 @@ APP = ptpclient
 # all source are stored in SRCS-y
 SRCS-y := ptpclient.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/qos_meter/Makefile +3 -3
index 1772c75a1e..de5b435166 100644
@@ -7,8 +7,10 @@ APP = qos_meter
 # all source are stored in SRCS-y
 SRCS-y := main.c rte_policer.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/qos_sched/Makefile +3 -3
index 8187542eb1..346d66d41e 100644
@@ -7,8 +7,10 @@ APP = qos_sched
 # all source are stored in SRCS-y
 SRCS-y := main.c args.c init.c app_thread.c cfg_file.c cmdline.c stats.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/rxtx_callbacks/Makefile +3 -3
index 4296b19f67..f980b033cb 100644
@@ -7,8 +7,10 @@ APP = rxtx_callbacks
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/server_node_efd/node/Makefile +3 -3
index 56550e6fe1..115e2da7a0 100644
@@ -9,8 +9,10 @@ SRCS-y := node.c
 
 CFLAGS += -I../shared
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/server_node_efd/server/Makefile +3 -3
index 50e18e150e..8eb75fe352 100644
@@ -9,8 +9,10 @@ SRCS-y := main.c init.c args.c
 
 CFLAGS += -I../shared
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/service_cores/Makefile +3 -3
index df0284bd01..8cc00cf02c 100644
@@ -7,8 +7,10 @@ APP = service_cores
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/skeleton/Makefile +3 -3
index bbd2dc181c..026ee48a88 100644
@@ -7,8 +7,10 @@ APP = basicfwd
 # all source are stored in SRCS-y
 SRCS-y := basicfwd.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/timer/Makefile +3 -3
index 4c0a0f62f9..a74f3c3254 100644
@@ -7,8 +7,10 @@ APP = timer
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/vdpa/Makefile +3 -3
index 470ca57dfc..d974db4f40 100644
@@ -8,8 +8,10 @@ APP = vdpa
 SRCS-y := main.c
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -20,8 +22,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/vhost/Makefile +3 -3
index 145b3f79a4..587ea2ab47 100644
@@ -7,8 +7,10 @@ APP = vhost-switch
 # all source are stored in SRCS-y
 SRCS-y := main.c virtio_net.c ioat.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ static: build/$(APP)-static
 
 LDFLAGS += -pthread
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/vhost_blk/Makefile +3 -3
index 2fe199454a..79fcee6131 100644
@@ -7,8 +7,10 @@ APP = vhost-blk
 # all source are stored in SRCS-y
 SRCS-y := blk.c vhost_blk.c vhost_blk_compat.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 LDFLAGS += -pthread
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
examples/vhost_crypto/Makefile +3 -3
index ce6f046244..84de8431a6 100644
@@ -8,8 +8,10 @@ APP = vhost-crypto
 SRCS-y := main.c
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -20,8 +22,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/vm_power_manager/Makefile +3 -3
index 2fff8dadda..d2f83f0da1 100644
@@ -1,8 +1,10 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2010-2020 Intel Corporation
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -25,8 +27,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/vm_power_manager/guest_cli/Makefile +3 -3
index e9dff47534..17b52f23b8 100644
@@ -7,8 +7,10 @@ APP = guest_vm_power_mgr
 # all source are stored in SRCS-y
 SRCS-y := main.c vm_power_cli_guest.c parse.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/vmdq/Makefile +3 -3
index 8edda6cd63..34c7778ec0 100644
@@ -7,8 +7,10 @@ APP = vmdq_app
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
examples/vmdq_dcb/Makefile +3 -3
index b5d2efa4af..d784586f6a 100644
@@ -7,8 +7,10 @@ APP = vmdq_dcb_app
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)

--
2.31.1

Acked-by on v2 1/1
#3 lore raw

Re: [dpdk-dev] [PATCH v2] examples: fix pkg-config override sequence

Quoted 10 lines · On Wed, May 05, 2021 at 07:55:25PM +0530, [email protected] wrote:

From: Jerin Jacob <[email protected]>

Move pkg-config override to beginning in the Makefile to allow use PKGCONF variable to detect the libdpdk availability.

Fixes fda34680eb9a ("examples: remove legacy sections of makefiles")

---

#4 lore raw

Re: [dpdk-dev] [dpdk-stable] [PATCH v2] examples: fix pkg-config override sequence

05/05/2021 17:30, Bruce Richardson:

Quoted 6 lines · On Wed, May 05, 2021 at 07:55:25PM +0530, [email protected] wrote:
Quoted 5 lines

From: Jerin Jacob <[email protected]>

Move pkg-config override to beginning in the Makefile to allow use PKGCONF variable to detect the libdpdk availability.

Quoted 6 lines
Quoted 5 lines
Fixes fda34680eb9a ("examples: remove legacy sections of makefiles")

---

Applied, thanks