d03ab969 |
1 | ## -*-makefile-*- |
2 | ## |
3bef8c14 |
3 | ## $Id: Makefile.m4,v 1.53 2001/04/29 18:11:19 mdw Exp $ |
d03ab969 |
4 | ## |
5 | ## Makefile for Catacomb |
6 | ## |
7 | ## (c) 1999 Straylight/Edgeware |
8 | ## |
9 | |
10 | ##----- Licensing notice ---------------------------------------------------- |
11 | ## |
12 | ## This file is part of Catacomb. |
13 | ## |
14 | ## Catacomb is free software; you can redistribute it and/or modify |
15 | ## it under the terms of the GNU Library General Public License as |
16 | ## published by the Free Software Foundation; either version 2 of the |
17 | ## License, or (at your option) any later version. |
18 | ## |
19 | ## Catacomb is distributed in the hope that it will be useful, |
20 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
21 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22 | ## GNU Library General Public License for more details. |
23 | ## |
24 | ## You should have received a copy of the GNU Library General Public |
25 | ## License along with Catacomb; if not, write to the Free |
26 | ## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
27 | ## MA 02111-1307, USA. |
28 | |
29 | ##----- Revision history ---------------------------------------------------- |
30 | ## |
31 | ## $Log: Makefile.m4,v $ |
3bef8c14 |
32 | ## Revision 1.53 2001/04/29 18:11:19 mdw |
33 | ## New block cipher MARS. |
34 | ## |
621468d8 |
35 | ## Revision 1.52 2001/04/29 17:37:35 mdw |
36 | ## Added SAFER block cipher. |
37 | ## |
e7dc130f |
38 | ## Revision 1.51 2001/04/19 18:26:32 mdw |
39 | ## Add CRC as another hash function. |
40 | ## |
51a0f805 |
41 | ## Revision 1.50 2001/04/06 22:05:10 mdw |
42 | ## Add support for SSL pseudo-random function. |
43 | ## |
d83a82be |
44 | ## Revision 1.49 2001/04/04 20:10:52 mdw |
45 | ## Add support for the TLS pseudo-random function. |
46 | ## |
b348397a |
47 | ## Revision 1.48 2001/04/03 19:36:50 mdw |
48 | ## New block cipher DESX added. |
49 | ## |
abef5380 |
50 | ## Revision 1.47 2001/03/03 13:14:13 mdw |
51 | ## Distribute md2-tab.h |
52 | ## |
d3187d77 |
53 | ## Revision 1.46 2001/02/21 20:03:22 mdw |
54 | ## Added support for MD2 hash function. |
55 | ## |
f2ec324f |
56 | ## Revision 1.45 2001/02/03 16:09:41 mdw |
57 | ## New files added. |
58 | ## |
eee16120 |
59 | ## Revision 1.44 2000/10/15 17:49:00 mdw |
60 | ## New SHA variants with longer outputs. |
61 | ## |
7c0acba6 |
62 | ## Revision 1.43 2000/10/08 16:01:26 mdw |
63 | ## Add binary poly arithmetic. Tidy table generation stuff. Distribute |
64 | ## calc prototypes. |
65 | ## |
9312c71f |
66 | ## Revision 1.42 2000/10/08 12:16:06 mdw |
67 | ## Remove vestiges of @primorial@. |
68 | ## |
3fe3eae5 |
69 | ## Revision 1.41 2000/08/15 21:46:20 mdw |
70 | ## Set up the dependencies on primetab.[ch] and mptypes.h properly. |
71 | ## There's some m4 hacking, but it's worth it not to have to recompile all |
72 | ## the cipher modes. |
73 | ## |
b55540f6 |
74 | ## Revision 1.40 2000/08/06 10:50:55 mdw |
75 | ## (mkphrase): New program for generating random passphrases with measured |
76 | ## strength. |
77 | ## |
525af7b8 |
78 | ## Revision 1.39 2000/07/29 21:55:32 mdw |
79 | ## Make sure the pixie is installed setuid-root (workaround for an Automake |
80 | ## bug). Install new manpages. |
81 | ## |
bc981076 |
82 | ## Revision 1.38 2000/07/29 10:54:55 mdw |
83 | ## Further fixing to support building using normal `make' again. ;-) I |
84 | ## think we're there now. |
85 | ## |
5a1a3a89 |
86 | ## Revision 1.37 2000/07/29 10:02:36 mdw |
87 | ## Lots of fixing to support `make -j' building. |
88 | ## |
c080c887 |
89 | ## Revision 1.36 2000/07/20 20:13:38 mdw |
90 | ## Added Bellare and Rogaway's PSS encoding for RSA signatures. |
91 | ## |
ea38161e |
92 | ## Revision 1.35 2000/07/16 20:00:46 mdw |
93 | ## Bug fixes to distribution. |
94 | ## |
a16cc8cf |
95 | ## Revision 1.34 2000/07/15 20:55:32 mdw |
96 | ## More hashes and ciphers. An extra tool. |
97 | ## |
817d0432 |
98 | ## Revision 1.33 2000/07/09 21:34:15 mdw |
99 | ## New hash functions and other stuff. |
100 | ## |
d3325040 |
101 | ## Revision 1.32 2000/07/01 11:27:32 mdw |
102 | ## Name changes and new files. |
103 | ## |
90484749 |
104 | ## Revision 1.31 2000/06/25 13:02:07 mdw |
105 | ## Fix cleaning of generated files. |
106 | ## |
1cf8e9fb |
107 | ## Revision 1.30 2000/06/22 19:10:33 mdw |
108 | ## Fix Makefile to test mp-sqrt.c. |
109 | ## |
338b4cd3 |
110 | ## Revision 1.29 2000/06/22 19:04:19 mdw |
111 | ## More new functions to be added. |
112 | ## |
ad47fc73 |
113 | ## Revision 1.28 2000/06/18 23:31:18 mdw |
114 | ## Rearrange build order to ensure that `mptypes.h' exists by the time it's |
115 | ## needed. |
116 | ## |
df9ed0a1 |
117 | ## Revision 1.27 2000/06/17 13:28:50 mdw |
118 | ## Minor tidying and fixing. |
119 | ## |
cc44d54e |
120 | ## Revision 1.26 2000/06/17 10:33:43 mdw |
121 | ## Lots of new ciphers and other files. |
122 | ## |
86a47753 |
123 | ## Revision 1.25 2000/02/12 18:55:40 mdw |
124 | ## Make it all compile properly. |
125 | ## |
876b4f53 |
126 | ## Revision 1.24 2000/02/12 18:22:26 mdw |
127 | ## Missed a file. Whoops. |
128 | ## |
052b36d0 |
129 | ## Revision 1.23 2000/02/12 18:21:01 mdw |
130 | ## Overhaul of key management (again). |
131 | ## |
de5585f8 |
132 | ## Revision 1.22 1999/12/22 16:04:06 mdw |
133 | ## Lots of new files. |
134 | ## |
6f51228e |
135 | ## Revision 1.21 1999/12/13 15:47:58 mdw |
136 | ## Fix a couple of minor bugs in the distribution set. |
c08b284a |
137 | ## |
b6f2c5a0 |
138 | ## Revision 1.19 1999/12/11 10:58:24 mdw |
139 | ## Fix bug in test rig link flags. Add Karatsuba squaring. |
140 | ## |
bba24c1d |
141 | ## Revision 1.18 1999/12/10 23:30:01 mdw |
142 | ## Lots of new files. |
143 | ## |
70b904c5 |
144 | ## Revision 1.17 1999/11/25 11:38:31 mdw |
145 | ## Support for conversions between MPs and C integers. |
146 | ## |
9fc256e8 |
147 | ## Revision 1.16 1999/11/22 20:51:33 mdw |
148 | ## Add yet more source files. |
149 | ## |
02b5177b |
150 | ## Revision 1.15 1999/11/22 14:08:30 mdw |
151 | ## Improve dependencies for test programs. |
152 | ## |
8b6cedcc |
153 | ## Revision 1.14 1999/11/22 00:17:09 mdw |
154 | ## Create object files for test programs so that rebuilding doesn't take so |
155 | ## long. |
ce79f967 |
156 | ## |
157 | ## Revision 1.12 1999/11/20 22:36:26 mdw |
158 | ## Improve dependencies. Move mpx testing into mpx.c. |
44c240ee |
159 | ## |
160 | ## Revision 1.11 1999/11/20 22:24:53 mdw |
161 | ## Add Diffie-Hellman support. |
a7557fb1 |
162 | ## |
163 | ## Revision 1.10 1999/11/19 19:28:24 mdw |
164 | ## Add DSA files and tests. |
471db039 |
165 | ## |
166 | ## Revision 1.9 1999/11/17 18:05:35 mdw |
167 | ## Many new files and test cases for multiprecision arithmetic. |
76f32ed2 |
168 | ## |
169 | ## Revision 1.8 1999/11/13 01:56:07 mdw |
170 | ## Include multiprecision maths stuff. |
a094cab7 |
171 | ## |
172 | ## Revision 1.7 1999/11/11 19:01:02 mdw |
173 | ## Use `libtool' to generate a shared library. |
8149619d |
174 | ## |
175 | ## Revision 1.6 1999/11/11 17:47:34 mdw |
176 | ## Updates for new configuration system, and `mptypes' generator. |
748ed8dc |
177 | ## |
8149619d |
178 | ## Revision 1.5 1999/11/11 00:59:17 mdw |
748ed8dc |
179 | ## Minor reformatting. |
3701c54f |
180 | ## |
748ed8dc |
181 | ## Revision 1.4 1999/10/24 10:20:36 mdw |
3701c54f |
182 | ## Modify for standalone distribution. The library's getting far too large |
183 | ## to be sensibly embedded in other programs. |
d03ab969 |
184 | ## |
3701c54f |
185 | ## Revision 1.3 1999/10/24 10:04:26 mdw |
9183ab7b |
186 | ## Install headers in the right directory. |
187 | ## |
188 | ## Revision 1.2 1999/10/23 12:55:35 mdw |
d03ab969 |
189 | ## The `CVS' directory can't be hardlinked. Don't worry about this |
190 | ## overmuch. |
191 | ## |
a094cab7 |
192 | ## Revision 1.1 1999/09/03 08:41:11 mdw |
193 | ## Initial import. |
d03ab969 |
194 | ## |
195 | |
196 | AUTOMAKE_OPTIONS = foreign |
197 | |
cc44d54e |
198 | SUBDIRS = tests |
199 | |
d03ab969 |
200 | archincludedir = $(libdir)/catacomb/include |
201 | |
202 | ## --- List handling macros --- |
203 | ## |
204 | ## List handling is nice, usually. Unfortunately, I based this design on |
205 | ## TeX list macros rather than anything sensible... |
206 | |
207 | define(`_', `define(`_item', $1)define(`_item_2', $2)emit`'') |
208 | define(`adorn', `pushdef(`emit', `$1`'_item`'$3')$2`'popdef(`emit')') |
209 | define(`join', |
210 | `pushdef(`emit', `adorn(``_(''_item`$2', `$3', ``)'')`'')$1`'popdef(`emit')') |
211 | define(`addsuffix', `adorn(`', `$1', `$2')') |
212 | define(`lit', `adorn(`', `$1', `')') |
213 | define(`nl', ` |
214 | ') |
215 | |
216 | define(`allwithsuffix', |
217 | `addsuffix(`$1', `$3') addsuffix(`$2', `$3') dnl |
218 | addsuffix(join(`$1', `-', `$2'), `$3')') |
219 | |
220 | ## --- Autogenerated source files --- |
221 | |
cc44d54e |
222 | define(`ciphers', `dnl |
3bef8c14 |
223 | _(des) _(desx) _(des3) _(mars) dnl |
621468d8 |
224 | _(idea) _(safer) _(safersk) dnl |
cc44d54e |
225 | _(blowfish) _(twofish) dnl |
a16cc8cf |
226 | _(tea) _(xtea) dnl |
cc44d54e |
227 | _(rc2) _(rc5) dnl |
a16cc8cf |
228 | _(skipjack) dnl |
cc44d54e |
229 | _(cast128) _(cast256) dnl |
a16cc8cf |
230 | _(square) _(rijndael) dnl |
cc44d54e |
231 | _(serpent)') |
232 | define(`cipher_modes', `_(ecb) _(cbc) _(cfb) _(ofb) _(counter)') |
d03ab969 |
233 | |
817d0432 |
234 | define(`hashes', `dnl |
d3187d77 |
235 | _(md5) _(md4) _(md2) _(tiger) dnl |
eee16120 |
236 | _(sha) _(sha256) _(sha384) _(sha512) dnl |
817d0432 |
237 | _(rmd128) _(rmd160) _(rmd256) _(rmd320)') |
cc44d54e |
238 | define(`hash_modes', `_(mgf) _(hmac)') |
d03ab969 |
239 | |
240 | MODES = \ |
241 | adorn(`$(srcdir)/', join(`ciphers', `-', `cipher_modes'), `.c') \ |
242 | adorn(`$(srcdir)/', join(`ciphers', `-', `cipher_modes'), `.h') \ |
243 | adorn(`$(srcdir)/', join(`hashes', `-', `hash_modes'), `.c') \ |
244 | adorn(`$(srcdir)/', join(`hashes', `-', `hash_modes'), `.h') |
245 | |
5a1a3a89 |
246 | $(MODES): modes-stamp |
247 | modes-stamp: genmodes |
a7557fb1 |
248 | cd $(srcdir); ./genmodes "lit(`ciphers')" "lit(`cipher_modes')" |
249 | cd $(srcdir); ./genmodes "lit(`hashes')" "lit(`hash_modes')" |
5a1a3a89 |
250 | echo datestamp >modes-stamp |
251 | |
bc981076 |
252 | define(`gen_tables', `dnl |
3bef8c14 |
253 | _(des) _(blowfish) _(twofish) _(square) _(rijndael) dnl |
254 | _(safer) _(mars) _(tiger) dnl |
7c0acba6 |
255 | _(gfshare) _(gfx-sqr)') |
a7557fb1 |
256 | |
bc981076 |
257 | autoheaders: addsuffix(`gen_tables', `-tab.h') primetab.h mptypes.h |
5a1a3a89 |
258 | define(`emit', ` |
259 | _item`'-tab.h: _item`'-mktab |
3bef8c14 |
260 | ./_item`'-mktab >_item`'-tab.h |
261 | _item`'.lo: _item`'-tab.h')dnl |
bc981076 |
262 | gen_tables |
5a1a3a89 |
263 | |
264 | primetab.h: primetab.c |
265 | primetab.c: genprimes |
3fe3eae5 |
266 | ./genprimes -h primetab.h -c primetab.c -n 256 \ |
267 | -t "unsigned short" -i primetab |
d03ab969 |
268 | archinclude_HEADERS = mptypes.h |
d03ab969 |
269 | mptypes.h: mptypes |
d03ab969 |
270 | ./mptypes >mptypes.h |
271 | |
272 | BUILT_SOURCES = \ |
273 | getdate.c \ |
274 | addsuffix(join(`ciphers', `-', `cipher_modes'), `.c') \ |
275 | addsuffix(join(`ciphers', `-', `cipher_modes'), `.h') \ |
d03ab969 |
276 | addsuffix(join(`hashes', `-', `hash_modes'), `.c') \ |
277 | addsuffix(join(`hashes', `-', `hash_modes'), `.h') |
ffc086db |
278 | |
279 | ## --- Building the main library --- |
8582bb3b |
280 | |
ffc086db |
281 | lib_LTLIBRARIES = libcatacomb.la |
282 | |
cc44d54e |
283 | libcatacomb_la_LDFLAGS = -version-info 2:0:0 |
d03ab969 |
284 | ## Middle number is the patchlevel. Final number is the minor version. The |
285 | ## difference between the first and last numbers is major version. |
286 | |
d03ab969 |
287 | pkginclude_HEADERS = \ |
cc44d54e |
288 | arena.h paranoia.h \ |
5a1a3a89 |
289 | blkc.h hash.h gcipher.h ghash.h gmac.h grand.h ghash-def.h \ |
290 | lcrand.h fibrand.h rc4.h seal.h rand.h noise.h fipstest.h maurer.h \ |
876b4f53 |
291 | key.h key-data.h passphrase.h pixie.h lmem.h \ |
70b904c5 |
292 | mpx.h mpw.h mpscan.h mparena.h mp.h mptext.h mpint.h \ |
5a1a3a89 |
293 | mpbarrett.h mpmont.h mpcrt.h mprand.h mpmul.h \ |
7c0acba6 |
294 | gfx.h \ |
9312c71f |
295 | primetab.h pfilt.h rabin.h \ |
f2ec324f |
296 | pgen.h prim.h strongprime.h limlee.h keycheck.h \ |
052b36d0 |
297 | bbs.h rsa.h dh.h dsarand.h dsa.h \ |
51a0f805 |
298 | oaep.h pkcs1.h pss.h tlsprf.h sslprf.h \ |
cc44d54e |
299 | gfshare.h share.h \ |
817d0432 |
300 | rho.h \ |
d03ab969 |
301 | allwithsuffix(`ciphers', `cipher_modes', `.h') \ |
bba24c1d |
302 | allwithsuffix(`hashes', `hash_modes', `.h') \ |
303 | addsuffix(`cipher_modes', `-def.h') \ |
e7dc130f |
304 | addsuffix(`hash_modes', `-def.h') crc32.h |
d03ab969 |
305 | |
3fe3eae5 |
306 | define(`MP_SOURCES', |
307 | `mpx.c mpx-kmul.c mpx-ksqr.c mpscan.c mparena.c \ |
a7557fb1 |
308 | mp-misc.c mp-mem.c mp-const.c mp-io.c mp-arith.c mp-test.c \ |
338b4cd3 |
309 | mp-sqrt.c mp-gcd.c mp-jacobi.c mp-modsqrt.c \ |
5a1a3a89 |
310 | mpint.c mptext.c mptext-file.c mptext-string.c mptext-dstr.c \ |
311 | mpbarrett.c mpmont.c mpmont-mexp.c mpcrt.c mpmul.c mprand.c \ |
3fe3eae5 |
312 | rho.c \ |
7c0acba6 |
313 | GF_SOURCES PGEN_SOURCES') |
314 | |
315 | define(`GF_SOURCES', |
316 | `gfx.c gfx-kmul.c gfx-sqr.c') |
3fe3eae5 |
317 | |
318 | define(`PGEN_SOURCES', |
9312c71f |
319 | `pfilt.c rabin.c \ |
cc44d54e |
320 | pgen.c pgen-stdev.c pgen-safe.c pgen-gcd.c prim.c strongprime.c \ |
817d0432 |
321 | limlee.c \ |
f2ec324f |
322 | keycheck.c keycheck-mp.c keycheck-report.c \ |
cc44d54e |
323 | bbs-rand.c bbs-gen.c bbs-jump.c bbs-fetch.c \ |
d3325040 |
324 | rsa-priv.c rsa-pub.c rsa-gen.c rsa-recover.c rsa-fetch.c \ |
f2ec324f |
325 | dh-gen.c dh-limlee.c dh-check.c dh-fetch.c \ |
326 | dsarand.c dsa-sign.c dsa-verify.c dsa-gen.c dsa-check.c \ |
ad47fc73 |
327 | key-data.c key-flags.c key-text.c key-binary.c key-pass.c \ |
5a1a3a89 |
328 | key-pack.c key-misc.c key-file.c key-attr.c key-io.c key-moan.c \ |
bc981076 |
329 | key-error.c key-fetch.c \ |
3fe3eae5 |
330 | primetab.c share.c') |
331 | |
332 | libcatacomb_la_SOURCES = \ |
333 | grand.c keysz.c \ |
334 | lcrand.c fibrand.c rc4.c seal.c rand.c noise.c fipstest.c maurer.c \ |
335 | arena.c \ |
336 | passphrase.c pixie-client.c pixie-common.c lmem.c \ |
51a0f805 |
337 | oaep.c pkcs1.c pss.c tlsprf.c sslprf.c \ |
3fe3eae5 |
338 | gfshare.c \ |
7c0acba6 |
339 | MP_SOURCES karatsuba.h \ |
3fe3eae5 |
340 | des-base.c des-base.h \ |
341 | cast-s.c cast-sk.c cast-base.h cast-tab.h \ |
abef5380 |
342 | md2-tab.h \ |
3fe3eae5 |
343 | serpent-sbox.h skipjack-tab.h tiger-base.h \ |
344 | daftstory.h \ |
d03ab969 |
345 | addsuffix(join(`ciphers', `-', `cipher_modes'), `.c') \ |
ce79f967 |
346 | addsuffix(join(`hashes', `-', `hash_modes'), `.c') \ |
e7dc130f |
347 | addsuffix(`ciphers', `.c') addsuffix(`hashes', `.c') crc32.c |
76f32ed2 |
348 | |
cc44d54e |
349 | des-base.lo: des-tab.h |
350 | blowfish.lo: blowfish-tab.h |
351 | twofish.lo: twofish-tab.h |
a16cc8cf |
352 | square.lo: square-tab.h |
cc44d54e |
353 | rijndael.lo: rijndael-tab.h |
a16cc8cf |
354 | tiger.lo: tiger-tab.h |
5a1a3a89 |
355 | gfshare.lo: gfshare-tab.h |
7c0acba6 |
356 | gfx-sqr.lo: gfx-sqr-tab.h |
3fe3eae5 |
357 | patsubst(MP_SOURCES, `\.c\>', `.lo') dsig.o keyutil.o rspit.o: mptypes.h |
358 | patsubst(PGEN_SOURCES, `\.c\>', `.lo') dsig.o keyutil.o rspit.o: primetab.h |
748ed8dc |
359 | |
d03ab969 |
360 | ## --- Utility programs --- |
a7557fb1 |
361 | |
b55540f6 |
362 | bin_PROGRAMS = dsig key pixie rspit factorial hashsum mkphrase |
de5585f8 |
363 | bin_SCRIPTS = catacomb-config xpixie |
cc44d54e |
364 | noinst_PROGRAMS = \ |
7c0acba6 |
365 | genprimes mptypes serpent-check \ |
366 | addsuffix(`gen_tables', `-mktab') |
d03ab969 |
367 | LDADD = libcatacomb.la |
a094cab7 |
368 | |
cc44d54e |
369 | dsig_SOURCES = dsig.c getdate.y getdate.h |
a094cab7 |
370 | key_SOURCES = keyutil.c getdate.y getdate.h |
a16cc8cf |
371 | hashsum_SOURCES = hashsum.c |
bba24c1d |
372 | rspit_SOURCES = rspit.c |
817d0432 |
373 | factorial_SOURCES = factorial.c |
a16cc8cf |
374 | pixie_SOURCES = pixie.c pixie-common.c lmem.c arena.c |
375 | pixie_LDADD = |
b55540f6 |
376 | mkphrase_SOURCES = mkphrase.c |
817d0432 |
377 | |
7c0acba6 |
378 | define(`emit', ` |
379 | patsubst(_item, `[^a-zA-Z0-9]', `_')_mktab_SOURCES = _item`'-mktab.c |
380 | patsubst(_item, `[^a-zA-Z0-9]', `_')_mktab_LDADD =')dnl |
381 | gen_tables |
382 | |
cc44d54e |
383 | serpent_check_SOURCES = serpent-check.c |
384 | serpent_check_LDADD = |
cc44d54e |
385 | |
d03ab969 |
386 | genprimes_SOURCES = genprimes.c |
387 | genprimes_LDADD = |
388 | |
389 | mptypes_SOURCES = mptypes.c |
390 | mptypes_LDADD = |
391 | |
de5585f8 |
392 | ## --- Install the pixie setuid-root if we can --- |
525af7b8 |
393 | ## |
394 | ## Bodge around a bug in Automake: it doesn't call `install-exec-hook' from |
395 | ## `install' if there are subdirectories. |
de5585f8 |
396 | |
397 | changequote(<, >) |
525af7b8 |
398 | install: install-exec-hook |
de5585f8 |
399 | install-exec-hook: |
400 | @pixie="$(bindir)/`echo pixie|sed $(transform)`"; \ |
401 | if chown root $$pixie && chmod 4755 $$pixie; then \ |
402 | echo "chown root $$pixie"; \ |
403 | echo "chmod 4755 $$pixie"; \ |
404 | else \ |
405 | echo "***"; \ |
406 | echo "*** You should probably install $$pixie setuid-root."; \ |
407 | echo "***"; \ |
408 | fi |
409 | changequote(`, ') |
410 | |
d03ab969 |
411 | ## --- Documentation --- |
412 | |
525af7b8 |
413 | man_MANS = key.1 hashsum.1 keyring.5 pixie.1 |
d03ab969 |
414 | |
415 | ## --- Other handy definitions --- |
9183ab7b |
416 | |
6f51228e |
417 | EXTRA_DIST = \ |
de5585f8 |
418 | Makefile.m4 genmodes $(man_MANS) xpixie \ |
6f51228e |
419 | README.cipher README.hash README.random README.mp |
d03ab969 |
420 | |
421 | dist-hook: |
422 | @ln getdate.c $(distdir) || ln $(srcdir)/getdate.c $(distdir) || true |
5a1a3a89 |
423 | @echo datestamp >$(distdir)/modes-stamp || true |
7c0acba6 |
424 | @for i in calc tests; do \ |
425 | mkdir $(distdir)/$$i; \ |
426 | ln $(srcdir)/$$i/*[!~] $(distdir)/$$i; \ |
427 | done || true |
cc44d54e |
428 | # kr=$$HOME/.catacomb/dsig-keyring; \ |
429 | # if [ -r $$kr ]; then \ |
430 | # cd $(distdir); \ |
431 | # ../key -k $$kr extract -f -secret KEYRING; \ |
432 | # find . -type f -print0 | ../dsig -k $$kr sign -0 -oMANIFEST; \ |
433 | # fi |
471db039 |
434 | |
a094cab7 |
435 | ## --- Testing --- |
d03ab969 |
436 | |
471db039 |
437 | define(`testprogs', `') |
438 | |
439 | define(`CTESTRIG', |
ffc086db |
440 | `define(`testprogs', testprogs \ |
d03ab969 |
441 | $1.t)dnl |
8b6cedcc |
442 | $1.to: $1.c |
443 | $(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" $(srcdir)/$1.c -o $1.to |
bba24c1d |
444 | $1.t: $1.to $1.o libcatacomb.la |
b6f2c5a0 |
445 | $(CC) $(CFLAGS) $(LDFLAGS) $1.to .libs/libcatacomb.a $(LIBS) -o $1.t') |
a7557fb1 |
446 | |
447 | CTESTRIG(rc4) |
cc44d54e |
448 | CTESTRIG(seal) |
a7557fb1 |
449 | adorn(`nl`'CTESTRIG(', `ciphers', `)') |
ce79f967 |
450 | adorn(`nl`'CTESTRIG(', `hashes', `)') |
471db039 |
451 | adorn(`nl`'CTESTRIG(', join(`ciphers', `-', `cipher_modes'), `)') |
452 | adorn(`nl`'CTESTRIG(', join(`hashes', `-', `hash_modes'), `)') |
bba24c1d |
453 | CTESTRIG(lcrand) |
a16cc8cf |
454 | CTESTRIG(oaep) |
d83a82be |
455 | CTESTRIG(tlsprf) |
51a0f805 |
456 | CTESTRIG(sslprf) |
471db039 |
457 | CTESTRIG(mpx) |
bba24c1d |
458 | CTESTRIG(mpx-kmul) |
b6f2c5a0 |
459 | CTESTRIG(mpx-ksqr) |
a7557fb1 |
460 | CTESTRIG(mp-arith) |
1cf8e9fb |
461 | CTESTRIG(mp-modsqrt) |
a7557fb1 |
462 | CTESTRIG(mp-gcd) |
9fc256e8 |
463 | CTESTRIG(mp-jacobi) |
1cf8e9fb |
464 | CTESTRIG(mp-sqrt) |
bba24c1d |
465 | CTESTRIG(mptext) |
70b904c5 |
466 | CTESTRIG(mpint) |
bba24c1d |
467 | CTESTRIG(mpbarrett) |
a7557fb1 |
468 | CTESTRIG(mpmont) |
469 | CTESTRIG(mpmont-mexp) |
9fc256e8 |
470 | CTESTRIG(mpcrt) |
817d0432 |
471 | CTESTRIG(mpmul) |
7c0acba6 |
472 | CTESTRIG(gfx) |
473 | CTESTRIG(gfx-kmul) |
a7557fb1 |
474 | CTESTRIG(pgen) |
471db039 |
475 | CTESTRIG(dsa-gen) |
476 | CTESTRIG(dsa-sign) |
d03ab969 |
477 | CTESTRIG(dsa-verify) |
bba24c1d |
478 | CTESTRIG(bbs-rand) |
479 | CTESTRIG(bbs-jump) |
cc44d54e |
480 | CTESTRIG(gfshare) |
481 | CTESTRIG(share) |
817d0432 |
482 | CTESTRIG(rho) |
a7557fb1 |
483 | |
a16cc8cf |
484 | TESTS = serpent-check testprogs |
d03ab969 |
485 | |
cc44d54e |
486 | CLEANFILES = \ |
487 | *.t *.to \ |
488 | mptypes.h primetab.c primetab.h \ |
bc981076 |
489 | addsuffix(`gen_tables', `-tab.h') |
d03ab969 |
490 | |
491 | ## --- Makefile building (haha!) --- |
492 | |
493 | $(srcdir)/Makefile.am: $(srcdir)/Makefile.m4 |
494 | m4 $(srcdir)/Makefile.m4 >$(srcdir)/Makefile.am |
a7557fb1 |
495 | |
9312c71f |
496 | DISTCLEANFILES = libtool |
497 | |
a7557fb1 |
498 | MAINTAINERCLEANFILES = \ |
d03ab969 |
499 | $(srcdir)/Makefile.am \ |
500 | $(srcdir)/getdate.c getdate.c \ |
5a1a3a89 |
501 | $(MODES) modes-stamp $(srcdir)/modes-stamp |
d03ab969 |
502 | |
503 | ##----- That's all, folks --------------------------------------------------- |