some bugs fixed, new introduced
[mkp224o.git] / Makefile
blob868dfb936e81c89e41961a9567fb2925b555eff1
2 CC= gcc
3 CFLAGS= -O3 -march=native -Wall
4 #CFLAGS= -O0 -g3 -fsanitize=address
5 MV= mv
7 ED25519OBJ= $(patsubst %.c,%.o,$(wildcard ed25519/ref10/*.c))
9 MAINOBJ= \
10 main.o \
11 base32_to.o \
12 base32_from.o \
13 $(ED25519OBJ) \
14 keccak.o
16 TEST_BASE32OBJ= \
17 test_base32.o \
18 base32_to.o \
19 base32_from.o
21 TEST_BASE16OBJ= \
22 test_base16.o \
23 base16_to.o \
24 base16_from.o
26 TEST_ED25519OBJ= \
27 test_ed25519.o \
28 base16_to.o \
29 base16_from.o \
30 $(ED25519OBJ)
32 MAINLIB= -lsodium -lpthread
33 TEST_ED25519LIB= -lsodium
35 EXE= mkp224o test_base32 test_base16 test_ed25519
37 default: mkp224o
39 all: $(EXE)
41 mkp224o: $(MAINOBJ)
42 $(CC) $(CFLAGS) -o $@.tmp $^ $(MAINLIB) && $(MV) $@.tmp $@
44 test_base32: $(TEST_BASE32OBJ)
45 $(CC) $(CFLAGS) -o $@.tmp $^ && $(MV) $@.tmp $@
47 test_base16: $(TEST_BASE16OBJ)
48 $(CC) $(CFLAGS) -o $@.tmp $^ && $(MV) $@.tmp $@
50 test_ed25519: $(TEST_ED25519OBJ)
51 $(CC) $(CFLAGS) -o $@.tmp $^ $(TEST_ED25519LIB) && $(MV) $@.tmp $@
53 %.o: %.c
54 $(CC) $(CFLAGS) -c -o $@.tmp $< && $(MV) $@.tmp $@
56 clean:
57 $(RM) $(MAINOBJ)
58 $(RM) $(TEST_BASE16OBJ)
59 $(RM) $(TEST_BASE32OBJ)
60 $(RM) $(TEST_ED25519OBJ)
61 $(RM) $(EXE)
63 depend:
64 makedepend -Y -- $(CFLAGS) -- $(MAINOBJ:.o=.c) $(TEST_BASE16OBJ:.o=.c) $(TEST_BASE32OBJ:.o=.c) $(TEST_ED25519OBJ:.o=.c)
66 # DO NOT DELETE THIS LINE
68 main.o: ed25519/ref10/ed25519_ref10.h ed25519/ref10/ge.h ed25519/ref10/fe.h
69 main.o: ed25519/ref10/crypto_int32.h types.h vec.h base32.h keccak.h
70 base32_to.o: types.h base32.h
71 base32_from.o: types.h base32.h
72 ed25519/ref10/sc_reduce.o: ed25519/ref10/sc.h ed25519/ref10/crypto_int64.h
73 ed25519/ref10/sc_reduce.o: ed25519/ref10/crypto_uint32.h
74 ed25519/ref10/sc_reduce.o: ed25519/ref10/crypto_uint64.h
75 ed25519/ref10/ge_msub.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
76 ed25519/ref10/ge_msub.o: ed25519/ref10/crypto_int32.h ed25519/ref10/ge_msub.h
77 ed25519/ref10/fe_copy.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
78 ed25519/ref10/fe_isnegative.o: ed25519/ref10/fe.h
79 ed25519/ref10/fe_isnegative.o: ed25519/ref10/crypto_int32.h
80 ed25519/ref10/fe_tobytes.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
81 ed25519/ref10/ge_p3_tobytes.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
82 ed25519/ref10/ge_p3_tobytes.o: ed25519/ref10/crypto_int32.h
83 ed25519/ref10/fe_0.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
84 ed25519/ref10/ge_p3_0.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
85 ed25519/ref10/ge_p3_0.o: ed25519/ref10/crypto_int32.h
86 ed25519/ref10/ge_double_scalarmult.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
87 ed25519/ref10/ge_double_scalarmult.o: ed25519/ref10/crypto_int32.h
88 ed25519/ref10/ge_double_scalarmult.o: ed25519/ref10/base2.h
89 ed25519/ref10/ge_p1p1_to_p3.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
90 ed25519/ref10/ge_p1p1_to_p3.o: ed25519/ref10/crypto_int32.h
91 ed25519/ref10/ge_p3_to_p2.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
92 ed25519/ref10/ge_p3_to_p2.o: ed25519/ref10/crypto_int32.h
93 ed25519/ref10/ge_sub.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
94 ed25519/ref10/ge_sub.o: ed25519/ref10/crypto_int32.h ed25519/ref10/ge_sub.h
95 ed25519/ref10/ge_madd.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
96 ed25519/ref10/ge_madd.o: ed25519/ref10/crypto_int32.h ed25519/ref10/ge_madd.h
97 ed25519/ref10/fe_frombytes.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
98 ed25519/ref10/fe_frombytes.o: ed25519/ref10/crypto_int64.h
99 ed25519/ref10/fe_frombytes.o: ed25519/ref10/crypto_uint64.h
100 ed25519/ref10/ge_scalarmult_base.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
101 ed25519/ref10/ge_scalarmult_base.o: ed25519/ref10/crypto_int32.h
102 ed25519/ref10/ge_scalarmult_base.o: ed25519/ref10/crypto_uint32.h
103 ed25519/ref10/ge_scalarmult_base.o: ed25519/ref10/base.h
104 ed25519/ref10/fe_neg.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
105 ed25519/ref10/ge_p2_dbl.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
106 ed25519/ref10/ge_p2_dbl.o: ed25519/ref10/crypto_int32.h
107 ed25519/ref10/ge_p2_dbl.o: ed25519/ref10/ge_p2_dbl.h
108 ed25519/ref10/fe_1.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
109 ed25519/ref10/sign.o: ed25519/ref10/crypto_sign.h
110 ed25519/ref10/sign.o: ed25519/ref10/ed25519_ref10.h
111 ed25519/ref10/sign.o: ed25519/ref10/crypto_hash_sha512.h ed25519/ref10/ge.h
112 ed25519/ref10/sign.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
113 ed25519/ref10/sign.o: ed25519/ref10/sc.h
114 ed25519/ref10/fe_cmov.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
115 ed25519/ref10/open.o: ed25519/ref10/crypto_sign.h
116 ed25519/ref10/open.o: ed25519/ref10/ed25519_ref10.h
117 ed25519/ref10/open.o: ed25519/ref10/crypto_hash_sha512.h
118 ed25519/ref10/open.o: ed25519/ref10/crypto_verify_32.h ed25519/ref10/ge.h
119 ed25519/ref10/open.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
120 ed25519/ref10/open.o: ed25519/ref10/sc.h
121 ed25519/ref10/ge_add.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
122 ed25519/ref10/ge_add.o: ed25519/ref10/crypto_int32.h ed25519/ref10/ge_add.h
123 ed25519/ref10/fe_sub.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
124 ed25519/ref10/fe_pow22523.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
125 ed25519/ref10/fe_pow22523.o: ed25519/ref10/pow22523.h
126 ed25519/ref10/fe_sq2.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
127 ed25519/ref10/fe_sq2.o: ed25519/ref10/crypto_int64.h
128 ed25519/ref10/fe_mul.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
129 ed25519/ref10/fe_mul.o: ed25519/ref10/crypto_int64.h
130 ed25519/ref10/ge_p2_0.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
131 ed25519/ref10/ge_p2_0.o: ed25519/ref10/crypto_int32.h
132 ed25519/ref10/keypair.o: ed25519/ref10/randombytes.h
133 ed25519/ref10/keypair.o: ed25519/ref10/crypto_sign.h
134 ed25519/ref10/keypair.o: ed25519/ref10/ed25519_ref10.h
135 ed25519/ref10/keypair.o: ed25519/ref10/crypto_hash_sha512.h
136 ed25519/ref10/keypair.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
137 ed25519/ref10/keypair.o: ed25519/ref10/crypto_int32.h
138 ed25519/ref10/fe_isnonzero.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
139 ed25519/ref10/fe_isnonzero.o: ed25519/ref10/crypto_verify_32.h
140 ed25519/ref10/ge_p1p1_to_p2.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
141 ed25519/ref10/ge_p1p1_to_p2.o: ed25519/ref10/crypto_int32.h
142 ed25519/ref10/fe_sq.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
143 ed25519/ref10/fe_sq.o: ed25519/ref10/crypto_int64.h
144 ed25519/ref10/fe_add.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
145 ed25519/ref10/ge_p3_to_cached.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
146 ed25519/ref10/ge_p3_to_cached.o: ed25519/ref10/crypto_int32.h
147 ed25519/ref10/ge_p3_to_cached.o: ed25519/ref10/d2.h
148 ed25519/ref10/ge_tobytes.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
149 ed25519/ref10/ge_tobytes.o: ed25519/ref10/crypto_int32.h
150 ed25519/ref10/sc_muladd.o: ed25519/ref10/sc.h ed25519/ref10/crypto_int64.h
151 ed25519/ref10/sc_muladd.o: ed25519/ref10/crypto_uint32.h
152 ed25519/ref10/sc_muladd.o: ed25519/ref10/crypto_uint64.h
153 ed25519/ref10/ge_p3_dbl.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
154 ed25519/ref10/ge_p3_dbl.o: ed25519/ref10/crypto_int32.h
155 ed25519/ref10/ge_frombytes.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
156 ed25519/ref10/ge_frombytes.o: ed25519/ref10/crypto_int32.h ed25519/ref10/d.h
157 ed25519/ref10/ge_frombytes.o: ed25519/ref10/sqrtm1.h
158 ed25519/ref10/fe_invert.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
159 ed25519/ref10/fe_invert.o: ed25519/ref10/pow225521.h
160 ed25519/ref10/ge_precomp_0.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
161 ed25519/ref10/ge_precomp_0.o: ed25519/ref10/crypto_int32.h
162 keccak.o: types.h keccak.h
163 test_base16.o: types.h base16.h
164 base16_to.o: types.h base16.h
165 base16_from.o: types.h base16.h
166 test_base32.o: types.h base32.h
167 base32_to.o: types.h base32.h
168 base32_from.o: types.h base32.h
169 test_ed25519.o: types.h base16.h ed25519/ref10/ed25519_ref10.h
170 base16_to.o: types.h base16.h
171 base16_from.o: types.h base16.h
172 ed25519/ref10/sc_reduce.o: ed25519/ref10/sc.h ed25519/ref10/crypto_int64.h
173 ed25519/ref10/sc_reduce.o: ed25519/ref10/crypto_uint32.h
174 ed25519/ref10/sc_reduce.o: ed25519/ref10/crypto_uint64.h
175 ed25519/ref10/ge_msub.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
176 ed25519/ref10/ge_msub.o: ed25519/ref10/crypto_int32.h ed25519/ref10/ge_msub.h
177 ed25519/ref10/fe_copy.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
178 ed25519/ref10/fe_isnegative.o: ed25519/ref10/fe.h
179 ed25519/ref10/fe_isnegative.o: ed25519/ref10/crypto_int32.h
180 ed25519/ref10/fe_tobytes.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
181 ed25519/ref10/ge_p3_tobytes.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
182 ed25519/ref10/ge_p3_tobytes.o: ed25519/ref10/crypto_int32.h
183 ed25519/ref10/fe_0.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
184 ed25519/ref10/ge_p3_0.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
185 ed25519/ref10/ge_p3_0.o: ed25519/ref10/crypto_int32.h
186 ed25519/ref10/ge_double_scalarmult.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
187 ed25519/ref10/ge_double_scalarmult.o: ed25519/ref10/crypto_int32.h
188 ed25519/ref10/ge_double_scalarmult.o: ed25519/ref10/base2.h
189 ed25519/ref10/ge_p1p1_to_p3.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
190 ed25519/ref10/ge_p1p1_to_p3.o: ed25519/ref10/crypto_int32.h
191 ed25519/ref10/ge_p3_to_p2.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
192 ed25519/ref10/ge_p3_to_p2.o: ed25519/ref10/crypto_int32.h
193 ed25519/ref10/ge_sub.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
194 ed25519/ref10/ge_sub.o: ed25519/ref10/crypto_int32.h ed25519/ref10/ge_sub.h
195 ed25519/ref10/ge_madd.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
196 ed25519/ref10/ge_madd.o: ed25519/ref10/crypto_int32.h ed25519/ref10/ge_madd.h
197 ed25519/ref10/fe_frombytes.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
198 ed25519/ref10/fe_frombytes.o: ed25519/ref10/crypto_int64.h
199 ed25519/ref10/fe_frombytes.o: ed25519/ref10/crypto_uint64.h
200 ed25519/ref10/ge_scalarmult_base.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
201 ed25519/ref10/ge_scalarmult_base.o: ed25519/ref10/crypto_int32.h
202 ed25519/ref10/ge_scalarmult_base.o: ed25519/ref10/crypto_uint32.h
203 ed25519/ref10/ge_scalarmult_base.o: ed25519/ref10/base.h
204 ed25519/ref10/fe_neg.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
205 ed25519/ref10/ge_p2_dbl.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
206 ed25519/ref10/ge_p2_dbl.o: ed25519/ref10/crypto_int32.h
207 ed25519/ref10/ge_p2_dbl.o: ed25519/ref10/ge_p2_dbl.h
208 ed25519/ref10/fe_1.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
209 ed25519/ref10/sign.o: ed25519/ref10/crypto_sign.h
210 ed25519/ref10/sign.o: ed25519/ref10/ed25519_ref10.h
211 ed25519/ref10/sign.o: ed25519/ref10/crypto_hash_sha512.h ed25519/ref10/ge.h
212 ed25519/ref10/sign.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
213 ed25519/ref10/sign.o: ed25519/ref10/sc.h
214 ed25519/ref10/fe_cmov.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
215 ed25519/ref10/open.o: ed25519/ref10/crypto_sign.h
216 ed25519/ref10/open.o: ed25519/ref10/ed25519_ref10.h
217 ed25519/ref10/open.o: ed25519/ref10/crypto_hash_sha512.h
218 ed25519/ref10/open.o: ed25519/ref10/crypto_verify_32.h ed25519/ref10/ge.h
219 ed25519/ref10/open.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
220 ed25519/ref10/open.o: ed25519/ref10/sc.h
221 ed25519/ref10/ge_add.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
222 ed25519/ref10/ge_add.o: ed25519/ref10/crypto_int32.h ed25519/ref10/ge_add.h
223 ed25519/ref10/fe_sub.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
224 ed25519/ref10/fe_pow22523.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
225 ed25519/ref10/fe_pow22523.o: ed25519/ref10/pow22523.h
226 ed25519/ref10/fe_sq2.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
227 ed25519/ref10/fe_sq2.o: ed25519/ref10/crypto_int64.h
228 ed25519/ref10/fe_mul.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
229 ed25519/ref10/fe_mul.o: ed25519/ref10/crypto_int64.h
230 ed25519/ref10/ge_p2_0.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
231 ed25519/ref10/ge_p2_0.o: ed25519/ref10/crypto_int32.h
232 ed25519/ref10/keypair.o: ed25519/ref10/randombytes.h
233 ed25519/ref10/keypair.o: ed25519/ref10/crypto_sign.h
234 ed25519/ref10/keypair.o: ed25519/ref10/ed25519_ref10.h
235 ed25519/ref10/keypair.o: ed25519/ref10/crypto_hash_sha512.h
236 ed25519/ref10/keypair.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
237 ed25519/ref10/keypair.o: ed25519/ref10/crypto_int32.h
238 ed25519/ref10/fe_isnonzero.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
239 ed25519/ref10/fe_isnonzero.o: ed25519/ref10/crypto_verify_32.h
240 ed25519/ref10/ge_p1p1_to_p2.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
241 ed25519/ref10/ge_p1p1_to_p2.o: ed25519/ref10/crypto_int32.h
242 ed25519/ref10/fe_sq.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
243 ed25519/ref10/fe_sq.o: ed25519/ref10/crypto_int64.h
244 ed25519/ref10/fe_add.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
245 ed25519/ref10/ge_p3_to_cached.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
246 ed25519/ref10/ge_p3_to_cached.o: ed25519/ref10/crypto_int32.h
247 ed25519/ref10/ge_p3_to_cached.o: ed25519/ref10/d2.h
248 ed25519/ref10/ge_tobytes.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
249 ed25519/ref10/ge_tobytes.o: ed25519/ref10/crypto_int32.h
250 ed25519/ref10/sc_muladd.o: ed25519/ref10/sc.h ed25519/ref10/crypto_int64.h
251 ed25519/ref10/sc_muladd.o: ed25519/ref10/crypto_uint32.h
252 ed25519/ref10/sc_muladd.o: ed25519/ref10/crypto_uint64.h
253 ed25519/ref10/ge_p3_dbl.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
254 ed25519/ref10/ge_p3_dbl.o: ed25519/ref10/crypto_int32.h
255 ed25519/ref10/ge_frombytes.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
256 ed25519/ref10/ge_frombytes.o: ed25519/ref10/crypto_int32.h ed25519/ref10/d.h
257 ed25519/ref10/ge_frombytes.o: ed25519/ref10/sqrtm1.h
258 ed25519/ref10/fe_invert.o: ed25519/ref10/fe.h ed25519/ref10/crypto_int32.h
259 ed25519/ref10/fe_invert.o: ed25519/ref10/pow225521.h
260 ed25519/ref10/ge_precomp_0.o: ed25519/ref10/ge.h ed25519/ref10/fe.h
261 ed25519/ref10/ge_precomp_0.o: ed25519/ref10/crypto_int32.h