blob: 2d1f1242e42eae689ee8b73bbba03f17a3279e01 (
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
|
.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) -o $@
results/test-%: results/test/%.o
results/test-tweakey: results/test/tweakey.o results/tweakey.o | results
gcc $^ $(nist_flags) -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
|