From c4531d8793b971565775e71cda1bdc8a45622e0a Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 11 Feb 2024 23:37:07 +0200 Subject: make it phony --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 30d40d1..c2bb4af 100644 --- a/Makefile +++ b/Makefile @@ -9,20 +9,24 @@ all: build run build: bpfbuild gobuild +.PHONY: bpfbuild bpfbuild: bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h $(CC) -g -O2 -Wall -fpie -I$(LIBBPFGO)/selftest/common -target bpf -D__TARGET_ARCH_amd64 -I$(LIBBPFGO)/output -I$(LIBBPFGO)/selftest/common -c ioriotng.bpf.c -o ioriotng.bpf.o +.PHONY: gobuild gobuild: echo 'package main' > internal/opids.go echo >> internal/opids.go sed -E 's/#define (.*) ([0-9]+)/const \1 = \2/' opids.h >> internal/opids.go go build -tags netgo -ldflags '-w -extldflags "-static"' -o ioriotng ./cmd/ioriotng/main.go +.PHONY: clean clean: find . -type f -name ioriotng -delete find . -name \*.o -delete find . -name vmlinux.h -delete +.PHONY: run run: sudo ./ioriotng -- cgit v1.2.3