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.

63 lines
1.5 KiB

14 years ago
14 years ago
14 years ago
  1. # st - simple terminal
  2. # See LICENSE file for copyright and license details.
  3. include config.mk
  4. SRC = st.c x.c
  5. OBJ = ${SRC:.c=.o}
  6. all: options st
  7. options:
  8. @echo st build options:
  9. @echo "CFLAGS = ${CFLAGS}"
  10. @echo "LDFLAGS = ${LDFLAGS}"
  11. @echo "CC = ${CC}"
  12. config.h:
  13. cp config.def.h config.h
  14. .c.o:
  15. @echo CC $<
  16. @${CC} -c ${CFLAGS} $<
  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. @echo CC -o $@
  22. @${CC} -o $@ ${OBJ} ${LDFLAGS}
  23. clean:
  24. @echo cleaning
  25. @rm -f st ${OBJ} st-${VERSION}.tar.gz
  26. dist: clean
  27. @echo creating dist tarball
  28. @mkdir -p st-${VERSION}
  29. @cp -R LICENSE Makefile README config.mk config.def.h st.info st.1 arg.h ${SRC} st-${VERSION}
  30. @tar -cf st-${VERSION}.tar st-${VERSION}
  31. @gzip st-${VERSION}.tar
  32. @rm -rf st-${VERSION}
  33. install: all
  34. @echo installing executable file to ${DESTDIR}${PREFIX}/bin
  35. @mkdir -p ${DESTDIR}${PREFIX}/bin
  36. @cp -f st ${DESTDIR}${PREFIX}/bin
  37. @chmod 755 ${DESTDIR}${PREFIX}/bin/st
  38. @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
  39. @mkdir -p ${DESTDIR}${MANPREFIX}/man1
  40. @sed "s/VERSION/${VERSION}/g" < st.1 > ${DESTDIR}${MANPREFIX}/man1/st.1
  41. @chmod 644 ${DESTDIR}${MANPREFIX}/man1/st.1
  42. @echo Please see the README file regarding the terminfo entry of st.
  43. @tic -sx st.info
  44. uninstall:
  45. @echo removing executable file from ${DESTDIR}${PREFIX}/bin
  46. @rm -f ${DESTDIR}${PREFIX}/bin/st
  47. @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
  48. @rm -f ${DESTDIR}${MANPREFIX}/man1/st.1
  49. .PHONY: all options clean dist install uninstall