chiark / gitweb /
symm/: New SSE2 implementations of Salsa20 and ChaCha.
[catacomb] / symm / Makefile.am
1 ### -*-makefile-*-
2 ###
3 ### Build script for symmetric cryptography
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       = libsymm.la
30 libsymm_la_SOURCES       =
31 nodist_libsymm_la_SOURCES =
32
33 TEST_LIBS                = libsymm.la
34
35 VPATH                   += $(srcdir)/modes
36
37 ###--------------------------------------------------------------------------
38 ### Autogenerated lists.
39
40 ## Fancy template substitutions.
41 multigen                 = $(PYTHON) $(srcdir)/multigen
42 EXTRA_DIST              += multigen
43
44 ## The heart of this is an enormous cross-product of crypto primitives and
45 ## the corresponding modes of operation.  Rather than write it out longhand,
46 ## we generate it using `multigen'.  Unfortunately, this needs to be done
47 ## at the Automake level, which causes some interesting bootstrapping
48 ## problems.
49 ##
50 ## Of course, now that we have this machinery for the complicated modes
51 ## generation, we might as well use it for simpler things.
52 include modes.am
53 include stubs.am
54
55 EXTRA_DIST              += modes.am.in modes.am
56 EXTRA_DIST              += stubs.am.in stubs.am
57 MAINTAINERCLEANFILES    += $(srcdir)/modes.am
58 MAINTAINERCLEANFILES    += $(srcdir)/stubs.am
59
60 ## Generate the lists.
61 $(srcdir)/modes.am: modes.am.in Makefile.am
62         $(AM_V_GEN)$(multigen) -g $(srcdir)/modes.am.in $(srcdir)/modes.am \
63                 blkc="$(BLKCS)" \
64                         blkcmode="$(BLKCMODES)" \
65                         blkcciphermode="$(BLKCCIPHERMODES)" \
66                 hash="$(HASHES)" \
67                         hashmode="$(HASHMODES)" \
68                         hashciphermode="$(HASHCIPHERMODES)" \
69                         hashmacmode="$(HASHMACMODES)"
70 $(srcdir)/stubs.am: stubs.am.in Makefile.am
71         $(AM_V_GEN)$(multigen) -g $(srcdir)/stubs.am.in $(srcdir)/stubs.am \
72                 descr,hname,base="$(STUBS_HDR)" cname="$(STUBS_SRC)"
73
74 ## Initialize lists of known classes.
75 ALL_CIPHERS              = $(CIPHER_MODES)
76 ALL_HASHES               = $(HASHES)
77 ALL_MACS                 = $(MAC_MODES)
78
79 ## Stub headers and sources.
80 STUBS_HDR                =
81 STUBS_SRC                =
82
83 ###--------------------------------------------------------------------------
84 ### Block ciphers.
85
86 BLKCS                    =
87 BLKCMODES                =
88
89 BLKCCIPHERMODES          =
90 BLKCMODES               += $(BLKCCIPHERMODES)
91
92 ## A tool for translating the AES-contest test vectors into a form our test
93 ## rigs understand.
94 EXTRA_DIST              += aes-trans
95
96 ## Block cipher utility macros, mainly used in mode implementations.
97 pkginclude_HEADERS      += blkc.h
98
99 ## Source code and headers for the block ciphers.
100 libsymm_la_SOURCES      += $(BLKC_C)
101 pkginclude_HEADERS      += $(BLKC_H)
102
103 ## Schneier's `Blowfish' block cipher.
104 BLKCS                   += blowfish
105 libsymm_la_SOURCES      += $(precomp)/blowfish-tab.c
106 PRECOMPS                += $(precomp)/blowfish-tab.c
107 PRECOMP_PROGS           += blowfish-mktab
108 blowfish_mktab_CPPFLAGS  = $(AM_CPPFLAGS) -DQUIET
109 if !CROSS_COMPILING
110 $(precomp)/blowfish-tab.c:
111         $(AM_V_at)$(MKDIR_P) $(precomp)
112         $(AM_V_at)$(MAKE) blowfish-mktab$e
113         $(AM_V_GEN)./blowfish-mktab >$(precomp)/blowfish-tab.c.new && \
114                 mv $(precomp)/blowfish-tab.c.new $(precomp)/blowfish-tab.c
115 endif
116
117 ## Adams and Tavares' `CAST' block ciphers.
118 BLKCS                   += cast128 cast256
119 libsymm_la_SOURCES      += cast-s.c cast-sk.c cast-base.h
120 cast256.$t: t/cast256
121 EXTRA_DIST              += t/cast256.aes
122 MAINTAINERCLEANFILES    += $(srcdir)/t/cast256
123 t/cast256: t/cast256.aes
124         $(AM_V_GEN)$(srcdir)/aes-trans CAST256 \
125                 <$(srcdir)/t/cast256.aes \
126                 >$(srcdir)/t/cast256.new && \
127         mv $(srcdir)/t/cast256.new $(srcdir)/t/cast256
128
129 ## IBM's `DES' block cipher, by Feistel, Coppersmith, and others.
130 BLKCS                   += des des3
131 libsymm_la_SOURCES      += des-base.h $(precomp)/des-tab.c
132 PRECOMPS                += $(precomp)/des-tab.c
133 PRECOMP_PROGS           += des-mktab
134 if !CROSS_COMPILING
135 $(precomp)/des-tab.c:
136         $(AM_V_at)$(MKDIR_P) $(precomp)
137         $(AM_V_at)$(MAKE) des-mktab$e
138         $(AM_V_GEN)./des-mktab >$(precomp)/des-tab.c.new && \
139                 mv $(precomp)/des-tab.c.new $(precomp)/des-tab.c
140 endif
141
142 ## Rivest's `DESX' variant, with pre- and post-whitening.
143 BLKCS                   += desx
144 libsymm_la_SOURCES      += desx-tab.c
145
146 ## Lai and Massey's IDEA.
147 BLKCS                   += idea
148
149 ## IBM's `MARS' block cipher.
150 BLKCS                   += mars
151 libsymm_la_SOURCES      += $(precomp)/mars-tab.c
152 PRECOMPS                += $(precomp)/mars-tab.c
153 PRECOMP_PROGS           += mars-mktab
154 if !CROSS_COMPILING
155 $(precomp)/mars-tab.c:
156         $(AM_V_at)$(MKDIR_P) $(precomp)
157         $(AM_V_at)$(MAKE) mars-mktab$e
158         $(AM_V_GEN)./mars-mktab >$(precomp)/mars-tab.c.new && \
159                 mv $(precomp)/mars-tab.c.new $(precomp)/mars-tab.c
160 endif
161 mars.$t: t/mars
162 EXTRA_DIST              += t/mars.aes
163 MAINTAINERCLEANFILES    += $(srcdir)/t/mars
164 t/mars: t/mars.aes
165         $(AM_V_GEN)$(srcdir)/aes-trans Mars \
166                 <$(srcdir)/t/mars.aes \
167                 >$(srcdir)/t/mars.new && \
168         mv $(srcdir)/t/mars.new $(srcdir)/t/mars
169
170 ## Daemen, Peeters, Van Assche and Rijmen's `Noekeon'.
171 BLKCS                   += noekeon
172
173 ## Rivest's `RC2' block cipher.
174 BLKCS                   += rc2
175 libsymm_la_SOURCES      += rc2-tab.c
176
177 ## Rivest's `RC5'.
178 BLKCS                   += rc5
179
180 ## Daemen and Rijmen's `Rijndael' block cipher, selected as AES.
181 BLKCS                   += rijndael rijndael192 rijndael256
182 libsymm_la_SOURCES      += rijndael-base.h rijndael-base.c
183 libsymm_la_SOURCES      += $(precomp)/rijndael-tab.c
184 PRECOMPS                += $(precomp)/rijndael-tab.c
185 PRECOMP_PROGS           += rijndael-mktab
186 if !CROSS_COMPILING
187 $(precomp)/rijndael-tab.c:
188         $(AM_V_at)$(MKDIR_P) $(precomp)
189         $(AM_V_at)$(MAKE) rijndael-mktab$e
190         $(AM_V_GEN)./rijndael-mktab >$(precomp)/rijndael-tab.c.new && \
191                 mv $(precomp)/rijndael-tab.c.new $(precomp)/rijndael-tab.c
192 endif
193 rijndael.$t: t/rijndael
194 EXTRA_DIST              += t/rijndael.aes
195 MAINTAINERCLEANFILES    += $(srcdir)/t/rijndael
196 t/rijndael: t/rijndael.aes
197         $(AM_V_GEN)$(srcdir)/aes-trans Rijndael \
198                 <$(srcdir)/t/rijndael.aes \
199                 >$(srcdir)/t/rijndael.new && \
200         mv $(srcdir)/t/rijndael.new $(srcdir)/t/rijndael
201
202 ## Massey's `SAFER' block ciphers.
203 BLKCS                   += safer safersk
204 libsymm_la_SOURCES      += $(precomp)/safer-tab.c
205 PRECOMPS                += $(precomp)/safer-tab.c
206 PRECOMP_PROGS           += safer-mktab
207 STUBS_HDR               += SAFER-SK,safersk,safer
208 if !CROSS_COMPILING
209 $(precomp)/safer-tab.c:
210         $(AM_V_at)$(MKDIR_P) $(precomp)
211         $(AM_V_at)$(MAKE) safer-mktab$e
212         $(AM_V_GEN)./safer-mktab >$(precomp)/safer-tab.c.new && \
213                 mv $(precomp)/safer-tab.c.new $(precomp)/safer-tab.c
214 endif
215
216 ## Anderson, Biham and Knudsen's `Serpent' block cipher.
217 BLKCS                   += serpent
218 libsymm_la_SOURCES      += serpent-sbox.h
219 check_PROGRAMS          += serpent-check
220 TESTS                   += serpent-check
221 serpent.$t: t/serpent
222 EXTRA_DIST              += t/serpent.aes
223 MAINTAINERCLEANFILES    += $(srcdir)/t/serpent
224 t/serpent: t/serpent.aes
225         $(AM_V_GEN)$(srcdir)/aes-trans Serpent -v rev=1 \
226                 <$(srcdir)/t/serpent.aes \
227                 >$(srcdir)/t/serpent.new && \
228         mv $(srcdir)/t/serpent.new $(srcdir)/t/serpent
229
230 ## The National Security Agency's `Skipjack' block cipher.  You don't want to
231 ## use this.
232 BLKCS                   += skipjack
233 libsymm_la_SOURCES      += skipjack-tab.c
234
235 ## Daemen and Rijmen's `Square' block cipher.
236 BLKCS                   += square
237 libsymm_la_SOURCES      += $(precomp)/square-tab.c
238 PRECOMPS                += $(precomp)/square-tab.c
239 PRECOMP_PROGS           += square-mktab
240 if !CROSS_COMPILING
241 $(precomp)/square-tab.c:
242         $(AM_V_at)$(MKDIR_P) $(precomp)
243         $(AM_V_at)$(MAKE) square-mktab$e
244         $(AM_V_GEN)./square-mktab >$(precomp)/square-tab.c.new && \
245                 mv $(precomp)/square-tab.c.new $(precomp)/square-tab.c
246 endif
247
248 ## Wheeler and Needham's `TEA' and `XTEA' block ciphers.
249 BLKCS                   += tea xtea
250
251 ## Schneier, Kelsey, Whiting, Wagner, Hall and Ferguson's `Twofish' block
252 ## cipher.
253 BLKCS                   += twofish
254 libsymm_la_SOURCES      += $(precomp)/twofish-tab.c
255 PRECOMPS                += $(precomp)/twofish-tab.c
256 PRECOMP_PROGS           += twofish-mktab
257 if !CROSS_COMPILING
258 $(precomp)/twofish-tab.c:
259         $(AM_V_at)$(MKDIR_P) $(precomp)
260         $(AM_V_at)$(MAKE) twofish-mktab$e
261         $(AM_V_GEN)./twofish-mktab >$(precomp)/twofish-tab.c.new && \
262                 mv $(precomp)/twofish-tab.c.new $(precomp)/twofish-tab.c
263 endif
264 twofish.$t: t/twofish
265 EXTRA_DIST              += t/twofish.aes
266 MAINTAINERCLEANFILES    += $(srcdir)/t/twofish
267 t/twofish: t/twofish.aes
268         $(AM_V_GEN)$(srcdir)/aes-trans Twofish \
269                 <$(srcdir)/t/twofish.aes \
270                 >$(srcdir)/t/twofish.new && \
271         mv $(srcdir)/t/twofish.new $(srcdir)/t/twofish
272
273 ## The old NIST modes for DES.
274 BLKCCIPHERMODES         += cbc cfb ecb ofb
275
276 ## Counter mode.
277 BLKCCIPHERMODES         += counter
278
279 ###--------------------------------------------------------------------------
280 ### Hash functions.
281
282 HASHES                   =
283 HASHMODES                =
284
285 HASHCIPHERMODES          =
286 HASHMODES               += $(HASHCIPHERMODES)
287
288 HASHMACMODES             =
289 HASHMODES               += $(HASHMACMODES)
290
291 ## Common definitions for hash functions.
292 pkginclude_HEADERS      += hash.h
293
294 ## Source code and headers for the hash functions.
295 libsymm_la_SOURCES      += $(HASH_C)
296 pkginclude_HEADERS      += $(HASH_H)
297
298 ## Lim and KISA's `HAS-160', recommended for use with KCDSA.
299 HASHES                  += has160
300
301 ## Rivest's `MD' series of hash functions
302 HASHES                  += md2 md4 md5
303 libsymm_la_SOURCES      += md2-tab.c
304
305 ## Dobbertin, Bosselaers and Preneel's `RIPEMD' suite.
306 HASHES                  += rmd128 rmd160 rmd256 rmd320
307
308 ## The National Security Agency's `SHA-1' hash function.
309 HASHES                  += sha
310
311 ## The National Security Agency's `SHA-2' suite.
312 HASHES                  += sha224 sha256
313 HASHES                  += sha384 sha512
314 STUBS_HDR               += SHA-224,sha224,sha256
315 STUBS_HDR               += SHA-384,sha384,sha512
316
317 ## Anderson and Biham's `Tiger' hash function.
318 HASHES                  += tiger
319 libsymm_la_SOURCES      += tiger-base.h $(precomp)/tiger-tab.c
320 PRECOMPS                += $(precomp)/tiger-tab.c
321 PRECOMP_PROGS           += tiger-mktab
322 if !CROSS_COMPILING
323 $(precomp)/tiger-tab.c:
324         $(AM_V_at)$(MKDIR_P) $(precomp)
325         $(AM_V_at)$(MAKE) tiger-mktab$e
326         $(AM_V_GEN)./tiger-mktab >$(precomp)/tiger-tab.c.new && \
327                 mv $(precomp)/tiger-tab.c.new $(precomp)/tiger-tab.c
328 endif
329
330 ## Barreto and Rijmen's `Whirlpool' hash function.
331 HASHES                  += whirlpool whirlpool256
332 libsymm_la_SOURCES      += $(precomp)/whirlpool-tab.c
333 PRECOMPS                += $(precomp)/whirlpool-tab.c
334 PRECOMP_PROGS           += whirlpool-mktab
335 STUBS_HDR               += Whirlpool-256,whirlpool256,whirlpool
336 if !CROSS_COMPILING
337 $(precomp)/whirlpool-tab.c:
338         $(AM_V_at)$(MKDIR_P) $(precomp)
339         $(AM_V_at)$(MAKE) whirlpool-mktab$e
340         $(AM_V_GEN)./whirlpool-mktab >$(precomp)/whirlpool-tab.c.new && \
341                 mv $(precomp)/whirlpool-tab.c.new $(precomp)/whirlpool-tab.c
342 endif
343
344 ## Bellare, Canetti and Krawczyk's `HMAC' mode for message authentication.
345 HASHMACMODES            += hmac
346
347 ## MGF1, used in OAEP and PSS.
348 HASHCIPHERMODES         += mgf
349
350 ###--------------------------------------------------------------------------
351 ### Other symmetric primitives.
352
353 ## The CRC32 algorithm, which is useful, but has no worthwhile security.
354 pkginclude_HEADERS      += crc32.h
355 libsymm_la_SOURCES      += crc32.c
356 ALL_HASHES              += crc32=gcrc32
357
358 ## Rivest's `RC4' stream cipher.
359 pkginclude_HEADERS      += rc4.h
360 libsymm_la_SOURCES      += rc4.c
361 TESTS                   += rc4.$t
362 EXTRA_DIST              += t/rc4
363 ALL_CIPHERS             += rc4
364
365 ## Coppersmith and Rogaway's `SEAL' pseudorandom function.
366 pkginclude_HEADERS      += seal.h
367 libsymm_la_SOURCES      += seal.c
368 TESTS                   += seal.$t
369 EXTRA_DIST              += t/seal
370 ALL_CIPHERS             += seal
371
372 ## Bernstein's `Salsa20' stream cipher.  Most of the test vectors come from
373 ## the eSTREAM project, captured by the Internet Archive's Wayback Machine at
374 ##
375 ##   http://web.archive.org/web/20070814004154/http://www.ecrypt.eu.org/stream/svn/viewcvs.cgi/ecrypt/trunk/submissions/salsa20.tar.gz?view=tar
376 ##
377 ## and automatically converted into the format we want.
378 EXTRA_DIST              += salsa20-tvconv
379 pkginclude_HEADERS      += salsa20.h salsa20-core.h
380 libsymm_la_SOURCES      += salsa20.c
381 if CPUFAM_X86
382 libsymm_la_SOURCES      += salsa20-x86-sse2.s
383 endif
384 TESTS                   += salsa20.$t
385 ALL_CIPHERS             += salsa20 salsa2012 salsa208
386 ALL_CIPHERS             += xsalsa20 xsalsa2012 xsalsa208
387 STUBS_HDR               += Salsa20/12,salsa2012,salsa20
388 STUBS_HDR               += Salsa20/8,salsa208,salsa20
389 STUBS_HDR               += XSalsa20,xsalsa20,salsa20
390 STUBS_HDR               += XSalsa20/12,xsalsa2012,salsa20
391 STUBS_HDR               += XSalsa20/8,xsalsa208,salsa20
392 EXTRA_DIST              += t/salsa20
393 MAINTAINERCLEANFILES    += t/salsa20
394 salsa20.$t: t/salsa20
395 SALSA20_ESTREAM_TV       = t/salsa20.estream
396 SALSA20_ESTREAM_TV      += t/salsa2012.estream
397 SALSA20_ESTREAM_TV      += t/salsa208.estream
398 EXTRA_DIST              += t/salsa20.local $(SALSA20_ESTREAM_TV)
399 t/salsa20: salsa20-tvconv t/salsa20.local $(SALSA20_ESTREAM_TV)
400         $(AM_V_GEN)cd $(srcdir) && \
401                 { echo "### GENERATED by salsa20-tvconv" && \
402                   cat t/salsa20.local && \
403                   ./salsa20-tvconv $(SALSA20_ESTREAM_TV); \
404                 } >t/salsa20.new && \
405                 mv t/salsa20.new t/salsa20
406
407 ## Bernstein's `ChaCha' stream cipher.
408 pkginclude_HEADERS      += chacha.h chacha-core.h
409 libsymm_la_SOURCES      += chacha.c
410 if CPUFAM_X86
411 libsymm_la_SOURCES      += chacha-x86-sse2.s
412 endif
413 TESTS                   += chacha.$t
414 EXTRA_DIST              += t/chacha
415 ALL_CIPHERS             += chacha20 chacha12 chacha8
416 ALL_CIPHERS             += xchacha20 xchacha12 xchacha8
417 STUBS_HDR               += ChaCha20,chacha20,chacha
418 STUBS_HDR               += ChaCha12,chacha12,chacha
419 STUBS_HDR               += ChaCha8,chacha8,chacha
420 STUBS_HDR               += XChaCha20,xchacha20,chacha
421 STUBS_HDR               += XChaCha12,xchacha12,chacha
422 STUBS_HDR               += XChaCha8,xchacha8,chacha
423
424 ###--------------------------------------------------------------------------
425 ### Autogenerated mode implementations.
426
427 ## The master stamp file, indicating that we generated all of the sources.
428 EXTRA_DIST              += mode.h.in mode.c.in
429 EXTRA_DIST              += modes/gen-stamp
430 MAINTAINERCLEANFILES    += modes/gen-stamp
431 modes/gen-stamp: Makefile.am
432         $(AM_V_at)$(MKDIR_P) $(srcdir)/modes
433         $(AM_V_GEN)$(multigen) -g $(srcdir)/mode.c.in \
434                 $(srcdir)/modes/@base-@mode.c \
435                 base="$(BLKCS)" mode="$(BLKCMODES)"
436         $(AM_V_at)$(multigen) -g $(srcdir)/mode.h.in \
437                 $(srcdir)/modes/@base-@mode.h \
438                 base="$(BLKCS)" mode="$(BLKCMODES)"
439         $(AM_V_at)$(multigen) -g $(srcdir)/mode.c.in \
440                 $(srcdir)/modes/@base-@mode.c \
441                 base="$(HASHES)" mode="$(HASHMODES)"
442         $(AM_V_at)$(multigen) -g $(srcdir)/mode.h.in \
443                 $(srcdir)/modes/@base-@mode.h \
444                 base="$(HASHES)" mode="$(HASHMODES)"
445         $(AM_V_at)touch $(srcdir)/modes/gen-stamp
446
447 ## The individual mode interfaces and implementations.
448 pkginclude_HEADERS      += $(MODE_H)
449
450 ## Generated implementations.
451 BUILT_SOURCES           += $(GENMODES_C)
452 MAINTAINERCLEANFILES    += $(GENMODES_C)
453 libsymm_la_SOURCES      += $(GENMODES_C)
454 $(GENMODES_C): modes/gen-stamp
455
456 ## Generated interfaces.
457 BUILT_SOURCES           += $(GENMODES_H)
458 MAINTAINERCLEANFILES    += $(GENMODES_H)
459 pkginclude_HEADERS      += $(GENMODES_H)
460 $(GENMODES_H): modes/gen-stamp
461
462 ###--------------------------------------------------------------------------
463 ### Autogenerated stub headers.
464
465 ## The master stamp file.
466 EXTRA_DIST              += stub.h.in
467 EXTRA_DIST              += stubs.gen-stamp
468 MAINTAINERCLEANFILES    += stubs.gen-stamp
469 stubs.gen-stamp: Makefile.am
470         $(AM_V_at)$(MKDIR_P) $(srcdir)/stubs
471         $(AM_V_GEN)$(multigen) -g $(srcdir)/stub.h.in \
472                 $(srcdir)/@name.h descr,name,base="$(STUBS_HDR)"
473         $(AM_V_GEN)$(multigen) -g $(srcdir)/stub.c.in \
474                 $(srcdir)/@name.c name="$(STUBS_SRC)"
475         $(AM_V_at)touch $(srcdir)/stubs.gen-stamp
476
477 ## Generated stub headers.
478 BUILT_SOURCES           += $(STUB_H) $(STUB_C)
479 MAINTAINERCLEANFILES    += $(STUB_H) $(STUB_C)
480 pkginclude_HEADERS      += $(STUB_H)
481 $(STUB_H) $(STUB_C): stubs.gen-stamp
482
483 ###--------------------------------------------------------------------------
484 ### Tables of classes for encryption, hashing, and message authentication.
485
486 ## The skeleton for the class tables.
487 EXTRA_DIST              += gthingtab.c.in
488
489 ## Table of cipher classes.
490 pkginclude_HEADERS      += gcipher.h
491 CLEANFILES              += gciphertab.c
492 nodist_libsymm_la_SOURCES += gciphertab.c
493 gciphertab.c: gthingtab.c.in Makefile.am
494         $(AM_V_GEN)$(multigen) -g $(srcdir)/gthingtab.c.in gciphertab.c \
495                 what=gcipher cls=gccipher thing="$(ALL_CIPHERS)"
496
497 ## Table of hash classes.
498 pkginclude_HEADERS      += ghash.h ghash-def.h
499 CLEANFILES              += ghashtab.c
500 nodist_libsymm_la_SOURCES += ghashtab.c
501 ghashtab.c: gthingtab.c.in Makefile.am
502         $(AM_V_GEN)$(multigen) -g $(srcdir)/gthingtab.c.in ghashtab.c \
503                 what=ghash cls=gchash thing="$(ALL_HASHES)"
504
505 ## Table of MAC classes.
506 pkginclude_HEADERS      += gmac.h
507 CLEANFILES              += gmactab.c
508 nodist_libsymm_la_SOURCES += gmactab.c
509 gmactab.c: gthingtab.c.in Makefile.am
510         $(AM_V_GEN)$(multigen) -g $(srcdir)/gthingtab.c.in gmactab.c \
511                 what=gmac cls=gcmac thing="$(ALL_MACS)"
512
513 ###--------------------------------------------------------------------------
514 ### Testing.
515
516 ## Run the test programs.
517 TESTS                   += $(SYMM_TESTS)
518 EXTRA_DIST              += $(SYMM_TEST_FILES)
519
520 ## A piece of sample text for round-trip testing encryption modes.
521 EXTRA_DIST              += daftstory.h
522
523 ## Clean the debris from the `modes' subdirectory.
524 CLEANFILES              += modes/*.to modes/*.$t
525
526 ###----- That's all, folks --------------------------------------------------