3 include $(top_srcdir)/Makefile.am.common
5 AUTOMAKE_OPTIONS = subdir-objects
7 if HAVE_HCRYPTO_W_OPENSSL
8 AM_CPPFLAGS += $(INCLUDE_openssl_crypto)
11 AM_CPPFLAGS += -I$(top_srcdir)/lib/hx509 \
12 -I$(srcdir)/libtommath -DUSE_HCRYPTO_LTM=1 \
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 \
31 if HAVE_HCRYPTO_W_OPENSSL
32 libhcrypto_la_LIBADD += $(LIB_openssl_crypto)
35 hcryptoincludedir = $(includedir)/hcrypto
36 buildhcryptoinclude = $(buildinclude)/hcrypto
38 hcryptoinclude_HEADERS = \
66 install-build-headers:: $(hcryptoinclude_HEADERS) $(x25519include_HEADERS)
67 @foo='$(hcryptoinclude_HEADERS)'; \
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 \
74 echo "cp $$file $(buildhcryptoinclude)/$$f";\
75 cp $$file $(buildhcryptoinclude)/$$f; \
92 libhctest_la_SOURCES = \
99 destest_LDADD = libhctest.la $(LIB_roken)
104 noinst_PROGRAMS = test_rand
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 \
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 = \
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 \
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)
370 libhcrypto_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
372 $(libhcrypto_la_OBJECTS): $(srcdir)/version-script.map
376 $(LN_S) $(srcdir)/../hcrypto hcrypto
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
402 libhcrypto-exports.def \