add header files for libtommath
[heimdal.git] / lib / hcrypto / Makefile.am
blobf119d8c88d5a050494421d0f2ac27a88b1a9d3d0
1 # $Id$
3 include $(top_srcdir)/Makefile.am.common
5 AM_CPPFLAGS += -I$(srcdir)/libtommath -DUSE_HCRYPTO_IMATH=1 -DUSE_HCRYPTO_LTM=1
7 lib_LTLIBRARIES = libhcrypto.la
8 check_LTLIBRARIES = libhctest.la
10 libhcrypto_la_LDFLAGS = -version-info 5:0:1
11 libhcrypto_la_LIBADD = \
12         $(top_builddir)/lib/asn1/libasn1.la \
13         $(LIB_dlopen) \
14         $(LIBADD_roken)
16 hcryptoincludedir = $(includedir)/hcrypto
17 buildhcryptoinclude = $(buildinclude)/hcrypto
19 hcryptoinclude_HEADERS =        \
20         aes.h                   \
21         bn.h                    \
22         des.h                   \
23         dh.h                    \
24         dsa.h                   \
25         ec.h                    \
26         ecdh.h                  \
27         ecdsa.h                 \
28         engine.h                \
29         evp.h                   \
30         evp-hcrypto.h           \
31         evp-cc.h                \
32         hmac.h                  \
33         md2.h                   \
34         md4.h                   \
35         md5.h                   \
36         pkcs12.h                \
37         rand.h                  \
38         rc2.h                   \
39         rc4.h                   \
40         rsa.h                   \
41         sha.h                   \
42         ui.h
44 install-build-headers:: $(hcryptoinclude_HEADERS)
45         @foo='$(hcryptoinclude_HEADERS)'; \
46         for f in $$foo; do \
47                 f=`basename $$f`; \
48                 if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
49                 else file="$$f"; fi; \
50                 if cmp -s  $$file $(buildhcryptoinclude)/$$f 2> /dev/null ; then \
51                 : ; else \
52                         echo "cp $$file $(buildhcryptoinclude)/$$f";\
53                         cp $$file $(buildhcryptoinclude)/$$f; \
54                 fi ; \
55         done
57 PROGRAM_TESTS = \
58         destest \
59         mdtest \
60         rc2test  \
61         rctest \
62         test_bn \
63         test_cipher \
64         test_engine_dso \
65         test_hmac \
66         test_imath \
67         test_pkcs12 \
68         test_pkcs5
70 libhctest_la_SOURCES = \
71         imath/imath.c   \
72         des-tables.h    \
73         des.c           \
74         des.h           \
75         ui.c            \
76         ui.h
78 test_imath_LDADD = libhctest.la $(LIB_roken)
79 destest_LDADD = libhctest.la $(LIB_roken)
81 SCRIPT_TESTS = \
82         test_crypto
84 noinst_PROGRAMS = test_rand
86 check_PROGRAMS = $(PROGRAM_TESTS) test_rsa test_dh example_evp_cipher
87 check_SCRIPTS = $(SCRIPT_TESTS)
89 TESTS = $(PROGRAM_TESTS) $(SCRIPT_TESTS)
91 LDADD = $(lib_LTLIBRARIES) $(LIB_roken)
93 libhcrypto_la_SOURCES = \
94         $(imathsource)  \
95         $(ltmsources)   \
96         aes.c           \
97         aes.h           \
98         bn.c            \
99         bn.h            \
100         common.c        \
101         common.h        \
102         camellia.h      \
103         camellia.c      \
104         camellia-ntt.c  \
105         camellia-ntt.h  \
106         des-tables.h    \
107         des.c           \
108         des.h           \
109         dh.c            \
110         dh.h            \
111         dh-imath.c      \
112         dh-tfm.c        \
113         dh-ltm.c        \
114         dsa.c           \
115         dsa.h           \
116         doxygen.c       \
117         evp.c           \
118         evp.h           \
119         evp-hcrypto.c   \
120         evp-cc.c        \
121         engine.c        \
122         engine.h        \
123         hash.h          \
124         hmac.c          \
125         hmac.h          \
126         md2.c           \
127         md2.h           \
128         md4.c           \
129         md4.h           \
130         md5.c           \
131         md5.h           \
132         pkcs5.c         \
133         pkcs12.c        \
134         rand-egd.c      \
135         rand-fortuna.c  \
136         rand-timer.c    \
137         rand-unix.c     \
138         rand.c          \
139         rand.h          \
140         randi.h         \
141         rc2.c           \
142         rc2.h           \
143         rc4.c           \
144         rc4.h           \
145         rijndael-alg-fst.c \
146         rijndael-alg-fst.h \
147         rnd_keys.c      \
148         rsa.c           \
149         rsa-gmp.c       \
150         rsa-imath.c     \
151         rsa-tfm.c       \
152         rsa-ltm.c       \
153         rsa.h           \
154         sha.c           \
155         sha.h           \
156         sha256.c        \
157         validate.c      \
158         ui.c            \
159         ui.h
161 imathsource =                   \
162         imath/imath.c           \
163         imath/imath.h           \
164         imath/iprime.c          \
165         imath/iprime.h
167 ltmsources = \
168         libtommath/tommath.h \
169         libtommath/tommath_class.h \
170         libtommath/tommath_superclass.h \
171         libtommath/bncore.c \
172         libtommath/bn_mp_init.c \
173         libtommath/bn_mp_clear.c \
174         libtommath/bn_mp_exch.c \
175         libtommath/bn_mp_grow.c \
176         libtommath/bn_mp_shrink.c \
177         libtommath/bn_mp_clamp.c \
178         libtommath/bn_mp_zero.c \
179         libtommath/bn_mp_zero_multi.c \
180         libtommath/bn_mp_set.c \
181         libtommath/bn_mp_set_int.c \
182         libtommath/bn_mp_init_size.c \
183         libtommath/bn_mp_copy.c \
184         libtommath/bn_mp_init_copy.c \
185         libtommath/bn_mp_abs.c \
186         libtommath/bn_mp_neg.c \
187         libtommath/bn_mp_cmp_mag.c \
188         libtommath/bn_mp_cmp.c \
189         libtommath/bn_mp_cmp_d.c \
190         libtommath/bn_mp_rshd.c \
191         libtommath/bn_mp_lshd.c \
192         libtommath/bn_mp_mod_2d.c \
193         libtommath/bn_mp_div_2d.c \
194         libtommath/bn_mp_mul_2d.c \
195         libtommath/bn_mp_div_2.c \
196         libtommath/bn_mp_mul_2.c \
197         libtommath/bn_s_mp_add.c \
198         libtommath/bn_s_mp_sub.c \
199         libtommath/bn_fast_s_mp_mul_digs.c \
200         libtommath/bn_s_mp_mul_digs.c \
201         libtommath/bn_fast_s_mp_mul_high_digs.c \
202         libtommath/bn_s_mp_mul_high_digs.c \
203         libtommath/bn_fast_s_mp_sqr.c \
204         libtommath/bn_s_mp_sqr.c \
205         libtommath/bn_mp_add.c \
206         libtommath/bn_mp_sub.c \
207         libtommath/bn_mp_karatsuba_mul.c \
208         libtommath/bn_mp_mul.c \
209         libtommath/bn_mp_karatsuba_sqr.c \
210         libtommath/bn_mp_sqr.c \
211         libtommath/bn_mp_div.c \
212         libtommath/bn_mp_mod.c \
213         libtommath/bn_mp_add_d.c \
214         libtommath/bn_mp_sub_d.c \
215         libtommath/bn_mp_mul_d.c \
216         libtommath/bn_mp_div_d.c \
217         libtommath/bn_mp_mod_d.c \
218         libtommath/bn_mp_expt_d.c \
219         libtommath/bn_mp_addmod.c \
220         libtommath/bn_mp_submod.c \
221         libtommath/bn_mp_mulmod.c \
222         libtommath/bn_mp_sqrmod.c \
223         libtommath/bn_mp_gcd.c \
224         libtommath/bn_mp_lcm.c \
225         libtommath/bn_fast_mp_invmod.c \
226         libtommath/bn_mp_invmod.c \
227         libtommath/bn_mp_reduce.c \
228         libtommath/bn_mp_montgomery_setup.c \
229         libtommath/bn_fast_mp_montgomery_reduce.c \
230         libtommath/bn_mp_montgomery_reduce.c \
231         libtommath/bn_mp_exptmod_fast.c \
232         libtommath/bn_mp_exptmod.c \
233         libtommath/bn_mp_2expt.c \
234         libtommath/bn_mp_n_root.c \
235         libtommath/bn_mp_jacobi.c \
236         libtommath/bn_reverse.c \
237         libtommath/bn_mp_count_bits.c \
238         libtommath/bn_mp_read_unsigned_bin.c \
239         libtommath/bn_mp_read_signed_bin.c \
240         libtommath/bn_mp_to_unsigned_bin.c \
241         libtommath/bn_mp_to_signed_bin.c \
242         libtommath/bn_mp_unsigned_bin_size.c \
243         libtommath/bn_mp_signed_bin_size.c \
244         libtommath/bn_mp_xor.c \
245         libtommath/bn_mp_and.c \
246         libtommath/bn_mp_or.c \
247         libtommath/bn_mp_rand.c \
248         libtommath/bn_mp_montgomery_calc_normalization.c \
249         libtommath/bn_mp_prime_is_divisible.c \
250         libtommath/bn_prime_tab.c \
251         libtommath/bn_mp_prime_fermat.c \
252         libtommath/bn_mp_prime_miller_rabin.c \
253         libtommath/bn_mp_prime_is_prime.c \
254         libtommath/bn_mp_prime_next_prime.c \
255         libtommath/bn_mp_find_prime.c \
256         libtommath/bn_mp_isprime.c \
257         libtommath/bn_mp_dr_reduce.c \
258         libtommath/bn_mp_dr_is_modulus.c \
259         libtommath/bn_mp_dr_setup.c \
260         libtommath/bn_mp_reduce_setup.c \
261         libtommath/bn_mp_toom_mul.c \
262         libtommath/bn_mp_toom_sqr.c \
263         libtommath/bn_mp_div_3.c \
264         libtommath/bn_s_mp_exptmod.c \
265         libtommath/bn_mp_reduce_2k.c \
266         libtommath/bn_mp_reduce_is_2k.c \
267         libtommath/bn_mp_reduce_2k_setup.c \
268         libtommath/bn_mp_reduce_2k_l.c \
269         libtommath/bn_mp_reduce_is_2k_l.c \
270         libtommath/bn_mp_reduce_2k_setup_l.c \
271         libtommath/bn_mp_radix_smap.c \
272         libtommath/bn_mp_read_radix.c \
273         libtommath/bn_mp_toradix.c \
274         libtommath/bn_mp_radix_size.c \
275         libtommath/bn_mp_fread.c \
276         libtommath/bn_mp_fwrite.c \
277         libtommath/bn_mp_cnt_lsb.c \
278         libtommath/bn_error.c \
279         libtommath/bn_mp_init_multi.c \
280         libtommath/bn_mp_clear_multi.c \
281         libtommath/bn_mp_exteuclid.c \
282         libtommath/bn_mp_toradix_n.c \
283         libtommath/bn_mp_prime_random_ex.c \
284         libtommath/bn_mp_get_int.c \
285         libtommath/bn_mp_sqrt.c \
286         libtommath/bn_mp_is_square.c \
287         libtommath/bn_mp_init_set.c \
288         libtommath/bn_mp_init_set_int.c \
289         libtommath/bn_mp_invmod_slow.c \
290         libtommath/bn_mp_prime_rabin_miller_trials.c \
291         libtommath/bn_mp_to_signed_bin_n.c \
292         libtommath/bn_mp_to_unsigned_bin_n.c
295 $(libhcrypto_la_OBJECTS): hcrypto-link
297 libhcrypto_la_CPPFLAGS = -DIMATH_LARGE_PRIME_TABLE -DTFM_CHECK -DTFM_TIMING_RESISTANT -DBUILD_HCRYPTO_LIB $(AM_CPPFLAGS)
299 if versionscript
300 libhcrypto_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
301 endif
302 $(libhcrypto_la_OBJECTS): $(srcdir)/version-script.map
305 hcrypto-link:
306         $(LN_S) $(srcdir)/../hcrypto hcrypto
307         touch hcrypto-link
309 do_subst = sed -e 's,[@]srcdir[@],$(srcdir),g' -e 's,[@]exeext[@],$(exeext),g'
311 test_crypto: test_crypto.in Makefile
312         $(do_subst) < $(srcdir)/test_crypto.in > test_crypto.tmp
313         chmod +x test_crypto.tmp
314         mv test_crypto.tmp test_crypto
316 CLEANFILES = \
317         crypto-test \
318         crypto-test2 \
319         error \
320         hcrypto \
321         hcrypto-link \
322         test.file \
323         test_crypto \
324         test-out* \
325         test_crypto.tmp \
326         test_crypto.tmp
328 EXTRA_DIST = \
329         DESperate.txt \
330         dllmain.c \
331         ec.h \
332         ecdh.h \
333         ecdsa.h \
334         gen-des.pl \
335         imath/LICENSE \
336         imath/import.sh \
337         md5crypt_test.c \
338         passwd_dialog.aps \
339         passwd_dialog.clw \
340         passwd_dialog.rc \
341         passwd_dialog.res \
342         passwd_dlg.c \
343         passwd_dlg.h \
344         resource.h \
345         rsakey.der \
346         test_crypto.in \
347         version-script.map