Skip to content
Snippets Groups Projects
Commit 6bd46b92 authored by Daniel Salzman's avatar Daniel Salzman
Browse files

xdp: rework Makefile.am to avoid `make distcheck` issues

parent 3f9a21b5
No related branches found
No related tags found
No related merge requests found
Pipeline #73355 passed
# Useful commands:
# make filter
# ip link show $eth
# sudo ip link set dev $eth xdp off
# sudo ip link set dev $eth xdp obj ./bpf-kernel.o
BUILT_SOURCES = bpf-kernel-obj.c
CLEANFILES = bpf-kernel.ll bpf-kernel.o bpf-kernel-obj.c
EXTRA_DIST = bpf-kernel.c
EXTRA_DIST = bpf-kernel-obj.c bpf-kernel.c
bpf-kernel.ll: bpf-kernel.c
clang -S -target bpf -Wall -O2 -emit-llvm -c -DNDEBUG -o $@ -I/usr/include/x86_64-linux-gnu -include ../../config.h $<
.PHONY: filter
bpf-kernel.o: bpf-kernel.ll
llc -march=bpf -filetype=obj -o $@ $<
bpf-kernel-obj.c: bpf-kernel.o
xxd -i $< > $@
filter:
rm -f bpf-kernel.ll bpf-kernel.o bpf-kernel-obj.c
clang -S -target bpf -Wall -O2 -emit-llvm -c -DNDEBUG -o bpf-kernel.ll -I/usr/include/x86_64-linux-gnu -include ../../config.h bpf-kernel.c
llc -march=bpf -filetype=obj -o bpf-kernel.o bpf-kernel.ll
xxd -i bpf-kernel.o > bpf-kernel-obj.c
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment