From bd4ec5705906642268d93561985f216f07dc2ba7 Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 18 May 2010 20:12:03 +0200 Subject: minimalistic test suite... --- Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ee73a1a..815227c 100644 --- a/Makefile +++ b/Makefile @@ -15,24 +15,33 @@ CCOPT= $(CFLAGS) $(CCLINK) $(ARCH) $(PROF) DEBUG?= -g -rdynamic -ggdb OBJ = anet.o hiredis.o sds.o example.o +TESTOBJ = anet.o hiredis.o sds.o test.o PRGNAME = hiredis-example +TESTNAME = hiredis-test -all: hiredis-example +all: hiredis-example hiredis-test # Deps (use make dep to generate this) anet.o: anet.c fmacros.h anet.h +example.o: example.c hiredis.h sds.h +test.o: test.c hiredis.h sds.h hiredis.o: hiredis.c hiredis.h sds.h anet.h sds.o: sds.c sds.h +hiredis.o: hiredis.c hiredis.h sds.h anet.h hiredis-example: $(OBJ) $(CC) -o $(PRGNAME) $(CCOPT) $(DEBUG) $(OBJ) +hiredis-test: $(TESTOBJ) + $(CC) -o $(TESTNAME) $(CCOPT) $(DEBUG) $(TESTOBJ) + ./hiredis-test + .c.o: $(CC) -c $(CFLAGS) $(DEBUG) $(COMPILE_TIME) $< clean: - rm -rf $(PRGNAME) *.o *.gcda *.gcno *.gcov + rm -rf $(PRGNAME) $(TESTNAME) *.o *.gcda *.gcno *.gcov dep: $(CC) -MM *.c -- cgit v1.2.3