Simple Terminal from SuckLess
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.

55 lines
1.2 KiB

  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
  6. OBJ = $(SRC:.c=.o)
  7. all: options st
  8. options:
  9. @echo st build options:
  10. @echo "CFLAGS = $(CFLAGS)"
  11. @echo "LDFLAGS = $(LDFLAGS)"
  12. @echo "CC = $(CC)"
  13. config.h:
  14. cp config.def.h config.h
  15. .c.o:
  16. $(CC) $(CFLAGS) -c $<
  17. st.o: config.h st.h win.h
  18. x.o: arg.h st.h win.h
  19. $(OBJ): config.h config.mk
  20. st: $(OBJ)
  21. $(CC) $(LDFLAGS) -o $@ $(OBJ)
  22. clean:
  23. rm -f st $(OBJ) st-$(VERSION).tar.gz
  24. dist: clean
  25. mkdir -p st-$(VERSION)
  26. cp -R LICENSE Makefile README config.mk config.def.h st.info st.1 arg.h $(SRC) st-$(VERSION)
  27. tar -cf - st-$(VERSION) | gzip > st-$(VERSION).tar.gz
  28. rm -rf st-$(VERSION)
  29. install: st
  30. mkdir -p $(DESTDIR)$(PREFIX)/bin
  31. cp -f st $(DESTDIR)$(PREFIX)/bin
  32. chmod 755 $(DESTDIR)$(PREFIX)/bin/st
  33. mkdir -p $(DESTDIR)$(MANPREFIX)/man1
  34. sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1
  35. chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1
  36. tic -sx st.info
  37. @echo Please see the README file regarding the terminfo entry of st.
  38. uninstall:
  39. rm -f $(DESTDIR)$(PREFIX)/bin/st
  40. rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1
  41. .PHONY: all options clean dist install uninstall