diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 16 |
2 files changed, 14 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore index e96e0c1..b31d1c5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.o +*.t catgirl chroot.tar config.mk diff --git a/Makefile b/Makefile index 9e6392b..fccee7f 100644 --- a/Makefile +++ b/Makefile @@ -25,20 +25,30 @@ OBJS += ui.o OBJS += url.o OBJS += xdg.o -dev: tags all +TESTS += edit.t + +dev: tags all check all: catgirl catgirl: ${OBJS} ${CC} ${LDFLAGS} ${OBJS} ${LDLIBS} -o $@ -${OBJS}: chat.h edit.h +${OBJS} ${TESTS}: chat.h edit.h + +check: ${TESTS} + +.SUFFIXES: .t + +.c.t: + ${CC} ${CFLAGS} -DTEST ${LDFLAGS} $< ${LDLIBS} -o $@ + ./$@ || rm $@ tags: *.[ch] ctags -w *.[ch] clean: - rm -f catgirl ${OBJS} tags + rm -f catgirl ${OBJS} ${TESTS} tags install: catgirl catgirl.1 install -d ${DESTDIR}${BINDIR} ${DESTDIR}${MANDIR}/man1 |