Commit | Line | Data |
---|---|---|
0f00dc4c MW |
1 | ### -*-makefile-*- |
2 | ### | |
3 | ### Build script for mathematical infrastructure | |
4 | ### | |
5 | ### (c) 2013 Straylight/Edgeware | |
6 | ### | |
7 | ||
8 | ###----- Licensing notice --------------------------------------------------- | |
9 | ### | |
10 | ### This file is part of Catacomb. | |
11 | ### | |
12 | ### Catacomb is free software; you can redistribute it and/or modify | |
13 | ### it under the terms of the GNU Library General Public License as | |
14 | ### published by the Free Software Foundation; either version 2 of the | |
15 | ### License, or (at your option) any later version. | |
16 | ### | |
17 | ### Catacomb is distributed in the hope that it will be useful, | |
18 | ### but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | ### GNU Library General Public License for more details. | |
21 | ### | |
22 | ### You should have received a copy of the GNU Library General Public | |
23 | ### License along with Catacomb; if not, write to the Free | |
24 | ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, | |
25 | ### MA 02111-1307, USA. | |
26 | ||
27 | include $(top_srcdir)/vars.am | |
28 | ||
29 | noinst_LTLIBRARIES = libmath.la | |
30 | libmath_la_SOURCES = | |
31 | nodist_libmath_la_SOURCES = | |
32 | libmath_la_LIBADD = | |
33 | ||
34 | TEST_LIBS = libmath.la | |
35 | ||
36 | ###-------------------------------------------------------------------------- | |
1c3d4cf5 MW |
37 | ### Representation of multiprecision integers. |
38 | ||
39 | ## The `mpgen' tool for dealing with these things. | |
40 | mpgen = $(srcdir)/mpgen | |
41 | EXTRA_DIST += mpgen | |
3eda76a3 MW |
42 | AM_V_MPGEN = $(AM_V_MPGEN_@AM_V@) |
43 | AM_V_MPGEN_ = $(AM_V_MPGEN_@AM_DEFAULT_V@) | |
44 | AM_V_MPGEN_0 = @echo " MPGEN $@"; | |
1c3d4cf5 MW |
45 | MPGEN = $(AM_V_MPGEN)$(PYTHON) $(mpgen) |
46 | ||
47 | ## The type information collected by `configure'. | |
48 | CLEANFILES += typeinfo.py | |
49 | EXTRA_DIST += typeinfo.py.in | |
50 | typeinfo.py: $(srcdir)/typeinfo.py.in Makefile | |
51 | $(SUBST) $(srcdir)/typeinfo.py.in >typeinfo.py.new \ | |
52 | type_bits="@type_bits@" \ | |
53 | limits="@limits@" && \ | |
54 | mv typeinfo.py.new typeinfo.py | |
55 | ||
56 | ## The header file containing our representation choices. | |
57 | BUILT_SOURCES += mptypes.h | |
58 | CLEANFILES += mptypes.h | |
59 | nodist_archinclude_HEADERS += mptypes.h | |
60 | mptypes.h: $(mpgen) typeinfo.py | |
61 | $(MPGEN) mptypes >mptypes.h.in && mv mptypes.h.in mptypes.h | |
62 | ||
63 | ## Limits of C types as multiprecision integers. | |
64 | BUILT_SOURCES += mplimits.h mplimits.c | |
65 | CLEANFILES += mplimits.h mplimits.c | |
66 | nodist_archinclude_HEADERS += mplimits.h | |
67 | nodist_libmath_la_SOURCES += mplimits.c | |
68 | mplimits.h: $(mpgen) typeinfo.py | |
69 | $(MPGEN) mplimits_h >mplimits.h.in && mv mplimits.h.in mplimits.h | |
70 | mplimits.c: $(mpgen) typeinfo.py | |
71 | $(MPGEN) mplimits_c >mplimits.c.in && mv mplimits.c.in mplimits.c | |
0f00dc4c | 72 | |
1c3d4cf5 MW |
73 | ###-------------------------------------------------------------------------- |
74 | ### Main multiprecision integer library. | |
0f00dc4c MW |
75 | |
76 | ## Additional buffer I/O functions for mathematical objects. | |
77 | pkginclude_HEADERS += buf.h | |
78 | libmath_la_SOURCES += buf.c | |
79 | ||
80 | ## Infrastructure for fast exponentiation. | |
81 | pkginclude_HEADERS += exp.h | |
82 | libmath_la_SOURCES += exp.c | |
83 | ||
84 | ## Main user-visible multiprecision arithmetic. | |
85 | pkginclude_HEADERS += mp.h | |
1c3d4cf5 | 86 | libmath_la_SOURCES += mp-arith.c |
ba57d652 | 87 | TESTS += mp-arith.t$(EXEEXT) |
1c3d4cf5 | 88 | libmath_la_SOURCES += mp-const.c |
0f00dc4c MW |
89 | libmath_la_SOURCES += mp-exp.c mp-exp.h |
90 | libmath_la_SOURCES += mp-gcd.c | |
ba57d652 | 91 | TESTS += mp-gcd.t$(EXEEXT) |
1c3d4cf5 | 92 | libmath_la_SOURCES += mp-io.c |
0f00dc4c | 93 | libmath_la_SOURCES += mp-jacobi.c |
ba57d652 | 94 | TESTS += mp-jacobi.t$(EXEEXT) |
1c3d4cf5 MW |
95 | libmath_la_SOURCES += mp-mem.c |
96 | libmath_la_SOURCES += mp-misc.c | |
0f00dc4c | 97 | libmath_la_SOURCES += mp-modexp.c |
ba57d652 | 98 | TESTS += mp-modexp.t$(EXEEXT) |
0f00dc4c | 99 | libmath_la_SOURCES += mp-modsqrt.c |
ba57d652 | 100 | TESTS += mp-modsqrt.t$(EXEEXT) |
0f00dc4c | 101 | libmath_la_SOURCES += mp-sqrt.c |
ba57d652 | 102 | TESTS += mp-sqrt.t$(EXEEXT) |
0f00dc4c MW |
103 | libmath_la_SOURCES += mp-test.c |
104 | EXTRA_DIST += t/mp | |
105 | ||
106 | ## Computing Fibonacci numbers. | |
107 | pkginclude_HEADERS += mp-fibonacci.h | |
108 | libmath_la_SOURCES += mp-fibonacci.c | |
ba57d652 | 109 | TESTS += mp-fibonacci.t$(EXEEXT) |
0f00dc4c MW |
110 | |
111 | ## Special memory allocation for multiprecision integers. | |
112 | pkginclude_HEADERS += mparena.h | |
1c3d4cf5 | 113 | libmath_la_SOURCES += mparena.c |
0f00dc4c MW |
114 | |
115 | ## Barrett reduction, an efficient method for modular reduction. | |
116 | pkginclude_HEADERS += mpbarrett.h | |
117 | libmath_la_SOURCES += mpbarrett.c | |
ba57d652 | 118 | TESTS += mpbarrett.t$(EXEEXT) |
0f00dc4c | 119 | libmath_la_SOURCES += mpbarrett-exp.c mpbarrett-mexp.c mpbarrett-exp.h |
ba57d652 MW |
120 | TESTS += mpbarrett-exp.t$(EXEEXT) mpbarrett-mexp.t$(EXEEXT) |
121 | TESTS += mpbarrett.t$(EXEEXT) | |
0f00dc4c MW |
122 | EXTRA_DIST += t/mpbarrett |
123 | ||
124 | ## Solving congruences using the Chinese Remainder Theorem. | |
125 | pkginclude_HEADERS += mpcrt.h | |
126 | libmath_la_SOURCES += mpcrt.c | |
ba57d652 | 127 | TESTS += mpcrt.t$(EXEEXT) |
0f00dc4c MW |
128 | EXTRA_DIST += t/mpcrt |
129 | ||
130 | ## Conversions between machine-native and multiprecision integers. | |
131 | pkginclude_HEADERS += mpint.h | |
132 | libmath_la_SOURCES += mpint.c | |
ba57d652 | 133 | TESTS += mpint.t$(EXEEXT) |
0f00dc4c MW |
134 | EXTRA_DIST += t/mpint |
135 | ||
0f00dc4c MW |
136 | ## Montgomery reduction, a clever method for modular arithmetic. |
137 | pkginclude_HEADERS += mpmont.h | |
138 | libmath_la_SOURCES += mpmont.c | |
ba57d652 | 139 | TESTS += mpmont.t$(EXEEXT) |
0f00dc4c | 140 | libmath_la_SOURCES += mpmont-exp.c mpmont-mexp.c mpmont-exp.h |
ba57d652 | 141 | TESTS += mpmont-exp.t$(EXEEXT) mpmont-mexp.t$(EXEEXT) |
0f00dc4c MW |
142 | EXTRA_DIST += t/mpmont |
143 | ||
144 | ## Efficient multiplication of many small numbers. | |
145 | pkginclude_HEADERS += mpmul.h | |
146 | libmath_la_SOURCES += mpmul.c | |
ba57d652 | 147 | TESTS += mpmul.t$(EXEEXT) |
0f00dc4c MW |
148 | |
149 | ## Generating random numbers. | |
150 | pkginclude_HEADERS += mprand.h | |
151 | libmath_la_SOURCES += mprand.c | |
152 | ||
153 | ## Efficient reduction modulo numbers with conveninent binary | |
154 | ## representations. | |
155 | pkginclude_HEADERS += mpreduce.h | |
156 | libmath_la_SOURCES += mpreduce.c mpreduce-exp.h | |
ba57d652 | 157 | TESTS += mpreduce.t$(EXEEXT) |
0f00dc4c MW |
158 | EXTRA_DIST += t/mpreduce |
159 | ||
160 | ## Iteratiion over the bianry representation of multiprecision integers. | |
161 | pkginclude_HEADERS += mpscan.h | |
1c3d4cf5 | 162 | libmath_la_SOURCES += mpscan.c |
0f00dc4c MW |
163 | |
164 | ## Conversion between multiprecision integers and their textual | |
165 | ## representations. | |
166 | pkginclude_HEADERS += mptext.h | |
1c3d4cf5 | 167 | libmath_la_SOURCES += mptext.c |
ba57d652 | 168 | TESTS += mptext.t$(EXEEXT) |
0f00dc4c MW |
169 | libmath_la_SOURCES += mptext-dstr.c |
170 | libmath_la_SOURCES += mptext-file.c | |
171 | libmath_la_SOURCES += mptext-len.c | |
1c3d4cf5 | 172 | libmath_la_SOURCES += mptext-string.c |
0f00dc4c MW |
173 | EXTRA_DIST += t/mptext |
174 | ||
0f00dc4c MW |
175 | ## Low-level multiprecision arithmetic. |
176 | pkginclude_HEADERS += mpx.h bitops.h mpw.h | |
1c3d4cf5 | 177 | libmath_la_SOURCES += mpx.c |
ba57d652 | 178 | TESTS += mpx.t$(EXEEXT) |
1c3d4cf5 | 179 | libmath_la_SOURCES += karatsuba.h mpx-kmul.c mpx-ksqr.c |
ba57d652 | 180 | TESTS += mpx-kmul.t$(EXEEXT) mpx-ksqr.t$(EXEEXT) |
0f00dc4c MW |
181 | noinst_PROGRAMS += bittest |
182 | TESTS += bittest | |
183 | EXTRA_DIST += t/mpx | |
1e8abdf5 | 184 | |
444083ae | 185 | if CPUFAM_X86 |
7ba379a6 MW |
186 | MPX_MUL4_SOURCES = mpx-mul4-x86-sse2.S |
187 | check_PROGRAMS += mpx-mul4.t | |
188 | TESTS += mpx-mul4.t$(EXEEXT) | |
444083ae | 189 | endif |
3119b3ae | 190 | if CPUFAM_AMD64 |
7ba379a6 MW |
191 | MPX_MUL4_SOURCES = mpx-mul4-amd64-sse2.S |
192 | check_PROGRAMS += mpx-mul4.t | |
193 | TESTS += mpx-mul4.t$(EXEEXT) | |
3119b3ae | 194 | endif |
7ba379a6 | 195 | libmath_la_SOURCES += $(MPX_MUL4_SOURCES) |
7ba379a6 MW |
196 | mpx_mul4_t_SOURCES = mpx-mul4-test.c $(MPX_MUL4_SOURCES) |
197 | mpx_mul4_t_CPPFLAGS = \ | |
198 | $(AM_CPPFLAGS) \ | |
199 | -DTEST_MUL4 -DSRCDIR="\"$(srcdir)\"" | |
200 | mpx_mul4_t_LDADD = $(top_builddir)/libcatacomb.la $(mLib_LIBS) | |
1e8abdf5 | 201 | EXTRA_DIST += t/mpx-mul4 |
0f00dc4c MW |
202 | |
203 | ## A quick-and-dirty parser, used for parsing descriptions of groups, fields, | |
204 | ## etc. | |
205 | pkginclude_HEADERS += qdparse.h | |
206 | libmath_la_SOURCES += qdparse.c | |
207 | ||
208 | ## Pollard's `rho' algorithm for determining discrete logarithms. | |
209 | pkginclude_HEADERS += rho.h | |
210 | libmath_la_SOURCES += rho.c | |
ba57d652 | 211 | TESTS += rho.t$(EXEEXT) |
0f00dc4c MW |
212 | |
213 | ###-------------------------------------------------------------------------- | |
214 | ### Prime number checking, searching, and related jobs. | |
215 | ||
216 | ## Generating Lim--Lee groups, i.e., unit groups of finite fields without | |
217 | ## small subgroups (except for the obvious ones). | |
218 | pkginclude_HEADERS += limlee.h | |
219 | libmath_la_SOURCES += limlee.c | |
220 | ||
221 | ## A table of small prime numbers. | |
c9cfa678 MW |
222 | pkginclude_HEADERS += $(precomp)/math/primetab.h |
223 | nodist_libmath_la_SOURCES += ../precomp/math/primetab.c | |
224 | PRECOMPS += $(precomp)/math/primetab.h \ | |
225 | $(precomp)/math/primetab.c | |
e5b61a8d | 226 | PRECOMP_PROGS += genprimes |
0f00dc4c | 227 | genprimes_LDADD = $(mLib_LIBS) |
e5b61a8d | 228 | if !CROSS_COMPILING |
c9cfa678 MW |
229 | $(precomp)/math/primetab.h: $(precomp)/math/primetab.c |
230 | $(precomp)/math/primetab.c: | |
231 | $(AM_V_at)$(MKDIR_P) $(precomp)/math | |
ba57d652 | 232 | $(AM_V_at)$(MAKE) genprimes$(EXEEXT) |
e5b61a8d | 233 | $(AM_V_GEN)./genprimes -sCATACOMB_PRIMETAB_H \ |
c9cfa678 | 234 | -h$(precomp)/math/primetab.h -c$(precomp)/math/primetab.c \ |
0f00dc4c | 235 | -n256 -t"unsigned short" -iprimetab |
e5b61a8d | 236 | endif |
0f00dc4c MW |
237 | |
238 | ## Filtering candidate prime numbers by checking for small factors | |
239 | ## efficiently. | |
240 | pkginclude_HEADERS += pfilt.h | |
241 | libmath_la_SOURCES += pfilt.c | |
242 | ||
243 | ## Generating prime numbers (and other kinds of numbers which need searching | |
244 | ## for). | |
245 | pkginclude_HEADERS += pgen.h | |
246 | libmath_la_SOURCES += pgen.c | |
247 | libmath_la_SOURCES += pgen-gcd.c | |
248 | libmath_la_SOURCES += pgen-simul.c | |
249 | libmath_la_SOURCES += pgen-stdev.c | |
ba57d652 | 250 | TESTS += pgen.t$(EXEEXT) |
0f00dc4c MW |
251 | EXTRA_DIST += t/pgen |
252 | ||
253 | ## Finding primitive elements in finite fields. | |
254 | pkginclude_HEADERS += prim.h | |
255 | libmath_la_SOURCES += prim.c | |
256 | ||
257 | ## Iterating over all prime numbers from a given starting point. | |
258 | pkginclude_HEADERS += primeiter.h | |
259 | libmath_la_SOURCES += primeiter.c | |
ba57d652 | 260 | TESTS += primeiter.t$(EXEEXT) |
c9cfa678 | 261 | primeiter.lo: $(precomp)/math/wheel.h |
0f00dc4c MW |
262 | |
263 | ## The Miller--Rabin primality test. | |
264 | pkginclude_HEADERS += rabin.h | |
265 | libmath_la_SOURCES += rabin.c | |
266 | ||
267 | ## Finding `strong' primes, using Gordon's algorithm. Once upon a time, | |
268 | ## products of these kinds of numbers were harder to factor. | |
269 | pkginclude_HEADERS += strongprime.h | |
270 | libmath_la_SOURCES += strongprime.c | |
271 | ||
272 | ## A `wheel', used by the prime iteration machinery. | |
c9cfa678 MW |
273 | pkginclude_HEADERS += $(precomp)/math/wheel.h |
274 | nodist_libmath_la_SOURCES += ../precomp/math/wheel.c | |
275 | PRECOMPS += $(precomp)/math/wheel.h $(precomp)/math/wheel.c | |
e5b61a8d | 276 | PRECOMP_PROGS += genwheel |
0f00dc4c | 277 | genwheel_LDADD = $(mLib_LIBS) |
e5b61a8d | 278 | if !CROSS_COMPILING |
c9cfa678 MW |
279 | $(precomp)/math/wheel.h: $(precomp)/math/wheel.c |
280 | $(precomp)/math/wheel.c: | |
281 | $(AM_V_at)$(MKDIR_P) $(precomp)/math | |
ba57d652 | 282 | $(AM_V_at)$(MAKE) genwheel$(EXEEXT) |
e5b61a8d | 283 | $(AM_V_GEN)./genwheel -sCATACOMB_WHEEL_H \ |
c9cfa678 | 284 | -h$(precomp)/math/wheel.h -c$(precomp)/math/wheel.c \ |
0f00dc4c | 285 | -n5 -t"unsigned char" -iwheel |
e5b61a8d | 286 | endif |
0f00dc4c MW |
287 | |
288 | ###-------------------------------------------------------------------------- | |
289 | ### Binary polynomial arithmetic. | |
290 | ||
291 | ## User-visible binary polynomial arithmetic. | |
292 | pkginclude_HEADERS += gf.h | |
293 | libmath_la_SOURCES += gf-arith.c | |
ba57d652 | 294 | TESTS += gf-arith.t$(EXEEXT) |
0f00dc4c MW |
295 | libmath_la_SOURCES += gf-exp.c gf-exp.h |
296 | libmath_la_SOURCES += gf-gcd.c | |
ba57d652 | 297 | TESTS += gf-gcd.t$(EXEEXT) |
0f00dc4c MW |
298 | EXTRA_DIST += t/gf |
299 | ||
300 | ## Low-level binary polynomial arithmetic. | |
301 | pkginclude_HEADERS += gfx.h | |
302 | libmath_la_SOURCES += gfx.c | |
ba57d652 | 303 | TESTS += gfx.t$(EXEEXT) |
0f00dc4c | 304 | libmath_la_SOURCES += gfx-kmul.c |
ba57d652 | 305 | TESTS += gfx-kmul.t$(EXEEXT) |
c9cfa678 MW |
306 | libmath_la_SOURCES += gfx-sqr.c |
307 | nodist_libmath_la_SOURCES += ../precomp/math/gfx-sqrtab.c | |
308 | PRECOMPS += $(precomp)/math/gfx-sqrtab.c | |
e5b61a8d MW |
309 | PRECOMP_PROGS += gfx-sqr-mktab |
310 | if !CROSS_COMPILING | |
c9cfa678 MW |
311 | $(precomp)/math/gfx-sqrtab.c: |
312 | $(AM_V_at)$(MKDIR_P) $(precomp)/math | |
ba57d652 | 313 | $(AM_V_at)$(MAKE) gfx-sqr-mktab$(EXEEXT) |
c9cfa678 MW |
314 | $(AM_V_GEN)./gfx-sqr-mktab >$(precomp)/math/gfx-sqrtab.c.new && \ |
315 | mv $(precomp)/math/gfx-sqrtab.c.new \ | |
316 | $(precomp)/math/gfx-sqrtab.c | |
e5b61a8d | 317 | endif |
ba57d652 | 318 | TESTS += gfx-sqr.t$(EXEEXT) |
0f00dc4c MW |
319 | EXTRA_DIST += t/gfx |
320 | ||
321 | ## Conversions between normal and polynomial basis representations for binary | |
322 | ## fields. | |
323 | pkginclude_HEADERS += gfn.h | |
324 | libmath_la_SOURCES += gfn.c | |
ba57d652 | 325 | TESTS += gfn.t$(EXEEXT) |
0f00dc4c MW |
326 | EXTRA_DIST += t/gfn |
327 | ||
328 | ## Efficient reduction modulo sparse polynomials. | |
329 | pkginclude_HEADERS += gfreduce.h | |
330 | libmath_la_SOURCES += gfreduce.c gfreduce-exp.h | |
ba57d652 | 331 | TESTS += gfreduce.t$(EXEEXT) |
0f00dc4c MW |
332 | EXTRA_DIST += t/gfreduce |
333 | ||
334 | ###-------------------------------------------------------------------------- | |
335 | ### Abstractions for various kinds of algebraic objects. | |
336 | ||
337 | ## Abstract cyclic groups. | |
338 | pkginclude_HEADERS += group.h group-guts.h | |
339 | libmath_la_SOURCES += group-dstr.c | |
340 | libmath_la_SOURCES += group-exp.c group-exp.h | |
341 | libmath_la_SOURCES += group-file.c | |
342 | libmath_la_SOURCES += group-parse.c | |
343 | libmath_la_SOURCES += group-stdops.c | |
344 | libmath_la_SOURCES += group-string.c | |
345 | libmath_la_SOURCES += g-bin.c | |
346 | libmath_la_SOURCES += g-prime.c | |
347 | libmath_la_SOURCES += g-ec.c | |
348 | EXTRA_DIST += group-test.c | |
ba57d652 | 349 | TESTS += group-test.t$(EXEEXT) |
0f00dc4c MW |
350 | EXTRA_DIST += t/group |
351 | ||
352 | ## Abstract finite fields. | |
353 | pkginclude_HEADERS += field.h field-guts.h | |
354 | libmath_la_SOURCES += field.c | |
355 | libmath_la_SOURCES += field-exp.c field-exp.h | |
356 | libmath_la_SOURCES += field-parse.c | |
357 | libmath_la_SOURCES += f-binpoly.c | |
358 | libmath_la_SOURCES += f-niceprime.c | |
359 | libmath_la_SOURCES += f-prime.c | |
360 | ||
361 | ## Table of built-in binary fields. | |
362 | pkginclude_HEADERS += bintab.h | |
1c3d4cf5 | 363 | nodist_libmath_la_SOURCES += bintab.c |
0f00dc4c | 364 | CLEANFILES += bintab.c |
1c3d4cf5 MW |
365 | EXTRA_DIST += bintab.in |
366 | bintab.c: $(mpgen) typeinfo.py bintab.in | |
367 | $(MPGEN) bintab $(srcdir)/bintab.in >bintab.c.new && \ | |
368 | mv bintab.c.new bintab.c | |
0f00dc4c MW |
369 | |
370 | ## Table of built-in prime fields. | |
371 | pkginclude_HEADERS += ptab.h | |
1c3d4cf5 | 372 | nodist_libmath_la_SOURCES += ptab.c |
0f00dc4c | 373 | CLEANFILES += ptab.c |
1c3d4cf5 MW |
374 | EXTRA_DIST += ptab.in |
375 | ptab.c: $(mpgen) typeinfo.py ptab.in | |
376 | $(MPGEN) ptab $(srcdir)/ptab.in >ptab.c.new && \ | |
377 | mv ptab.c.new ptab.c | |
0f00dc4c MW |
378 | |
379 | ###-------------------------------------------------------------------------- | |
380 | ### Elliptic curve arithmetic. | |
381 | ||
382 | ## Basic elliptic curve arithmetic. | |
383 | pkginclude_HEADERS += ec.h ec-guts.h | |
384 | libmath_la_SOURCES += ec.c | |
385 | libmath_la_SOURCES += ec-exp.c ec-exp.h | |
386 | libmath_la_SOURCES += ec-info.c | |
ba57d652 | 387 | TESTS += ec-info.t$(EXEEXT) |
0f00dc4c | 388 | libmath_la_SOURCES += ec-bin.c |
ba57d652 | 389 | TESTS += ec-bin.t$(EXEEXT) |
0f00dc4c | 390 | libmath_la_SOURCES += ec-prime.c |
ba57d652 | 391 | TESTS += ec-prime.t$(EXEEXT) |
0f00dc4c MW |
392 | EXTRA_DIST += t/ec |
393 | ||
394 | ## The standard `raw' encoding (`EC2OSP') of elliptic curve points. | |
395 | pkginclude_HEADERS += ec-raw.h | |
396 | libmath_la_SOURCES += ec-raw.c | |
397 | ||
398 | ## Assistance for elliptic-curve keys. | |
399 | pkginclude_HEADERS += ec-keys.h | |
400 | libmath_la_SOURCES += ec-fetch.c | |
401 | ||
402 | ## Test infrastructure for elliptic curves. | |
403 | pkginclude_HEADERS += ec-test.h | |
404 | libmath_la_SOURCES += ec-test.c | |
ba57d652 | 405 | TESTS += ec-test.t$(EXEEXT) |
0f00dc4c | 406 | |
1c3d4cf5 | 407 | ## Table of built-in elliptic-curve groups. |
0f00dc4c | 408 | pkginclude_HEADERS += ectab.h |
1c3d4cf5 | 409 | nodist_libmath_la_SOURCES += ectab.c |
0f00dc4c | 410 | CLEANFILES += ectab.c |
1c3d4cf5 MW |
411 | EXTRA_DIST += ectab.in |
412 | ectab.c: $(mpgen) typeinfo.py ectab.in | |
413 | $(MPGEN) ectab $(srcdir)/ectab.in >ectab.c.new && \ | |
414 | mv ectab.c.new ectab.c | |
0f00dc4c | 415 | |
ee39a683 MW |
416 | ###-------------------------------------------------------------------------- |
417 | ### Other strange things. | |
418 | ||
419 | pkginclude_HEADERS += qfarith.h | |
420 | ||
421 | pkginclude_HEADERS += f25519.h | |
422 | libmath_la_SOURCES += f25519.c | |
423 | TESTS += f25519.t$(EXEEXT) | |
424 | TESTS += f25519-p10.t$(EXEEXT) | |
425 | EXTRA_DIST += t/f25519 | |
426 | ||
427 | check_PROGRAMS += f25519-p10.t | |
428 | f25519_p10_t_SOURCES = f25519.c | |
429 | f25519_p10_t_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_RIG -DSRCDIR="\"$(srcdir)\"" | |
430 | f25519_p10_t_CPPFLAGS += -DF25519_IMPL=10 | |
431 | f25519_p10_t_LDADD = $(TEST_LIBS) $(top_builddir)/libcatacomb.la | |
432 | f25519_p10_t_LDADD += $(mLib_LIBS) $(CATACOMB_LIBS) $(LIBS) | |
433 | ||
266efb73 MW |
434 | pkginclude_HEADERS += fgoldi.h |
435 | libmath_la_SOURCES += fgoldi.c | |
436 | TESTS += fgoldi.t$(EXEEXT) | |
437 | TESTS += fgoldi-p12.t$(EXEEXT) | |
438 | EXTRA_DIST += t/fgoldi | |
439 | ||
440 | check_PROGRAMS += fgoldi-p12.t | |
441 | fgoldi_p12_t_SOURCES = fgoldi.c | |
442 | fgoldi_p12_t_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_RIG -DSRCDIR="\"$(srcdir)\"" | |
443 | fgoldi_p12_t_CPPFLAGS += -DFGOLDI_IMPL=12 | |
444 | fgoldi_p12_t_LDADD = $(TEST_LIBS) $(top_builddir)/libcatacomb.la | |
445 | fgoldi_p12_t_LDADD += $(mLib_LIBS) $(CATACOMB_LIBS) $(LIBS) | |
446 | ||
d56fd9d1 MW |
447 | pkginclude_HEADERS += scaf.h |
448 | libmath_la_SOURCES += scaf.c | |
449 | ||
fc2d44af | 450 | pkginclude_HEADERS += montladder.h |
581ac808 | 451 | pkginclude_HEADERS += scmul.h |
fc2d44af | 452 | |
0f00dc4c | 453 | ###----- That's all, folks -------------------------------------------------- |