1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#clang -target bpf -O2 -c xdp-drop-ebpf.c -o xdp-drop-ebpf.o src = $(wildcard *.c) obj = $(src:.c=.o) CLANG = clang CFLAGS = -Wall -Wno-unused-value -Wno-pointer-sign -Wno-compare-distinct-pointer-types -Werror -O2 %.o: %.c $(CLANG) -target bpf $(CFLAGS) -o $@ -c $< .PHONY: all all: $(obj) .PHONY: clean clean: rm -f *.o