Import dwm-win32-alpha1
[dwm-win32.git] / Makefile
blobf7db603b16a19fdeba7ca3e5e266d2ba7cd837b5
1 # dwm-win32 - dynamic window manager for win32
2 # See LICENSE file for copyright and license details.
4 include config.mk
6 SRC = dwm-win32.c
7 OBJ = ${SRC:.c=.o}
9 all: options dwm-win32
11 options:
12 @echo dwm-win32 build options:
13 @echo "CFLAGS = ${CFLAGS}"
14 @echo "LDFLAGS = ${LDFLAGS}"
15 @echo "CC = ${CC}"
17 .c.o:
18 @echo CC $<
19 @${CC} -c ${CFLAGS} $<
21 ${OBJ}: config.h config.mk
23 config.h:
24 @echo creating $@ from config.def.h
25 @cp config.def.h $@
27 dwm-win32: ${OBJ}
28 @echo CC -o $@
29 @${CC} -o $@ ${OBJ} ${LDFLAGS}
31 clean:
32 @echo cleaning
33 @rm -f dwm-win32.exe ${OBJ} dwm-win32-${VERSION}.tar.gz
35 dist: clean
36 @echo creating dist tarball
37 @mkdir -p dwm-win32-${VERSION}
38 @cp -R LICENSE.txt Makefile README.txt config.def.h config.mk \
39 ${SRC} dwm-win32-${VERSION}
40 @tar -cf dwm-win32-${VERSION}.tar dwm-win32-${VERSION}
41 @gzip dwm-win32-${VERSION}.tar
42 @rm -rf dwm-win32-${VERSION}
44 install: all
45 @echo installing executable file to ${DESTDIR}${PREFIX}/bin
46 @mkdir -p ${DESTDIR}${PREFIX}/bin
47 @cp -f dwm-win32 ${DESTDIR}${PREFIX}/bin
48 @chmod 755 ${DESTDIR}${PREFIX}/bin/dwm-win32
49 @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
50 @mkdir -p ${DESTDIR}${MANPREFIX}/man1
51 @sed "s/VERSION/${VERSION}/g" < dwm-win32.1 > ${DESTDIR}${MANPREFIX}/man1/dwm-win32.1
52 @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm-win32.1
54 uninstall:
55 @echo removing executable file from ${DESTDIR}${PREFIX}/bin
56 @rm -f ${DESTDIR}${PREFIX}/bin/dwm-win32
57 @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
58 @rm -f ${DESTDIR}${MANPREFIX}/man1/dwm-win32.1
60 .PHONY: all options clean dist install uninstall