1# $FreeBSD$ 2 3.include "Makefile.inc" 4 5.PATH: ${LCRYPTO_SRC} ${LCRYPTO_SRC}/asn1 ${LCRYPTO_SRC}/bf \ 6 ${LCRYPTO_SRC}/bio ${LCRYPTO_SRC}/bn ${LCRYPTO_SRC}/buffer \ 7 ${LCRYPTO_SRC}/cast ${LCRYPTO_SRC}/comp ${LCRYPTO_SRC}/conf \ 8 ${LCRYPTO_SRC}/des ${LCRYPTO_SRC}/dh ${LCRYPTO_SRC}/dsa \ 9 ${LCRYPTO_SRC}/err ${LCRYPTO_SRC}/evp ${LCRYPTO_SRC}/hmac \ 10 ${LCRYPTO_SRC}/lhash ${LCRYPTO_SRC}/md2 ${LCRYPTO_SRC}/md5 \ 11 ${LCRYPTO_SRC}/mdc2 ${LCRYPTO_SRC}/objects ${LCRYPTO_SRC}/pem \ 12 ${LCRYPTO_SRC}/pkcs7 ${LCRYPTO_SRC}/pkcs12 ${LCRYPTO_SRC}/rand \ 13 ${LCRYPTO_SRC}/rc2 ${LCRYPTO_SRC}/rc4 ${LCRYPTO_SRC}/rc5 \ 14 ${LCRYPTO_SRC}/ripemd ${LCRYPTO_SRC}/rsa ${LCRYPTO_SRC}/../rsaref \ 15 ${LCRYPTO_SRC}/sha ${LCRYPTO_SRC}/stack ${LCRYPTO_SRC}/txt_db \ 16 ${LCRYPTO_SRC}/x509 ${LCRYPTO_SRC}/x509v3 17 18.if defined(MAKE_IDEA) && ${MAKE_IDEA} == YES 19.PATH: ${LCRYPTO_SRC}/idea 20.endif 21 22LIB= crypto 23SHLIB_MAJOR= 1 24 25MAINTAINER= kris 26 27# base sources 28SRCS+= cpt_err.c cryptlib.c cversion.c ebcdic.c ex_data.c mem.c mem_dbg.c \ 29 tmdiff.c 30 31# asn1 32SRCS+= a_bitstr.c a_bmp.c a_bool.c a_bytes.c a_d2i_fp.c a_digest.c \ 33 a_dup.c a_enum.c a_gentm.c a_hdr.c a_i2d_fp.c a_int.c a_mbstr.c \ 34 a_meth.c a_null.c a_object.c a_octet.c a_print.c a_set.c a_sign.c \ 35 a_strnid.c a_time.c a_type.c a_utctm.c a_utf8.c a_verify.c a_vis.c \ 36 asn1_err.c asn1_lib.c asn1_par.c asn_pack.c d2i_dhp.c d2i_dsap.c \ 37 d2i_pr.c d2i_pu.c d2i_r_pr.c d2i_r_pu.c d2i_s_pr.c d2i_s_pu.c \ 38 evp_asn1.c f_enum.c f_int.c f_string.c i2d_dhp.c i2d_dsap.c i2d_pr.c \ 39 i2d_pu.c i2d_r_pr.c i2d_r_pu.c i2d_s_pr.c i2d_s_pu.c n_pkey.c nsseq.c \ 40 p5_pbe.c p5_pbev2.c p7_dgst.c p7_enc.c p7_enc_c.c p7_evp.c p7_i_s.c \ 41 p7_lib.c p7_recip.c p7_s_e.c p7_signd.c p7_signi.c p8_pkey.c \ 42 t_bitst.c t_crl.c t_pkey.c t_req.c t_spki.c t_x509.c t_x509a.c \ 43 x_algor.c x_attrib.c x_cinf.c x_crl.c x_exten.c x_info.c x_name.c \ 44 x_pkey.c x_pubkey.c x_req.c x_sig.c x_spki.c x_val.c x_x509.c \ 45 x_x509a.c \ 46 47# blowfish 48SRCS+= bf_cfb64.c bf_ecb.c bf_enc.c bf_ofb64.c bf_skey.c 49 50# bio 51SRCS+= b_dump.c b_print.c b_sock.c bf_buff.c bf_nbio.c bf_null.c \ 52 bio_cb.c bio_err.c bio_lib.c bss_acpt.c bss_bio.c bss_conn.c \ 53 bss_fd.c bss_file.c bss_log.c bss_mem.c bss_null.c bss_sock.c 54 55# bn 56SRCS+= bn_add.c bn_asm.c bn_blind.c bn_ctx.c bn_div.c bn_err.c bn_exp.c \ 57 bn_exp2.c bn_gcd.c bn_lib.c bn_mont.c bn_mpi.c bn_mul.c bn_prime.c \ 58 bn_print.c bn_rand.c bn_recp.c bn_shift.c bn_sqr.c bn_word.c 59 60# buffer 61SRCS+= buf_err.c buffer.c 62 63# cast 64SRCS+= c_cfb64.c c_ecb.c c_enc.c c_ofb64.c c_skey.c 65 66# comp 67SRCS+= c_rle.c c_zlib.c comp_lib.c 68 69# conf 70SRCS+= conf.c conf_err.c 71 72# des 73SRCS+= cbc_cksm.c cbc_enc.c cfb64ede.c cfb64enc.c cfb_enc.c des_enc.c \ 74 ecb3_enc.c ecb_enc.c ede_cbcm_enc.c enc_read.c enc_writ.c fcrypt.c \ 75 fcrypt_b.c ofb64ede.c ofb64enc.c ofb_enc.c pcbc_enc.c qud_cksm.c \ 76 rand_key.c read2pwd.c read_pwd.c rnd_keys.c rpc_enc.c set_key.c \ 77 str2key.c supp.c xcbc_enc.c 78 79# dh 80SRCS+= dh_check.c dh_err.c dh_gen.c dh_key.c dh_lib.c 81 82# dsa 83SRCS+= dsa_asn1.c dsa_err.c dsa_gen.c dsa_key.c dsa_lib.c dsa_ossl.c \ 84 dsa_sign.c dsa_vrf.c 85 86# err 87SRCS+= err.c err_all.c err_prn.c 88 89# evp 90SRCS+= bio_b64.c bio_enc.c bio_md.c bio_ok.c c_all.c c_allc.c c_alld.c \ 91 digest.c e_cbc_3d.c e_cbc_bf.c e_cbc_c.c e_cbc_d.c e_cbc_i.c \ 92 e_cbc_r2.c e_cbc_r5.c e_cfb_3d.c e_cfb_bf.c e_cfb_c.c e_cfb_d.c \ 93 e_cfb_i.c e_cfb_r2.c e_cfb_r5.c e_ecb_3d.c e_ecb_bf.c e_ecb_c.c \ 94 e_ecb_d.c e_ecb_i.c e_ecb_r2.c e_ecb_r5.c e_null.c e_ofb_3d.c \ 95 e_ofb_bf.c e_ofb_c.c e_ofb_d.c e_ofb_i.c e_ofb_r2.c e_ofb_r5.c \ 96 e_rc4.c e_xcbc_d.c encode.c evp_enc.c evp_err.c evp_key.c \ 97 evp_lib.c evp_pbe.c evp_pkey.c m_dss.c m_dss1.c m_md2.c m_md5.c \ 98 m_mdc2.c m_null.c m_ripemd.c m_sha.c m_sha1.c names.c p5_crpt.c \ 99 p5_crpt2.c p_dec.c p_enc.c p_lib.c p_open.c p_seal.c p_sign.c \ 100 p_verify.c 101 102# hmac 103SRCS+= hmac.c 104 105# idea 106.if defined(MAKE_IDEA) && ${MAKE_IDEA} == YES 107SRCS+= i_ecb.c i_cbc.c i_cfb64.c i_ofb64.c i_skey.c 108.endif 109 110# lhash 111SRCS+= lh_stats.c lhash.c 112 113# md2 114SRCS+= md2_dgst.c md2_one.c 115 116# md5 117SRCS+= md5_dgst.c md5_one.c 118 119# mdc2 120SRCS+= mdc2dgst.c mdc2_one.c 121 122# objects 123SRCS+= o_names.c obj_dat.c obj_err.c obj_lib.c 124 125# pem 126SRCS+= pem_all.c pem_err.c pem_info.c pem_lib.c pem_seal.c pem_sign.c 127 128# pkcs7 129SRCS+= pk7_attr.c pk7_doit.c pk7_lib.c pk7_mime.c pk7_smime.c pkcs7err.c 130 131# pkcs12 132SRCS+= p12_add.c p12_attr.c p12_bags.c p12_crpt.c p12_crt.c p12_decr.c \ 133 p12_init.c p12_key.c p12_kiss.c p12_lib.c p12_mac.c p12_mutl.c \ 134 p12_npas.c p12_sbag.c p12_utl.c pk12err.c 135 136# rand 137SRCS+= md_rand.c rand_egd.c rand_err.c rand_lib.c randfile.c 138 139# rc2 140SRCS+= rc2_cbc.c rc2cfb64.c rc2_ecb.c rc2ofb64.c rc2_skey.c 141 142# rc4 143SRCS+= rc4_enc.c rc4_skey.c 144 145# rc5 146SRCS+= rc5cfb64.c rc5_ecb.c rc5_enc.c rc5ofb64.c rc5_skey.c 147 148# ripemd 149SRCS+= rmd_dgst.c rmd_one.c 150 151# rsa 152.if defined(WITH_RSA) && ${WITH_RSA} == YES 153SRCS+= rsa_chk.c rsa_err.c rsa_gen.c rsa_lib.c rsa_none.c rsa_null.c \ 154 rsa_oaep.c rsa_pk1.c rsa_saos.c rsa_sign.c rsa_ssl.c rsa_stubs.c 155.endif 156 157# sha 158SRCS+= sha_dgst.c sha_one.c sha1_one.c sha1dgst.c 159 160# stack 161SRCS+= stack.c 162 163# txt_db 164SRCS+= txt_db.c 165 166# x509 167SRCS+= by_dir.c by_file.c x509_att.c x509_cmp.c x509_d2.c x509_def.c \ 168 x509_err.c x509_ext.c x509_lu.c x509_obj.c x509_r2x.c x509_req.c \ 169 x509_set.c x509_trs.c x509_txt.c x509_v3.c x509_vfy.c x509name.c \ 170 x509rset.c x509spki.c x509type.c x_all.c 171 172# x509v3 173SRCS+= v3_akey.c v3_alt.c v3_bcons.c v3_bitst.c v3_conf.c v3_cpols.c \ 174 v3_crld.c v3_enum.c v3_extku.c v3_genn.c v3_ia5.c v3_info.c v3_int.c \ 175 v3_lib.c v3_pku.c v3_prn.c v3_purp.c v3_skey.c v3_sxnet.c v3_utl.c \ 176 v3err.c 177 178HDRS= asn1/asn1.h asn1/asn1_mac.h bio/bio.h bf/blowfish.h bn/bn.h \ 179 buffer/buffer.h cast/cast.h comp/comp.h conf/conf.h crypto.h \ 180 des/des.h dh/dh.h dsa/dsa.h ../e_os.h ../e_os2.h ebcdic.h \ 181 err/err.h evp/evp.h hmac/hmac.h lhash/lhash.h md2/md2.h \ 182 md5/md5.h mdc2/mdc2.h objects/objects.h opensslv.h pem/pem.h \ 183 pem/pem2.h pkcs12/pkcs12.h pkcs7/pkcs7.h rand/rand.h rc2/rc2.h \ 184 rc4/rc4.h rc5/rc5.h ripemd/ripemd.h rsa/rsa.h stack/safestack.h \ 185 sha/sha.h stack/stack.h tmdiff.h txt_db/txt_db.h x509/x509.h \ 186 x509/x509_vfy.h x509v3/x509v3.h 187 188.if defined(MAKE_IDEA) && ${MAKE_IDEA} == YES 189HDRS+= idea/idea.h 190.endif 191 192 193.for h in ${HDRS} 194CRYPTO_HDRS+= ${LCRYPTO_SRC}/${h} 195.endfor 196 197POD1+= apps/CA.pl.pod apps/asn1parse.pod apps/ca.pod apps/ciphers.pod \ 198 apps/config.pod apps/crl.pod apps/crl2pkcs7.pod apps/dgst.pod \ 199 apps/dhparam.pod apps/dsa.pod apps/dsaparam.pod apps/enc.pod \ 200 apps/gendsa.pod apps/genrsa.pod apps/nseq.pod apps/openssl.pod \ 201 apps/passwd.pod apps/pkcs12.pod apps/pkcs7.pod apps/pkcs8.pod \ 202 apps/req.pod apps/rsa.pod apps/s_client.pod apps/s_server.pod \ 203 apps/sess_id.pod apps/smime.pod apps/speed.pod apps/spkac.pod \ 204 apps/verify.pod apps/version.pod apps/x509.pod 205 206POD3+= crypto/BN_CTX_new.pod crypto/BN_CTX_start.pod crypto/BN_add.pod \ 207 crypto/BN_add_word.pod crypto/BN_bn2bin.pod crypto/BN_cmp.pod \ 208 crypto/BN_copy.pod crypto/BN_generate_prime.pod \ 209 crypto/BN_mod_inverse.pod crypto/BN_mod_mul_montgomery.pod \ 210 crypto/BN_mod_mul_reciprocal.pod crypto/BN_new.pod \ 211 crypto/BN_num_bytes.pod crypto/BN_rand.pod crypto/BN_set_bit.pod \ 212 crypto/BN_zero.pod crypto/CRYPTO_set_ex_data.pod \ 213 crypto/DH_generate_key.pod crypto/DH_generate_parameters.pod \ 214 crypto/DH_get_ex_new_index.pod crypto/DH_new.pod \ 215 crypto/DH_set_method.pod crypto/DH_size.pod crypto/DSA_SIG_new.pod \ 216 crypto/DSA_do_sign.pod crypto/DSA_dup_DH.pod \ 217 crypto/DSA_generate_key.pod crypto/DSA_generate_parameters.pod \ 218 crypto/DSA_get_ex_new_index.pod crypto/DSA_new.pod \ 219 crypto/DSA_set_method.pod crypto/DSA_sign.pod crypto/DSA_size.pod \ 220 crypto/ERR_GET_LIB.pod crypto/ERR_clear_error.pod \ 221 crypto/ERR_error_string.pod crypto/ERR_get_error.pod \ 222 crypto/ERR_load_crypto_strings.pod crypto/ERR_load_strings.pod \ 223 crypto/ERR_print_errors.pod crypto/ERR_put_error.pod \ 224 crypto/ERR_remove_state.pod crypto/EVP_DigestInit.pod \ 225 crypto/EVP_EncryptInit.pod crypto/OPENSSL_VERSION_NUMBER.pod \ 226 crypto/OpenSSL_add_all_algorithms.pod crypto/RAND_add.pod \ 227 crypto/RAND_bytes.pod crypto/RAND_cleanup.pod crypto/RAND_egd.pod \ 228 crypto/RAND_load_file.pod crypto/RAND_set_rand_method.pod \ 229 crypto/RSA_blinding_on.pod crypto/RSA_check_key.pod \ 230 crypto/RSA_generate_key.pod crypto/RSA_get_ex_new_index.pod \ 231 crypto/RSA_new.pod crypto/RSA_padding_add_PKCS1_type_1.pod \ 232 crypto/RSA_print.pod crypto/RSA_private_encrypt.pod \ 233 crypto/RSA_public_encrypt.pod crypto/RSA_set_method.pod \ 234 crypto/RSA_sign.pod crypto/RSA_sign_ASN1_OCTET_STRING.pod \ 235 crypto/RSA_size.pod crypto/blowfish.pod crypto/bn.pod \ 236 crypto/bn_internal.pod crypto/buffer.pod crypto/crypto.pod \ 237 crypto/d2i_DHparams.pod crypto/d2i_RSAPublicKey.pod \ 238 crypto/des_modes.pod crypto/dh.pod crypto/dsa.pod crypto/err.pod \ 239 crypto/hmac.pod crypto/lh_stats.pod crypto/lhash.pod crypto/md5.pod \ 240 crypto/mdc2.pod crypto/rand.pod crypto/rc4.pod crypto/ripemd.pod \ 241 crypto/rsa.pod crypto/sha.pod crypto/threads.pod 242 243POD3+= ssl/SSL_get_error.pod ssl/ssl.pod 244 245#.for section in 1 3 246#.for pod in ${POD${section}} 247#.for target in ${pod:T:S/.pod/.${section}/g} 248#MAN${section}+= ${target} 249#CLEANFILES+= ${target} 250#all-man: ${target} 251#${target}: ${LCRYPTO_SRC}/../doc/${pod} 252# pod2man ${LCRYPTO_SRC}/../doc/${pod} > ${target} 253#.endfor 254#.endfor 255#.endfor 256 257MAN3= des_crypt.3 258 259MLINKS= des_crypt.3 des_read_password.3 \ 260 des_crypt.3 des_read_2password.3 des_crypt.3 des_string_to_key.3 \ 261 des_crypt.3 des_string_to_2key.3 des_crypt.3 des_read_pw_string.3 \ 262 des_crypt.3 des_random_key.3 des_crypt.3 des_set_key.3 \ 263 des_crypt.3 des_key_sched.3 des_crypt.3 des_ecb_encrypt.3 \ 264 des_crypt.3 des_3ecb_encrypt.3 des_crypt.3 des_cbc_encrypt.3 \ 265 des_crypt.3 des_3cbc_encrypt.3 des_crypt.3 des_pcbc_encrypt.3 \ 266 des_crypt.3 des_cfb_encrypt.3 des_crypt.3 des_ofb_encrypt.3 \ 267 des_crypt.3 des_cbc_cksum.3 des_crypt.3 des_quad_cksum.3 \ 268 des_crypt.3 des_enc_read.3 des_crypt.3 des_enc_write.3 \ 269 des_crypt.3 des_set_odd_parity.3 des_crypt.3 des_is_weak_key.3 270 271beforeinstall: openssl/opensslconf.h 272 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \ 273 ${CRYPTO_HDRS} openssl/opensslconf.h \ 274 ${DESTDIR}/usr/include/openssl 275 276.include <bsd.lib.mk> 277 278afterinstall: 279.if !defined(NOPIC) 280 @cd ${DESTDIR}${SHLIBDIR}; \ 281 rm -f libdes.so.3; \ 282 ln -sf lib${LIB}.so.${SHLIB_MAJOR} libdes.so.3; 283.endif 284.if !defined(NOPIC) && ${OBJFORMAT} == elf 285 @cd ${DESTDIR}${SHLIBDIR}; \ 286 rm -f libdes.so; \ 287 ln -sf lib${LIB}.so libdes.so 288.endif 289 @cd ${DESTDIR}${LIBDIR}; \ 290 rm -f libdes.a; \ 291 ln -sf lib${LIB}.a libdes.a 292 @cd ${DESTDIR}${INCDIR}; \ 293 rm -f des.h; \ 294 ln -sf openssl/des.h 295.if !defined(NOPROFILE) 296 @cd ${DESTDIR}${LIBDIR}; \ 297 rm -f libdes_p.a; \ 298 ln -sf lib${LIB}_p.a libdes_p.a 299.endif 300