Commit | Line | Data |
---|---|---|
0f00dc4c MW |
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 | ||
e5b61a8d | 35 | VPATH += $(srcdir)/modes |
0f00dc4c MW |
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. | |
24497005 MW |
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. | |
0f00dc4c | 52 | include modes.am |
24497005 | 53 | include stubs.am |
0f00dc4c MW |
54 | |
55 | EXTRA_DIST += modes.am.in modes.am | |
24497005 | 56 | EXTRA_DIST += stubs.am.in stubs.am |
0f00dc4c | 57 | MAINTAINERCLEANFILES += $(srcdir)/modes.am |
24497005 | 58 | MAINTAINERCLEANFILES += $(srcdir)/stubs.am |
0f00dc4c MW |
59 | |
60 | ## Generate the lists. | |
77843a37 | 61 | $(srcdir)/modes.am: modes.am.in Makefile.am |
0f00dc4c MW |
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)" | |
24497005 MW |
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)" | |
0f00dc4c MW |
73 | |
74 | ## Initialize lists of known classes. | |
75 | ALL_CIPHERS = $(CIPHER_MODES) | |
76 | ALL_HASHES = $(HASHES) | |
77 | ALL_MACS = $(MAC_MODES) | |
78 | ||
24497005 MW |
79 | ## Stub headers and sources. |
80 | STUBS_HDR = | |
81 | STUBS_SRC = | |
82 | ||
0f00dc4c MW |
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 | |
e5b61a8d MW |
105 | libsymm_la_SOURCES += $(precomp)/blowfish-tab.c |
106 | PRECOMPS += $(precomp)/blowfish-tab.c | |
107 | PRECOMP_PROGS += blowfish-mktab | |
0f00dc4c | 108 | blowfish_mktab_CPPFLAGS = $(AM_CPPFLAGS) -DQUIET |
e5b61a8d MW |
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 | |
0f00dc4c MW |
116 | |
117 | ## Adams and Tavares' `CAST' block ciphers. | |
118 | BLKCS += cast128 cast256 | |
e5b61a8d | 119 | libsymm_la_SOURCES += cast-s.c cast-sk.c cast-base.h |
0f00dc4c MW |
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 | |
e5b61a8d MW |
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 | |
0f00dc4c MW |
141 | |
142 | ## Rivest's `DESX' variant, with pre- and post-whitening. | |
143 | BLKCS += desx | |
e5b61a8d | 144 | libsymm_la_SOURCES += desx-tab.c |
0f00dc4c MW |
145 | |
146 | ## Lai and Massey's IDEA. | |
147 | BLKCS += idea | |
148 | ||
149 | ## IBM's `MARS' block cipher. | |
150 | BLKCS += mars | |
e5b61a8d MW |
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 | |
0f00dc4c MW |
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 | |
e5b61a8d | 175 | libsymm_la_SOURCES += rc2-tab.c |
0f00dc4c MW |
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 | |
e5b61a8d MW |
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 | |
0f00dc4c MW |
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 | |
e5b61a8d MW |
204 | libsymm_la_SOURCES += $(precomp)/safer-tab.c |
205 | PRECOMPS += $(precomp)/safer-tab.c | |
206 | PRECOMP_PROGS += safer-mktab | |
24497005 | 207 | STUBS_HDR += SAFER-SK,safersk,safer |
e5b61a8d MW |
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 | |
0f00dc4c MW |
215 | |
216 | ## Anderson, Biham and Knudsen's `Serpent' block cipher. | |
217 | BLKCS += serpent | |
218 | libsymm_la_SOURCES += serpent-sbox.h | |
e5b61a8d | 219 | check_PROGRAMS += serpent-check |
0f00dc4c MW |
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 | |
e5b61a8d | 233 | libsymm_la_SOURCES += skipjack-tab.c |
0f00dc4c MW |
234 | |
235 | ## Daemen and Rijmen's `Square' block cipher. | |
236 | BLKCS += square | |
e5b61a8d MW |
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 | |
0f00dc4c MW |
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 | |
e5b61a8d MW |
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 | |
0f00dc4c MW |
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 | |
e5b61a8d | 303 | libsymm_la_SOURCES += md2-tab.c |
0f00dc4c MW |
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 | |
24497005 MW |
314 | STUBS_HDR += SHA-224,sha224,sha256 |
315 | STUBS_HDR += SHA-384,sha384,sha512 | |
0f00dc4c MW |
316 | |
317 | ## Anderson and Biham's `Tiger' hash function. | |
318 | HASHES += tiger | |
e5b61a8d MW |
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 | |
0f00dc4c MW |
329 | |
330 | ## Barreto and Rijmen's `Whirlpool' hash function. | |
331 | HASHES += whirlpool whirlpool256 | |
e5b61a8d MW |
332 | libsymm_la_SOURCES += $(precomp)/whirlpool-tab.c |
333 | PRECOMPS += $(precomp)/whirlpool-tab.c | |
334 | PRECOMP_PROGS += whirlpool-mktab | |
24497005 | 335 | STUBS_HDR += Whirlpool-256,whirlpool256,whirlpool |
e5b61a8d MW |
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 | |
0f00dc4c MW |
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 | ###-------------------------------------------------------------------------- | |
373 | ### Autogenerated mode implementations. | |
374 | ||
375 | ## The master stamp file, indicating that we generated all of the sources. | |
0f00dc4c | 376 | EXTRA_DIST += mode.h.in mode.c.in |
e5b61a8d MW |
377 | EXTRA_DIST += modes/gen-stamp |
378 | MAINTAINERCLEANFILES += modes/gen-stamp | |
77843a37 | 379 | modes/gen-stamp: Makefile.am |
e5b61a8d | 380 | $(AM_V_at)$(MKDIR_P) $(srcdir)/modes |
0f00dc4c | 381 | $(AM_V_GEN)$(multigen) -g $(srcdir)/mode.c.in \ |
e5b61a8d | 382 | $(srcdir)/modes/@base-@mode.c \ |
0f00dc4c MW |
383 | base="$(BLKCS)" mode="$(BLKCMODES)" |
384 | $(AM_V_at)$(multigen) -g $(srcdir)/mode.h.in \ | |
e5b61a8d | 385 | $(srcdir)/modes/@base-@mode.h \ |
0f00dc4c MW |
386 | base="$(BLKCS)" mode="$(BLKCMODES)" |
387 | $(AM_V_at)$(multigen) -g $(srcdir)/mode.c.in \ | |
e5b61a8d | 388 | $(srcdir)/modes/@base-@mode.c \ |
0f00dc4c MW |
389 | base="$(HASHES)" mode="$(HASHMODES)" |
390 | $(AM_V_at)$(multigen) -g $(srcdir)/mode.h.in \ | |
e5b61a8d | 391 | $(srcdir)/modes/@base-@mode.h \ |
0f00dc4c | 392 | base="$(HASHES)" mode="$(HASHMODES)" |
e5b61a8d | 393 | $(AM_V_at)touch $(srcdir)/modes/gen-stamp |
0f00dc4c MW |
394 | |
395 | ## The individual mode interfaces and implementations. | |
396 | pkginclude_HEADERS += $(MODE_H) | |
397 | ||
398 | ## Generated implementations. | |
399 | BUILT_SOURCES += $(GENMODES_C) | |
e5b61a8d | 400 | MAINTAINERCLEANFILES += $(GENMODES_C) |
ef75f314 | 401 | libsymm_la_SOURCES += $(GENMODES_C) |
0f00dc4c MW |
402 | $(GENMODES_C): modes/gen-stamp |
403 | ||
404 | ## Generated interfaces. | |
405 | BUILT_SOURCES += $(GENMODES_H) | |
e5b61a8d | 406 | MAINTAINERCLEANFILES += $(GENMODES_H) |
ef75f314 | 407 | pkginclude_HEADERS += $(GENMODES_H) |
0f00dc4c MW |
408 | $(GENMODES_H): modes/gen-stamp |
409 | ||
410 | ###-------------------------------------------------------------------------- | |
24497005 MW |
411 | ### Autogenerated stub headers. |
412 | ||
413 | ## The master stamp file. | |
414 | EXTRA_DIST += stub.h.in | |
415 | EXTRA_DIST += stubs.gen-stamp | |
416 | MAINTAINERCLEANFILES += stubs.gen-stamp | |
417 | stubs.gen-stamp: Makefile.am | |
418 | $(AM_V_at)$(MKDIR_P) $(srcdir)/stubs | |
419 | $(AM_V_GEN)$(multigen) -g $(srcdir)/stub.h.in \ | |
420 | $(srcdir)/@name.h descr,name,base="$(STUBS_HDR)" | |
421 | $(AM_V_GEN)$(multigen) -g $(srcdir)/stub.c.in \ | |
422 | $(srcdir)/@name.c name="$(STUBS_SRC)" | |
423 | $(AM_V_at)touch $(srcdir)/stubs.gen-stamp | |
424 | ||
425 | ## Generated stub headers. | |
426 | BUILT_SOURCES += $(STUB_H) $(STUB_C) | |
427 | MAINTAINERCLEANFILES += $(STUB_H) $(STUB_C) | |
428 | pkginclude_HEADERS += $(STUB_H) | |
429 | $(STUB_H) $(STUB_C): stubs.gen-stamp | |
430 | ||
431 | ###-------------------------------------------------------------------------- | |
0f00dc4c MW |
432 | ### Tables of classes for encryption, hashing, and message authentication. |
433 | ||
434 | ## The skeleton for the class tables. | |
435 | EXTRA_DIST += gthingtab.c.in | |
436 | ||
437 | ## Table of cipher classes. | |
438 | pkginclude_HEADERS += gcipher.h | |
439 | CLEANFILES += gciphertab.c | |
440 | nodist_libsymm_la_SOURCES += gciphertab.c | |
77843a37 | 441 | gciphertab.c: gthingtab.c.in Makefile.am |
0f00dc4c MW |
442 | $(AM_V_GEN)$(multigen) -g $(srcdir)/gthingtab.c.in gciphertab.c \ |
443 | what=gcipher cls=gccipher thing="$(ALL_CIPHERS)" | |
444 | ||
445 | ## Table of hash classes. | |
446 | pkginclude_HEADERS += ghash.h ghash-def.h | |
447 | CLEANFILES += ghashtab.c | |
448 | nodist_libsymm_la_SOURCES += ghashtab.c | |
77843a37 | 449 | ghashtab.c: gthingtab.c.in Makefile.am |
0f00dc4c MW |
450 | $(AM_V_GEN)$(multigen) -g $(srcdir)/gthingtab.c.in ghashtab.c \ |
451 | what=ghash cls=gchash thing="$(ALL_HASHES)" | |
452 | ||
453 | ## Table of MAC classes. | |
454 | pkginclude_HEADERS += gmac.h | |
455 | CLEANFILES += gmactab.c | |
456 | nodist_libsymm_la_SOURCES += gmactab.c | |
77843a37 | 457 | gmactab.c: gthingtab.c.in Makefile.am |
0f00dc4c MW |
458 | $(AM_V_GEN)$(multigen) -g $(srcdir)/gthingtab.c.in gmactab.c \ |
459 | what=gmac cls=gcmac thing="$(ALL_MACS)" | |
460 | ||
461 | ###-------------------------------------------------------------------------- | |
462 | ### Testing. | |
463 | ||
464 | ## Run the test programs. | |
465 | TESTS += $(SYMM_TESTS) | |
466 | EXTRA_DIST += $(SYMM_TEST_FILES) | |
467 | ||
468 | ## A piece of sample text for round-trip testing encryption modes. | |
469 | EXTRA_DIST += daftstory.h | |
470 | ||
471 | ## Clean the debris from the `modes' subdirectory. | |
472 | CLEANFILES += modes/*.to modes/*.$t | |
473 | ||
474 | ###----- That's all, folks -------------------------------------------------- |