catgirl/Makefile

63 lines
1.2 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
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