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