commit: 50f68022055c4ef651fc8bce05b0783bc1014495
parent 9f6708cb9be70689376823c5ca4a0ae42aac03d9
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Thu, 16 Oct 2025 01:34:28 +0200
Makefile: add install target
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,6 +1,9 @@
# SPDX-FileCopyrightText: 2024 Haelwenn (lanodan) Monnier <contact+mstrace@hacktivis.me>
# SPDX-License-Identifier: MPL-2.0
+PREFIX ?= /usr/local
+BINDIR ?= ${PREFIX}/bin
+
mstrace: mstrace.c strsyscall.c print_syscall.o
${CC} -std=c99 ${CFLAGS} -o mstrace mstrace.c strsyscall.c print_syscall.o ${LDFLAGS} ${LDSTATIC}
@@ -22,3 +25,8 @@ clean:
.PHONY: format
format:
clang-format -style=file -assume-filename=.clang-format -i mstrace.c print_syscall.c
+
+.PHONY: install
+install: mstrace
+ mkdir -p ${DESTDIR}${BINDIR}
+ cp -p mstrace ${DESTDIR}${BINDIR}/mstrace