From ee162a64d3c6697a9f33f5941cd6f08d1bb7059b Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 19 Jun 2024 00:58:20 +0200 Subject: Install target for executable --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f48a6f7..6a0a502 100644 --- a/Makefile +++ b/Makefile @@ -2,13 +2,20 @@ CFLAGS=-Wall -Wextra -Wpedantic -O3 -std=c99 -D_POSIX_C_SOURCE=200809L CFLAGS+=`pkg-config --cflags libgit2` LDLIBS+=`pkg-config --libs libgit2` +DESTDIR= +PREFIX=/usr/local +BINDIR=$(PREFIX)/bin all: datever - clean: rm -f datever +install: all + install -Dm755 datever -t $(DESTDIR)$(BINDIR)/ + +uninstall: + rm -f $(DESTDIR)$(BINDIR)/datever .POSIX: -.PHONY: all clean +.PHONY: all clean install uninstall -- cgit v1.1