-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
62 lines (52 loc) · 983 Bytes
/
Makefile
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
CC = /usr/bin/gcc
LDFLAGS=-L.
PERFFLAGS=-O3 -fomit-frame-pointer -march=native
CFLAGS= #-DRPI #For the raspberry pi
SOURCES=main.c performance.c
HEADERS=performance.h
# Which cryptosystem to include?
LIBFLAGS=
ifdef NTRU
LIBFLAGS += -lntru
HEADERS += ntru-hrss701/api.h
CFLAGS += -DNTRU
endif
ifdef NTRUP
LIBFLAGS += -lntrup
HEADERS += ntrulpr653/api.h ntrulpr653/crypto_kem.h
CFLAGS += -DNTRUP
endif
ifdef SABER
LIBFLAGS += -lsaber
HEADERS += saber/api.h
CFLAGS += -DSABER
endif
ifdef KYBER
LIBFLAGS += -lkyber
HEADERS += kyber/api.h
CFLAGS += -DKYBER
endif
ifdef FRODO
LIBFLAGS += -lfrodo
HEADERS += FrodoKEM-640/api.h
CFLAGS += -DFRODO
endif
LIBFLAGS += -lcrypto
DEBUGF=
ifdef DEBUG
DEBUGF = -g
endif
ifdef TIME
CFLAGS += -DTIME
endif
ifdef MEMORY
CFLAGS += -DMEMORY
endif
ifdef RPI
CFLAGS += -DRPI
endif
$( info $(LIBFLAGS) )
test: $(SOURCES) $(HEADERS)
$(CC) $(DEBUGF) $(CFLAGS) $(LDFLAGS) $(SOURCES) -o $@ $(LIBFLAGS) $(PERFFLAGS)
clean:
rm test