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.

67 lines
1.8 KiB

18 years ago
18 years ago
18 years ago
14 years ago
18 years ago
18 years ago
14 years ago
18 years ago
18 years ago
18 years ago
18 years ago
17 years ago
18 years ago
18 years ago
18 years ago
  1. # dmenu - dynamic menu
  2. # See LICENSE file for copyright and license details.
  3. include config.mk
  4. SRC = dinput.c dmenu.c common.c
  5. OBJ = ${SRC:.c=.o}
  6. all: options dinput 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}: config.h config.mk
  16. config.h:
  17. @echo creating $@ from config.def.h
  18. @cp config.def.h $@
  19. dinput: dinput.o common.o
  20. @echo CC -o $@
  21. @${CC} -o $@ $+ ${LDFLAGS}
  22. dmenu: dmenu.o common.o
  23. @echo CC -o $@
  24. @${CC} -o $@ $+ ${LDFLAGS}
  25. clean:
  26. @echo cleaning
  27. @rm -f dinput dmenu ${OBJ} dmenu-${VERSION}.tar.gz
  28. dist: clean
  29. @echo creating dist tarball
  30. @mkdir -p dmenu-${VERSION}
  31. @cp -R LICENSE Makefile README config.mk dmenu.1 config.def.h dmenu_path dmenu_run ${SRC} dmenu-${VERSION}
  32. @tar -cf dmenu-${VERSION}.tar dmenu-${VERSION}
  33. @gzip dmenu-${VERSION}.tar
  34. @rm -rf dmenu-${VERSION}
  35. install: all
  36. @echo installing executable file to ${DESTDIR}${PREFIX}/bin
  37. @mkdir -p ${DESTDIR}${PREFIX}/bin
  38. @cp -f dinput dmenu dmenu_path dmenu_run ${DESTDIR}${PREFIX}/bin
  39. @chmod 755 ${DESTDIR}${PREFIX}/bin/dinput
  40. @chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu
  41. @chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu_path
  42. @chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu_run
  43. @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
  44. @mkdir -p ${DESTDIR}${MANPREFIX}/man1
  45. @sed "s/VERSION/${VERSION}/g" < dmenu.1 > ${DESTDIR}${MANPREFIX}/man1/dmenu.1
  46. @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dmenu.1
  47. uninstall:
  48. @echo removing executable file from ${DESTDIR}${PREFIX}/bin
  49. @rm -f ${DESTDIR}${PREFIX}/bin/dmenu ${DESTDIR}${PREFIX}/bin/dmenu_path
  50. @rm -f ${DESTDIR}${PREFIX}/bin/dinput ${DESTDIR}${PREFIX}/bin/dmenu_run
  51. @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
  52. @rm -f ${DESTDIR}${MANPREFIX}/man1/dmenu.1
  53. .PHONY: all options clean dist install uninstall