aewl

annotate Makefile @ 174:48c820470858

applied Sanders doc changes, added a PHONY line and changed the output of config.h creation somewhat
author arg@10ksloc.org
date Thu, 03 Aug 2006 10:58:29 +0200
parents af781faa40d6
children f0b81c08a588
rev   line source
garbeam@34 1 # dwm - dynamic window manager
garbeam@0 2 # (C)opyright MMVI Anselm R. Garbe
garbeam@0 3
garbeam@0 4 include config.mk
garbeam@0 5
garbeam@75 6 SRC = client.c draw.c event.c main.c tag.c util.c
garbeam@32 7 OBJ = ${SRC:.c=.o}
garbeam@34 8 MAN1 = dwm.1
garbeam@34 9 BIN = dwm
garbeam@0 10
garbeam@91 11 all: options dwm
garbeam@0 12 @echo finished
garbeam@0 13
garbeam@91 14 options:
garbeam@34 15 @echo dwm build options:
garbeam@1 16 @echo "CFLAGS = ${CFLAGS}"
garbeam@1 17 @echo "LDFLAGS = ${LDFLAGS}"
garbeam@1 18 @echo "CC = ${CC}"
garbeam@1 19
garbeam@0 20 .c.o:
garbeam@0 21 @echo CC $<
garbeam@0 22 @${CC} -c ${CFLAGS} $<
garbeam@0 23
arg@172 24 ${OBJ}: dwm.h config.h
arg@172 25
arg@172 26 config.h:
arg@174 27 @echo missing config.h created
arg@174 28 @cp config.default.h $@
garbeam@3 29
garbeam@34 30 dwm: ${OBJ}
garbeam@3 31 @echo LD $@
garbeam@32 32 @${CC} -o $@ ${OBJ} ${LDFLAGS}
garbeam@0 33
garbeam@0 34 clean:
arg@143 35 rm -f dwm *.o dwm-${VERSION}.tar.gz
garbeam@1 36
garbeam@1 37 dist: clean
garbeam@34 38 mkdir -p dwm-${VERSION}
garbeam@68 39 cp -R Makefile README LICENSE config.mk *.h *.c ${MAN1} dwm-${VERSION}
garbeam@34 40 tar -cf dwm-${VERSION}.tar dwm-${VERSION}
garbeam@34 41 gzip dwm-${VERSION}.tar
garbeam@34 42 rm -rf dwm-${VERSION}
garbeam@1 43
garbeam@1 44 install: all
garbeam@1 45 @mkdir -p ${DESTDIR}${PREFIX}/bin
garbeam@1 46 @cp -f ${BIN} ${DESTDIR}${PREFIX}/bin
arg@116 47 @for i in ${BIN}; do \
arg@116 48 chmod 755 ${DESTDIR}${PREFIX}/bin/`basename $$i`; \
arg@116 49 done
garbeam@1 50 @echo installed executable files to ${DESTDIR}${PREFIX}/bin
garbeam@1 51 @mkdir -p ${DESTDIR}${MANPREFIX}/man1
garbeam@1 52 @cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1
arg@116 53 @for i in ${MAN1}; do \
arg@116 54 chmod 444 ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \
arg@116 55 done
garbeam@1 56 @echo installed manual pages to ${DESTDIR}${MANPREFIX}/man1
garbeam@1 57
garbeam@1 58 uninstall:
garbeam@1 59 for i in ${BIN}; do \
garbeam@1 60 rm -f ${DESTDIR}${PREFIX}/bin/`basename $$i`; \
garbeam@1 61 done
garbeam@1 62 for i in ${MAN1}; do \
garbeam@1 63 rm -f ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \
garbeam@1 64 done
arg@174 65
arg@174 66 .PHONY: all options clean dist install uninstall