aewl

view 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
line source
1 # dwm - dynamic window manager
2 # (C)opyright MMVI Anselm R. Garbe
4 include config.mk
6 SRC = client.c draw.c event.c main.c tag.c util.c
7 OBJ = ${SRC:.c=.o}
8 MAN1 = dwm.1
9 BIN = dwm
11 all: options dwm
12 @echo finished
14 options:
15 @echo dwm build options:
16 @echo "CFLAGS = ${CFLAGS}"
17 @echo "LDFLAGS = ${LDFLAGS}"
18 @echo "CC = ${CC}"
20 .c.o:
21 @echo CC $<
22 @${CC} -c ${CFLAGS} $<
24 ${OBJ}: dwm.h config.h
26 config.h:
27 @echo missing config.h created
28 @cp config.default.h $@
30 dwm: ${OBJ}
31 @echo LD $@
32 @${CC} -o $@ ${OBJ} ${LDFLAGS}
34 clean:
35 rm -f dwm *.o dwm-${VERSION}.tar.gz
37 dist: clean
38 mkdir -p dwm-${VERSION}
39 cp -R Makefile README LICENSE config.mk *.h *.c ${MAN1} dwm-${VERSION}
40 tar -cf dwm-${VERSION}.tar dwm-${VERSION}
41 gzip dwm-${VERSION}.tar
42 rm -rf dwm-${VERSION}
44 install: all
45 @mkdir -p ${DESTDIR}${PREFIX}/bin
46 @cp -f ${BIN} ${DESTDIR}${PREFIX}/bin
47 @for i in ${BIN}; do \
48 chmod 755 ${DESTDIR}${PREFIX}/bin/`basename $$i`; \
49 done
50 @echo installed executable files to ${DESTDIR}${PREFIX}/bin
51 @mkdir -p ${DESTDIR}${MANPREFIX}/man1
52 @cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1
53 @for i in ${MAN1}; do \
54 chmod 444 ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \
55 done
56 @echo installed manual pages to ${DESTDIR}${MANPREFIX}/man1
58 uninstall:
59 for i in ${BIN}; do \
60 rm -f ${DESTDIR}${PREFIX}/bin/`basename $$i`; \
61 done
62 for i in ${MAN1}; do \
63 rm -f ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \
64 done
66 .PHONY: all options clean dist install uninstall