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