about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-11 02:45:50 -0500
committerJune McEnroe <june@causal.agency>2020-02-11 02:45:50 -0500
commitd1913a4c63ae1d44b13d530b522eec0e7ebfbfd1 (patch)
tree2747c6ef852ddd8bfbafdac04c760a19c2640fad /Makefile
parentRemove legacy code (diff)
parentAdd INSTALLING section to README (diff)
downloadcatgirl-d1913a4c63ae1d44b13d530b522eec0e7ebfbfd1.tar.gz
catgirl-d1913a4c63ae1d44b13d530b522eec0e7ebfbfd1.zip
Merge branch 'rewrite'
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..b1ffede
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,41 @@
+PREFIX = /usr/local
+MANDIR = ${PREFIX}/share/man
+
+CFLAGS += -std=c11 -Wall -Wextra -Wpedantic
+LDLIBS = -lcrypto -ltls -lncursesw
+
+-include config.mk
+
+OBJS += chat.o
+OBJS += command.o
+OBJS += complete.o
+OBJS += config.o
+OBJS += edit.o
+OBJS += handle.o
+OBJS += irc.o
+OBJS += ui.o
+OBJS += url.o
+OBJS += xdg.o
+
+dev: tags all
+
+all: catgirl
+
+catgirl: ${OBJS}
+	${CC} ${LDFLAGS} ${OBJS} ${LDLIBS} -o $@
+
+${OBJS}: chat.h
+
+tags: *.h *.c
+	ctags -w *.h *.c
+
+clean:
+	rm -f tags catgirl ${OBJS}
+
+install: catgirl catgirl.1
+	install -d ${PREFIX}/bin ${MANDIR}/man1
+	install catgirl ${PREFIX}/bin
+	gzip -c catgirl.1 > ${MANDIR}/man1/catgirl.1.gz
+
+uninstall:
+	rm -f ${PREFIX}/bin/catgirl ${MANDIR}/man1/catgirl.1.gz