IRC client
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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. PREFIX = ~/.local
  2. MANDIR = ${PREFIX}/share/man
  3. CHROOT_USER = chat
  4. CHROOT_GROUP = ${CHROOT_USER}
  5. LIBRESSL_PREFIX = /usr/local
  6. CFLAGS += -std=c11 -Wall -Wextra -Wpedantic
  7. CFLAGS += -I${LIBRESSL_PREFIX}/include
  8. LDFLAGS += -L${LIBRESSL_PREFIX}/lib
  9. LDLIBS = -lcursesw -ltls
  10. BINS = catgirl
  11. MANS = catgirl.1
  12. -include config.mk
  13. OBJS += chat.o
  14. OBJS += color.o
  15. OBJS += edit.o
  16. OBJS += event.o
  17. OBJS += format.o
  18. OBJS += handle.o
  19. OBJS += input.o
  20. OBJS += irc.o
  21. OBJS += log.o
  22. OBJS += pls.o
  23. OBJS += tab.o
  24. OBJS += tag.o
  25. OBJS += term.o
  26. OBJS += ui.o
  27. OBJS += url.o
  28. TESTS += format.t
  29. TESTS += pls.t
  30. TESTS += term.t
  31. all: tags ${BINS} test
  32. catgirl: ${OBJS}
  33. ${CC} ${LDFLAGS} ${OBJS} ${LDLIBS} -o $@
  34. ${OBJS}: chat.h
  35. test: ${TESTS}
  36. set -e; ${TESTS:%=./%;}
  37. .SUFFIXES: .t
  38. .c.t:
  39. ${CC} ${CFLAGS} -DTEST ${LDFLAGS} $< ${LDLIBS} -o $@
  40. tags: *.c *.h
  41. ctags -w *.c *.h
  42. install: ${BINS} ${MANS}
  43. install -d ${PREFIX}/bin ${MANDIR}/man1
  44. install ${BINS} ${PREFIX}/bin
  45. install -m 644 ${MANS} ${MANDIR}/man1
  46. uninstall:
  47. rm -f ${BINS:%=${PREFIX}/bin/%}
  48. rm -f ${MANS:%=${MANDIR}/man1/%}
  49. chroot.tar: catgirl catgirl.1 man.sh
  50. install -d -o root -g wheel \
  51. root \
  52. root/bin \
  53. root/etc/ssl \
  54. root/home \
  55. root/lib \
  56. root/libexec \
  57. root/usr/bin \
  58. root/usr/share/man \
  59. root/usr/share/misc
  60. install -d -o ${CHROOT_USER} -g ${CHROOT_GROUP} root/home/${CHROOT_USER}
  61. cp -fp /libexec/ld-elf.so.1 root/libexec
  62. cp -fp \
  63. /lib/libc.so.7 \
  64. /lib/libncursesw.so.8 \
  65. /lib/libthr.so.3 \
  66. /lib/libz.so.6 \
  67. /usr/local/lib/libcrypto.so.45 \
  68. /usr/local/lib/libssl.so.47 \
  69. /usr/local/lib/libtls.so.19 \
  70. root/lib
  71. cp -fp /etc/hosts /etc/resolv.conf root/etc
  72. cp -fp /etc/ssl/cert.pem root/etc/ssl
  73. cp -af /usr/share/locale root/usr/share
  74. cp -fp /usr/share/misc/termcap.db root/usr/share/misc
  75. cp -fp /rescue/sh /usr/bin/mandoc /usr/bin/less root/bin
  76. ${MAKE} install PREFIX=root/usr
  77. install man.sh root/usr/bin/man
  78. tar -c -f chroot.tar -C root bin etc home lib libexec usr
  79. install-chroot: chroot.tar
  80. tar -x -f chroot.tar -C /home/${CHROOT_USER}
  81. clean:
  82. rm -fr ${BINS} ${OBJS} ${TESTS} tags root chroot.tar
  83. README: catgirl.7
  84. mandoc catgirl.7 | col -bx > README