1 # dwm - dynamic window manager
2 # (C)opyright MMVI-MMVII Anselm R. Garbe
6 SRC = client.c event.c main.c screen.c util.c
12 @echo dwm build options:
13 @echo "CFLAGS = ${CFLAGS}"
14 @echo "LDFLAGS = ${LDFLAGS}"
19 @${CC} -c ${CFLAGS} $<
21 ${OBJ}: dwm.h config.h config.mk
24 @echo creating $@ from config.default.h
25 @cp config.default.h $@
29 @${CC} -o $@ ${OBJ} ${LDFLAGS}
34 @rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
37 @echo creating dist tarball
38 @mkdir -p dwm-${VERSION}
39 @cp -R LICENSE Makefile README config.*.h config.mk \
40 dwm.1 dwm.h ${SRC} dwm-${VERSION}
41 @tar -cf dwm-${VERSION}.tar dwm-${VERSION}
42 @gzip dwm-${VERSION}.tar
43 @rm -rf dwm-${VERSION}
46 @echo installing executable file to ${DESTDIR}${PREFIX}/bin
47 @mkdir -p ${DESTDIR}${PREFIX}/bin
48 @cp -f dwm ${DESTDIR}${PREFIX}/bin
49 @chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
50 @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
51 @mkdir -p ${DESTDIR}${MANPREFIX}/man1
52 @sed 's/VERSION/${VERSION}/g' < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
53 @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
56 @echo removing executable file from ${DESTDIR}${PREFIX}/bin
57 @rm -f ${DESTDIR}${PREFIX}/bin/dwm
58 @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
59 @rm -f ${DESTDIR}${MANPREFIX}/man1/dwm.1
61 .PHONY: all options clean dist install uninstall