examples: fix build with old pkg-config
[dpdk.git] / examples / l2fwd / Makefile
index 59b2b4a..97af55a 100644 (file)
@@ -17,10 +17,12 @@ 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)
+# Add flag to allow experimental API as l2fwd uses rte_ethdev_set_ptype API
+CFLAGS += -DALLOW_EXPERIMENTAL_API
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)