summaryrefslogtreecommitdiff
path: root/crypto_aead/lilliputaei128v1/ref/Makefile
blob: a921f516ce9069474919d0e360c057ec9d02d910 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.PHONY: clean test-tweakey


nist_flags = -std=c99 -Wall -Wextra -Wshadow -fsanitize=address,undefined -O2


clean:
	-rm -r results

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 $@

results/test-%: results/test/%.o

results/test-tweakey: results/test/tweakey.o results/tweakey.o results/constants.o | results
	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


results/test-tweakey.o: tweakey.h
results/tweakey.o: tweakey.h constants.h
results/constants.o: constants.h

# TODO: add valgrind