-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
87 lines (70 loc) · 2.22 KB
/
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# curve25519 Makefile version 20050915
# D. J. Bernstein
# Public domain.
CFLAGS := -m32 -no-pie
# Test programs:
default: test-curve25519
speedreport: speedreport.do \
curve25519.h cpucycles.h \
curve25519-speed test-curve25519
sh speedreport.do > speedreport
test-curve25519: test-curve25519.o curve25519.a
$(CC) $(CFLAGS) -o test-curve25519 test-curve25519.o curve25519.a
test-curve25519.o: test-curve25519.c \
curve25519_athlon.h \
curve25519.h
$(CC) $(CFLAGS) -c test-curve25519.c
curve25519-speed: curve25519-speed.o curve25519.a cpucycles.a
$(CC) $(CFLAGS) -o curve25519-speed curve25519-speed.o curve25519.a cpucycles.a
curve25519-speed.o: curve25519-speed.c \
curve25519_athlon.h \
curve25519.h
$(CC) $(CFLAGS) -c curve25519-speed.c
cpucycles.h: curve25519.impl \
cpucycles.h.do
sh -e cpucycles.h.do > cpucycles.h.new
mv cpucycles.h.new cpucycles.h
cpucycles.a: curve25519.impl \
cpucycles_athlon.h \
cpucycles_athlon.s \
cpucycles.a.do
sh -e cpucycles.a.do $(CC) $(CFLAGS) > cpucycles.a.new
mv cpucycles.a.new cpucycles.a
# The curve25519 library:
curve25519: curve25519.a curve25519.h
curve25519.h: curve25519.impl \
curve25519.h.do
sh -e curve25519.h.do > curve25519.h.new
mv curve25519.h.new curve25519.h
curve25519.a: curve25519.impl \
curve25519.a.do \
curve25519_athlon.h \
curve25519_athlon.c \
curve25519_athlon_const.s \
curve25519_athlon_fromdouble.s \
curve25519_athlon_init.s \
curve25519_athlon_mainloop.s \
curve25519_athlon_mult.s \
curve25519_athlon_square.s \
curve25519_athlon_todouble.s
sh -e curve25519.a.do $(CC) $(CFLAGS) > curve25519.a.new
mv curve25519.a.new curve25519.a
curve25519.impl: \
curve25519.impl.do \
x86cpuid.c \
curve25519.impl.check.c \
curve25519_athlon.h \
curve25519_athlon.c \
curve25519_athlon_const.s \
curve25519_athlon_fromdouble.s \
curve25519_athlon_init.s \
curve25519_athlon_mainloop.s \
curve25519_athlon_mult.s \
curve25519_athlon_square.s \
curve25519_athlon_todouble.s
sh -e curve25519.impl.do $(CC) $(CFLAGS) > curve25519.impl.new
mv curve25519.impl.new curve25519.impl
clean:
rm -f curve25519.impl.check.h curve25519.impl.new curve25519.impl \
curve25519.impl.check x86cpuid x86cpuid.out *.o *.a curve25519.h cpucycles.h \
test-curve25519 curve25519-speed speedreport