blob: 9ad26eaacb1f1890b22bcc582cd233291bd5dd9b [file] [log] [blame]
Yulong Peia3f1b4c2023-01-25 08:05:03 +00001CC := $(shell which clang)
Benoît Ganne4a76d6f2020-06-12 08:47:34 +02002
Yulong Peia3f1b4c2023-01-25 08:05:03 +00003# where to find bpf includes?
4BPF_ROOT ?= /usr/include
5#BPF_ROOT ?= /opt/vpp/external/x86_64/include
6
7CFLAGS := -O3 -g -Wextra -Wall -target bpf
Benoît Ganne4a76d6f2020-06-12 08:47:34 +02008# Workaround for Ubuntu/Debian for asm/types.h
Yulong Peia3f1b4c2023-01-25 08:05:03 +00009CFLAGS += -I/usr/include/x86_64-linux-gnu
10CFLAGS += -I$(BPF_ROOT)
11#CFLAGS += -DDEBUG
Benoît Ganne4a76d6f2020-06-12 08:47:34 +020012
13all: af_xdp.bpf.o
14
15clean:
16 $(RM) af_xdp.bpf.o
17
18.PHONY: all clean