-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (31 loc) · 1.34 KB
/
Copy pathMakefile
File metadata and controls
42 lines (31 loc) · 1.34 KB
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
34
35
36
37
38
39
40
41
42
CC ?= /usr/bin/cc
CFLAGS += -Wall -Wextra -Wmissing-prototypes -Wredundant-decls \
-Wshadow -Wpointer-arith -O3 -fomit-frame-pointer
NISTFLAGS += -Wno-unused-result -O3 -fomit-frame-pointer
RM = /bin/rm
SOURCES = polyvec.c poly.c ntt.c reduce.c util.c
SOURCESKECCAK = $(SOURCES) fips202.c symmetric-shake.c
HEADERS = params.h polyvec.h poly.h ntt.h reduce.h util.h
HEADERSKECCAK = $(HEADERS) fips202.h
.PHONY: all speed shared clean
all: \
test_rlwe \
test_shuffle
%_short.o: %.c params.h Makefile
$(CC) $(CFLAGS) -DSHORT=1 -c $< -o $@
%_shuffle.o: %.c params.h Makefile
$(CC) $(CFLAGS) -c $< -o $@
test_mx: $(SOURCESKECCAK) rlwe.c comm_shuffle.o comm_short.o shortness_proof_short.o mxproof.c test_shuffle.c randombytes.c
$(CC) $(CFLAGS) $^ -o test_mx -lm
test_shuffle: $(SOURCESKECCAK) rlwe.c comm_shuffle.o comm_short.o shortness_proof_short.o mxproof.c test_shuffle.c randombytes.c
$(CC) $(CFLAGS) -DNO_SHORT=1 $^ -o test_shuffle -lm
test_shortness: $(SOURCESKECCAK) randombytes.c shortness_proof_short.o comm_short.o comm_shuffle.o rlwe.c test_shortness.c
$(CC) $(CFLAGS) $^ -o test_shortness -lm
test_rlwe: $(SOURCESKECCAK) randombytes.c rlwe.c test_rlwe.c
$(CC) $(CFLAGS) $^ -o test_rlwe -lm
clean:
-$(RM) -rf *.gcno *.gcda *.gch *.lcov *.o *.so
-$(RM) -rf test_rlwe
-$(RM) -rf test_shuffle
-$(RM) -rf test_shortness
-$(RM) -rf test_mx