Makefile (1450B) - raw
1 # dwm - dynamic window manager 2 # See LICENSE file for copyright and license details. 3 4 include config.mk 5 6 SRC = drw.c dwm.c util.c 7 OBJ = ${SRC:.c=.o} 8 9 all: options dwm 10 11 options: 12 @echo dwm build options: 13 @echo "CFLAGS = ${CFLAGS}" 14 @echo "LDFLAGS = ${LDFLAGS}" 15 @echo "CC = ${CC}" 16 17 .c.o: 18 ${CC} -c ${CFLAGS} $< 19 20 ${OBJ}: config.h config.mk layouts.c 21 22 config.h: 23 cp config.def.h $@ 24 25 dwm: ${OBJ} 26 ${CC} -o $@ ${OBJ} ${LDFLAGS} 27 28 clean: 29 rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz 30 31 dist: clean 32 mkdir -p dwm-${VERSION} 33 cp -R LICENSE Makefile README config.def.h config.mk\ 34 dwm.1 drw.h util.h ${SRC} dwm.png transient.c layouts.c dwm-${VERSION} 35 tar -cf dwm-${VERSION}.tar dwm-${VERSION} 36 gzip dwm-${VERSION}.tar 37 rm -rf dwm-${VERSION} 38 39 install: all 40 mkdir -p ${DESTDIR}${PREFIX}/bin 41 cp -f dwm dwm-session ${DESTDIR}${PREFIX}/bin 42 chmod 755 ${DESTDIR}${PREFIX}/bin/dwm 43 chmod 755 ${DESTDIR}${PREFIX}/bin/dwm-session 44 mkdir -p ${DESTDIR}${MANPREFIX}/man1 45 sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1 46 chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1 47 mkdir -p ${DESTDIR}${PREFIX}/usr/share/xsessions 48 cp -f dwm.desktop ${DESTDIR}/usr/share/xsessions 49 chmod 644 ${DESTDIR}/usr/share/xsessions/dwm.desktop 50 51 uninstall: 52 rm -f ${DESTDIR}${PREFIX}/bin/dwm\ 53 ${DESTDIR}${MANPREFIX}/man1/dwm.1\ 54 ${DESTDIR}/usr/share/xsessions/dwm.desktop\ 55 ${DESTDIR}/usr/local/bin/dwm-session 56 57 .PHONY: all options clean dist install uninstall