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.

56 lines
1.4 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
  1. # dwm - dynamic window manager
  2. # © 2006-2007 Anselm R. Garbe, Sander van Dijk
  3. include config.mk
  4. SRC = dwm.c
  5. OBJ = ${SRC:.c=.o}
  6. all: options dwm
  7. options:
  8. @echo dwm build options:
  9. @echo "CFLAGS = ${CFLAGS}"
  10. @echo "LDFLAGS = ${LDFLAGS}"
  11. @echo "CC = ${CC}"
  12. .c.o:
  13. @echo CC $<
  14. @${CC} -c ${CFLAGS} $<
  15. ${OBJ}: config.h config.mk
  16. dwm: ${OBJ}
  17. @echo CC -o $@
  18. @${CC} -o $@ ${OBJ} ${LDFLAGS}
  19. clean:
  20. @echo cleaning
  21. @rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
  22. dist: clean
  23. @echo creating dist tarball
  24. @mkdir -p dwm-${VERSION}
  25. @cp -R LICENSE Makefile README config.h config.mk \
  26. dwm.1 ${SRC} dwm-${VERSION}
  27. @tar -cf dwm-${VERSION}.tar dwm-${VERSION}
  28. @gzip dwm-${VERSION}.tar
  29. @rm -rf dwm-${VERSION}
  30. install: all
  31. @echo installing executable file to ${DESTDIR}${PREFIX}/bin
  32. @mkdir -p ${DESTDIR}${PREFIX}/bin
  33. @cp -f dwm ${DESTDIR}${PREFIX}/bin
  34. @chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
  35. @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
  36. @mkdir -p ${DESTDIR}${MANPREFIX}/man1
  37. @sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
  38. @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
  39. uninstall:
  40. @echo removing executable file from ${DESTDIR}${PREFIX}/bin
  41. @rm -f ${DESTDIR}${PREFIX}/bin/dwm
  42. @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
  43. @rm -f ${DESTDIR}${MANPREFIX}/man1/dwm.1
  44. .PHONY: all options clean dist install uninstall