diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2015-08-27 13:49:38 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2015-08-27 13:49:38 +0200 |
commit | 5295909e45d8fdc172d9495367c056ff4bb6df60 (patch) | |
tree | 63234245b5fc8e1c9ae300d341cf53a0cae865fc | |
parent | 62323ca1073df961ad875e3ef7cf79db8b688919 (diff) | |
download | nq-5295909e45d8fdc172d9495367c056ff4bb6df60.tar.gz nq-5295909e45d8fdc172d9495367c056ff4bb6df60.tar.xz nq-5295909e45d8fdc172d9495367c056ff4bb6df60.zip |
Makefile: add make install rule
-rw-r--r-- | Makefile | 25 |
1 files changed, 20 insertions, 5 deletions
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: |