From 202c3c4e6fe6bd8082e221f8866dd1d55a398636 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 16 Feb 2024 02:06:14 +0200 Subject: move C file to internal --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Makefile') 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: -- cgit v1.2.3