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.

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