comparison Makefile @ 13:c65d4f8dc8fd

use inverse border color
author paulo
date Sat, 12 Mar 2016 23:30:00 -0800
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e118ffe434c4
1 # dwm - dynamic window manager
2 # (C)opyright MMVI-MMVII Anselm R. Garbe
3
4 include config.mk
5
6 SRC = client.c draw.c event.c layout.c main.c tag.c util.c
7 OBJ = ${SRC:.c=.o}
8
9 all: options dwm
10
11 options:
12 @echo dwm build options:
13 @echo "CFLAGS = ${CFLAGS}"
14 @echo "LDFLAGS = ${LDFLAGS}"
15 @echo "CC = ${CC}"
16
17 .c.o:
18 @echo CC $<
19 @${CC} -c ${CFLAGS} $<
20
21 ${OBJ}: dwm.h config.h config.mk
22
23 config.h:
24 @echo creating $@ from config.default.h
25 @cp config.default.h $@
26
27 dwm: ${OBJ}
28 @echo CC -o $@
29 @${CC} -o $@ ${OBJ} ${LDFLAGS}
30 @strip $@
31
32 clean:
33 @echo cleaning
34 @rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
35
36 dist: clean
37 @echo creating dist tarball
38 @mkdir -p dwm-${VERSION}
39 @cp -R LICENSE Makefile README config.*.h config.mk \
40 dwm.1 dwm.h ${SRC} dwm-${VERSION}
41 @tar -cf dwm-${VERSION}.tar dwm-${VERSION}
42 @gzip dwm-${VERSION}.tar
43 @rm -rf dwm-${VERSION}
44
45 install: all
46 @echo installing executable file to ${DESTDIR}${PREFIX}/bin
47 @mkdir -p ${DESTDIR}${PREFIX}/bin
48 @cp -f dwm ${DESTDIR}${PREFIX}/bin
49 @chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
50 @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
51 @mkdir -p ${DESTDIR}${MANPREFIX}/man1
52 @sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
53 @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
54
55 uninstall:
56 @echo removing executable file from ${DESTDIR}${PREFIX}/bin
57 @rm -f ${DESTDIR}${PREFIX}/bin/dwm
58 @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
59 @rm -f ${DESTDIR}${MANPREFIX}/man1/dwm.1
60
61 .PHONY: all options clean dist install uninstall