X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fipsec-secgw%2FMakefile;h=851123be58ae43cc9255e93913530c9351c7242d;hb=403e9d914bdb2291c3ba73a9262545aa2c9f4eca;hp=75f2bcd00bb7e602f49747588577b1aaae354ff7;hpb=96d8ea839bded055fbbc01bfca44a7df3710e2ef;p=dpdk.git diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile index 75f2bcd00b..851123be58 100644 --- a/examples/ipsec-secgw/Makefile +++ b/examples/ipsec-secgw/Makefile @@ -19,8 +19,7 @@ SRCS-y += ipsec-secgw.c CFLAGS += -gdwarf-2 # Build using pkg-config variables if possible -$(shell pkg-config --exists libdpdk) -ifeq ($(.SHELLSTATUS),0) +ifeq ($(shell pkg-config --exists libdpdk && echo 0),0) all: shared .PHONY: shared static @@ -29,10 +28,12 @@ shared: build/$(APP)-shared static: build/$(APP)-static ln -sf $(APP)-static build/$(APP) -PC_FILE := $(shell pkg-config --path libdpdk) -CFLAGS += -O3 $(shell pkg-config --cflags libdpdk) -LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) -LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) +PKGCONF=pkg-config --define-prefix + +PC_FILE := $(shell $(PKGCONF) --path libdpdk) +CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) +LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk) +LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API @@ -48,7 +49,7 @@ build: .PHONY: clean clean: rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared - rmdir --ignore-fail-on-non-empty build + test -d build && rmdir -p build || true else