Add Windows CNG (BCrypt) support to HCrypto EVP API
[heimdal.git] / lib / hcrypto / Makefile.am
blob510e5350e886112e136d55beed768017c6bf74eb
1 # $Id$
3 include $(top_srcdir)/Makefile.am.common
5 AM_CPPFLAGS += -I$(srcdir)/libtommath -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_bulk \
64         test_cipher \
65         test_engine_dso \
66         test_hmac \
67         test_pkcs12 \
68         test_pkcs5
70 libhctest_la_SOURCES = \
71         des-tables.h    \
72         des.c           \
73         des.h           \
74         ui.c            \
75         ui.h
77 destest_LDADD = libhctest.la $(LIB_roken)
79 SCRIPT_TESTS = \
80         test_crypto
82 noinst_PROGRAMS = test_rand
84 check_PROGRAMS = $(PROGRAM_TESTS) test_rsa test_dh example_evp_cipher
85 check_SCRIPTS = $(SCRIPT_TESTS)
87 TESTS = $(PROGRAM_TESTS) $(SCRIPT_TESTS)
89 LDADD = $(lib_LTLIBRARIES) $(LIB_roken)
90 test_rand_LDADD = $(LDADD) -lm
92 libhcrypto_la_SOURCES = \
93         $(ltmsources)   \
94         aes.c           \
95         aes.h           \
96         bn.c            \
97         bn.h            \
98         common.c        \
99         common.h        \
100         camellia.h      \
101         camellia.c      \
102         camellia-ntt.c  \
103         camellia-ntt.h  \
104         des-tables.h    \
105         des.c           \
106         des.h           \
107         dh.c            \
108         dh.h            \
109         dh-ltm.c        \
110         dsa.c           \
111         dsa.h           \
112         doxygen.c       \
113         evp.c           \
114         evp.h           \
115         evp-hcrypto.c   \
116         evp-cc.c        \
117         engine.c        \
118         engine.h        \
119         hash.h          \
120         hmac.c          \
121         hmac.h          \
122         md2.c           \
123         md2.h           \
124         md4.c           \
125         md4.h           \
126         md5.c           \
127         md5.h           \
128         pkcs5.c         \
129         pkcs12.c        \
130         rand-egd.c      \
131         rand-fortuna.c  \
132         rand-timer.c    \
133         rand-unix.c     \
134         rand.c          \
135         rand.h          \
136         randi.h         \
137         rc2.c           \
138         rc2.h           \
139         rc4.c           \
140         rc4.h           \
141         rijndael-alg-fst.c \
142         rijndael-alg-fst.h \
143         rnd_keys.c      \
144         rsa.c           \
145         rsa-gmp.c       \
146         rsa-ltm.c       \
147         rsa.h           \
148         sha.c           \
149         sha.h           \
150         sha256.c        \
151         sha512.c        \
152         validate.c      \
153         ui.c            \
154         ui.h
156 ltmsources = \
157         libtommath/tommath.h \
158         libtommath/tommath_class.h \
159         libtommath/tommath_superclass.h \
160         libtommath/bncore.c \
161         libtommath/bn_mp_init.c \
162         libtommath/bn_mp_clear.c \
163         libtommath/bn_mp_exch.c \
164         libtommath/bn_mp_grow.c \
165         libtommath/bn_mp_shrink.c \
166         libtommath/bn_mp_clamp.c \
167         libtommath/bn_mp_zero.c \
168         libtommath/bn_mp_zero_multi.c \
169         libtommath/bn_mp_set.c \
170         libtommath/bn_mp_set_int.c \
171         libtommath/bn_mp_init_size.c \
172         libtommath/bn_mp_copy.c \
173         libtommath/bn_mp_init_copy.c \
174         libtommath/bn_mp_abs.c \
175         libtommath/bn_mp_neg.c \
176         libtommath/bn_mp_cmp_mag.c \
177         libtommath/bn_mp_cmp.c \
178         libtommath/bn_mp_cmp_d.c \
179         libtommath/bn_mp_rshd.c \
180         libtommath/bn_mp_lshd.c \
181         libtommath/bn_mp_mod_2d.c \
182         libtommath/bn_mp_div_2d.c \
183         libtommath/bn_mp_mul_2d.c \
184         libtommath/bn_mp_div_2.c \
185         libtommath/bn_mp_mul_2.c \
186         libtommath/bn_s_mp_add.c \
187         libtommath/bn_s_mp_sub.c \
188         libtommath/bn_fast_s_mp_mul_digs.c \
189         libtommath/bn_s_mp_mul_digs.c \
190         libtommath/bn_fast_s_mp_mul_high_digs.c \
191         libtommath/bn_s_mp_mul_high_digs.c \
192         libtommath/bn_fast_s_mp_sqr.c \
193         libtommath/bn_s_mp_sqr.c \
194         libtommath/bn_mp_add.c \
195         libtommath/bn_mp_sub.c \
196         libtommath/bn_mp_karatsuba_mul.c \
197         libtommath/bn_mp_mul.c \
198         libtommath/bn_mp_karatsuba_sqr.c \
199         libtommath/bn_mp_sqr.c \
200         libtommath/bn_mp_div.c \
201         libtommath/bn_mp_mod.c \
202         libtommath/bn_mp_add_d.c \
203         libtommath/bn_mp_sub_d.c \
204         libtommath/bn_mp_mul_d.c \
205         libtommath/bn_mp_div_d.c \
206         libtommath/bn_mp_mod_d.c \
207         libtommath/bn_mp_expt_d.c \
208         libtommath/bn_mp_addmod.c \
209         libtommath/bn_mp_submod.c \
210         libtommath/bn_mp_mulmod.c \
211         libtommath/bn_mp_sqrmod.c \
212         libtommath/bn_mp_gcd.c \
213         libtommath/bn_mp_lcm.c \
214         libtommath/bn_fast_mp_invmod.c \
215         libtommath/bn_mp_invmod.c \
216         libtommath/bn_mp_reduce.c \
217         libtommath/bn_mp_montgomery_setup.c \
218         libtommath/bn_fast_mp_montgomery_reduce.c \
219         libtommath/bn_mp_montgomery_reduce.c \
220         libtommath/bn_mp_exptmod_fast.c \
221         libtommath/bn_mp_exptmod.c \
222         libtommath/bn_mp_2expt.c \
223         libtommath/bn_mp_n_root.c \
224         libtommath/bn_mp_jacobi.c \
225         libtommath/bn_reverse.c \
226         libtommath/bn_mp_count_bits.c \
227         libtommath/bn_mp_read_unsigned_bin.c \
228         libtommath/bn_mp_read_signed_bin.c \
229         libtommath/bn_mp_to_unsigned_bin.c \
230         libtommath/bn_mp_to_signed_bin.c \
231         libtommath/bn_mp_unsigned_bin_size.c \
232         libtommath/bn_mp_signed_bin_size.c \
233         libtommath/bn_mp_xor.c \
234         libtommath/bn_mp_and.c \
235         libtommath/bn_mp_or.c \
236         libtommath/bn_mp_rand.c \
237         libtommath/bn_mp_montgomery_calc_normalization.c \
238         libtommath/bn_mp_prime_is_divisible.c \
239         libtommath/bn_prime_tab.c \
240         libtommath/bn_mp_prime_fermat.c \
241         libtommath/bn_mp_prime_miller_rabin.c \
242         libtommath/bn_mp_prime_is_prime.c \
243         libtommath/bn_mp_prime_next_prime.c \
244         libtommath/bn_mp_find_prime.c \
245         libtommath/bn_mp_dr_reduce.c \
246         libtommath/bn_mp_dr_is_modulus.c \
247         libtommath/bn_mp_dr_setup.c \
248         libtommath/bn_mp_reduce_setup.c \
249         libtommath/bn_mp_toom_mul.c \
250         libtommath/bn_mp_toom_sqr.c \
251         libtommath/bn_mp_div_3.c \
252         libtommath/bn_s_mp_exptmod.c \
253         libtommath/bn_mp_reduce_2k.c \
254         libtommath/bn_mp_reduce_is_2k.c \
255         libtommath/bn_mp_reduce_2k_setup.c \
256         libtommath/bn_mp_reduce_2k_l.c \
257         libtommath/bn_mp_reduce_is_2k_l.c \
258         libtommath/bn_mp_reduce_2k_setup_l.c \
259         libtommath/bn_mp_radix_smap.c \
260         libtommath/bn_mp_read_radix.c \
261         libtommath/bn_mp_toradix.c \
262         libtommath/bn_mp_radix_size.c \
263         libtommath/bn_mp_fread.c \
264         libtommath/bn_mp_fwrite.c \
265         libtommath/bn_mp_cnt_lsb.c \
266         libtommath/bn_error.c \
267         libtommath/bn_mp_init_multi.c \
268         libtommath/bn_mp_clear_multi.c \
269         libtommath/bn_mp_exteuclid.c \
270         libtommath/bn_mp_toradix_n.c \
271         libtommath/bn_mp_prime_random_ex.c \
272         libtommath/bn_mp_get_int.c \
273         libtommath/bn_mp_sqrt.c \
274         libtommath/bn_mp_is_square.c \
275         libtommath/bn_mp_init_set.c \
276         libtommath/bn_mp_init_set_int.c \
277         libtommath/bn_mp_invmod_slow.c \
278         libtommath/bn_mp_prime_rabin_miller_trials.c \
279         libtommath/bn_mp_to_signed_bin_n.c \
280         libtommath/bn_mp_to_unsigned_bin_n.c
283 $(libhcrypto_la_OBJECTS): hcrypto-link
285 libhcrypto_la_CPPFLAGS = -DBUILD_HCRYPTO_LIB $(AM_CPPFLAGS)
287 if versionscript
288 libhcrypto_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
289 endif
290 $(libhcrypto_la_OBJECTS): $(srcdir)/version-script.map
293 hcrypto-link:
294         $(LN_S) $(srcdir)/../hcrypto hcrypto
295         touch hcrypto-link
297 do_subst = sed -e 's,[@]srcdir[@],$(srcdir),g' -e 's,[@]exeext[@],$(exeext),g'
299 test_crypto: test_crypto.in Makefile
300         $(do_subst) < $(srcdir)/test_crypto.in > test_crypto.tmp
301         chmod +x test_crypto.tmp
302         mv test_crypto.tmp test_crypto
304 CLEANFILES = \
305         crypto-test \
306         crypto-test2 \
307         error \
308         hcrypto \
309         hcrypto-link \
310         test.file \
311         test_crypto \
312         test-out* \
313         test_crypto.tmp \
314         test_crypto.tmp
316 EXTRA_DIST = \
317         NTMakefile \
318         DESperate.txt \
319         passwd_dialog.rc \
320         libhcrypto-exports.def \
321         dllmain.c \
322         ec.h \
323         ecdh.h \
324         ecdsa.h \
325         gen-des.pl \
326         md5crypt_test.c \
327         passwd_dialog.aps \
328         passwd_dialog.clw \
329         passwd_dialog.rc \
330         passwd_dialog.res \
331         passwd_dlg.c \
332         passwd_dlg.h \
333         resource.h \
334         rsakey.der \
335         rsakey2048.der \
336         rsakey4096.der \
337         test_crypto.in \
338         version-script.map