Another copy of my dotfiles. Because I don't completely trust GitHub.
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.

69 lines
1.5 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. # dwm - dynamic window manager
  2. # See LICENSE file for copyright and license details.
  3. include config.mk
  4. SRC = drw.c dwm.c util.c
  5. OBJ = ${SRC:.c=.o}
  6. # FreeBSD users, prefix all ifdef, else and endif statements with a . for this to work (e.g. .ifdef)
  7. ifdef YAJLLIBS
  8. all: options dwm dwm-msg
  9. else
  10. all: options dwm
  11. endif
  12. options:
  13. @echo dwm build options:
  14. @echo "CFLAGS = ${CFLAGS}"
  15. @echo "LDFLAGS = ${LDFLAGS}"
  16. @echo "CC = ${CC}"
  17. .c.o:
  18. ${CC} -c ${CFLAGS} $<
  19. ${OBJ}: config.h config.mk
  20. config.h:
  21. cp config.def.h $@
  22. dwm: ${OBJ}
  23. ${CC} -o $@ ${OBJ} ${LDFLAGS}
  24. ifdef YAJLLIBS
  25. dwm-msg:
  26. ${CC} -o $@ patch/ipc/dwm-msg.c ${LDFLAGS}
  27. endif
  28. clean:
  29. rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
  30. rm -f dwm-msg
  31. dist: clean
  32. mkdir -p dwm-${VERSION}
  33. cp -R LICENSE Makefile README config.def.h config.mk\
  34. dwm.1 drw.h util.h ${SRC} dwm.png transient.c dwm-${VERSION}
  35. tar -cf dwm-${VERSION}.tar dwm-${VERSION}
  36. gzip dwm-${VERSION}.tar
  37. rm -rf dwm-${VERSION}
  38. install: all
  39. mkdir -p ${DESTDIR}${PREFIX}/bin
  40. cp -f dwm ${DESTDIR}${PREFIX}/bin
  41. ifdef YAJLLIBS
  42. cp -f dwm-msg ${DESTDIR}${PREFIX}/bin
  43. endif
  44. chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
  45. ifdef YAJLLIBS
  46. chmod 755 ${DESTDIR}${PREFIX}/bin/dwm-msg
  47. endif
  48. mkdir -p ${DESTDIR}${MANPREFIX}/man1
  49. sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1
  50. chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
  51. uninstall:
  52. rm -f ${DESTDIR}${PREFIX}/bin/dwm\
  53. ${DESTDIR}${MANPREFIX}/man1/dwm.1
  54. .PHONY: all options clean dist install uninstall