aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-03-05 20:16:14 +0100
committerMattias Andrée <maandree@kth.se>2016-03-05 20:16:14 +0100
commit5860237d2f05f6ae45a98569b0d567c2227904c6 (patch)
treebbddb91e2a6a5e7efe7825971c726a9e4db87dd6 /Makefile
parentMore detailed description of division and modulus (diff)
downloadlibzahl-5860237d2f05f6ae45a98569b0d567c2227904c6.tar.gz
libzahl-5860237d2f05f6ae45a98569b0d567c2227904c6.tar.bz2
libzahl-5860237d2f05f6ae45a98569b0d567c2227904c6.tar.xz
Fix bugs and add a randomised testing
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 7 insertions, 4 deletions
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