author | anselm@anselm1 |
Sun, 20 Apr 2008 19:09:00 +0100 | |
changeset 1180 | f0c6c30d2edc |
parent 1168 | f525cd0cfbd6 |
child 1181 | 65db532ac394 |
permissions | -rw-r--r-- |
34 | 1 |
# dwm - dynamic window manager |
0 | 2 |
|
3 |
include config.mk |
|
4 |
||
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
|
5 |
SRC = dwm.c |
32 | 6 |
OBJ = ${SRC:.c=.o} |
0 | 7 |
|
91 | 8 |
all: options dwm |
0 | 9 |
|
91 | 10 |
options: |
34 | 11 |
@echo dwm build options: |
1 | 12 |
@echo "CFLAGS = ${CFLAGS}" |
13 |
@echo "LDFLAGS = ${LDFLAGS}" |
|
14 |
@echo "CC = ${CC}" |
|
15 |
||
0 | 16 |
.c.o: |
17 |
@echo CC $< |
|
18 |
@${CC} -c ${CFLAGS} $< |
|
19 |
||
990 | 20 |
${OBJ}: config.h config.mk |
172
af781faa40d6
implemented the idea presented by Sander for dwm target
arg@10ksloc.org
parents:
143
diff
changeset
|
21 |
|
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
|
22 |
config.h: |
1038 | 23 |
@echo creating $@ from config.def.h |
24 |
@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
|
25 |
|
34 | 26 |
dwm: ${OBJ} |
729
9c3bf42bdbf4
got rid of LD (inspired by JGs patch to wmii)
Anselm R. Garbe <arg@suckless.org>
parents:
643
diff
changeset
|
27 |
@echo CC -o $@ |
9c3bf42bdbf4
got rid of LD (inspired by JGs patch to wmii)
Anselm R. Garbe <arg@suckless.org>
parents:
643
diff
changeset
|
28 |
@${CC} -o $@ ${OBJ} ${LDFLAGS} |
0 | 29 |
|
30 |
clean: |
|
180 | 31 |
@echo cleaning |
184 | 32 |
@rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz |
1 | 33 |
|
34 |
dist: clean |
|
180 | 35 |
@echo creating dist tarball |
36 |
@mkdir -p dwm-${VERSION} |
|
1168 | 37 |
@cp -R LICENSE Makefile README config.def.h config.mk \ |
990 | 38 |
dwm.1 ${SRC} dwm-${VERSION} |
180 | 39 |
@tar -cf dwm-${VERSION}.tar dwm-${VERSION} |
40 |
@gzip dwm-${VERSION}.tar |
|
41 |
@rm -rf dwm-${VERSION} |
|
1 | 42 |
|
43 |
install: all |
|
180 | 44 |
@echo installing executable file to ${DESTDIR}${PREFIX}/bin |
1 | 45 |
@mkdir -p ${DESTDIR}${PREFIX}/bin |
180 | 46 |
@cp -f dwm ${DESTDIR}${PREFIX}/bin |
47 |
@chmod 755 ${DESTDIR}${PREFIX}/bin/dwm |
|
48 |
@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1 |
|
1 | 49 |
@mkdir -p ${DESTDIR}${MANPREFIX}/man1 |
796
75b1b25fe0d7
fixed quoting and a comment
Anselm R. Garbe <arg@suckless.org>
parents:
793
diff
changeset
|
50 |
@sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1 |
180 | 51 |
@chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1 |
1 | 52 |
|
53 |
uninstall: |
|
180 | 54 |
@echo removing executable file from ${DESTDIR}${PREFIX}/bin |
55 |
@rm -f ${DESTDIR}${PREFIX}/bin/dwm |
|
56 |
@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1 |
|
57 |
@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
|
58 |
|
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 |
.PHONY: all options clean dist install uninstall |