aewl

annotate Makefile @ 185:4b770a585866

make config.h not a time dependence
author arg@10ksloc.org
date Thu, 03 Aug 2006 15:36:13 +0200
parents 2d05df09253c
children c0defd7d5a5a
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}
arg@181 8 CONFIG ?= config.default.h
garbeam@0 9
garbeam@91 10 all: options dwm
garbeam@0 11 @echo finished
garbeam@0 12
garbeam@91 13 options:
garbeam@34 14 @echo dwm build options:
garbeam@1 15 @echo "CFLAGS = ${CFLAGS}"
garbeam@1 16 @echo "LDFLAGS = ${LDFLAGS}"
garbeam@1 17 @echo "CC = ${CC}"
garbeam@1 18
garbeam@0 19 .c.o:
garbeam@0 20 @echo CC $<
garbeam@0 21 @${CC} -c ${CFLAGS} $<
garbeam@0 22
arg@172 23 ${OBJ}: dwm.h config.h
arg@172 24
arg@185 25 config.h:
arg@183 26 @echo creating $@ from ${CONFIG}
arg@183 27 @cp ${CONFIG} $@
garbeam@3 28
garbeam@34 29 dwm: ${OBJ}
garbeam@3 30 @echo LD $@
garbeam@32 31 @${CC} -o $@ ${OBJ} ${LDFLAGS}
garbeam@0 32
garbeam@0 33 clean:
arg@180 34 @echo cleaning
arg@184 35 @rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
garbeam@1 36
garbeam@1 37 dist: clean
arg@180 38 @echo creating dist tarball
arg@180 39 @mkdir -p dwm-${VERSION}
arg@180 40 @cp -R LICENSE Makefile README config.*.h config.mk \
arg@180 41 dwm.1 dwm.h ${SRC} dwm-${VERSION}
arg@180 42 @tar -cf dwm-${VERSION}.tar dwm-${VERSION}
arg@180 43 @gzip dwm-${VERSION}.tar
arg@180 44 @rm -rf dwm-${VERSION}
garbeam@1 45
garbeam@1 46 install: all
arg@180 47 @echo installing executable file to ${DESTDIR}${PREFIX}/bin
garbeam@1 48 @mkdir -p ${DESTDIR}${PREFIX}/bin
arg@180 49 @cp -f dwm ${DESTDIR}${PREFIX}/bin
arg@180 50 @chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
arg@180 51 @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
garbeam@1 52 @mkdir -p ${DESTDIR}${MANPREFIX}/man1
arg@180 53 @cp -f dwm.1 ${DESTDIR}${MANPREFIX}/man1
arg@180 54 @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
garbeam@1 55
garbeam@1 56 uninstall:
arg@180 57 @echo removing executable file from ${DESTDIR}${PREFIX}/bin
arg@180 58 @rm -f ${DESTDIR}${PREFIX}/bin/dwm
arg@180 59 @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
arg@180 60 @rm -f ${DESTDIR}${MANPREFIX}/man1/dwm.1
arg@174 61
arg@174 62 .PHONY: all options clean dist install uninstall