summaryrefslogtreecommitdiff
path: root/crypto_aead/lilliputaei128v1/ref/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'crypto_aead/lilliputaei128v1/ref/Makefile')
-rw-r--r--crypto_aead/lilliputaei128v1/ref/Makefile18
1 files changed, 10 insertions, 8 deletions
diff --git a/crypto_aead/lilliputaei128v1/ref/Makefile b/crypto_aead/lilliputaei128v1/ref/Makefile
index a921f51..3c73db8 100644
--- a/crypto_aead/lilliputaei128v1/ref/Makefile
+++ b/crypto_aead/lilliputaei128v1/ref/Makefile
@@ -1,4 +1,6 @@
-.PHONY: clean test-tweakey
+tests = test-tweakey
+
+.PHONY: clean $(tests)
nist_flags = -std=c99 -Wall -Wextra -Wshadow -fsanitize=address,undefined -O2
@@ -15,16 +17,16 @@ results/%.o: %.c
@mkdir -p $(dir $@)
gcc -c -I. $< $(nist_flags) -Werror -o $@
-results/test-%: results/test/%.o
-
-results/test-tweakey: results/test/tweakey.o results/tweakey.o results/constants.o | results
+results/test-%: results/test/test-%.o
gcc $^ $(nist_flags) -Werror -o $@
-test-tweakey: results/test-tweakey
- mkdir -p results/tweakey
- ./results/test-tweakey
- ./test/tweakey.sh test/tweakey-ref results/tweakey
+$(tests): %: results/%
+ 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