Makefile
author arg@10ksloc.org
Thu, 03 Aug 2006 15:36:13 +0200
changeset 185 4b770a585866
parent 184 2d05df09253c
child 186 c0defd7d5a5a
permissions -rw-r--r--
make config.h not a time dependence
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34
cd30cce52b78 added logo+description
Anselm R. Garbe <garbeam@wmii.de>
parents: 32
diff changeset
     1
# dwm - dynamic window manager
0
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
     2
#   (C)opyright MMVI Anselm R. Garbe
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
     3
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
     4
include config.mk
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
     5
75
f08271b7cb20 rearranged several stuff
Anselm R. Garbe <garbeam@wmii.de>
parents: 73
diff changeset
     6
SRC = client.c draw.c event.c main.c tag.c util.c
32
082c75b937b5 removed unnecessary crap
Anselm R. Garbe <garbeam@wmii.de>
parents: 27
diff changeset
     7
OBJ = ${SRC:.c=.o}
181
03cb4cc41818 applied Jukka's diff
arg@10ksloc.org
parents: 180
diff changeset
     8
CONFIG ?= config.default.h
0
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
     9
91
c4f8d7695833 simplified Makefile
Anselm R. Garbe <garbeam@wmii.de>
parents: 75
diff changeset
    10
all: options dwm
0
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    11
	@echo finished
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    12
91
c4f8d7695833 simplified Makefile
Anselm R. Garbe <garbeam@wmii.de>
parents: 75
diff changeset
    13
options:
34
cd30cce52b78 added logo+description
Anselm R. Garbe <garbeam@wmii.de>
parents: 32
diff changeset
    14
	@echo dwm build options:
1
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    15
	@echo "CFLAGS   = ${CFLAGS}"
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    16
	@echo "LDFLAGS  = ${LDFLAGS}"
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    17
	@echo "CC       = ${CC}"
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    18
0
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    19
.c.o:
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    20
	@echo CC $<
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    21
	@${CC} -c ${CFLAGS} $<
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    22
172
af781faa40d6 implemented the idea presented by Sander for dwm target
arg@10ksloc.org
parents: 143
diff changeset
    23
${OBJ}: dwm.h config.h
af781faa40d6 implemented the idea presented by Sander for dwm target
arg@10ksloc.org
parents: 143
diff changeset
    24
185
4b770a585866 make config.h not a time dependence
arg@10ksloc.org
parents: 184
diff changeset
    25
config.h:
183
ca8d8b7bd16f added gmake compliance
arg@10ksloc.org
parents: 181
diff changeset
    26
	@echo creating $@ from ${CONFIG}
ca8d8b7bd16f added gmake compliance
arg@10ksloc.org
parents: 181
diff changeset
    27
	@cp ${CONFIG} $@
3
e969f3575b7a several new changes, made gridmenu working
Anselm R. Garbe <garbeam@wmii.de>
parents: 2
diff changeset
    28
34
cd30cce52b78 added logo+description
Anselm R. Garbe <garbeam@wmii.de>
parents: 32
diff changeset
    29
dwm: ${OBJ}
3
e969f3575b7a several new changes, made gridmenu working
Anselm R. Garbe <garbeam@wmii.de>
parents: 2
diff changeset
    30
	@echo LD $@
32
082c75b937b5 removed unnecessary crap
Anselm R. Garbe <garbeam@wmii.de>
parents: 27
diff changeset
    31
	@${CC} -o $@ ${OBJ} ${LDFLAGS}
0
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    32
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    33
clean:
180
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    34
	@echo cleaning
184
2d05df09253c removed rm config.h from clean
arg@10ksloc.org
parents: 183
diff changeset
    35
	@rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
1
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    36
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    37
dist: clean
180
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    38
	@echo creating dist tarball
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    39
	@mkdir -p dwm-${VERSION}
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    40
	@cp -R LICENSE Makefile README config.*.h config.mk \
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    41
		dwm.1 dwm.h ${SRC} dwm-${VERSION}
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    42
	@tar -cf dwm-${VERSION}.tar dwm-${VERSION}
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    43
	@gzip dwm-${VERSION}.tar
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    44
	@rm -rf dwm-${VERSION}
1
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    45
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    46
install: all
180
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    47
	@echo installing executable file to ${DESTDIR}${PREFIX}/bin
1
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    48
	@mkdir -p ${DESTDIR}${PREFIX}/bin
180
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    49
	@cp -f dwm ${DESTDIR}${PREFIX}/bin
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    50
	@chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    51
	@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
1
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    52
	@mkdir -p ${DESTDIR}${MANPREFIX}/man1
180
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    53
	@cp -f dwm.1 ${DESTDIR}${MANPREFIX}/man1
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    54
	@chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
1
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    55
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    56
uninstall:
180
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    57
	@echo removing executable file from ${DESTDIR}${PREFIX}/bin
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    58
	@rm -f ${DESTDIR}${PREFIX}/bin/dwm
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    59
	@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    60
	@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
    61
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
    62
.PHONY: all options clean dist install uninstall