dmenu for lunch applications in dwm
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

18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
  1. # dmenu - dynamic menu
  2. # (C)opyright MMVI-MMVII Anselm R. Garbe
  3. include config.mk
  4. SRC = main.c util.c
  5. OBJ = ${SRC:.c=.o}
  6. all: options dmenu
  7. options:
  8. @echo dmenu 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}: dmenu.h config.mk
  16. dmenu: ${OBJ}
  17. @echo CC -o $@
  18. @${CC} -o $@ ${OBJ} ${LDFLAGS}
  19. @strip $@
  20. clean:
  21. @echo cleaning
  22. @rm -f dmenu ${OBJ} dmenu-${VERSION}.tar.gz
  23. dist: clean
  24. @echo creating dist tarball
  25. @mkdir -p dmenu-${VERSION}
  26. @cp -R LICENSE Makefile README config.mk dmenu.1 dmenu.h ${SRC} dmenu-${VERSION}
  27. @tar -cf dmenu-${VERSION}.tar dmenu-${VERSION}
  28. @gzip dmenu-${VERSION}.tar
  29. @rm -rf dmenu-${VERSION}
  30. install: all
  31. @echo installing executable file to ${DESTDIR}${PREFIX}/bin
  32. @mkdir -p ${DESTDIR}${PREFIX}/bin
  33. @cp -f dmenu ${DESTDIR}${PREFIX}/bin
  34. @chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu
  35. @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
  36. @mkdir -p ${DESTDIR}${MANPREFIX}/man1
  37. @sed 's/VERSION/${VERSION}/g' < dmenu.1 > ${DESTDIR}${MANPREFIX}/man1/dmenu.1
  38. @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dmenu.1
  39. uninstall:
  40. @echo removing executable file from ${DESTDIR}${PREFIX}/bin
  41. @rm -f ${DESTDIR}${PREFIX}/bin/dmenu
  42. @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
  43. @rm -f ${DESTDIR}${MANPREFIX}/man1/dmenu.1
  44. .PHONY: all options clean dist install uninstall