My build of suckless st terminal
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.

45 lines
1.1 KiB

  1. # st - simple terminal
  2. # See LICENSE file for copyright and license details.
  3. VERSION = 0.0
  4. PREFIX = /usr/local
  5. MANDIR = $(PREFIX)/share/man
  6. CFLAGS = -DVERSION=\"0.0\" -D_GNU_SOURCE
  7. all: st std
  8. clean:
  9. rm -f st std
  10. rm -f st.o std.o
  11. rm -f st-$(VERSION).tar.gz
  12. dist: clean
  13. mkdir st-$(VERSION)
  14. cp -f LICENSE README st-$(VERSION)
  15. cp -f Makefile config.mk st-$(VERSION)
  16. cp -f st.1 std.1 st-$(VERSION)
  17. cp -f st.c std.c st-$(VERSION)
  18. tar -czf st-$(VERSION).tar st-$(VERSION)
  19. rm -rf st-$(VERSION)
  20. install:
  21. mkdir -p $(DESTDIR)$(PREFIX)/bin
  22. cp -f st $(DESTDIR)$(PREFIX)/bin
  23. cp -f std $(DESTDIR)$(PREFIX)/bin
  24. chmod 755 $(DESTDIR)$(PREFIX)/bin/st
  25. chmod 755 $(DESTDIR)$(PREFIX)/bin/std
  26. mkdir -p $(DESTDIR)$(MANDIR)/man1
  27. sed 's/VERSION/$(VERSION)/g' < st.1 > $(DESTDIR)$(MANDIR)/man1/st.1
  28. chmod 644 $(DESTDIR)$(MANDIR)/man1/st.1
  29. sed 's/VERSION/$(VERSION)/g' < std.1 > $(DESTDIR)$(MANDIR)/man1/std.1
  30. chmod 644 $(DESTDIR)$(MANDIR)/man1/std.1
  31. uninstall:
  32. rm -f $(DESTDIR)$(PREFIX)/bin/st
  33. rm -f $(DESTDIR)$(PREFIX)/bin/std
  34. rm -f $(DESTDIR)$(MANDIR)/man1/st.1
  35. rm -f $(DESTDIR)$(MANDIR)/man1/std.1
  36. .PHONY: all clean dist install uninstall