X-Git-Url: https://git.subgeniuskitty.com/xmenu/.git/blobdiff_plain/697f63c47427bcca9115e74859ce4debe788fdc5..78cdb02be61695e7ac9eedce5796c22b570f568e:/Makefile diff --git a/Makefile b/Makefile index 8e58c75..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} @@ -8,7 +11,7 @@ all: ${PROG} ${PROG}: ${OBJS} ${CC} -o $@ ${OBJS} ${LDFLAGS} -${OBJS}: config.h +${OBJS}: config.h ${PROG}.h .c.o: ${CC} ${CFLAGS} -c $< @@ -17,13 +20,13 @@ clean: -rm ${OBJS} ${PROG} install: all - install -d ${DESTDIR}${PREFIX}/bin/ - install -d ${DESTDIR}${MANPREFIX}/man1/ - install -m 755 ${PROG} ${DESTDIR}${PREFIX}/bin/ - install -m 644 ${PROG}.1 ${DESTDIR}${MANPREFIX}/man1/ + 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