diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -5,6 +5,11 @@ CFLAGS=-Wall -O2 $(EXTRACFLAGS) LIBS=-lutil RST2MAN=rst2man.py +PREFIX=/usr +BINDIR=$(PREFIX)/bin +MANDIR=$(PREFIX)/man +MAN1DIR=$(MANDIR)/man1 + all: $(PROJ) $(PROJ): $(PROJ).c $(PROJ).1 README.txt @@ -19,6 +24,12 @@ README.txt: $(PROJ).1 test: all sh test.sh +install: all + mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MAN1DIR) + install -s -m0755 $(PROJ) $(DESTDIR)$(BINDIR) + install -m0644 $(PROJ).1 $(DESTDIR)$(MAN1DIR) + gzip --help >/dev/null 2>/dev/null && gzip $(DESTDIR)$(MAN1DIR)/$(PROJ).1 + # Don't remove the man page or README here, it's in git. clean: rm -f $(PROJ) core *.o |