summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-02-16 02:06:14 +0200
committerPaul Buetow <paul@buetow.org>2024-02-16 02:06:14 +0200
commit202c3c4e6fe6bd8082e221f8866dd1d55a398636 (patch)
tree4ceb5af36140a64cc7bf4829b8771239488e0806 /Makefile
parent04fa01992ad88ea8e9cd05e7cbb9f81087b23aff (diff)
move C file to internal
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 116d967..60ab9b3 100644
--- a/Makefile
+++ b/Makefile
@@ -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: