summaryrefslogtreecommitdiff
path: root/Makefile
blob: 86ffaf59d10db97ea636ba241107d521ce695ec4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
MAN1DIR=$(MANDIR)/man1

all: pkgrel

clean:
	rm -f *.o pkgrel

install: all
	install -Dm755 pkgrel -t $(DESTDIR)$(BINDIR)/
	install -Dm644 pkgrel.1 -t $(DESTDIR)$(MAN1DIR)/

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