aewl

annotate Makefile @ 273:ffc73b32084a

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