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 \
16 hcryptoincludedir = $(includedir)/hcrypto
17 buildhcryptoinclude = $(buildinclude)/hcrypto
19 hcryptoinclude_HEADERS = \
44 install-build-headers:: $(hcryptoinclude_HEADERS)
45 @foo='$(hcryptoinclude_HEADERS)'; \
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 \
52 echo "cp $$file $(buildhcryptoinclude)/$$f";\
53 cp $$file $(buildhcryptoinclude)/$$f; \
69 libhctest_la_SOURCES = \
76 destest_LDADD = libhctest.la $(LIB_roken)
81 noinst_PROGRAMS = test_rand
83 check_PROGRAMS = $(PROGRAM_TESTS) test_rsa test_dh example_evp_cipher
84 check_SCRIPTS = $(SCRIPT_TESTS)
86 TESTS = $(PROGRAM_TESTS) $(SCRIPT_TESTS)
88 LDADD = $(lib_LTLIBRARIES) $(LIB_roken)
90 libhcrypto_la_SOURCES = \
155 libtommath/tommath.h \
156 libtommath/tommath_class.h \
157 libtommath/tommath_superclass.h \
158 libtommath/bncore.c \
159 libtommath/bn_mp_init.c \
160 libtommath/bn_mp_clear.c \
161 libtommath/bn_mp_exch.c \
162 libtommath/bn_mp_grow.c \
163 libtommath/bn_mp_shrink.c \
164 libtommath/bn_mp_clamp.c \
165 libtommath/bn_mp_zero.c \
166 libtommath/bn_mp_zero_multi.c \
167 libtommath/bn_mp_set.c \
168 libtommath/bn_mp_set_int.c \
169 libtommath/bn_mp_init_size.c \
170 libtommath/bn_mp_copy.c \
171 libtommath/bn_mp_init_copy.c \
172 libtommath/bn_mp_abs.c \
173 libtommath/bn_mp_neg.c \
174 libtommath/bn_mp_cmp_mag.c \
175 libtommath/bn_mp_cmp.c \
176 libtommath/bn_mp_cmp_d.c \
177 libtommath/bn_mp_rshd.c \
178 libtommath/bn_mp_lshd.c \
179 libtommath/bn_mp_mod_2d.c \
180 libtommath/bn_mp_div_2d.c \
181 libtommath/bn_mp_mul_2d.c \
182 libtommath/bn_mp_div_2.c \
183 libtommath/bn_mp_mul_2.c \
184 libtommath/bn_s_mp_add.c \
185 libtommath/bn_s_mp_sub.c \
186 libtommath/bn_fast_s_mp_mul_digs.c \
187 libtommath/bn_s_mp_mul_digs.c \
188 libtommath/bn_fast_s_mp_mul_high_digs.c \
189 libtommath/bn_s_mp_mul_high_digs.c \
190 libtommath/bn_fast_s_mp_sqr.c \
191 libtommath/bn_s_mp_sqr.c \
192 libtommath/bn_mp_add.c \
193 libtommath/bn_mp_sub.c \
194 libtommath/bn_mp_karatsuba_mul.c \
195 libtommath/bn_mp_mul.c \
196 libtommath/bn_mp_karatsuba_sqr.c \
197 libtommath/bn_mp_sqr.c \
198 libtommath/bn_mp_div.c \
199 libtommath/bn_mp_mod.c \
200 libtommath/bn_mp_add_d.c \
201 libtommath/bn_mp_sub_d.c \
202 libtommath/bn_mp_mul_d.c \
203 libtommath/bn_mp_div_d.c \
204 libtommath/bn_mp_mod_d.c \
205 libtommath/bn_mp_expt_d.c \
206 libtommath/bn_mp_addmod.c \
207 libtommath/bn_mp_submod.c \
208 libtommath/bn_mp_mulmod.c \
209 libtommath/bn_mp_sqrmod.c \
210 libtommath/bn_mp_gcd.c \
211 libtommath/bn_mp_lcm.c \
212 libtommath/bn_fast_mp_invmod.c \
213 libtommath/bn_mp_invmod.c \
214 libtommath/bn_mp_reduce.c \
215 libtommath/bn_mp_montgomery_setup.c \
216 libtommath/bn_fast_mp_montgomery_reduce.c \
217 libtommath/bn_mp_montgomery_reduce.c \
218 libtommath/bn_mp_exptmod_fast.c \
219 libtommath/bn_mp_exptmod.c \
220 libtommath/bn_mp_2expt.c \
221 libtommath/bn_mp_n_root.c \
222 libtommath/bn_mp_jacobi.c \
223 libtommath/bn_reverse.c \
224 libtommath/bn_mp_count_bits.c \
225 libtommath/bn_mp_read_unsigned_bin.c \
226 libtommath/bn_mp_read_signed_bin.c \
227 libtommath/bn_mp_to_unsigned_bin.c \
228 libtommath/bn_mp_to_signed_bin.c \
229 libtommath/bn_mp_unsigned_bin_size.c \
230 libtommath/bn_mp_signed_bin_size.c \
231 libtommath/bn_mp_xor.c \
232 libtommath/bn_mp_and.c \
233 libtommath/bn_mp_or.c \
234 libtommath/bn_mp_rand.c \
235 libtommath/bn_mp_montgomery_calc_normalization.c \
236 libtommath/bn_mp_prime_is_divisible.c \
237 libtommath/bn_prime_tab.c \
238 libtommath/bn_mp_prime_fermat.c \
239 libtommath/bn_mp_prime_miller_rabin.c \
240 libtommath/bn_mp_prime_is_prime.c \
241 libtommath/bn_mp_prime_next_prime.c \
242 libtommath/bn_mp_find_prime.c \
243 libtommath/bn_mp_isprime.c \
244 libtommath/bn_mp_dr_reduce.c \
245 libtommath/bn_mp_dr_is_modulus.c \
246 libtommath/bn_mp_dr_setup.c \
247 libtommath/bn_mp_reduce_setup.c \
248 libtommath/bn_mp_toom_mul.c \
249 libtommath/bn_mp_toom_sqr.c \
250 libtommath/bn_mp_div_3.c \
251 libtommath/bn_s_mp_exptmod.c \
252 libtommath/bn_mp_reduce_2k.c \
253 libtommath/bn_mp_reduce_is_2k.c \
254 libtommath/bn_mp_reduce_2k_setup.c \
255 libtommath/bn_mp_reduce_2k_l.c \
256 libtommath/bn_mp_reduce_is_2k_l.c \
257 libtommath/bn_mp_reduce_2k_setup_l.c \
258 libtommath/bn_mp_radix_smap.c \
259 libtommath/bn_mp_read_radix.c \
260 libtommath/bn_mp_toradix.c \
261 libtommath/bn_mp_radix_size.c \
262 libtommath/bn_mp_fread.c \
263 libtommath/bn_mp_fwrite.c \
264 libtommath/bn_mp_cnt_lsb.c \
265 libtommath/bn_error.c \
266 libtommath/bn_mp_init_multi.c \
267 libtommath/bn_mp_clear_multi.c \
268 libtommath/bn_mp_exteuclid.c \
269 libtommath/bn_mp_toradix_n.c \
270 libtommath/bn_mp_prime_random_ex.c \
271 libtommath/bn_mp_get_int.c \
272 libtommath/bn_mp_sqrt.c \
273 libtommath/bn_mp_is_square.c \
274 libtommath/bn_mp_init_set.c \
275 libtommath/bn_mp_init_set_int.c \
276 libtommath/bn_mp_invmod_slow.c \
277 libtommath/bn_mp_prime_rabin_miller_trials.c \
278 libtommath/bn_mp_to_signed_bin_n.c \
279 libtommath/bn_mp_to_unsigned_bin_n.c
282 $(libhcrypto_la_OBJECTS): hcrypto-link
284 libhcrypto_la_CPPFLAGS = -DBUILD_HCRYPTO_LIB $(AM_CPPFLAGS)
287 libhcrypto_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
289 $(libhcrypto_la_OBJECTS): $(srcdir)/version-script.map
293 $(LN_S) $(srcdir)/../hcrypto hcrypto
296 do_subst = sed -e 's,[@]srcdir[@],$(srcdir),g' -e 's,[@]exeext[@],$(exeext),g'
298 test_crypto: test_crypto.in Makefile
299 $(do_subst) < $(srcdir)/test_crypto.in > test_crypto.tmp
300 chmod +x test_crypto.tmp
301 mv test_crypto.tmp test_crypto
319 libhcrypto-exports.def \