summaryrefslogtreecommitdiff
path: root/examples/helloworld
diff options
context:
space:
mode:
authorJerin Jacob <[email protected]>2021-05-05 19:55:25 +0530
committerThomas Monjalon <[email protected]>2021-05-05 22:20:24 +0200
commit11e027022d0f72f3cd7419b83e69a9ceb342666d (patch)
tree2c9044a9168786b27d69b382dc4f7ce5e5d45809 /examples/helloworld
parent486cc30399879f0ab006d095e03ad193ab18f2f4 (diff)
examples: fix pkg-config override
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") Cc: [email protected] Signed-off-by: Jerin Jacob <[email protected]> Acked-by: Bruce Richardson <[email protected]>
Diffstat (limited to 'examples/helloworld')
-rw-r--r--examples/helloworld/Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile
index 1b4dfcdde9..2a6a2f1527 100644
--- a/examples/helloworld/Makefile
+++ b/examples/helloworld/Makefile
@@ -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)