aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile32
1 files changed, 21 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index ffa69b4..ad5119d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,20 +1,30 @@
1# dwm - dynamic window manager 1# dwm - dynamic window manager
2# See LICENSE file for copyright and license details. 2# See LICENSE file for copyright and license details.
3 3
4include config.mk 4include src/config/config.mk
5 5
6SRC = drw.c dwm.c util.c 6SRC = src/drw/drw.c src/core/dwm.c src/util/util.c
7OBJ = ${SRC:.c=.o} 7OBJ = $(SRC:.c=.o)
8
9CFLAGS += -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os \
10 -I/usr/X11R6/include \
11 -I/usr/include/freetype2 \
12 -I./src/util \
13 -I./src/drw \
14 -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L \
15 -DVERSION=\"6.4\" -DXINERAMA
16
17LDFLAGS += -L/usr/X11R6/lib -lX11 -lXinerama -lfontconfig -lXft -lX11-xcb -lxcb -lxcb-res
8 18
9all: dwm 19all: dwm
10 20
11.c.o: 21%.o: %.c
12 ${CC} -c ${CFLAGS} $< 22 ${CC} -c ${CFLAGS} -o $@ $<
13 23
14${OBJ}: config.h config.mk 24${OBJ}: src/config/config.h src/config/config.mk
15 25
16config.h: 26config.h:
17 cp config.def.h $@ 27 cp src/config/config.def.h $@
18 28
19dwm: ${OBJ} 29dwm: ${OBJ}
20 ${CC} -o $@ ${OBJ} ${LDFLAGS} 30 ${CC} -o $@ ${OBJ} ${LDFLAGS}
@@ -24,8 +34,8 @@ clean:
24 34
25dist: clean 35dist: clean
26 mkdir -p dwm-${VERSION} 36 mkdir -p dwm-${VERSION}
27 cp -R LICENSE Makefile README config.def.h config.mk\ 37 cp -R LICENSE Makefile README src/config/config.def.h src/config/config.mk \
28 dwm.1 drw.h util.h ${SRC} dwm.png transient.c dwm-${VERSION} 38 src/core/dwm.1 src/drw/drw.h src/util/util.h ${SRC} /assets/dwm.png src/transient/transient.c dwm-${VERSION}
29 tar -cf dwm-${VERSION}.tar dwm-${VERSION} 39 tar -cf dwm-${VERSION}.tar dwm-${VERSION}
30 gzip dwm-${VERSION}.tar 40 gzip dwm-${VERSION}.tar
31 rm -rf dwm-${VERSION} 41 rm -rf dwm-${VERSION}
@@ -35,11 +45,11 @@ install: all
35 cp -f dwm ${DESTDIR}${PREFIX}/bin 45 cp -f dwm ${DESTDIR}${PREFIX}/bin
36 chmod 755 ${DESTDIR}${PREFIX}/bin/dwm 46 chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
37 mkdir -p ${DESTDIR}${MANPREFIX}/man1 47 mkdir -p ${DESTDIR}${MANPREFIX}/man1
38 sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1 48 sed "s/VERSION/${VERSION}/g" < assets/dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
39 chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1 49 chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
40 50
41uninstall: 51uninstall:
42 rm -f ${DESTDIR}${PREFIX}/bin/dwm\ 52 rm -f ${DESTDIR}${PREFIX}/bin/dwm \
43 ${DESTDIR}${MANPREFIX}/man1/dwm.1 53 ${DESTDIR}${MANPREFIX}/man1/dwm.1
44 54
45.PHONY: all clean dist install uninstall 55.PHONY: all clean dist install uninstall