From 5295909e45d8fdc172d9495367c056ff4bb6df60 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Thu, 27 Aug 2015 13:49:38 +0200 Subject: Makefile: add make install rule --- Makefile | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 431b504..99bb31e 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,23 @@ +ALL=nq fq tq + CFLAGS=-g -Wall -O2 -all: nq fq -nq: nq.c -fq: fq.c -clean: + +DESTDIR= +PREFIX=/usr/local +BINDIR=$(PREFIX)/bin +MANDIR=$(PREFIX)/share/man + +all: $(ALL) + +clean: FRC rm -f nq fq -check: + +check: FRC prove -v ./tests + +install: FRC all + mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 + install -m0755 $(ALL) $(DESTDIR)$(BINDIR) + install -m0644 $(ALL:=.1) $(DESTDIR)$(MANDIR)/man1 + +FRC: -- cgit 1.4.1