]> git.droids-corp.org - dpdk.git/commitdiff
examples: fix build with old pkg-config
authorBruce Richardson <bruce.richardson@intel.com>
Fri, 15 Nov 2019 15:16:59 +0000 (15:16 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 20 Nov 2019 21:47:15 +0000 (22:47 +0100)
Not all versions of pkg-config in distros have support for the
--define-prefix flag [1], causing errors when building examples manually or
with test-meson-builds.sh script [2].

For the former case, we need to remove the hard-coded use of the flag in
the Makefiles.

For the latter case, the flag is necessary for builds to succeed, so we
skip the tests when it's not present, passing it as part of the pkg-config
command if it is supported.

[1]
CentOS Linux release 7.7.1908 (Core)
pkg-config version 0.27.1

[2]
 ## Building cmdline
Unknown option --define-prefix
gmake: Entering directory
`...ild-x86-default/install-root/usr/local/share/dpdk/examples/cmdline'
rm -f build/cmdline build/cmdline-static build/cmdline-shared
test -d build && rmdir -p build || true
Unknown option --define-prefix
Unknown option --define-prefix
gcc -O3  main.c commands.c parse_obj_list.c -o build/cmdline-shared
main.c:14:28: fatal error: cmdline_rdline.h: No such file or directory

Fixes: ca9268529d2b ("examples: support relocated DPDK install")
Fixes: 7f80a2102bbb ("devtools: test pkg-config file")
Cc: stable@dpdk.org
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
43 files changed:
devtools/test-meson-builds.sh
examples/bbdev_app/Makefile
examples/bond/Makefile
examples/cmdline/Makefile
examples/distributor/Makefile
examples/eventdev_pipeline/Makefile
examples/fips_validation/Makefile
examples/flow_classify/Makefile
examples/flow_filtering/Makefile
examples/helloworld/Makefile
examples/ioat/Makefile
examples/ip_fragmentation/Makefile
examples/ip_pipeline/Makefile
examples/ip_reassembly/Makefile
examples/ipsec-secgw/Makefile
examples/ipv4_multicast/Makefile
examples/kni/Makefile
examples/l2fwd-cat/Makefile
examples/l2fwd-crypto/Makefile
examples/l2fwd-event/Makefile
examples/l2fwd-jobstats/Makefile
examples/l2fwd-keepalive/Makefile
examples/l2fwd/Makefile
examples/l3fwd-acl/Makefile
examples/l3fwd-power/Makefile
examples/l3fwd/Makefile
examples/link_status_interrupt/Makefile
examples/ntb/Makefile
examples/packet_ordering/Makefile
examples/ptpclient/Makefile
examples/qos_meter/Makefile
examples/qos_sched/Makefile
examples/rxtx_callbacks/Makefile
examples/service_cores/Makefile
examples/skeleton/Makefile
examples/tep_termination/Makefile
examples/timer/Makefile
examples/vdpa/Makefile
examples/vhost/Makefile
examples/vhost_blk/Makefile
examples/vhost_crypto/Makefile
examples/vmdq/Makefile
examples/vmdq_dcb/Makefile

index 08e83eb5c687ba9d099c1dffd6e636722dd624f6..e3a5a5d51d49b2094740c7b705b27ca4d5a8c5ff 100755 (executable)
@@ -133,7 +133,11 @@ load_env cc
 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
+# if pkg-config defines the necessary flags, test building some examples
+if pkg-config --define-prefix libdpdk >/dev/null 2>&1; then
+       export PKGCONF="pkg-config --define-prefix"
+       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
+fi
index 715c521a964ee0687a94fe3084906e3e43cc8103..033f5aada750a9288533b52d8db096cf8e296942 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 0229b31bb109695c6a071460d42af9d4a8026303..3f1ae1b6f5166e3e414f50de826c98a2a9c98c12 100644 (file)
@@ -19,7 +19,7 @@ static: build/$(APP)-static
 
 LDFLAGS += -lrte_pmd_bond
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index c1852080abc2f30184bdc2b35d84bd5ca80c95ac..f362a2afb4169c9db7a2338fb6232c0e58047e3b 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index bac8d5578e70f6a6712957669ff370c37bea74fc..ac804da3438c2909b61aebf1ca78632637b6eeef 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 205145853659e017ca43b687ff0544e11f239aaf..9a6250b8570271a033353c7570d96621089fe83b 100644 (file)
@@ -19,7 +19,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 9485daf7a40232d67e93a6f85f0e9b80b5ca9d69..da5c8f6e7fd38b975422e20afee19513a004dafd 100644 (file)
@@ -26,7 +26,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 4c23e5c6d1b1edc765a3758487e08c04e5a26d2d..0b41ac4eb3f8e72acb39f3059185857d698f1ca5 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index a63a755550aa56a2395a2c39bb56d1c283a898e5..1d5ab739c7f7cce7d022b134778cb2e49201c3d1 100644 (file)
@@ -15,7 +15,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 403afa05046c22dd536feef97831e4b612a60ece..267f90b4e06886875582c2cb75162eaea6bde57e 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 2a4d1da2db14604a5fc04f0fa635e1f42f045997..ad4c63e31ac1a9704059da946f2b9f8652057d3f 100644 (file)
@@ -17,10 +17,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
+
+PC_FILE := $(shell $(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)
index 6af25a02e20d838f9039646522add15fba283a11..1d13962117eecf960bba33bf5e261f8a0f00cf5a 100644 (file)
@@ -18,7 +18,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index cf10d7180872e3c701b0928c12738989fa9b3f0e..77d37cc40ecba60cd0d326fb92a1f8aabafa12e2 100644 (file)
@@ -30,7 +30,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 0b1a904e0734ac583c1f714acc4a176c906fb9ff..3d7fac1956d711fee53221ee3fbe8d7c78e93cb1 100644 (file)
@@ -18,7 +18,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 851123be58ae43cc9255e93913530c9351c7242d..1c2b944d6c15c05e8130aa6654db803e431cce62 100644 (file)
@@ -28,7 +28,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 5f8a67dd4edfd131f9c19395078f853bd9e7a7f8..5f9d738810cbdcd9381ca0085488c4905b7ce5f4 100644 (file)
@@ -18,7 +18,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 5dc8118e312a122e3b7e43f2b3f3a70c972c797b..fbe0097cfe645b5c99136269e0f4050fd9e495aa 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index c1960d6d34d67c1773fa356cb334b891c3576f1d..86e56a1e712d1caa32956f20734c13e6f023afc3 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 29fd530b47dd758fc74599b746163fb4da7c69da..ecfbab1f59c1ed9df32d6c6ad60f6e3342492f9c 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 6f41768828dd52cb2d598018a37d09135e8babb9..04e6796a6a3f0e79c420ac533e35aeb5124003bc 100644 (file)
@@ -23,7 +23,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 729a39e93b5ed692069fb8dc1e5586933b338fe0..0882c26978627317ddb178df0e021343cb303fba 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 37de27a6f49ca00b70565344bc0c4777d0b9113c..68e467426324c64569a29e0667b050f2f49228c5 100644 (file)
@@ -19,7 +19,7 @@ static: build/$(APP)-static
 
 LDFLAGS += -pthread -lrt
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 9c506844ea3d0fcc8fc91f8c4acaf25c9888870d..97af55a50ece8465939910a42147b3eada53f373 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index e2c989f717cf5b338a524c929c36339c84a91127..7fcf1e7a6362f2763bdbcd703409430826a1c669 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 98248f462ab14e7b14e54a3d460fd0a8685afb9d..de5d15cb7c67535776d905dc42042bd3ac1b4e9e 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index c55f5c2888d98b948ad57018c92c9d9b9ba31116..042eae92bbd0c63c95b661b752fa3df65c322ddf 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 97e5a14a838eae9c16a97cb2a9b28a31b57a3a84..3d55aa1ac4803b21745bcdad72798bd9aea6fa2c 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 5ddd9b95f1de2a66eabc14adf98296b1ce041d8a..7927f44ac3b5396a3caa5b61193577e923426a2d 100644 (file)
@@ -18,13 +18,15 @@ 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
 
-PC_FILE := $(shell pkg-config --path libdpdk)
-CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
-LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
+PC_FILE := $(shell $(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)
index 51acaf7ebec3797fee2f7538712d885451c015f8..b04a39399a3d668197b3ccda6df1d30ca47d86bb 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 89e2bacbdaa14a11b9fa5846b083ea7cfb786b49..0f8390b6892f0af5820d2c2629a2d7f3d7faca34 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index e5217cf7c0f991403d7ab3c60869498e04552d57..4a9b628b834abd60262bc9115dd6fc154905729b 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index ce2d253715add3bbe47c1c5e683d32a2a7d74ebd..5737ad652f6db598079a025f63ffff969f8ec8fe 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index edd5b52cd6570ee038be4782063f04ca52b50b7b..0f126692a9dfb90dc135c7bc9ab53170d1ccee76 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index abbb7aed22ae86aee15bc39ca8317ce61bde560c..6fecedc54a404d86de53a99cdf91fa7ca8120e6d 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index c5ac2602938182092ec2cb6499a0d2b507cb9e37..fdc458c913f86ad073330237fcbd1ea899c4e458 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 31165bd92a3d6e402f7768eb59354d465f2079d3..57af4e7ccab0b39d4bcc3894f981fe823237ad66 100644 (file)
@@ -19,7 +19,7 @@ static: build/$(APP)-static
 
 LDFLAGS += -pthread
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index a861783551bd6aa6f024f66f3035dfa2bc2c928a..21f05918c538d61324b68c48aaec1389c436a643 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 2ac991a4beb7343701638659cc58fe5eaa52e1fd..68d088f220ee704dfb46e625bf2ec82a59244ccf 100644 (file)
@@ -18,7 +18,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index f84b7f01720cec170c0458c768ef0a7018870f1f..fcb864d0eca8de05556cfbfe16b8f29502732000 100644 (file)
@@ -19,7 +19,7 @@ static: build/$(APP)-static
 
 LDFLAGS += -pthread
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index a10a90071aaa22de9e95be7408e367e647ddcd24..af2a3f87becd896c1f5cf010ac34365e46fd93e4 100644 (file)
@@ -18,12 +18,14 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
+PKGCONF ?= pkg-config
+
 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)
+PC_FILE := $(shell $(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
 
index a9e1c4d3af6b9183b2814bcdb49e98e469f37b47..43e2e324440a33b50c4d04f40d85914ddeb8c9f8 100644 (file)
@@ -18,7 +18,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 1557ee86bff519790c720397f0504c8a1e5c643a..e0f1e4c4064d7e95e93a7b1c4c237319ba689a36 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
index 391096cfb7b1f72dcad7ff4d47eb1de79f71adbc..def5158729afe319b97b7ef3b692c8fea39a5112 100644 (file)
@@ -17,7 +17,7 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
        ln -sf $(APP)-static build/$(APP)
 
-PKGCONF=pkg-config --define-prefix
+PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)