dwm

Simple dynamic window manager for X
git clone https://git.sinitax.com/suckless/dwm
Log | Files | Refs | README | LICENSE | sfeed.txt

Makefile (992B)


      1# dwm - dynamic window manager
      2# See LICENSE file for copyright and license details.
      3
      4include config.mk
      5
      6SRC = drw.c dwm.c util.c
      7OBJ = ${SRC:.c=.o}
      8
      9all: dwm
     10
     11.c.o:
     12	${CC} -c ${CFLAGS} $<
     13
     14${OBJ}: config.h config.mk
     15
     16config.h:
     17	cp config.def.h $@
     18
     19dwm: ${OBJ}
     20	${CC} -o $@ ${OBJ} ${LDFLAGS}
     21
     22clean:
     23	rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
     24
     25dist: 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
     33install: 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
     41uninstall:
     42	rm -f ${DESTDIR}${PREFIX}/bin/dwm\
     43		${DESTDIR}${MANPREFIX}/man1/dwm.1
     44
     45.PHONY: all clean dist install uninstall