summaryrefslogtreecommitdiff
path: root/crypto_aead/lilliputaei128v1/ref/Makefile
blob: 30d6e1209671db6e57c6545c4ed3249ab4429eeb (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
.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
	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

# TODO: add valgrind