2023-01-25 08:05:03 +00:00
|
|
|
CC := $(shell which clang)
|
|
|
|
|
2020-06-12 08:47:34 +02:00
|
|
|
# where to find bpf includes?
|
2023-01-25 08:05:03 +00:00
|
|
|
BPF_ROOT ?= /usr/include
|
|
|
|
#BPF_ROOT ?= /opt/vpp/external/x86_64/include
|
2020-06-12 08:47:34 +02:00
|
|
|
|
2023-01-25 08:05:03 +00:00
|
|
|
CFLAGS := -O3 -g -Wextra -Wall -target bpf
|
2020-06-12 08:47:34 +02:00
|
|
|
# Workaround for Ubuntu/Debian for asm/types.h
|
2023-01-25 08:05:03 +00:00
|
|
|
CFLAGS += -I/usr/include/x86_64-linux-gnu
|
|
|
|
CFLAGS += -I$(BPF_ROOT)
|
|
|
|
#CFLAGS += -DDEBUG
|
2020-06-12 08:47:34 +02:00
|
|
|
|
|
|
|
all: af_xdp.bpf.o
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) af_xdp.bpf.o
|
|
|
|
|
|
|
|
.PHONY: all clean
|