author | Anselm R Garbe <garbeam@gmail.com> |
Tue, 14 Jul 2009 16:26:04 +0100 | |
changeset 1464 | 555070221577 |
parent 1221 | c4a359bfcbb6 |
permissions | -rw-r--r-- |
34 | 1 |
# dwm - dynamic window manager |
1181 | 2 |
# See LICENSE file for copyright and license details. |
0 | 3 |
|
4 |
include config.mk |
|
5 |
||
1036
e6188cb17fa1
removed dwm.h, just include C-files in config.h if you extend dwm, that's simplier and most flexible than all other possibilities
arg@suckless.org
parents:
1029
diff
changeset
|
6 |
SRC = dwm.c |
32 | 7 |
OBJ = ${SRC:.c=.o} |
0 | 8 |
|
91 | 9 |
all: options dwm |
0 | 10 |
|
91 | 11 |
options: |
34 | 12 |
@echo dwm build options: |
1 | 13 |
@echo "CFLAGS = ${CFLAGS}" |
14 |
@echo "LDFLAGS = ${LDFLAGS}" |
|
15 |
@echo "CC = ${CC}" |
|
16 |
||
0 | 17 |
.c.o: |
18 |
@echo CC $< |
|
19 |
@${CC} -c ${CFLAGS} $< |
|
20 |
||
990 | 21 |
${OBJ}: config.h config.mk |
172
af781faa40d6
implemented the idea presented by Sander for dwm target
arg@10ksloc.org
parents:
143
diff
changeset
|
22 |
|
1009
00d2fc91a2c7
renamed config.h into config.def.h, config.h will be created if not present, this seems less annoying after all
Anselm R. Garbe <garbeam@gmail.com>
parents:
1001
diff
changeset
|
23 |
config.h: |
1038 | 24 |
@echo creating $@ from config.def.h |
25 |
@cp config.def.h $@ |
|
1009
00d2fc91a2c7
renamed config.h into config.def.h, config.h will be created if not present, this seems less annoying after all
Anselm R. Garbe <garbeam@gmail.com>
parents:
1001
diff
changeset
|
26 |
|
34 | 27 |
dwm: ${OBJ} |
729
9c3bf42bdbf4
got rid of LD (inspired by JGs patch to wmii)
Anselm R. Garbe <arg@suckless.org>
parents:
643
diff
changeset
|
28 |
@echo CC -o $@ |
9c3bf42bdbf4
got rid of LD (inspired by JGs patch to wmii)
Anselm R. Garbe <arg@suckless.org>
parents:
643
diff
changeset
|
29 |
@${CC} -o $@ ${OBJ} ${LDFLAGS} |
0 | 30 |
|
31 |
clean: |
|
180 | 32 |
@echo cleaning |
184 | 33 |
@rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz |
1 | 34 |
|
35 |
dist: clean |
|
180 | 36 |
@echo creating dist tarball |
37 |
@mkdir -p dwm-${VERSION} |
|
1168 | 38 |
@cp -R LICENSE Makefile README config.def.h config.mk \ |
1221 | 39 |
dwm.1 ${SRC} dwm-${VERSION} |
180 | 40 |
@tar -cf dwm-${VERSION}.tar dwm-${VERSION} |
41 |
@gzip dwm-${VERSION}.tar |
|
42 |
@rm -rf dwm-${VERSION} |
|
1 | 43 |
|
44 |
install: all |
|
180 | 45 |
@echo installing executable file to ${DESTDIR}${PREFIX}/bin |
1 | 46 |
@mkdir -p ${DESTDIR}${PREFIX}/bin |
180 | 47 |
@cp -f dwm ${DESTDIR}${PREFIX}/bin |
48 |
@chmod 755 ${DESTDIR}${PREFIX}/bin/dwm |
|
49 |
@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1 |
|
1 | 50 |
@mkdir -p ${DESTDIR}${MANPREFIX}/man1 |
796
75b1b25fe0d7
fixed quoting and a comment
Anselm R. Garbe <arg@suckless.org>
parents:
793
diff
changeset
|
51 |
@sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1 |
180 | 52 |
@chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1 |
1 | 53 |
|
54 |
uninstall: |
|
180 | 55 |
@echo removing executable file from ${DESTDIR}${PREFIX}/bin |
56 |
@rm -f ${DESTDIR}${PREFIX}/bin/dwm |
|
57 |
@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1 |
|
58 |
@rm -f ${DESTDIR}${MANPREFIX}/man1/dwm.1 |
|
174
48c820470858
applied Sanders doc changes, added a PHONY line and changed the output of config.h creation somewhat
arg@10ksloc.org
parents:
172
diff
changeset
|
59 |
|
48c820470858
applied Sanders doc changes, added a PHONY line and changed the output of config.h creation somewhat
arg@10ksloc.org
parents:
172
diff
changeset
|
60 |
.PHONY: all options clean dist install uninstall |