Yureka writes: > Maybe. Calling clang with the right flags is tricky. I have never > written a meson recipe from scratch, and this doesn't seem like a good > first meson project for me, and it feels like the abstractions from > meson would make it more complicated rather than easier. Could we just copy what systemd does? It builds BPF programs with Meson. I can take a look if you prefer, though. > On 9/1/25 16:03, Alyssa Ross wrote: >> Yureka Lilian writes: >> >>> diff --git a/tools/xdp-forwarder/Makefile b/tools/xdp-forwarder/Makefile >>> new file mode 100644 >>> index 0000000..24268d9 >>> --- /dev/null >>> +++ b/tools/xdp-forwarder/Makefile >>> @@ -0,0 +1,28 @@ >>> +CC ?= gcc >>> +CLANG ?= clang >>> +prefix ?= /usr/local >>> +bindir ?= $(prefix)/bin >>> +xdpdir ?= $(prefix)/lib/xdp >>> + >>> +TOOLS = set_router_iface >>> +PROGS = prog_router.o prog_physical.o >>> + >>> +set_router_iface: set_router_iface.c >>> + $(CC) `pkg-config --libs --cflags libbpf` -o $@ $^ >>> + >>> +prog_%.o: prog_%.c >>> + $(CLANG) $(NIX_CFLAGS_COMPILE) -target bpf -I include -g -c -o $@ $^ >>> + >>> +tools: $(TOOLS) >>> + >>> +progs: $(PROGS) >>> + >>> +all: tools progs >>> + >>> +install_tools: $(TOOLS) >>> + install -Dm755 -t $(bindir) $^ >>> + >>> +install_progs: $(PROGS) >>> + install -Dm755 -t $(xdpdir) $^ >>> + >>> +install: install_tools install_progs >> Could we integrate this into our existing Meson build instead? >> I think we should rename the current "guest" option to "app", and add a >> new option for driver VM stuff.