Commit | Line | Data |
---|---|---|
f9984d11 | 1 | ## -*-m4-*- |
d03ab969 | 2 | ## |
c65df279 | 3 | ## $Id$ |
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. | |
45c0fd36 | 18 | ## |
d03ab969 | 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. | |
45c0fd36 | 23 | ## |
d03ab969 | 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 | ||
d03ab969 | 29 | AUTOMAKE_OPTIONS = foreign |
30 | ||
cc44d54e | 31 | SUBDIRS = tests |
32 | ||
d03ab969 | 33 | archincludedir = $(libdir)/catacomb/include |
34 | ||
35 | ## --- List handling macros --- | |
36 | ## | |
37 | ## List handling is nice, usually. Unfortunately, I based this design on | |
38 | ## TeX list macros rather than anything sensible... | |
39 | ||
40 | define(`_', `define(`_item', $1)define(`_item_2', $2)emit`'') | |
41 | define(`adorn', `pushdef(`emit', `$1`'_item`'$3')$2`'popdef(`emit')') | |
42 | define(`join', | |
43 | `pushdef(`emit', `adorn(``_(''_item`$2', `$3', ``)'')`'')$1`'popdef(`emit')') | |
44 | define(`addsuffix', `adorn(`', `$1', `$2')') | |
45 | define(`lit', `adorn(`', `$1', `')') | |
46 | define(`nl', ` | |
47 | ') | |
48 | ||
49 | define(`allwithsuffix', | |
50 | `addsuffix(`$1', `$3') addsuffix(`$2', `$3') dnl | |
51 | addsuffix(join(`$1', `-', `$2'), `$3')') | |
52 | ||
53 | ## --- Autogenerated source files --- | |
54 | ||
cc44d54e | 55 | define(`ciphers', `dnl |
3bef8c14 | 56 | _(des) _(desx) _(des3) _(mars) dnl |
621468d8 | 57 | _(idea) _(safer) _(safersk) dnl |
cc44d54e | 58 | _(blowfish) _(twofish) dnl |
a16cc8cf | 59 | _(tea) _(xtea) dnl |
cc44d54e | 60 | _(rc2) _(rc5) dnl |
a16cc8cf | 61 | _(skipjack) dnl |
cc44d54e | 62 | _(cast128) _(cast256) dnl |
2e8eb64a | 63 | _(square) _(rijndael) _(rijndael192) _(rijndael256) dnl |
0ba18b90 | 64 | _(serpent) _(noekeon)') |
cc44d54e | 65 | define(`cipher_modes', `_(ecb) _(cbc) _(cfb) _(ofb) _(counter)') |
d03ab969 | 66 | |
817d0432 | 67 | define(`hashes', `dnl |
e9026a0a | 68 | _(md5) _(md4) _(md2) _(tiger) _(has160) dnl |
5b69c389 | 69 | _(sha) _(sha224) _(sha256) _(sha384) _(sha512) dnl |
7fcfe7de | 70 | _(whirlpool) _(whirlpool256) dnl |
817d0432 | 71 | _(rmd128) _(rmd160) _(rmd256) _(rmd320)') |
cc44d54e | 72 | define(`hash_modes', `_(mgf) _(hmac)') |
d03ab969 | 73 | |
74 | MODES = \ | |
75 | adorn(`$(srcdir)/', join(`ciphers', `-', `cipher_modes'), `.c') \ | |
76 | adorn(`$(srcdir)/', join(`ciphers', `-', `cipher_modes'), `.h') \ | |
77 | adorn(`$(srcdir)/', join(`hashes', `-', `hash_modes'), `.c') \ | |
78 | adorn(`$(srcdir)/', join(`hashes', `-', `hash_modes'), `.h') | |
79 | ||
5a1a3a89 | 80 | $(MODES): modes-stamp |
81 | modes-stamp: genmodes | |
a7557fb1 | 82 | cd $(srcdir); ./genmodes "lit(`ciphers')" "lit(`cipher_modes')" |
83 | cd $(srcdir); ./genmodes "lit(`hashes')" "lit(`hash_modes')" | |
5a1a3a89 | 84 | echo datestamp >modes-stamp |
85 | ||
bc981076 | 86 | define(`gen_tables', `dnl |
2e8eb64a | 87 | _(des) _(blowfish) _(twofish) dnl |
7fcfe7de | 88 | _(square) _(rijndael) _(whirlpool) dnl |
3bef8c14 | 89 | _(safer) _(mars) _(tiger) dnl |
7c0acba6 | 90 | _(gfshare) _(gfx-sqr)') |
a7557fb1 | 91 | |
7eaaecf5 | 92 | autoheaders: \ |
1d6d3b01 MW |
93 | addsuffix(`gen_tables', `-tab.h') \ |
94 | primetab.h wheel.h mptypes.h mplimits.h | |
5a1a3a89 | 95 | define(`emit', ` |
8282072d | 96 | _item`'-tab.h: _item`'-mktab$(EXEEXT) |
f21119d7 | 97 | ./_item`'-mktab >_item`'-tab.h.new |
98 | mv _item`'-tab.h.new _item`'-tab.h')dnl | |
bc981076 | 99 | gen_tables |
5a1a3a89 | 100 | |
101 | primetab.h: primetab.c | |
8282072d | 102 | primetab.c: genprimes$(EXEEXT) |
34e4f738 | 103 | ./genprimes -h primetab.h -c primetab.c \ |
104 | -s CATACOMB_PRIMETAB_H -n 256 \ | |
3fe3eae5 | 105 | -t "unsigned short" -i primetab |
1d6d3b01 MW |
106 | |
107 | wheel.h: wheel.c | |
108 | wheel.c: genwheel$(EXEEXT) | |
109 | ./genwheel -h wheel.h -c wheel.c \ | |
4263ac2b | 110 | -s CATACOMB_WHEEL_H -n 5 \ |
1d6d3b01 MW |
111 | -t "unsigned char" -i wheel |
112 | ||
7eaaecf5 | 113 | archinclude_HEADERS = mptypes.h mplimits.h |
8282072d | 114 | mptypes.h: mptypes$(EXEEXT) |
f21119d7 | 115 | ./mptypes >mptypes.h.new |
116 | mv mptypes.h.new mptypes.h | |
d03ab969 | 117 | |
7eaaecf5 MW |
118 | mplimits.h: genlimits$(EXEEXT) |
119 | ./genlimits h >mplimits.h.new | |
120 | mv mplimits.h.new mplimits.h | |
121 | mplimits.c: genlimits$(EXEEXT) | |
122 | ./genlimits c >mplimits.c.new | |
123 | mv mplimits.c.new mplimits.c | |
124 | ||
8282072d | 125 | ectab.c: ectab.in ec-gentab.awk mpdump$(EXEEXT) |
4edc47b8 | 126 | $(srcdir)/ec-gentab.awk <$(srcdir)/ectab.in >ectab.c.new |
432c4e18 | 127 | mv ectab.c.new ectab.c |
128 | ||
8282072d | 129 | ptab.c: ptab.in p-gentab.awk mpdump$(EXEEXT) |
4edc47b8 | 130 | $(srcdir)/p-gentab.awk <$(srcdir)/ptab.in >ptab.c.new |
34e4f738 | 131 | mv ptab.c.new ptab.c |
132 | ||
8282072d | 133 | bintab.c: bintab.in bin-gentab.awk mpdump$(EXEEXT) |
3688eb75 | 134 | $(srcdir)/bin-gentab.awk <$(srcdir)/bintab.in >bintab.c.new |
135 | mv bintab.c.new bintab.c | |
136 | ||
e9026a0a | 137 | gciphertab.c: gengctab |
138 | $(srcdir)/gengctab gccipher gcipher >gciphertab.c.new \ | |
139 | "lit(join(`ciphers', `-', `cipher_modes')) \ | |
b817bfc6 | 140 | lit(join(`hashes', `-', `_(mgf)')) \ |
45c0fd36 | 141 | rc4 seal" |
e9026a0a | 142 | mv gciphertab.c.new gciphertab.c |
143 | ||
144 | gmactab.c: gengctab | |
145 | $(srcdir)/gengctab gcmac gmac >gmactab.c.new \ | |
45c0fd36 | 146 | "lit(join(`hashes', `-', `_(hmac)'))" |
e9026a0a | 147 | mv gmactab.c.new gmactab.c |
148 | ||
149 | ghashtab.c: gengctab | |
150 | $(srcdir)/gengctab gchash ghash >ghashtab.c.new \ | |
b817bfc6 | 151 | "lit(`hashes') \ |
152 | crc32=gcrc32" | |
e9026a0a | 153 | mv ghashtab.c.new ghashtab.c |
154 | ||
d03ab969 | 155 | BUILT_SOURCES = \ |
e9026a0a | 156 | getdate.c modes-stamp gciphertab.c gmactab.c ghashtab.c \ |
d03ab969 | 157 | addsuffix(join(`ciphers', `-', `cipher_modes'), `.c') \ |
158 | addsuffix(join(`ciphers', `-', `cipher_modes'), `.h') \ | |
d03ab969 | 159 | addsuffix(join(`hashes', `-', `hash_modes'), `.c') \ |
160 | addsuffix(join(`hashes', `-', `hash_modes'), `.h') | |
ffc086db | 161 | |
162 | ## --- Building the main library --- | |
8582bb3b | 163 | |
ffc086db | 164 | lib_LTLIBRARIES = libcatacomb.la |
165 | ||
4263ac2b MW |
166 | libcatacomb_la_LIBADD = $(CATACOMB_LIBS) |
167 | libcatacomb_la_LDFLAGS = -version-info 3:1:1 | |
d03ab969 | 168 | ## Middle number is the patchlevel. Final number is the minor version. The |
169 | ## difference between the first and last numbers is major version. | |
170 | ||
d03ab969 | 171 | pkginclude_HEADERS = \ |
c61ee18c | 172 | arena.h paranoia.h buf.h qdparse.h keysz.h \ |
5a1a3a89 | 173 | blkc.h hash.h gcipher.h ghash.h gmac.h grand.h ghash-def.h \ |
174 | lcrand.h fibrand.h rc4.h seal.h rand.h noise.h fipstest.h maurer.h \ | |
1dda051b | 175 | key.h key-error.h key-data.h passphrase.h pixie.h lmem.h \ |
75263f25 | 176 | mpx.h bitops.h mpw.h mpscan.h mparena.h mp.h mptext.h mpint.h \ |
f4535c64 | 177 | exp.h mpbarrett.h mpmont.h mpreduce.h mp-exp.h \ |
dbfee00a | 178 | mpcrt.h mprand.h mpmul.h \ |
f4535c64 | 179 | gfx.h gf.h gfreduce.h gfn.h gf-exp.h \ |
1d6d3b01 MW |
180 | primetab.h wheel.h pfilt.h rabin.h \ |
181 | pgen.h primeiter.h prim.h strongprime.h limlee.h keycheck.h \ | |
e9026a0a | 182 | bbs.h rsa.h dh.h dsarand.h dsa.h gdsa.h gkcdsa.h \ |
b817bfc6 | 183 | tlsprf.h sslprf.h \ |
cc44d54e | 184 | gfshare.h share.h \ |
817d0432 | 185 | rho.h \ |
489e11f0 | 186 | field.h field-guts.h field-exp.h \ |
f94b972d | 187 | ec.h ec-guts.h ec-exp.h ec-test.h ectab.h ec-keys.h ec-raw.h \ |
e40955b5 | 188 | ptab.h bintab.h group.h group-guts.h \ |
d03ab969 | 189 | allwithsuffix(`ciphers', `cipher_modes', `.h') \ |
bba24c1d | 190 | allwithsuffix(`hashes', `hash_modes', `.h') \ |
191 | addsuffix(`cipher_modes', `-def.h') \ | |
e7dc130f | 192 | addsuffix(`hash_modes', `-def.h') crc32.h |
d03ab969 | 193 | |
7eaaecf5 MW |
194 | define(`MP_BASE', |
195 | `mpx.c mpx-kmul.c mpx-ksqr.c mpscan.c mparena.c \ | |
196 | mp-misc.c mp-mem.c mp-const.c mp-arith.c mp-io.c \ | |
197 | mptext.c mptext-string.c') | |
198 | ||
3fe3eae5 | 199 | define(`MP_SOURCES', |
7eaaecf5 MW |
200 | `qdparse.c \ |
201 | mp-test.c mplimits.c \ | |
ffec4880 | 202 | mp-sqrt.c mp-gcd.c mp-jacobi.c mp-modsqrt.c mp-exp.c mp-modexp.c \ |
7eaaecf5 | 203 | mpint.c mptext-file.c mptext-dstr.c \ |
0cbfe12e | 204 | mptext-len.c \ |
aacf9080 | 205 | exp.c mpcrt.c mpmul.c mprand.c \ |
34e4f738 | 206 | mpbarrett.c mpbarrett-exp.c mpbarrett-mexp.c mpbarrett-exp.h \ |
207 | mpmont.c mpmont-exp.c mpmont-mexp.c mpmont-exp.h \ | |
f46efa79 | 208 | mpreduce.c mpreduce-exp.h \ |
3688eb75 | 209 | group-stdops.c group-exp.c group-exp.h g-prime.c g-bin.c \ |
210 | group-parse.c \ | |
34e4f738 | 211 | group-string.c group-file.c group-dstr.c \ |
3688eb75 | 212 | rho.c buf.c ptab.c bintab.c \ |
dbfee00a | 213 | GF_SOURCES PGEN_SOURCES EC_SOURCES') |
7c0acba6 | 214 | |
215 | define(`GF_SOURCES', | |
f4535c64 | 216 | `gfx.c gfx-kmul.c gfx-sqr.c gf-arith.c gf-exp.c gf-gcd.c \ |
4edc47b8 | 217 | gfreduce.c gfreduce-exp.h gfn.c') |
3fe3eae5 | 218 | |
dbfee00a | 219 | define(`EC_SOURCES', |
489e11f0 | 220 | `field.c field-parse.c field-exp.c \ |
221 | f-prime.c f-niceprime.c f-binpoly.c \ | |
34e4f738 | 222 | ec.c ec-exp.c ec-prime.c ec-bin.c ec-test.c ec-info.c ectab.c \ |
0f3faccd | 223 | ec-fetch.c ec-raw.c g-ec.c') |
3fe3eae5 | 224 | |
225 | define(`PGEN_SOURCES', | |
1d6d3b01 | 226 | `pfilt.c primeiter.c rabin.c \ |
975679c7 | 227 | pgen.c pgen-stdev.c pgen-gcd.c pgen-simul.c \ |
29e444ad | 228 | prim.c strongprime.c limlee.c \ |
f2ec324f | 229 | keycheck.c keycheck-mp.c keycheck-report.c \ |
cc44d54e | 230 | bbs-rand.c bbs-gen.c bbs-jump.c bbs-fetch.c \ |
d3325040 | 231 | rsa-priv.c rsa-pub.c rsa-gen.c rsa-recover.c rsa-fetch.c \ |
53cbeae3 | 232 | oaep.c pkcs1.c pss.c \ |
4e67e30b | 233 | dh-gen.c dh-limlee.c dh-kcdsa.c dh-check.c dh-fetch.c dh-param.c \ |
c97fbcf9 | 234 | dsarand.c dsa-misc.c dsa-sign.c dsa-verify.c dsa-gen.c dsa-check.c \ |
e9026a0a | 235 | gdsa.c gkcdsa.c \ |
ad47fc73 | 236 | key-data.c key-flags.c key-text.c key-binary.c key-pass.c \ |
5a1a3a89 | 237 | key-pack.c key-misc.c key-file.c key-attr.c key-io.c key-moan.c \ |
bc981076 | 238 | key-error.c key-fetch.c \ |
1d6d3b01 | 239 | primetab.c wheel.c share.c') |
3fe3eae5 | 240 | |
241 | libcatacomb_la_SOURCES = \ | |
518452de | 242 | grand.c keysz.c keysz-conv.c \ |
3fe3eae5 | 243 | lcrand.c fibrand.c rc4.c seal.c rand.c noise.c fipstest.c maurer.c \ |
8ef0c733 | 244 | arena.c \ |
025c5f4a | 245 | passphrase.c pixie-common.c lmem.c \ |
53cbeae3 | 246 | tlsprf.c sslprf.c \ |
3fe3eae5 | 247 | gfshare.c \ |
7eaaecf5 | 248 | MP_BASE MP_SOURCES karatsuba.h \ |
e9026a0a | 249 | gciphertab.c ghashtab.c gmactab.c \ |
3fe3eae5 | 250 | des-base.c des-base.h \ |
0798f682 | 251 | desx-tab.h \ |
a297c216 | 252 | rc2-tab.h \ |
253 | skipjack-tab.h \ | |
3fe3eae5 | 254 | cast-s.c cast-sk.c cast-base.h cast-tab.h \ |
2e8eb64a | 255 | rijndael-base.c rijndael-base.h \ |
abef5380 | 256 | md2-tab.h \ |
3fe3eae5 | 257 | serpent-sbox.h skipjack-tab.h tiger-base.h \ |
258 | daftstory.h \ | |
d03ab969 | 259 | addsuffix(join(`ciphers', `-', `cipher_modes'), `.c') \ |
ce79f967 | 260 | addsuffix(join(`hashes', `-', `hash_modes'), `.c') \ |
e7dc130f | 261 | addsuffix(`ciphers', `.c') addsuffix(`hashes', `.c') crc32.c |
76f32ed2 | 262 | |
cc44d54e | 263 | des-base.lo: des-tab.h |
264 | blowfish.lo: blowfish-tab.h | |
265 | twofish.lo: twofish-tab.h | |
a16cc8cf | 266 | square.lo: square-tab.h |
2e8eb64a | 267 | rijndael-base.lo: rijndael-tab.h |
7fcfe7de | 268 | whirlpool.lo: whirlpool-tab.h |
2e8eb64a | 269 | safer.lo: safer-tab.h |
270 | mars.lo: mars-tab.h | |
a16cc8cf | 271 | tiger.lo: tiger-tab.h |
5a1a3a89 | 272 | gfshare.lo: gfshare-tab.h |
7c0acba6 | 273 | gfx-sqr.lo: gfx-sqr-tab.h |
748ed8dc | 274 | |
d03ab969 | 275 | ## --- Utility programs --- |
a7557fb1 | 276 | |
e2edda68 | 277 | bin_PROGRAMS = \ |
fa54fe1e | 278 | dsig key pixie cookie rspit factorial hashsum mkphrase \ |
279 | catcrypt catsign | |
c65df279 | 280 | noinst_LIBRARIES = libcatcrypt.a |
4263ac2b MW |
281 | pkgconfigdir = $(libdir)/pkgconfig |
282 | pkgconfig_DATA = catacomb.pc | |
cc44d54e | 283 | noinst_PROGRAMS = \ |
1d6d3b01 | 284 | genprimes genwheel mptypes genlimits serpent-check bittest mpdump \ |
e2edda68 | 285 | perftest \ |
7c0acba6 | 286 | addsuffix(`gen_tables', `-mktab') |
8282072d | 287 | LDADD = libcatcrypt.a libcatacomb.la |
c65df279 | 288 | |
4b09da23 | 289 | define(`LIBCAT_SRC', `cc.h getdate.h dnl |
18b3351a MW |
290 | cc-sig.c cc-subcmd.c cc-enc.c cc-kem.c cc-hash.c \ |
291 | cc-list.c cc-progress.c') | |
4b09da23 | 292 | libcatcrypt_a_SOURCES = LIBCAT_SRC getdate.y |
293 | ||
7eaaecf5 | 294 | patsubst(MP_BASE MP_SOURCES, `\.c\>', `.lo') dsig.o keyutil.o rspit.o \ |
4b09da23 | 295 | patsubst(LIBCAT_SRC, `\.c\>', `.o'): \ |
1d6d3b01 | 296 | mptypes.h primetab.h wheel.h |
7eaaecf5 | 297 | patsubst(MP_SOURCES, `\.c\>', `.lo'): mplimits.h |
45c0fd36 | 298 | |
c65df279 | 299 | dsig_SOURCES = dsig.c |
300 | cookie_SOURCES = cookie.c | |
301 | catcrypt_SOURCES = catcrypt.c | |
fa54fe1e | 302 | catsign_SOURCES = catsign.c |
c65df279 | 303 | key_SOURCES = keyutil.c |
a16cc8cf | 304 | hashsum_SOURCES = hashsum.c |
bba24c1d | 305 | rspit_SOURCES = rspit.c |
817d0432 | 306 | factorial_SOURCES = factorial.c |
e2edda68 | 307 | perftest_SOURCES = perftest.c |
5b7e2ea2 | 308 | perftest_LDADD = $(CATACOMB_LIBS) $(LDADD) |
025c5f4a | 309 | pixie_SOURCES = pixie.c pixie-common.c lmem.c arena.c passphrase.c |
4263ac2b | 310 | pixie_LDADD = $(PIXIE_LIBS) |
8282072d | 311 | pixie_CFLAGS = $(AM_CFLAGS) |
b55540f6 | 312 | mkphrase_SOURCES = mkphrase.c |
5b7e2ea2 | 313 | mkphrase_LDADD = $(CATACOMB_LIBS) $(LDADD) |
75263f25 | 314 | bittest_SOURCES = bittest.c |
45c0fd36 | 315 | bittest_LDADD = |
817d0432 | 316 | |
7c0acba6 | 317 | define(`emit', ` |
318 | patsubst(_item, `[^a-zA-Z0-9]', `_')_mktab_SOURCES = _item`'-mktab.c | |
319 | patsubst(_item, `[^a-zA-Z0-9]', `_')_mktab_LDADD =')dnl | |
320 | gen_tables | |
321 | ||
cc44d54e | 322 | serpent_check_SOURCES = serpent-check.c |
323 | serpent_check_LDADD = | |
cc44d54e | 324 | |
d03ab969 | 325 | genprimes_SOURCES = genprimes.c |
326 | genprimes_LDADD = | |
327 | ||
1d6d3b01 MW |
328 | genwheel_SOURCES = genwheel.c |
329 | genwheel_LDADD = | |
330 | ||
d03ab969 | 331 | mptypes_SOURCES = mptypes.c |
332 | mptypes_LDADD = | |
333 | ||
1d6d3b01 | 334 | genlimits_SOURCES = genlimits.c MP_BASE mptypes.h |
7eaaecf5 MW |
335 | genlimits_LDADD = |
336 | genlimits_CFLAGS = $(AM_CFLAGS) | |
337 | ||
338 | mpdump_SOURCES = mpdump.c MP_BASE | |
432c4e18 | 339 | mpdump_LDADD = |
8282072d | 340 | mpdump_CFLAGS = $(AM_CFLAGS) |
432c4e18 | 341 | |
de5585f8 | 342 | ## --- Install the pixie setuid-root if we can --- |
525af7b8 | 343 | ## |
344 | ## Bodge around a bug in Automake: it doesn't call `install-exec-hook' from | |
345 | ## `install' if there are subdirectories. | |
de5585f8 | 346 | |
347 | changequote(<, >) | |
21aac40c | 348 | # install: install-exec-hook |
de5585f8 | 349 | install-exec-hook: |
0798f682 | 350 | @pixie="$(DESTDIR)$(bindir)/`echo pixie|sed $(transform)`"; \ |
de5585f8 | 351 | if chown root $$pixie && chmod 4755 $$pixie; then \ |
352 | echo "chown root $$pixie"; \ | |
353 | echo "chmod 4755 $$pixie"; \ | |
354 | else \ | |
355 | echo "***"; \ | |
356 | echo "*** You should probably install $$pixie setuid-root."; \ | |
357 | echo "***"; \ | |
358 | fi | |
359 | changequote(`, ') | |
360 | ||
d03ab969 | 361 | ## --- Documentation --- |
362 | ||
fa54fe1e | 363 | man_MANS = \ |
6abcf20f | 364 | key.1 dsig.1 cookie.1 catcrypt.1 catsign.1 hashsum.1 mkphrase.1 \ |
fa54fe1e | 365 | keyring.5 pixie.1 |
d03ab969 | 366 | |
d7f3f07d MW |
367 | ## --- Prime group keyring --- |
368 | ||
69638ece | 369 | #pkgdata_DATA = pgroups.kr |
d7f3f07d MW |
370 | |
371 | $(srcdir)/pgroups.kr: ptab.in mkpgroups | |
372 | cd $(srcdir) && rm -f pgroups.kr && ./mkpgroups <ptab.in | |
373 | ||
d03ab969 | 374 | ## --- Other handy definitions --- |
9183ab7b | 375 | |
6f51228e | 376 | EXTRA_DIST = \ |
b817bfc6 | 377 | Makefile.m4 genmodes gengctab $(man_MANS) xpixie \ |
378 | group-test.c rsa-test.c \ | |
8282072d | 379 | ectab.in ec-gentab.awk \ |
69638ece | 380 | ptab.in p-gentab.awk mkpgroups \ |
8282072d | 381 | bintab.in bin-gentab.awk \ |
2ee993fe | 382 | README.cipher README.hash README.random README.mp \ |
383 | debian/rules debian/copyright debian/control debian/changelog \ | |
384 | debian/catacomb-bin.postinst debian/catacomb-bin.config \ | |
385 | debian/catacomb-bin.prerm debian/catacomb-bin.templates | |
d03ab969 | 386 | |
387 | dist-hook: | |
e9026a0a | 388 | @for i in getdate.c gciphertab.c ghashtab.c gmactab.c; do \ |
389 | ln $$i $(distdir) || ln $(srcdir)/$$i $(distdir) || true; \ | |
390 | done | |
5a1a3a89 | 391 | @echo datestamp >$(distdir)/modes-stamp || true |
7c0acba6 | 392 | @for i in calc tests; do \ |
393 | mkdir $(distdir)/$$i; \ | |
394 | ln $(srcdir)/$$i/*[!~] $(distdir)/$$i; \ | |
395 | done || true | |
cc44d54e | 396 | # kr=$$HOME/.catacomb/dsig-keyring; \ |
397 | # if [ -r $$kr ]; then \ | |
398 | # cd $(distdir); \ | |
399 | # ../key -k $$kr extract -f -secret KEYRING; \ | |
400 | # find . -type f -print0 | ../dsig -k $$kr sign -0 -oMANIFEST; \ | |
401 | # fi | |
471db039 | 402 | |
a094cab7 | 403 | ## --- Testing --- |
d03ab969 | 404 | |
471db039 | 405 | define(`testprogs', `') |
406 | ||
407 | define(`CTESTRIG', | |
ffc086db | 408 | `define(`testprogs', testprogs \ |
8282072d | 409 | $1.t$(EXEEXT))dnl |
8b6cedcc | 410 | $1.to: $1.c |
411 | $(COMPILE) -c -DTEST_RIG -DSRCDIR=\"$(srcdir)\" $(srcdir)/$1.c -o $1.to | |
8282072d | 412 | $1.t$(EXEEXT): $1.to libcatacomb.la |
b2524d68 | 413 | $(CC) $(CFLAGS) $(LDFLAGS) $1.to .libs/libcatacomb.a $(CATACOMB_LIBS) $(LIBS) -o $1.t$(EXEEXT)') |
a7557fb1 | 414 | |
415 | CTESTRIG(rc4) | |
cc44d54e | 416 | CTESTRIG(seal) |
a7557fb1 | 417 | adorn(`nl`'CTESTRIG(', `ciphers', `)') |
ce79f967 | 418 | adorn(`nl`'CTESTRIG(', `hashes', `)') |
471db039 | 419 | adorn(`nl`'CTESTRIG(', join(`ciphers', `-', `cipher_modes'), `)') |
420 | adorn(`nl`'CTESTRIG(', join(`hashes', `-', `hash_modes'), `)') | |
bba24c1d | 421 | CTESTRIG(lcrand) |
d83a82be | 422 | CTESTRIG(tlsprf) |
51a0f805 | 423 | CTESTRIG(sslprf) |
471db039 | 424 | CTESTRIG(mpx) |
bba24c1d | 425 | CTESTRIG(mpx-kmul) |
b6f2c5a0 | 426 | CTESTRIG(mpx-ksqr) |
a7557fb1 | 427 | CTESTRIG(mp-arith) |
1cf8e9fb | 428 | CTESTRIG(mp-modsqrt) |
a7557fb1 | 429 | CTESTRIG(mp-gcd) |
9fc256e8 | 430 | CTESTRIG(mp-jacobi) |
1cf8e9fb | 431 | CTESTRIG(mp-sqrt) |
ffec4880 | 432 | CTESTRIG(mp-modexp) |
bba24c1d | 433 | CTESTRIG(mptext) |
70b904c5 | 434 | CTESTRIG(mpint) |
bba24c1d | 435 | CTESTRIG(mpbarrett) |
34e4f738 | 436 | CTESTRIG(mpbarrett-exp) |
aacf9080 | 437 | CTESTRIG(mpbarrett-mexp) |
a7557fb1 | 438 | CTESTRIG(mpmont) |
34e4f738 | 439 | CTESTRIG(mpmont-exp) |
a7557fb1 | 440 | CTESTRIG(mpmont-mexp) |
f46efa79 | 441 | CTESTRIG(mpreduce) |
9fc256e8 | 442 | CTESTRIG(mpcrt) |
817d0432 | 443 | CTESTRIG(mpmul) |
b817bfc6 | 444 | CTESTRIG(rsa-test) |
7c0acba6 | 445 | CTESTRIG(gfx) |
ceb3f0c0 | 446 | CTESTRIG(gfx-sqr) |
7c0acba6 | 447 | CTESTRIG(gfx-kmul) |
ceb3f0c0 | 448 | CTESTRIG(gf-arith) |
449 | CTESTRIG(gf-gcd) | |
450 | CTESTRIG(gfreduce) | |
4edc47b8 | 451 | CTESTRIG(gfn) |
dbfee00a | 452 | CTESTRIG(ec-prime) |
ceb3f0c0 | 453 | CTESTRIG(ec-bin) |
bc985cef | 454 | CTESTRIG(ec-test) |
fb83f882 | 455 | CTESTRIG(ec-info) |
34e4f738 | 456 | CTESTRIG(dh-param) |
457 | CTESTRIG(group-test) | |
e9026a0a | 458 | CTESTRIG(gdsa) |
459 | CTESTRIG(gkcdsa) | |
a7557fb1 | 460 | CTESTRIG(pgen) |
1d6d3b01 | 461 | CTESTRIG(primeiter) |
471db039 | 462 | CTESTRIG(dsa-gen) |
463 | CTESTRIG(dsa-sign) | |
d03ab969 | 464 | CTESTRIG(dsa-verify) |
bba24c1d | 465 | CTESTRIG(bbs-rand) |
466 | CTESTRIG(bbs-jump) | |
cc44d54e | 467 | CTESTRIG(gfshare) |
468 | CTESTRIG(share) | |
817d0432 | 469 | CTESTRIG(rho) |
a7557fb1 | 470 | |
75263f25 | 471 | TESTS = serpent-check bittest testprogs |
d03ab969 | 472 | |
cc44d54e | 473 | CLEANFILES = \ |
d7f3f07d | 474 | *.t$(EXEEXT) *.to *.kr.old \ |
1d6d3b01 MW |
475 | mptypes.h primetab.c primetab.h wheel.c wheel.h \ |
476 | ectab.c ptab.c bintab.c \ | |
bc981076 | 477 | addsuffix(`gen_tables', `-tab.h') |
d03ab969 | 478 | |
479 | ## --- Makefile building (haha!) --- | |
480 | ||
481 | $(srcdir)/Makefile.am: $(srcdir)/Makefile.m4 | |
f21119d7 | 482 | m4 $(srcdir)/Makefile.m4 >$(srcdir)/Makefile.am.new |
483 | mv $(srcdir)/Makefile.am.new $(srcdir)/Makefile.am | |
a7557fb1 | 484 | |
9312c71f | 485 | DISTCLEANFILES = libtool |
486 | ||
a7557fb1 | 487 | MAINTAINERCLEANFILES = \ |
d03ab969 | 488 | $(srcdir)/Makefile.am \ |
489 | $(srcdir)/getdate.c getdate.c \ | |
d7f3f07d | 490 | $(srcdir)/pgroups.kr \ |
5a1a3a89 | 491 | $(MODES) modes-stamp $(srcdir)/modes-stamp |
d03ab969 | 492 | |
493 | ##----- That's all, folks --------------------------------------------------- |