Makefile
author Stiletto <blasux@blasux.ru>
Wed, 02 Apr 2014 20:43:22 +0400
branchstil
changeset 1540 e8a43c5bbc46
parent 1221 c4a359bfcbb6
permissions -rw-r--r--
Upgrade to 6.0
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
1181
65db532ac394 this is the correct way
anselm@anselm1
parents: 1180
diff changeset
     2
# See LICENSE file for copyright and license details.
0
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
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
082c75b937b5 removed unnecessary crap
Anselm R. Garbe <garbeam@wmii.de>
parents: 27
diff changeset
     7
OBJ = ${SRC:.c=.o}
0
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
     8
91
c4f8d7695833 simplified Makefile
Anselm R. Garbe <garbeam@wmii.de>
parents: 75
diff changeset
     9
all: options dwm
0
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    10
91
c4f8d7695833 simplified Makefile
Anselm R. Garbe <garbeam@wmii.de>
parents: 75
diff changeset
    11
options:
34
cd30cce52b78 added logo+description
Anselm R. Garbe <garbeam@wmii.de>
parents: 32
diff changeset
    12
	@echo dwm build options:
1
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    13
	@echo "CFLAGS   = ${CFLAGS}"
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    14
	@echo "LDFLAGS  = ${LDFLAGS}"
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    15
	@echo "CC       = ${CC}"
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    16
0
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    17
.c.o:
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    18
	@echo CC $<
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    19
	@${CC} -c ${CFLAGS} $<
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    20
990
70f6fcd100b7 micromizing dwm step 1
Anselm R. Garbe <garbeam@gmail.com>
parents: 988
diff changeset
    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
cdd1db1c525b thx to Toni Lainson
arg@suckless.org
parents: 1036
diff changeset
    24
	@echo creating $@ from config.def.h
cdd1db1c525b thx to Toni Lainson
arg@suckless.org
parents: 1036
diff changeset
    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
cd30cce52b78 added logo+description
Anselm R. Garbe <garbeam@wmii.de>
parents: 32
diff changeset
    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
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    30
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    31
clean:
180
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    32
	@echo cleaning
184
2d05df09253c removed rm config.h from clean
arg@10ksloc.org
parents: 183
diff changeset
    33
	@rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
1
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    34
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    35
dist: clean
180
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    36
	@echo creating dist tarball
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    37
	@mkdir -p dwm-${VERSION}
1168
f525cd0cfbd6 some cleanup changes
Anselm R Garbe <garbeam@gmail.com>
parents: 1135
diff changeset
    38
	@cp -R LICENSE Makefile README config.def.h config.mk \
1221
c4a359bfcbb6 reverted dist target in Makefile
anselm@anselm1
parents: 1204
diff changeset
    39
		dwm.1 ${SRC} dwm-${VERSION}
180
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    40
	@tar -cf dwm-${VERSION}.tar dwm-${VERSION}
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    41
	@gzip dwm-${VERSION}.tar
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    42
	@rm -rf dwm-${VERSION}
1
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    43
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    44
install: all
180
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    45
	@echo installing executable file to ${DESTDIR}${PREFIX}/bin
1
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    46
	@mkdir -p ${DESTDIR}${PREFIX}/bin
180
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    47
	@cp -f dwm ${DESTDIR}${PREFIX}/bin
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    48
	@chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    49
	@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
1
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    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
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    52
	@chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
1
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    53
f10194d4b76d added gridmenu
Anselm R. Garbe <garbeam@wmii.de>
parents: 0
diff changeset
    54
uninstall:
180
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    55
	@echo removing executable file from ${DESTDIR}${PREFIX}/bin
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    56
	@rm -f ${DESTDIR}${PREFIX}/bin/dwm
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    57
	@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
6d2bc1d3a00d applied Sanders Makefile patch
arg@10ksloc.org
parents: 176
diff changeset
    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