dwm

My custom build of dwm window manager
git clone https://git.mtkn.jp/dwm
Log | Files | Refs | README | LICENSE

Makefile (992B)


      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: dwm
     10 
     11 .c.o:
     12 	${CC} -c ${CFLAGS} $<
     13 
     14 ${OBJ}: config.h config.mk
     15 
     16 config.h:
     17 	cp config.def.h $@
     18 
     19 dwm: ${OBJ}
     20 	${CC} -o $@ ${OBJ} ${LDFLAGS}
     21 
     22 clean:
     23 	rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
     24 
     25 dist: clean
     26 	mkdir -p dwm-${VERSION}
     27 	cp -R LICENSE Makefile README config.def.h config.mk\
     28 		dwm.1 drw.h util.h ${SRC} dwm.png transient.c dwm-${VERSION}
     29 	tar -cf dwm-${VERSION}.tar dwm-${VERSION}
     30 	gzip dwm-${VERSION}.tar
     31 	rm -rf dwm-${VERSION}
     32 
     33 install: all
     34 	mkdir -p ${DESTDIR}${PREFIX}/bin
     35 	cp -f dwm ${DESTDIR}${PREFIX}/bin
     36 	chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
     37 	mkdir -p ${DESTDIR}${MANPREFIX}/man1
     38 	sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
     39 	chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
     40 
     41 uninstall:
     42 	rm -f ${DESTDIR}${PREFIX}/bin/dwm\
     43 		${DESTDIR}${MANPREFIX}/man1/dwm.1
     44 
     45 .PHONY: all clean dist install uninstall