From 97da4e863440837b84911d32a5aa02e7a73ffc4c Mon Sep 17 00:00:00 2001 From: Gregory Shimansky Date: Fri, 20 Sep 2019 12:29:48 -0500 Subject: [PATCH] Added support for BPF in makefile --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index e8a5158..9aa48eb 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,15 @@ export GO_BUILD_TAGS += mlx endif endif +ifndef NFF_GO_NO_BPF_SUPPORT +ifeq (,$(findstring bpf,$(GO_BUILD_TAGS))) +export GO_BUILD_TAGS += bpf +endif +CFLAGS := $(CGO_CFLAGS) -DNFF_GO_SUPPORT_XDP +export CGO_CFLAGS = $(CFLAGS) +$(info CFLAGS = $(CGO_CFLAGS)) +endif + .PHONY: all all: nff-go-nat client/client httpperfserv wrk