Yulong Pei | a3f1b4c | 2023-01-25 08:05:03 +0000 | [diff] [blame^] | 1 | CC := $(shell which clang) |
Benoît Ganne | 4a76d6f | 2020-06-12 08:47:34 +0200 | [diff] [blame] | 2 | |
Yulong Pei | a3f1b4c | 2023-01-25 08:05:03 +0000 | [diff] [blame^] | 3 | # where to find bpf includes? |
| 4 | BPF_ROOT ?= /usr/include |
| 5 | #BPF_ROOT ?= /opt/vpp/external/x86_64/include |
| 6 | |
| 7 | CFLAGS := -O3 -g -Wextra -Wall -target bpf |
Benoît Ganne | 4a76d6f | 2020-06-12 08:47:34 +0200 | [diff] [blame] | 8 | # Workaround for Ubuntu/Debian for asm/types.h |
Yulong Pei | a3f1b4c | 2023-01-25 08:05:03 +0000 | [diff] [blame^] | 9 | CFLAGS += -I/usr/include/x86_64-linux-gnu |
| 10 | CFLAGS += -I$(BPF_ROOT) |
| 11 | #CFLAGS += -DDEBUG |
Benoît Ganne | 4a76d6f | 2020-06-12 08:47:34 +0200 | [diff] [blame] | 12 | |
| 13 | all: af_xdp.bpf.o |
| 14 | |
| 15 | clean: |
| 16 | $(RM) af_xdp.bpf.o |
| 17 | |
| 18 | .PHONY: all clean |