paulo@0: # dwm - dynamic window manager paulo@0: # (C)opyright MMVI-MMVII Anselm R. Garbe paulo@0: paulo@0: include config.mk paulo@0: paulo@0: SRC = client.c draw.c event.c layout.c main.c tag.c util.c paulo@0: OBJ = ${SRC:.c=.o} paulo@0: paulo@0: all: options dwm paulo@0: paulo@0: options: paulo@0: @echo dwm build options: paulo@0: @echo "CFLAGS = ${CFLAGS}" paulo@0: @echo "LDFLAGS = ${LDFLAGS}" paulo@0: @echo "CC = ${CC}" paulo@0: paulo@0: .c.o: paulo@0: @echo CC $< paulo@0: @${CC} -c ${CFLAGS} $< paulo@0: paulo@0: ${OBJ}: dwm.h config.h config.mk paulo@0: paulo@0: config.h: paulo@0: @echo creating $@ from config.default.h paulo@0: @cp config.default.h $@ paulo@0: paulo@0: dwm: ${OBJ} paulo@0: @echo CC -o $@ paulo@0: @${CC} -o $@ ${OBJ} ${LDFLAGS} paulo@0: @strip $@ paulo@0: paulo@0: clean: paulo@0: @echo cleaning paulo@0: @rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz paulo@0: paulo@0: dist: clean paulo@0: @echo creating dist tarball paulo@0: @mkdir -p dwm-${VERSION} paulo@0: @cp -R LICENSE Makefile README config.*.h config.mk \ paulo@0: dwm.1 dwm.h ${SRC} dwm-${VERSION} paulo@0: @tar -cf dwm-${VERSION}.tar dwm-${VERSION} paulo@0: @gzip dwm-${VERSION}.tar paulo@0: @rm -rf dwm-${VERSION} paulo@0: paulo@0: install: all paulo@0: @echo installing executable file to ${DESTDIR}${PREFIX}/bin paulo@0: @mkdir -p ${DESTDIR}${PREFIX}/bin paulo@0: @cp -f dwm ${DESTDIR}${PREFIX}/bin paulo@0: @chmod 755 ${DESTDIR}${PREFIX}/bin/dwm paulo@0: @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1 paulo@0: @mkdir -p ${DESTDIR}${MANPREFIX}/man1 paulo@0: @sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1 paulo@0: @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1 paulo@0: paulo@0: uninstall: paulo@0: @echo removing executable file from ${DESTDIR}${PREFIX}/bin paulo@0: @rm -f ${DESTDIR}${PREFIX}/bin/dwm paulo@0: @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1 paulo@0: @rm -f ${DESTDIR}${MANPREFIX}/man1/dwm.1 paulo@0: paulo@0: .PHONY: all options clean dist install uninstall