2020-05-27 16:01:49 +00:00
|
|
|
PREFIX ?= /usr/local
|
2021-05-04 16:09:46 +00:00
|
|
|
BINDIR ?= ${PREFIX}/bin
|
|
|
|
MANDIR ?= ${PREFIX}/man
|
2020-02-09 20:02:47 +00:00
|
|
|
|
2020-04-03 21:10:52 +00:00
|
|
|
CEXTS = gnu-case-range gnu-conditional-omitted-operand
|
|
|
|
CFLAGS += -std=c11 -Wall -Wextra -Wpedantic ${CEXTS:%=-Wno-%}
|
2021-05-04 16:09:46 +00:00
|
|
|
LDADD.libtls = -ltls
|
|
|
|
LDADD.ncursesw = -lncursesw
|
2020-02-07 04:49:27 +00:00
|
|
|
|
|
|
|
-include config.mk
|
2020-02-01 06:18:01 +00:00
|
|
|
|
2021-05-04 16:09:46 +00:00
|
|
|
LDLIBS = ${LDADD.libtls} ${LDADD.ncursesw}
|
|
|
|
|
2020-09-02 00:35:17 +00:00
|
|
|
OBJS += buffer.o
|
2020-02-01 06:18:01 +00:00
|
|
|
OBJS += chat.o
|
2020-02-05 05:20:39 +00:00
|
|
|
OBJS += command.o
|
2020-02-08 02:30:25 +00:00
|
|
|
OBJS += complete.o
|
2020-02-06 03:49:56 +00:00
|
|
|
OBJS += config.o
|
2020-02-05 01:23:55 +00:00
|
|
|
OBJS += edit.o
|
2021-01-16 18:30:59 +00:00
|
|
|
OBJS += filter.o
|
2020-02-01 06:18:01 +00:00
|
|
|
OBJS += handle.o
|
|
|
|
OBJS += irc.o
|
2020-03-25 22:56:09 +00:00
|
|
|
OBJS += log.o
|
2020-02-02 00:37:48 +00:00
|
|
|
OBJS += ui.o
|
2020-02-08 23:29:01 +00:00
|
|
|
OBJS += url.o
|
2020-02-11 00:57:10 +00:00
|
|
|
OBJS += xdg.o
|
2020-02-01 06:18:01 +00:00
|
|
|
|
2020-02-02 02:55:05 +00:00
|
|
|
dev: tags all
|
|
|
|
|
|
|
|
all: catgirl
|
|
|
|
|
2020-02-01 06:18:01 +00:00
|
|
|
catgirl: ${OBJS}
|
|
|
|
${CC} ${LDFLAGS} ${OBJS} ${LDLIBS} -o $@
|
|
|
|
|
|
|
|
${OBJS}: chat.h
|
|
|
|
|
2021-05-04 16:09:46 +00:00
|
|
|
tags: *.[ch]
|
|
|
|
ctags -w *.[ch]
|
2020-02-02 02:55:05 +00:00
|
|
|
|
2020-02-01 06:18:01 +00:00
|
|
|
clean:
|
2021-05-04 16:09:46 +00:00
|
|
|
rm -f catgirl ${OBJS} tags
|
2020-02-09 20:02:47 +00:00
|
|
|
|
|
|
|
install: catgirl catgirl.1
|
2021-05-04 16:09:46 +00:00
|
|
|
install -d ${DESTDIR}${BINDIR} ${DESTDIR}${MANDIR}/man1
|
|
|
|
install catgirl ${DESTDIR}${BINDIR}
|
2020-05-23 18:12:07 +00:00
|
|
|
install -m 644 catgirl.1 ${DESTDIR}${MANDIR}/man1
|
2020-02-09 20:02:47 +00:00
|
|
|
|
|
|
|
uninstall:
|
2021-05-04 16:09:46 +00:00
|
|
|
rm -f ${DESTDIR}${BINDIR}/catgirl ${DESTDIR}${MANDIR}/man1/catgirl.1
|
2020-02-12 03:07:01 +00:00
|
|
|
|
2020-02-13 02:31:09 +00:00
|
|
|
scripts/sandman: scripts/sandman.o
|
|
|
|
${CC} ${LDFLAGS} scripts/sandman.o -framework Cocoa -o $@
|
|
|
|
|
|
|
|
install-sandman: scripts/sandman scripts/sandman.1
|
2021-05-04 16:09:46 +00:00
|
|
|
install -d ${DESTDIR}${BINDIR} ${DESTDIR}${MANDIR}/man1
|
|
|
|
install scripts/sandman ${DESTDIR}${BINDIR}
|
2020-05-23 18:12:07 +00:00
|
|
|
install -m 644 scripts/sandman.1 ${DESTDIR}${MANDIR}/man1
|
2020-02-13 02:31:09 +00:00
|
|
|
|
|
|
|
uninstall-sandman:
|
2021-05-04 16:09:46 +00:00
|
|
|
rm -f ${DESTDIR}${BINDIR}/sandman ${DESTDIR}${MANDIR}/man1/sandman.1
|
2020-02-13 02:31:09 +00:00
|
|
|
|
2020-02-12 03:07:01 +00:00
|
|
|
CHROOT_USER = chat
|
|
|
|
CHROOT_GROUP = ${CHROOT_USER}
|
|
|
|
|
|
|
|
chroot.tar: catgirl catgirl.1 scripts/chroot-prompt.sh scripts/chroot-man.sh
|
2021-09-27 19:16:45 +00:00
|
|
|
chroot.tar: scripts/build-chroot.sh
|
|
|
|
sh scripts/build-chroot.sh ${CHROOT_USER} ${CHROOT_GROUP}
|
2020-02-12 03:07:01 +00:00
|
|
|
|
|
|
|
install-chroot: chroot.tar
|
2021-09-27 19:16:45 +00:00
|
|
|
tar -px -f chroot.tar -C /home/${CHROOT_USER}
|
2020-02-12 03:07:01 +00:00
|
|
|
|
|
|
|
clean-chroot:
|
|
|
|
rm -fr chroot.tar root
|