You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.5 KiB

19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 years ago
  1. # dwm - dynamic window manager
  2. # (C)opyright MMVI Anselm R. Garbe
  3. include config.mk
  4. SRC = client.c draw.c event.c main.c tag.c util.c
  5. OBJ = ${SRC:.c=.o}
  6. CONFIG ?= config.default.h
  7. all: options dwm
  8. @echo finished
  9. options:
  10. @echo dwm build options:
  11. @echo "CFLAGS = ${CFLAGS}"
  12. @echo "LDFLAGS = ${LDFLAGS}"
  13. @echo "CC = ${CC}"
  14. .c.o:
  15. @echo CC $<
  16. @${CC} -c ${CFLAGS} $<
  17. ${OBJ}: dwm.h config.h
  18. config.h: ${CONFIG}
  19. @echo creating $@ from ${CONFIG}
  20. @cp ${CONFIG} $@
  21. dwm: ${OBJ}
  22. @echo LD $@
  23. @${CC} -o $@ ${OBJ} ${LDFLAGS}
  24. clean:
  25. @echo cleaning
  26. @rm -f dwm ${OBJ} config.h dwm-${VERSION}.tar.gz
  27. dist: clean
  28. @echo creating dist tarball
  29. @mkdir -p dwm-${VERSION}
  30. @cp -R LICENSE Makefile README config.*.h config.mk \
  31. dwm.1 dwm.h ${SRC} dwm-${VERSION}
  32. @tar -cf dwm-${VERSION}.tar dwm-${VERSION}
  33. @gzip dwm-${VERSION}.tar
  34. @rm -rf dwm-${VERSION}
  35. install: all
  36. @echo installing executable file to ${DESTDIR}${PREFIX}/bin
  37. @mkdir -p ${DESTDIR}${PREFIX}/bin
  38. @cp -f dwm ${DESTDIR}${PREFIX}/bin
  39. @chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
  40. @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
  41. @mkdir -p ${DESTDIR}${MANPREFIX}/man1
  42. @cp -f dwm.1 ${DESTDIR}${MANPREFIX}/man1
  43. @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
  44. uninstall:
  45. @echo removing executable file from ${DESTDIR}${PREFIX}/bin
  46. @rm -f ${DESTDIR}${PREFIX}/bin/dwm
  47. @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
  48. @rm -f ${DESTDIR}${MANPREFIX}/man1/dwm.1
  49. .PHONY: all options clean dist install uninstall