wprof/wprof-make-install.diff
Michel Lind 7c690d6827
Initial package of wprof 0.1
Signed-off-by: Michel Lind <salimma@centosproject.org>
2025-11-05 18:11:16 +00:00

22 lines
528 B
Diff

--- a/src/Makefile
+++ b/src/Makefile
@@ -5,6 +5,11 @@ CARGO ?= $(shell which cargo)
DEBUG ?=
BLAZESYM_DEBUG ?=
+# for installation
+DESTDIR ?=
+prefix ?= /usr/local
+bindir ?= $(prefix)/bin
+
LIBBPF_SRC := $(abspath ../libbpf/src)
BPFTOOL_SRC := $(abspath ../bpftool/src)
LIBBPF_OBJ := $(abspath $(OUTPUT)/libbpf.a)
@@ -144,3 +149,7 @@ sim: $(OUTPUT)/sim.o | $(OUTPUT)
# keep intermediate (.skel.h, .bpf.o, etc) targets
.SECONDARY:
+
+install: wprof
+ mkdir -p $(DESTDIR)$(bindir)
+ cp -p wprof $(DESTDIR)$(bindir)/