aewl

annotate Makefile @ 753:c459e05a61a8

bugfix in Makefile
author meillo@marmaro.de
date Sat, 16 Jun 2007 21:49:51 +0200
parents 6692d7e7e156
children 4c12dccc288d
rev   line source
garbeam@34 1 # dwm - dynamic window manager
arg@741 2 # (C)opyright MMVI-MMVII Anselm R. Garbe
garbeam@0 3
garbeam@0 4 include config.mk
garbeam@0 5
arg@327 6 SRC = client.c draw.c event.c main.c tag.c util.c view.c
garbeam@32 7 OBJ = ${SRC:.c=.o}
garbeam@0 8
garbeam@91 9 all: options dwm
garbeam@0 10
garbeam@91 11 options:
garbeam@34 12 @echo dwm build options:
garbeam@1 13 @echo "CFLAGS = ${CFLAGS}"
garbeam@1 14 @echo "LDFLAGS = ${LDFLAGS}"
garbeam@1 15 @echo "CC = ${CC}"
garbeam@1 16
garbeam@0 17 .c.o:
garbeam@0 18 @echo CC $<
garbeam@0 19 @${CC} -c ${CFLAGS} $<
garbeam@0 20
arg@222 21 ${OBJ}: dwm.h config.h config.mk
arg@172 22
meillo@753 23 config.h: config.meillo.h
meillo@749 24 @echo creating $@ from config.meillo.h
meillo@749 25 @cp config.meillo.h $@
garbeam@3 26
garbeam@34 27 dwm: ${OBJ}
arg@729 28 @echo CC -o $@
arg@729 29 @${CC} -o $@ ${OBJ} ${LDFLAGS}
arg@204 30 @strip $@
garbeam@0 31
garbeam@0 32 clean:
arg@180 33 @echo cleaning
arg@184 34 @rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
garbeam@1 35
garbeam@1 36 dist: clean
arg@180 37 @echo creating dist tarball
arg@180 38 @mkdir -p dwm-${VERSION}
arg@180 39 @cp -R LICENSE Makefile README config.*.h config.mk \
arg@180 40 dwm.1 dwm.h ${SRC} dwm-${VERSION}
arg@180 41 @tar -cf dwm-${VERSION}.tar dwm-${VERSION}
arg@180 42 @gzip dwm-${VERSION}.tar
arg@180 43 @rm -rf dwm-${VERSION}
garbeam@1 44
garbeam@1 45 install: all
arg@180 46 @echo installing executable file to ${DESTDIR}${PREFIX}/bin
garbeam@1 47 @mkdir -p ${DESTDIR}${PREFIX}/bin
arg@180 48 @cp -f dwm ${DESTDIR}${PREFIX}/bin
arg@180 49 @chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
arg@180 50 @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
garbeam@1 51 @mkdir -p ${DESTDIR}${MANPREFIX}/man1
arg@213 52 @sed 's/VERSION/${VERSION}/g' < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
arg@180 53 @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
garbeam@1 54
garbeam@1 55 uninstall:
arg@180 56 @echo removing executable file from ${DESTDIR}${PREFIX}/bin
arg@180 57 @rm -f ${DESTDIR}${PREFIX}/bin/dwm
arg@180 58 @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
arg@180 59 @rm -f ${DESTDIR}${MANPREFIX}/man1/dwm.1
arg@174 60
arg@174 61 .PHONY: all options clean dist install uninstall