From 14bfd00920bfa9c4160786e486ed12841cc26cc3 Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 8 Jul 2022 17:07:13 +0200 Subject: Added install and uninstall targets --- Makefile | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 89954cd..1003a77 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,23 @@ CFLAGS=`pkg-config --cflags libgit2` LDLIBS=`pkg-config --libs libgit2` +PREFIX?=/usr/local +BINDIR?=$(PREFIX)/bin +DATADIR?=$(PREFIX)/share +MANDIR?=$(DATADIR)/man/man1 + all: pkgrel clean: rm -f *.o pkgrel -.PHONY: all clean +install: pkgrel + mkdir -p $(DESTDIR)$(BINDIR) + mkdir -p $(DESTDIR)$(MANDIR) + cp -f pkgrel $(DESTDIR)$(BINDIR)/pkgrel + chmod 755 $(DESTDIR)$(BINDIR)/pkgrel + +uninstall: + rm -f $(DESTDIR)$(BINDIR)/pkgrel + +.PHONY: all clean install uninstall -- cgit v1.1