From f7ba8b694a4c6b1d6583b730cf918e7953b20a72 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 19 Feb 2024 10:38:38 +0200 Subject: propper C makefile --- internal/c/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/c/Makefile b/internal/c/Makefile index 196b2d3..439e413 100644 --- a/internal/c/Makefile +++ b/internal/c/Makefile @@ -1,12 +1,12 @@ export LIBBPFGO = $(CURDIR)/../../../libbpfgo export CC = clang -all: bpfbuild +ioriotng.bpf.o: ioriotng.bpf.c vmlinux.h + $(CC) -g -O2 -Wall -fpie -target bpf -D__TARGET_ARCH_amd64 \ + -I$(LIBBPFGO)/output -c ioriotng.bpf.c -o ioriotng.bpf.o -.PHONY: bpfbuild -bpfbuild: +vmlinux.h: bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h - $(CC) -g -O2 -Wall -fpie -target bpf -D__TARGET_ARCH_amd64 -I$(LIBBPFGO)/output -c ioriotng.bpf.c -o ioriotng.bpf.o .PHONY: clean clean: -- cgit v1.2.3