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.

64 lines
1.6 KiB

16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
  1. # st - simple terminal
  2. # See LICENSE file for copyright and license details.
  3. include config.mk
  4. SRC = st.c std.c pty.c
  5. OBJ = ${SRC:.c=.o}
  6. all: options st std
  7. options:
  8. @echo st build options:
  9. @echo "CFLAGS = ${CFLAGS}"
  10. @echo "LDFLAGS = ${LDFLAGS}"
  11. @echo "X11LDFLAGS = ${X11LDFLAGS}"
  12. @echo "CC = ${CC}"
  13. .c.o:
  14. @echo CC $<
  15. @${CC} -c ${CFLAGS} $<
  16. ${OBJ}: config.mk
  17. st: st.o
  18. @echo CC -o $@
  19. @${CC} -o $@ $^ ${LDFLAGS} ${X11LDFLAGS}
  20. std: std.o pty.o
  21. @echo CC -o $@
  22. @${CC} -o $@ $^ ${LDFLAGS}
  23. clean:
  24. @echo cleaning
  25. @rm -f st std ${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 \
  30. st.1 ${SRC} st-${VERSION}
  31. @tar -cf st-${VERSION}.tar st-${VERSION}
  32. @gzip st-${VERSION}.tar
  33. @rm -rf st-${VERSION}
  34. install: all
  35. @echo installing executable file to ${DESTDIR}${PREFIX}/bin
  36. @mkdir -p ${DESTDIR}${PREFIX}/bin
  37. @cp -f st ${DESTDIR}${PREFIX}/bin
  38. @cp -f std ${DESTDIR}${PREFIX}/bin
  39. @chmod 755 ${DESTDIR}${PREFIX}/bin/st
  40. @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
  41. @mkdir -p ${DESTDIR}${MANPREFIX}/man1
  42. @sed "s/VERSION/${VERSION}/g" < st.1 > ${DESTDIR}${MANPREFIX}/man1/st.1
  43. @chmod 644 ${DESTDIR}${MANPREFIX}/man1/st.1
  44. @sed "s/VERSION/${VERSION}/g" < std.1 > ${DESTDIR}${MANPREFIX}/man1/std.1
  45. @chmod 644 ${DESTDIR}${MANPREFIX}/man1/std.1
  46. uninstall:
  47. @echo removing executable file from ${DESTDIR}${PREFIX}/bin
  48. @rm -f ${DESTDIR}${PREFIX}/bin/st
  49. @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
  50. @rm -f ${DESTDIR}${MANPREFIX}/man1/st.1
  51. .PHONY: all options clean dist install uninstall