diff options
author | B. Watson <yalhcru@gmail.com> | 2021-07-24 11:23:52 -0400 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2021-07-24 11:23:52 -0400 |
commit | f81125b285faa47273f699873fe49871123d0924 (patch) | |
tree | 3237e7a06c0beff704c42860f10c657d6135c091 /Makefile | |
parent | 0baa92a29a25d2bcf85b29176d8f764c7fcd2db9 (diff) | |
download | slowbaud-f81125b285faa47273f699873fe49871123d0924.tar.gz |
Add "make install"
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 |