catgirl/Makefile

74 lines
1.6 KiB
Makefile
Raw Normal View History

PREFIX ?= /usr/local
BINDIR ?= ${PREFIX}/bin
MANDIR ?= ${PREFIX}/man
2020-02-09 20:02:47 +00:00
CEXTS = gnu-case-range gnu-conditional-omitted-operand
CFLAGS += -std=c11 -Wall -Wextra -Wpedantic ${CEXTS:%=-Wno-%}
LDADD.libtls = -ltls
LDADD.ncursesw = -lncursesw
-include config.mk
2020-02-01 06:18:01 +00:00
LDLIBS = ${LDADD.libtls} ${LDADD.ncursesw}
OBJS += buffer.o
2020-02-01 06:18:01 +00:00
OBJS += chat.o
OBJS += command.o
2020-02-08 02:30:25 +00:00
OBJS += complete.o
OBJS += config.o
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
OBJS += log.o
OBJS += ui.o
2020-02-08 23:29:01 +00:00
OBJS += url.o
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
tags: *.[ch]
ctags -w *.[ch]
2020-02-02 02:55:05 +00:00
2020-02-01 06:18:01 +00:00
clean:
rm -f catgirl ${OBJS} tags
2020-02-09 20:02:47 +00:00
install: catgirl catgirl.1
install -d ${DESTDIR}${BINDIR} ${DESTDIR}${MANDIR}/man1
install catgirl ${DESTDIR}${BINDIR}
install -m 644 catgirl.1 ${DESTDIR}${MANDIR}/man1
2020-02-09 20:02:47 +00:00
uninstall:
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
install -d ${DESTDIR}${BINDIR} ${DESTDIR}${MANDIR}/man1
install scripts/sandman ${DESTDIR}${BINDIR}
install -m 644 scripts/sandman.1 ${DESTDIR}${MANDIR}/man1
2020-02-13 02:31:09 +00:00
uninstall-sandman:
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
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
tar -px -f chroot.tar -C /home/${CHROOT_USER}
2020-02-12 03:07:01 +00:00
clean-chroot:
rm -fr chroot.tar root