summaryrefslogtreecommitdiff
path: root/internal/c
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-02-19 10:38:38 +0200
committerPaul Buetow <paul@buetow.org>2024-02-19 10:38:38 +0200
commitf7ba8b694a4c6b1d6583b730cf918e7953b20a72 (patch)
treed7c7f9de6f34b7a18ea03d66d5f79164c3bd741a /internal/c
parent88483511d71a4f74e03580866be73769c407beee (diff)
propper C makefile
Diffstat (limited to 'internal/c')
-rw-r--r--internal/c/Makefile8
1 files 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: