dwm-meillo

view Makefile @ 179:621222b67c3b

stylistic chnage
author arg@10ksloc.org
date Thu, 03 Aug 2006 12:21:00 +0200
parents f0b81c08a588
children 6d2bc1d3a00d
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 dwm.h config.*.h \
40 ${SRC} ${MAN1} dwm-${VERSION}
41 tar -cf dwm-${VERSION}.tar dwm-${VERSION}
42 gzip dwm-${VERSION}.tar
43 rm -rf dwm-${VERSION}
45 install: all
46 @mkdir -p ${DESTDIR}${PREFIX}/bin
47 @cp -f ${BIN} ${DESTDIR}${PREFIX}/bin
48 @for i in ${BIN}; do \
49 chmod 755 ${DESTDIR}${PREFIX}/bin/`basename $$i`; \
50 done
51 @echo installed executable files to ${DESTDIR}${PREFIX}/bin
52 @mkdir -p ${DESTDIR}${MANPREFIX}/man1
53 @cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1
54 @for i in ${MAN1}; do \
55 chmod 444 ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \
56 done
57 @echo installed manual pages to ${DESTDIR}${MANPREFIX}/man1
59 uninstall:
60 for i in ${BIN}; do \
61 rm -f ${DESTDIR}${PREFIX}/bin/`basename $$i`; \
62 done
63 for i in ${MAN1}; do \
64 rm -f ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \
65 done
67 .PHONY: all options clean dist install uninstall