about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index c0ea331..d8f8504 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,9 @@ OBJS += ring.o
 OBJS += server.o
 OBJS += state.o
 
-dev: tags all
+TESTS += config.t
+
+dev: tags all test
 
 all: ${BINS}
 
@@ -37,6 +39,15 @@ ${OBJS}: bounce.h compat.h
 
 dispatch.o: compat.h
 
+test: ${TESTS}
+	set -e; ${TESTS:%=./%;}
+	touch test
+
+.SUFFIXES: .t
+
+.c.t:
+	${CC} ${CFLAGS} -DTEST ${LDFLAGS} $< ${LDLIBS} -o $@
+
 tags: *.c *.h
 	ctags -w *.c *.h