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.

Makefile 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # dunst - Notification-daemon
  2. # See LICENSE file for copyright and license details.
  3. include config.mk
  4. SRC = x.c \
  5. dunst.c \
  6. dbus.c \
  7. utils.c \
  8. option_parser.c \
  9. settings.c \
  10. rules.c \
  11. menu.c \
  12. notification.c
  13. OBJ = ${SRC:.c=.o}
  14. V ?= 0
  15. ifeq (${V}, 0)
  16. .SILENT:
  17. endif
  18. all: doc options dunst service
  19. options:
  20. @echo dunst build options:
  21. @echo "CFLAGS = ${CFLAGS}"
  22. @echo "LDFLAGS = ${LDFLAGS}"
  23. @echo "CC = ${CC}"
  24. .c.o:
  25. @echo CC -c $<
  26. ${CC} -c $< ${CFLAGS}
  27. ${OBJ}: config.h config.mk
  28. config.h: config.def.h
  29. @if test -s $@; then echo $< is newer than $@, merge and save $@. If you haven\'t edited $@ you can just delete it && exit 1; fi
  30. @echo creating $@ from $<
  31. @cp $< $@
  32. dunst: ${OBJ}
  33. @echo "${CC} ${CFLAGS} -o $@ ${OBJ} ${LDFLAGS}"
  34. @${CC} ${CFLAGS} -o $@ ${OBJ} ${LDFLAGS}
  35. dunstify:
  36. @${CC} -o $@ dunstify.c -std=c99 $(shell pkg-config --libs --cflags glib-2.0 libnotify)
  37. debug: ${OBJ}
  38. @echo CC -o $@
  39. @${CC} ${CFLAGS} -O0 -o dunst ${OBJ} ${LDFLAGS}
  40. clean:
  41. @echo cleaning
  42. rm -f ${OBJ}
  43. rm -f dunst
  44. rm -f dunst.1
  45. rm -f org.knopwob.dunst.service
  46. rm -f core
  47. rm -f dunstify
  48. doc: dunst.1
  49. dunst.1: README.pod
  50. pod2man --name=dunst -c "Dunst Reference" --section=1 --release=${VERSION} $< > $@
  51. service:
  52. @sed "s|##PREFIX##|$(PREFIX)|" org.knopwob.dunst.service.in > org.knopwob.dunst.service
  53. install: all
  54. @echo installing executables to ${DESTDIR}${PREFIX}/bin
  55. mkdir -p ${DESTDIR}${PREFIX}/bin
  56. cp -f dunst ${DESTDIR}${PREFIX}/bin
  57. chmod 755 ${DESTDIR}${PREFIX}/bin/dunst
  58. @echo installing manual pages to ${DESTDIR}${MANPREFIX}/man1
  59. mkdir -p ${DESTDIR}${MANPREFIX}/man1
  60. cp -f dunst.1 ${DESTDIR}${MANPREFIX}/man1/
  61. chmod 644 ${DESTDIR}${MANPREFIX}/man1/dunst.1
  62. mkdir -p "${DESTDIR}${PREFIX}/share/dunst"
  63. cp -f dunstrc ${DESTDIR}${PREFIX}/share/dunst
  64. mkdir -p "${DESTDIR}${PREFIX}/share/dbus-1/services/"
  65. cp -vf org.knopwob.dunst.service "${DESTDIR}${PREFIX}/share/dbus-1/services/org.knopwob.dunst.service"
  66. uninstall:
  67. @echo removing executables from ${DESTDIR}${PREFIX}/bin
  68. rm -f ${DESTDIR}${PREFIX}/bin/dunst
  69. @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
  70. rm -f ${DESTDIR}${MANPREFIX}/man1/dunst
  71. rm -f ${DESTDIR}${PREFIX}/share/dbus-1/service/org.knopwob.dunst.service
  72. .PHONY: all options clean dist install uninstall