X-Git-Url: https://git.subgeniuskitty.com/xmenu/.git/blobdiff_plain/b6cf4847cedfc09ccad10db651e2e97d7ac89184..60ddf397e389f25f0a038548d9c808c83d815ba7:/Makefile diff --git a/Makefile b/Makefile index 58079ce..f5c7488 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ include config.mk +bindir = ${DESTDIR}${PREFIX} +mandir = ${DESTDIR}${MANPREFIX} + SRCS = ${PROG}.c OBJS = ${SRCS:.c=.o} @@ -17,11 +20,13 @@ clean: -rm ${OBJS} ${PROG} install: all - install -D -m 755 ${PROG} ${DESTDIR}${PREFIX}/bin/${PROG} - install -D -m 644 ${PROG}.1 ${DESTDIR}${MANPREFIX}/man1/${PROG}.1 + mkdir -p ${bindir}/bin + install -m 755 ${PROG} ${bindir}/bin/${PROG} + mkdir -p ${mandir}/man1 + install -m 644 ${PROG}.1 ${mandir}/man1/${PROG}.1 uninstall: - rm -f ${DESTDIR}${PREFIX}/bin/${PROG} - rm -f ${DESTDIR}${MANPREFIX}/man1/${PROG}.1 + rm -f ${bindir}/bin/${PROG} + rm -f ${mandir}/man1/${PROG}.1 .PHONY: all clean install uninstall