From 0a03ddd9b31a6eef5419e20d11d50bdc99443307 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Wed, 21 Nov 2018 11:27:50 +0100 Subject: Ajout de la nouvelle suite de test dans le Makefile --- crypto_aead/lilliputaei128v1/ref/Makefile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/crypto_aead/lilliputaei128v1/ref/Makefile b/crypto_aead/lilliputaei128v1/ref/Makefile index 3c73db8..8379bb9 100644 --- a/crypto_aead/lilliputaei128v1/ref/Makefile +++ b/crypto_aead/lilliputaei128v1/ref/Makefile @@ -1,6 +1,8 @@ -tests = test-tweakey +# TODO: should add order-only prerequisites to remove mkdirs inside recipes -.PHONY: clean $(tests) +tests = test-tweakey test-cipher + +.PHONY: clean test $(tests) nist_flags = -std=c99 -Wall -Wextra -Wshadow -fsanitize=address,undefined -O2 @@ -12,7 +14,6 @@ clean: results: mkdir -p $@ -# TODO: should add order-only prerequisite to remove mkdir from this target results/%.o: %.c @mkdir -p $(dir $@) gcc -c -I. $< $(nist_flags) -Werror -o $@ @@ -20,16 +21,18 @@ results/%.o: %.c results/test-%: results/test/test-%.o gcc $^ $(nist_flags) -Werror -o $@ +test: $(tests) + $(tests): %: results/% - mkdir -p results/$@-output + @mkdir -p results/$@-output ./results/$@ results/$@-output diff -ru test/$*-ref results/$@-output results/test-tweakey: results/tweakey.o results/constants.o | results -results/test-tweakey.o: tweakey.h -results/tweakey.o: tweakey.h constants.h +results/test-tweakey.o: tweakey.h parameters.h +results/tweakey.o: tweakey.h constants.h parameters.h results/constants.o: constants.h -# TODO: add valgrind +# TODO: add valgrind, although it does not seem to play well with ASAN -- cgit v1.2.3