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.

74 lines
2.1 KiB

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