From 5860237d2f05f6ae45a98569b0d567c2227904c6 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 5 Mar 2016 20:16:14 +0100 Subject: Fix bugs and add a randomised testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 1d86a86..9f664a4 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,7 @@ FUN =\ OBJ = $(FUN:=.o) MAN = $(foreach F,$(FUN),man/$(F).3) man/libzahl.7 -all: libzahl.a test +all: libzahl.a %.o: src/%.c $(HDR) config.mk $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< @@ -67,13 +67,16 @@ libzahl.a: $(OBJ) $(AR) rc $@ $? $(RANLIB) $@ -test: test.c libzahl.a - $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -o $@ $^ +test-random.c: test-generate.py + ./test-generate.py > test-random.c + +test: test.c libzahl.a test-random.c + $(CC) $(LDFLAGS) $(CFLAGS) $(CPPFLAGS) -o $@ test.c libzahl.a check: test ./test clean: - -rm -- *.o *.su *.a *.so test 2>/dev/null + -rm -- *.o *.su *.a *.so test test-random.c 2>/dev/null .PHONY: all check clean -- cgit v1.2.3-70-g09d2