My dmenu build
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.

Makefile 1.7 KiB

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