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.

62 lines
1.5 KiB

18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
  1. # dmenu - dynamic menu
  2. # (C)opyright MMVI Anselm R. Garbe
  3. include config.mk
  4. SRC = draw.c main.c util.c
  5. OBJ = ${SRC:.c=.o}
  6. all: options dmenu
  7. @echo finished
  8. options:
  9. @echo dmenu build options:
  10. @echo "CFLAGS = ${CFLAGS}"
  11. @echo "LDFLAGS = ${LDFLAGS}"
  12. @echo "CC = ${CC}"
  13. .c.o:
  14. @echo CC $<
  15. @${CC} -c ${CFLAGS} $<
  16. ${OBJ}: dmenu.h config.h
  17. config.h:
  18. @echo creating $@ from config.default.h
  19. @cp config.default.h $@
  20. dmenu: ${OBJ}
  21. @echo LD $@
  22. @${CC} -o $@ ${OBJ} ${LDFLAGS}
  23. @strip $@
  24. clean:
  25. @echo cleaning
  26. @rm -f dmenu ${OBJ} dmenu-${VERSION}.tar.gz
  27. dist: clean
  28. @echo creating dist tarball
  29. @mkdir -p dmenu-${VERSION}
  30. @cp -R LICENSE Makefile README config.*.h config.mk \
  31. dmenu.1 dmenu.h ${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 dmenu ${DESTDIR}${PREFIX}/bin
  39. @chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu
  40. @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
  41. @mkdir -p ${DESTDIR}${MANPREFIX}/man1
  42. @sed 's/VERSION/${VERSION}/g' < dmenu.1 > ${DESTDIR}${MANPREFIX}/man1/dmenu.1
  43. @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dmenu.1
  44. uninstall:
  45. @echo removing executable file from ${DESTDIR}${PREFIX}/bin
  46. @rm -f ${DESTDIR}${PREFIX}/bin/dmenu
  47. @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
  48. @rm -f ${DESTDIR}${MANPREFIX}/man1/dmenu.1
  49. .PHONY: all options clean dist install uninstall