2 # See LICENSE file for copyright and license details.
12 @echo dmenu build options:
13 @echo "CFLAGS = ${CFLAGS}"
14 @echo "LDFLAGS = ${LDFLAGS}"
19 @${CC} -c ${CFLAGS} $<
21 ${OBJ}: config.h config.mk
25 @${CC} -o $@ ${OBJ} ${LDFLAGS}
29 @rm -f dmenu ${OBJ} dmenu-${VERSION}.tar.gz
32 @echo creating dist tarball
33 @mkdir -p dmenu-${VERSION}
34 @cp -R LICENSE Makefile README config.mk dmenu.1 config.h dmenu_path dmenu_run ${SRC} dmenu-${VERSION}
35 @tar -cf dmenu-${VERSION}.tar dmenu-${VERSION}
36 @gzip dmenu-${VERSION}.tar
37 @rm -rf dmenu-${VERSION}
40 @echo installing executable file to ${DESTDIR}${PREFIX}/bin
41 @mkdir -p ${DESTDIR}${PREFIX}/bin
42 @cp -f dmenu dmenu_path dmenu_run ${DESTDIR}${PREFIX}/bin
43 @chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu
44 @chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu_path
45 @chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu_run
46 @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
47 @mkdir -p ${DESTDIR}${MANPREFIX}/man1
48 @sed "s/VERSION/${VERSION}/g" < dmenu.1 > ${DESTDIR}${MANPREFIX}/man1/dmenu.1
49 @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dmenu.1
52 @echo removing executable file from ${DESTDIR}${PREFIX}/bin
53 @rm -f ${DESTDIR}${PREFIX}/bin/dmenu ${DESTDIR}${PREFIX}/bin/dmenu_path
54 @rm -f ${DESTDIR}${PREFIX}/bin/dmenu ${DESTDIR}${PREFIX}/bin/dmenu_run
55 @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
56 @rm -f ${DESTDIR}${MANPREFIX}/man1/dmenu.1
58 .PHONY: all options clean dist install uninstall