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.

58 lines
1.5 KiB

19 years ago
19 years ago
14 years ago
19 years ago
14 years ago
19 years ago
14 years ago
14 years ago
14 years ago
19 years ago
19 years ago
19 years ago
19 years ago
19 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: dmenu stest
  7. .c.o:
  8. $(CC) -c $(CFLAGS) $<
  9. config.h:
  10. cp config.def.h $@
  11. $(OBJ): arg.h config.h config.mk drw.h
  12. dmenu: dmenu.o drw.o util.o
  13. $(CC) -o $@ dmenu.o drw.o util.o $(LDFLAGS)
  14. stest: stest.o
  15. $(CC) -o $@ stest.o $(LDFLAGS)
  16. clean:
  17. rm -f dmenu stest $(OBJ) dmenu-$(VERSION).tar.gz
  18. dist: clean
  19. mkdir -p dmenu-$(VERSION)
  20. cp LICENSE Makefile README arg.h config.def.h config.mk dmenu.1\
  21. drw.h util.h dmenu_path dmenu_run stest.1 $(SRC)\
  22. dmenu-$(VERSION)
  23. tar -cf dmenu-$(VERSION).tar dmenu-$(VERSION)
  24. gzip dmenu-$(VERSION).tar
  25. rm -rf dmenu-$(VERSION)
  26. install: all
  27. mkdir -p $(DESTDIR)$(PREFIX)/bin
  28. cp -f dmenu dmenu_path dmenu_run stest $(DESTDIR)$(PREFIX)/bin
  29. chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu
  30. chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_path
  31. chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_run
  32. chmod 755 $(DESTDIR)$(PREFIX)/bin/stest
  33. mkdir -p $(DESTDIR)$(MANPREFIX)/man1
  34. sed "s/VERSION/$(VERSION)/g" < dmenu.1 > $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
  35. sed "s/VERSION/$(VERSION)/g" < stest.1 > $(DESTDIR)$(MANPREFIX)/man1/stest.1
  36. chmod 644 $(DESTDIR)$(MANPREFIX)/man1/dmenu.1
  37. chmod 644 $(DESTDIR)$(MANPREFIX)/man1/stest.1
  38. uninstall:
  39. rm -f $(DESTDIR)$(PREFIX)/bin/dmenu\
  40. $(DESTDIR)$(PREFIX)/bin/dmenu_path\
  41. $(DESTDIR)$(PREFIX)/bin/dmenu_run\
  42. $(DESTDIR)$(PREFIX)/bin/stest\
  43. $(DESTDIR)$(MANPREFIX)/man1/dmenu.1\
  44. $(DESTDIR)$(MANPREFIX)/man1/stest.1
  45. .PHONY: all clean dist install uninstall