garbeam@34: # dwm - dynamic window manager garbeam@0: # (C)opyright MMVI Anselm R. Garbe garbeam@0: garbeam@0: include config.mk garbeam@0: garbeam@75: SRC = client.c draw.c event.c main.c tag.c util.c garbeam@32: OBJ = ${SRC:.c=.o} garbeam@34: MAN1 = dwm.1 garbeam@34: BIN = dwm garbeam@0: garbeam@91: all: options dwm garbeam@0: @echo finished garbeam@0: garbeam@91: options: garbeam@34: @echo dwm build options: garbeam@1: @echo "CFLAGS = ${CFLAGS}" garbeam@1: @echo "LDFLAGS = ${LDFLAGS}" garbeam@1: @echo "CC = ${CC}" garbeam@1: garbeam@0: .c.o: garbeam@0: @echo CC $< garbeam@0: @${CC} -c ${CFLAGS} $< garbeam@0: arg@172: ${OBJ}: dwm.h config.h arg@172: arg@172: config.h: arg@174: @echo missing config.h created arg@174: @cp config.default.h $@ garbeam@3: garbeam@34: dwm: ${OBJ} garbeam@3: @echo LD $@ garbeam@32: @${CC} -o $@ ${OBJ} ${LDFLAGS} garbeam@0: garbeam@0: clean: arg@143: rm -f dwm *.o dwm-${VERSION}.tar.gz garbeam@1: garbeam@1: dist: clean garbeam@34: mkdir -p dwm-${VERSION} garbeam@68: cp -R Makefile README LICENSE config.mk *.h *.c ${MAN1} dwm-${VERSION} garbeam@34: tar -cf dwm-${VERSION}.tar dwm-${VERSION} garbeam@34: gzip dwm-${VERSION}.tar garbeam@34: rm -rf dwm-${VERSION} garbeam@1: garbeam@1: install: all garbeam@1: @mkdir -p ${DESTDIR}${PREFIX}/bin garbeam@1: @cp -f ${BIN} ${DESTDIR}${PREFIX}/bin arg@116: @for i in ${BIN}; do \ arg@116: chmod 755 ${DESTDIR}${PREFIX}/bin/`basename $$i`; \ arg@116: done garbeam@1: @echo installed executable files to ${DESTDIR}${PREFIX}/bin garbeam@1: @mkdir -p ${DESTDIR}${MANPREFIX}/man1 garbeam@1: @cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1 arg@116: @for i in ${MAN1}; do \ arg@116: chmod 444 ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \ arg@116: done garbeam@1: @echo installed manual pages to ${DESTDIR}${MANPREFIX}/man1 garbeam@1: garbeam@1: uninstall: garbeam@1: for i in ${BIN}; do \ garbeam@1: rm -f ${DESTDIR}${PREFIX}/bin/`basename $$i`; \ garbeam@1: done garbeam@1: for i in ${MAN1}; do \ garbeam@1: rm -f ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \ garbeam@1: done arg@174: arg@174: .PHONY: all options clean dist install uninstall