X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fipsec-secgw%2FMakefile;h=851123be58ae43cc9255e93913530c9351c7242d;hb=0e8f47491f090f44a4956429cb27f6942b6618b0;hp=ac042e4ce69883bb7d94e96f77de9a50cc93a53d;hpb=e9c659426416c95c4469b16e6bcc7700f1898278;p=dpdk.git diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile index ac042e4ce6..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,12 +49,12 @@ 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 ifeq ($(RTE_SDK),) - $(error "Please define RTE_SDK environment variable") +$(error "Please define RTE_SDK environment variable") endif # Default target, detect a build directory, by looking for a path with a .config