lib/krb5: krb5_init_creds_set_service fail if set_realm fails
[heimdal.git] / lib / hcrypto / Makefile.am
blobbb36f74519070b26d5f0b6b775955d4ddf5e7cb3
1 # $Id$
3 include $(top_srcdir)/Makefile.am.common
5 AUTOMAKE_OPTIONS = subdir-objects
7 if HAVE_HCRYPTO_W_OPENSSL
8 AM_CPPFLAGS += $(INCLUDE_openssl_crypto)
9 endif
11 AM_CPPFLAGS += -I$(top_srcdir)/lib/hx509 \
12                -I$(srcdir)/libtommath -DUSE_HCRYPTO_LTM=1 \
13                -I$(srcdir)/x25519 \
14                -I$(srcdir)/..
16 WFLAGS += $(WFLAGS_LITE) -Wno-error=unused-function
17 # XXX: Make these not necessary:
18 WFLAGS += -Wno-error=unused-result -Wno-error=deprecated-declarations
19 WFLAGS += $(WFLAGS_UNUSED_BUT_SET_VAR)
21 lib_LTLIBRARIES = libhcrypto.la
22 check_LTLIBRARIES = libhctest.la
24 libhcrypto_la_LDFLAGS = -version-info 5:0:1
25 libhcrypto_la_LIBADD = \
26         $(top_builddir)/lib/asn1/libasn1.la \
27         $(LIB_dlopen) \
28         $(LIB_heimbase) \
29         $(LIBADD_roken)
31 if HAVE_HCRYPTO_W_OPENSSL
32 libhcrypto_la_LIBADD += $(LIB_openssl_crypto)
33 endif
35 hcryptoincludedir = $(includedir)/hcrypto
36 buildhcryptoinclude = $(buildinclude)/hcrypto
38 hcryptoinclude_HEADERS =        \
39         aes.h                   \
40         bn.h                    \
41         des.h                   \
42         dh.h                    \
43         dsa.h                   \
44         ec.h                    \
45         ecdh.h                  \
46         ecdsa.h                 \
47         engine.h                \
48         evp.h                   \
49         evp-hcrypto.h           \
50         evp-cc.h                \
51         evp-openssl.h           \
52         evp-pkcs11.h            \
53         hmac.h                  \
54         md2.h                   \
55         md4.h                   \
56         md5.h                   \
57         pkcs12.h                \
58         rand.h                  \
59         rc2.h                   \
60         rc4.h                   \
61         rsa.h                   \
62         sha.h                   \
63         ui.h                    \
64         undef.h
66 install-build-headers:: $(hcryptoinclude_HEADERS) $(x25519include_HEADERS)
67         @foo='$(hcryptoinclude_HEADERS)'; \
68         for f in $$foo; do \
69                 f=`basename $$f`; \
70                 if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
71                 else file="$$f"; fi; \
72                 if cmp -s  $$file $(buildhcryptoinclude)/$$f 2> /dev/null ; then \
73                 : ; else \
74                         echo "cp $$file $(buildhcryptoinclude)/$$f";\
75                         cp $$file $(buildhcryptoinclude)/$$f; \
76                 fi ; \
77         done
79 PROGRAM_TESTS = \
80         destest \
81         mdtest \
82         rc2test  \
83         rctest \
84         test_bn \
85         test_bulk \
86         test_cipher \
87         test_engine_dso \
88         test_hmac \
89         test_pkcs12 \
90         test_pkcs5
92 libhctest_la_SOURCES = \
93         des-tables.h    \
94         des.c           \
95         des.h           \
96         ui.c            \
97         ui.h
99 destest_LDADD = libhctest.la $(LIB_roken)
101 SCRIPT_TESTS = \
102         test_crypto
104 noinst_PROGRAMS = test_rand
106 noinst_HEADERS = \
107         x25519/ed25519_ref10_fe_51.h    \
108         x25519/ed25519_ref10_fe_25_5.h  \
109         x25519/ed25519_ref10.h  \
110         x25519/fe_25_5/base.h   \
111         x25519/fe_25_5/base2.h  \
112         x25519/fe_25_5/constants.h  \
113         x25519/fe_25_5/fe.h \
114         x25519/fe_51/base.h \
115         x25519/fe_51/base2.h    \
116         x25519/fe_51/constants.h    \
117         x25519/fe_51/fe.h   \
118         x25519/align.h  \
119         x25519_ref10.h
122 check_PROGRAMS = $(PROGRAM_TESTS) test_rsa test_dh example_evp_cipher
123 check_SCRIPTS = $(SCRIPT_TESTS)
125 TESTS = $(PROGRAM_TESTS) $(SCRIPT_TESTS)
127 LDADD = $(lib_LTLIBRARIES) $(LIB_roken) $(LIB_openssl_crypto)
128 test_rand_LDADD = $(LDADD) -lm
130 libhcrypto_la_SOURCES = \
131         $(ltmsources)   \
132         $(x25519sources)\
133         aes.c           \
134         aes.h           \
135         bn.c            \
136         bn.h            \
137         common.c        \
138         common.h        \
139         camellia.h      \
140         camellia.c      \
141         camellia-ntt.c  \
142         camellia-ntt.h  \
143         des-tables.h    \
144         des.c           \
145         des.h           \
146         dh.c            \
147         dh.h            \
148         dh-ltm.c        \
149         dsa.c           \
150         dsa.h           \
151         doxygen.c       \
152         evp.c           \
153         evp.h           \
154         evp-hcrypto.c   \
155         evp-cc.c        \
156         evp-openssl.c   \
157         evp-pkcs11.c    \
158         engine.c        \
159         engine.h        \
160         hash.h          \
161         hmac.c          \
162         hmac.h          \
163         md2.c           \
164         md2.h           \
165         md4.c           \
166         md4.h           \
167         md5.c           \
168         md5.h           \
169         pkcs5.c         \
170         pkcs12.c        \
171         rand-fortuna.c  \
172         rand-timer.c    \
173         rand-unix.c     \
174         rand.c          \
175         rand.h          \
176         randi.h         \
177         rc2.c           \
178         rc2.h           \
179         rc4.c           \
180         rc4.h           \
181         rijndael-alg-fst.c \
182         rijndael-alg-fst.h \
183         rnd_keys.c      \
184         rsa.c           \
185         rsa-gmp.c       \
186         rsa-ltm.c       \
187         rsa.h           \
188         sha.c           \
189         sha.h           \
190         sha256.c        \
191         sha512.c        \
192         validate.c      \
193         ui.c            \
194         ui.h            \
195         undef.h
197 ltmsources = \
198         libtommath/bn_cutoffs.c \
199         libtommath/bn_deprecated.c \
200         libtommath/bn_mp_2expt.c \
201         libtommath/bn_mp_abs.c \
202         libtommath/bn_mp_add.c \
203         libtommath/bn_mp_add_d.c \
204         libtommath/bn_mp_addmod.c \
205         libtommath/bn_mp_and.c \
206         libtommath/bn_mp_clamp.c \
207         libtommath/bn_mp_clear.c \
208         libtommath/bn_mp_clear_multi.c \
209         libtommath/bn_mp_cmp.c \
210         libtommath/bn_mp_cmp_d.c \
211         libtommath/bn_mp_cmp_mag.c \
212         libtommath/bn_mp_cnt_lsb.c \
213         libtommath/bn_mp_complement.c \
214         libtommath/bn_mp_copy.c \
215         libtommath/bn_mp_count_bits.c \
216         libtommath/bn_mp_decr.c \
217         libtommath/bn_mp_div.c \
218         libtommath/bn_mp_div_2.c \
219         libtommath/bn_mp_div_2d.c \
220         libtommath/bn_mp_div_3.c \
221         libtommath/bn_mp_div_d.c \
222         libtommath/bn_mp_dr_is_modulus.c \
223         libtommath/bn_mp_dr_reduce.c \
224         libtommath/bn_mp_dr_setup.c \
225         libtommath/bn_mp_error_to_string.c \
226         libtommath/bn_mp_exch.c \
227         libtommath/bn_mp_expt_u32.c \
228         libtommath/bn_mp_exptmod.c \
229         libtommath/bn_mp_exteuclid.c \
230         libtommath/bn_mp_fread.c \
231         libtommath/bn_mp_from_sbin.c \
232         libtommath/bn_mp_from_ubin.c \
233         libtommath/bn_mp_fwrite.c \
234         libtommath/bn_mp_gcd.c \
235         libtommath/bn_mp_get_double.c \
236         libtommath/bn_mp_get_i32.c \
237         libtommath/bn_mp_get_i64.c \
238         libtommath/bn_mp_get_l.c \
239         libtommath/bn_mp_get_ll.c \
240         libtommath/bn_mp_get_mag_u32.c \
241         libtommath/bn_mp_get_mag_u64.c \
242         libtommath/bn_mp_get_mag_ul.c \
243         libtommath/bn_mp_get_mag_ull.c \
244         libtommath/bn_mp_grow.c \
245         libtommath/bn_mp_incr.c \
246         libtommath/bn_mp_init.c \
247         libtommath/bn_mp_init_copy.c \
248         libtommath/bn_mp_init_i32.c \
249         libtommath/bn_mp_init_i64.c \
250         libtommath/bn_mp_init_l.c \
251         libtommath/bn_mp_init_ll.c \
252         libtommath/bn_mp_init_multi.c \
253         libtommath/bn_mp_init_set.c \
254         libtommath/bn_mp_init_size.c \
255         libtommath/bn_mp_init_u32.c \
256         libtommath/bn_mp_init_u64.c \
257         libtommath/bn_mp_init_ul.c \
258         libtommath/bn_mp_init_ull.c \
259         libtommath/bn_mp_invmod.c \
260         libtommath/bn_mp_is_square.c \
261         libtommath/bn_mp_iseven.c \
262         libtommath/bn_mp_isodd.c \
263         libtommath/bn_mp_kronecker.c \
264         libtommath/bn_mp_lcm.c \
265         libtommath/bn_mp_log_u32.c \
266         libtommath/bn_mp_lshd.c \
267         libtommath/bn_mp_mod.c \
268         libtommath/bn_mp_mod_2d.c \
269         libtommath/bn_mp_mod_d.c \
270         libtommath/bn_mp_montgomery_calc_normalization.c \
271         libtommath/bn_mp_montgomery_reduce.c \
272         libtommath/bn_mp_montgomery_setup.c \
273         libtommath/bn_mp_mul.c \
274         libtommath/bn_mp_mul_2.c \
275         libtommath/bn_mp_mul_2d.c \
276         libtommath/bn_mp_mul_d.c \
277         libtommath/bn_mp_mulmod.c \
278         libtommath/bn_mp_neg.c \
279         libtommath/bn_mp_or.c \
280         libtommath/bn_mp_pack.c \
281         libtommath/bn_mp_pack_count.c \
282         libtommath/bn_mp_prime_fermat.c \
283         libtommath/bn_mp_prime_frobenius_underwood.c \
284         libtommath/bn_mp_prime_is_prime.c \
285         libtommath/bn_mp_prime_miller_rabin.c \
286         libtommath/bn_mp_prime_next_prime.c \
287         libtommath/bn_mp_prime_rabin_miller_trials.c \
288         libtommath/bn_mp_prime_rand.c \
289         libtommath/bn_mp_prime_strong_lucas_selfridge.c \
290         libtommath/bn_mp_radix_size.c \
291         libtommath/bn_mp_radix_smap.c \
292         libtommath/bn_mp_rand.c \
293         libtommath/bn_mp_read_radix.c \
294         libtommath/bn_mp_reduce.c \
295         libtommath/bn_mp_reduce_2k.c \
296         libtommath/bn_mp_reduce_2k_l.c \
297         libtommath/bn_mp_reduce_2k_setup.c \
298         libtommath/bn_mp_reduce_2k_setup_l.c \
299         libtommath/bn_mp_reduce_is_2k.c \
300         libtommath/bn_mp_reduce_is_2k_l.c \
301         libtommath/bn_mp_reduce_setup.c \
302         libtommath/bn_mp_root_u32.c \
303         libtommath/bn_mp_rshd.c \
304         libtommath/bn_mp_sbin_size.c \
305         libtommath/bn_mp_set.c \
306         libtommath/bn_mp_set_double.c \
307         libtommath/bn_mp_set_i32.c \
308         libtommath/bn_mp_set_i64.c \
309         libtommath/bn_mp_set_l.c \
310         libtommath/bn_mp_set_ll.c \
311         libtommath/bn_mp_set_u32.c \
312         libtommath/bn_mp_set_u64.c \
313         libtommath/bn_mp_set_ul.c \
314         libtommath/bn_mp_set_ull.c \
315         libtommath/bn_mp_shrink.c \
316         libtommath/bn_mp_signed_rsh.c \
317         libtommath/bn_mp_sqr.c \
318         libtommath/bn_mp_sqrmod.c \
319         libtommath/bn_mp_sqrt.c \
320         libtommath/bn_mp_sqrtmod_prime.c \
321         libtommath/bn_mp_sub.c \
322         libtommath/bn_mp_sub_d.c \
323         libtommath/bn_mp_submod.c \
324         libtommath/bn_mp_to_radix.c \
325         libtommath/bn_mp_to_sbin.c \
326         libtommath/bn_mp_to_ubin.c \
327         libtommath/bn_mp_ubin_size.c \
328         libtommath/bn_mp_unpack.c \
329         libtommath/bn_mp_xor.c \
330         libtommath/bn_mp_zero.c \
331         libtommath/bn_prime_tab.c \
332         libtommath/bn_s_mp_add.c \
333         libtommath/bn_s_mp_balance_mul.c \
334         libtommath/bn_s_mp_exptmod.c \
335         libtommath/bn_s_mp_exptmod_fast.c \
336         libtommath/bn_s_mp_get_bit.c \
337         libtommath/bn_s_mp_invmod_fast.c \
338         libtommath/bn_s_mp_invmod_slow.c \
339         libtommath/bn_s_mp_karatsuba_mul.c \
340         libtommath/bn_s_mp_karatsuba_sqr.c \
341         libtommath/bn_s_mp_montgomery_reduce_fast.c \
342         libtommath/bn_s_mp_mul_digs.c \
343         libtommath/bn_s_mp_mul_digs_fast.c \
344         libtommath/bn_s_mp_mul_high_digs.c \
345         libtommath/bn_s_mp_mul_high_digs_fast.c \
346         libtommath/bn_s_mp_prime_is_divisible.c \
347         libtommath/bn_s_mp_rand_jenkins.c \
348         libtommath/bn_s_mp_rand_platform.c \
349         libtommath/bn_s_mp_reverse.c \
350         libtommath/bn_s_mp_sqr.c \
351         libtommath/bn_s_mp_sqr_fast.c \
352         libtommath/bn_s_mp_sub.c \
353         libtommath/bn_s_mp_toom_mul.c \
354         libtommath/bn_s_mp_toom_sqr.c \
355         libtommath/tommath_private.h \
356         libtommath/tommath_cutoffs.h \
357         libtommath/tommath_superclass.h \
358         libtommath/tommath_class.h \
359         libtommath/tommath.h
361 x25519sources = \
362         x25519/ed25519_ref10.c \
363         x25519/x25519_ref10.c
365 $(libhcrypto_la_OBJECTS) $(test_rand_OBJECTS): hcrypto-link
367 libhcrypto_la_CPPFLAGS = -DBUILD_HCRYPTO_LIB $(AM_CPPFLAGS)
369 if versionscript
370 libhcrypto_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
371 endif
372 $(libhcrypto_la_OBJECTS): $(srcdir)/version-script.map
375 hcrypto-link:
376         $(LN_S) $(srcdir)/../hcrypto hcrypto
377         touch hcrypto-link
379 do_subst = sed -e 's,[@]srcdir[@],$(srcdir),g' -e 's,[@]exeext[@],$(exeext),g'
381 test_crypto: test_crypto.in Makefile
382         $(do_subst) < $(srcdir)/test_crypto.in > test_crypto.tmp
383         chmod +x test_crypto.tmp
384         mv test_crypto.tmp test_crypto
386 CLEANFILES = \
387         crypto-test \
388         crypto-test2 \
389         error \
390         hcrypto \
391         hcrypto-link \
392         test.file \
393         test_crypto \
394         test-out* \
395         test_crypto.tmp \
396         test_crypto.tmp
398 EXTRA_DIST = \
399         NTMakefile \
400         DESperate.txt \
401         passwd_dialog.rc \
402         libhcrypto-exports.def \
403         dh-tfm.c \
404         ec.h \
405         ecdh.h \
406         ecdsa.h \
407         evp-crypt.c \
408         evp-w32.c \
409         evp-w32.h \
410         evp-wincng.c \
411         evp-wincng.h \
412         gen-des.pl \
413         md5crypt_test.c \
414         passwd_dialog.aps \
415         passwd_dialog.clw \
416         passwd_dialog.rc \
417         passwd_dialog.res \
418         passwd_dlg.c \
419         passwd_dlg.h \
420         rand-w32.c \
421         resource.h \
422         rsa-tfm.c \
423         rsakey.der \
424         rsakey2048.der \
425         rsakey4096.der \
426         test_crypto.in \
427         version-script.map