Another copy of my dotfiles. Because I don't completely trust GitHub.
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.

61 lines
1.4 KiB

4 years ago
4 years ago
  1. # st - simple terminal
  2. # See LICENSE file for copyright and license details.
  3. .POSIX:
  4. include config.mk
  5. SRC = st.c x.c boxdraw.c
  6. OBJ = $(SRC:.c=.o)
  7. all: options st
  8. options:
  9. @echo st build options:
  10. @echo "CFLAGS = $(STCFLAGS)"
  11. @echo "LDFLAGS = $(STLDFLAGS)"
  12. @echo "CC = $(CC)"
  13. config.h:
  14. cp config.def.h config.h
  15. .c.o:
  16. $(CC) $(STCFLAGS) -c $<
  17. st.o: config.h st.h win.h
  18. x.o: arg.h config.h st.h win.h
  19. boxdraw.o: config.h st.h boxdraw_data.h
  20. $(OBJ): config.h config.mk
  21. st: $(OBJ)
  22. $(CC) -o $@ $(OBJ) $(STLDFLAGS)
  23. clean:
  24. rm -f st $(OBJ) st-$(VERSION).tar.gz
  25. dist: clean
  26. mkdir -p st-$(VERSION)
  27. cp -R FAQ LEGACY TODO LICENSE Makefile README config.mk\
  28. config.def.h st.info st.1 arg.h st.h win.h $(SRC)\
  29. st-$(VERSION)
  30. tar -cf - st-$(VERSION) | gzip > st-$(VERSION).tar.gz
  31. rm -rf st-$(VERSION)
  32. install: st
  33. mkdir -p $(DESTDIR)$(PREFIX)/bin
  34. cp -f st $(DESTDIR)$(PREFIX)/bin
  35. chmod 755 $(DESTDIR)$(PREFIX)/bin/st
  36. mkdir -p $(DESTDIR)$(MANPREFIX)/man1
  37. sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1
  38. chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1
  39. tic -sx st.info
  40. @echo Please see the README file regarding the terminfo entry of st.
  41. mkdir -p $(DESTDIR)$(PREFIX)/share/applications
  42. cp -f st.desktop $(DESTDIR)$(PREFIX)/share/applications
  43. uninstall:
  44. rm -f $(DESTDIR)$(PREFIX)/bin/st
  45. rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1
  46. rm -f $(DESTDIR)$(PREFIX)/share/applications/st.desktop
  47. .PHONY: all options clean dist install uninstall