dwm

suckless's window manager with Luke's setup
Log | Files | Refs | README | LICENSE

Makefile (1273B)


      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
     21 
     22 dwm: ${OBJ}
     23 	${CC} -o $@ ${OBJ} ${LDFLAGS}
     24 
     25 clean:
     26 	rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz *.orig *.rej
     27 
     28 dist: clean
     29 	mkdir -p dwm-${VERSION}
     30 	cp -R LICENSE Makefile README config.mk\
     31 		dwm.1 drw.h util.h ${SRC} transient.c dwm-${VERSION}
     32 	tar -cf dwm-${VERSION}.tar dwm-${VERSION}
     33 	gzip dwm-${VERSION}.tar
     34 	rm -rf dwm-${VERSION}
     35 
     36 install: all
     37 	mkdir -p ${DESTDIR}${PREFIX}/bin
     38 	cp -f dwm ${DESTDIR}${PREFIX}/bin
     39 	chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
     40 	mkdir -p ${DESTDIR}${MANPREFIX}/man1
     41 	sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
     42 	chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
     43 	mkdir -p ${DESTDIR}${PREFIX}/share/dwm
     44 	cp -f larbs.mom ${DESTDIR}${PREFIX}/share/dwm
     45 	chmod 644 ${DESTDIR}${PREFIX}/share/dwm/larbs.mom
     46 
     47 uninstall:
     48 	rm -f ${DESTDIR}${PREFIX}/bin/dwm\
     49 		${DESTDIR}${PREFIX}/share/dwm/larbs.mom\
     50 		${DESTDIR}${MANPREFIX}/man1/dwm.1
     51 
     52 .PHONY: all options clean dist install uninstall