summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index da97e66..a1624c8 100644
--- a/Makefile
+++ b/Makefile
@@ -18,3 +18,19 @@ options:
gramscii: $(SRC) $(INCLUDES)
$(CC) $(CFLAGS) -o $@ $(SRC)
+install: all
+ @echo installing executable to ${DESTDIR}${BINDIR}
+ @mkdir -p "${DESTDIR}${BINDIR}"
+ @cp -f ${NAME} "${DESTDIR}${BINDIR}"
+ @chmod 755 "${DESTDIR}${BINDIR}/${NAME}"
+ @echo installing manpage to "${DESTDIR}${MANDIR}/man1"
+ @mkdir -p "${DESTDIR}${MANDIR}/man1"
+ @cp -f ${NAME}.1 "${DESTDIR}${MANDIR}/man1"
+ @chmod 644 "${DESTDIR}${MANDIR}/man1/${NAME}.1"
+
+uninstall:
+ @echo removing executable file from ${DESTDIR}${BINDIR}
+ @rm -f "${DESTDIR}${BINDIR}/${NAME}"
+ @echo removing manpage from "${DESTDIR}${MANDIR}"
+ @rm -f "${DESTDIR}${MANDIR}/man1/${NAME}.1"
+