CFLAGS?=-Wall -Wextra -Wpedantic -O3 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 install: pkgrel mkdir -p $(DESTDIR)$(BINDIR) mkdir -p $(DESTDIR)$(MANDIR) cp -f pkgrel $(DESTDIR)$(BINDIR)/pkgrel cp -f pkgrel.1 $(DESTDIR)$(MANDIR)/pkgrel.1 chmod 755 $(DESTDIR)$(BINDIR)/pkgrel chmod 644 $(DESTDIR)$(MANDIR)/pkgrel.1 uninstall: rm -f $(DESTDIR)$(BINDIR)/pkgrel rm -f $(DESTDIR)$(MANDIR)/pkgrel.1 test: pkgrel @./test.sh 2>/dev/null .PHONY: all clean install uninstall test