diff options
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | Makefile | 4 | ||||
| -rw-r--r-- | internal/ioriotng.bpf.c (renamed from ioriotng.bpf.c) | 6 |
3 files changed, 8 insertions, 4 deletions
@@ -1,3 +1,5 @@ ioriotng +/ioriotng.bpf.c *.o vmlinux.h + @@ -12,7 +12,8 @@ build: bpfbuild gobuild .PHONY: bpfbuild bpfbuild: bpftool btf dump file /sys/kernel/btf/vmlinux format c > ./internal/types/vmlinux.h - $(CC) -g -O2 -Wall -fpie -target bpf -D__TARGET_ARCH_amd64 -I$(LIBBPFGO)/output -c ioriotng.bpf.c -o ioriotng.bpf.o + if [ ! -e ioriotng.bpf.c ]; then ln -s ./internal/ioriotng.bpf.c .; fi + $(CC) -g -O2 -Wall -fpie -target bpf -D__TARGET_ARCH_amd64 -I$(LIBBPFGO)/output -c ./internal/ioriotng.bpf.c -o ioriotng.bpf.o .PHONY: gobuild gobuild: @@ -23,6 +24,7 @@ clean: find . -type f -name ioriotng -delete find . -name \*.o -delete find . -name vmlinux.h -delete + if [ -e ioriotng.bpf.c ]; then rm ioriotng.bpf.c; fi .PHONY: run run: diff --git a/ioriotng.bpf.c b/internal/ioriotng.bpf.c index 1b64ee4..13a112d 100644 --- a/ioriotng.bpf.c +++ b/internal/ioriotng.bpf.c @@ -1,9 +1,9 @@ //+build ignore -#include "internal/types/vmlinux.h" +#include "types/vmlinux.h" #include <bpf/bpf_helpers.h> -#include "internal/types/types.bpf.h" -#include "internal/types/maps.bpf.h" +#include "types/types.bpf.h" +#include "types/maps.bpf.h" static inline int filter() { u32 key = 1; |
