summaryrefslogtreecommitdiffstats
path: root/extras/bpf/Makefile
diff options
context:
space:
mode:
authorYulong Pei <yulong.pei@intel.com>2023-01-25 08:05:03 +0000
committerBeno�t Ganne <bganne@cisco.com>2023-02-02 12:51:45 +0000
commita3f1b4c719b25595fc8f0214a29210abbfc34683 (patch)
treede8385d233a0f985f87b1f74bec50175d6f5d57a /extras/bpf/Makefile
parent02bdd3f5cb0f2ff4988f972f31fb44da89fd786e (diff)
af_xdp: update custom XDP program example
Update custom XDP program example to work with libbpf 0.8.0 and libxdp 1.2.9. Type: fix Signed-off-by: Yulong Pei <yulong.pei@intel.com> Change-Id: Ib8d03f0be7f71fe996dfb7da0cfe35165711ebb0 Signed-off-by: Yulong Pei <yulong.pei@intel.com>
Diffstat (limited to 'extras/bpf/Makefile')
-rw-r--r--extras/bpf/Makefile15
1 files changed, 8 insertions, 7 deletions
diff --git a/extras/bpf/Makefile b/extras/bpf/Makefile
index 77b06434237..9ad26eaacb1 100644
--- a/extras/bpf/Makefile
+++ b/extras/bpf/Makefile
@@ -1,13 +1,14 @@
-CC?=clang
+CC := $(shell which clang)
+
# where to find bpf includes?
-BPF_ROOT?=/usr/include
-#BPF_ROOT?=/opt/vpp/external/x86_64/include
+BPF_ROOT ?= /usr/include
+#BPF_ROOT ?= /opt/vpp/external/x86_64/include
-CFLAGS:=-O3 -g -Wextra -Wall -target bpf
+CFLAGS := -O3 -g -Wextra -Wall -target bpf
# Workaround for Ubuntu/Debian for asm/types.h
-CFLAGS+= -I/usr/include/x86_64-linux-gnu
-CFLAGS+= -I$(BPF_ROOT)
-#CFLAGS+= -DDEBUG
+CFLAGS += -I/usr/include/x86_64-linux-gnu
+CFLAGS += -I$(BPF_ROOT)
+#CFLAGS += -DDEBUG
all: af_xdp.bpf.o