Home | History | Annotate | Download | only in patches
      1 LOCAL_PATH:= $(call my-dir)
      2 
      3 arm_cflags := -DOPENSSL_BN_ASM_MONT -DAES_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM
      4 arm_src_files := \
      5     aes/asm/aes-armv4.s \
      6     bn/asm/armv4-mont.s \
      7     sha/asm/sha1-armv4-large.s \
      8     sha/asm/sha256-armv4.s \
      9     sha/asm/sha512-armv4.s
     10 non_arm_src_files := aes/aes_core.c
     11 
     12 local_src_files := \
     13 	cryptlib.c \
     14 	mem.c \
     15 	mem_clr.c \
     16 	mem_dbg.c \
     17 	cversion.c \
     18 	ex_data.c \
     19 	cpt_err.c \
     20 	ebcdic.c \
     21 	uid.c \
     22 	o_time.c \
     23 	o_str.c \
     24 	o_dir.c \
     25 	aes/aes_cbc.c \
     26 	aes/aes_cfb.c \
     27 	aes/aes_ctr.c \
     28 	aes/aes_ecb.c \
     29 	aes/aes_misc.c \
     30 	aes/aes_ofb.c \
     31 	aes/aes_wrap.c \
     32 	asn1/a_bitstr.c \
     33 	asn1/a_bool.c \
     34 	asn1/a_bytes.c \
     35 	asn1/a_d2i_fp.c \
     36 	asn1/a_digest.c \
     37 	asn1/a_dup.c \
     38 	asn1/a_enum.c \
     39 	asn1/a_gentm.c \
     40 	asn1/a_i2d_fp.c \
     41 	asn1/a_int.c \
     42 	asn1/a_mbstr.c \
     43 	asn1/a_object.c \
     44 	asn1/a_octet.c \
     45 	asn1/a_print.c \
     46 	asn1/a_set.c \
     47 	asn1/a_sign.c \
     48 	asn1/a_strex.c \
     49 	asn1/a_strnid.c \
     50 	asn1/a_time.c \
     51 	asn1/a_type.c \
     52 	asn1/a_utctm.c \
     53 	asn1/a_utf8.c \
     54 	asn1/a_verify.c \
     55 	asn1/ameth_lib.c \
     56 	asn1/asn1_err.c \
     57 	asn1/asn1_gen.c \
     58 	asn1/asn1_lib.c \
     59 	asn1/asn1_par.c \
     60 	asn1/asn_mime.c \
     61 	asn1/asn_moid.c \
     62 	asn1/asn_pack.c \
     63 	asn1/bio_asn1.c \
     64 	asn1/bio_ndef.c \
     65 	asn1/d2i_pr.c \
     66 	asn1/d2i_pu.c \
     67 	asn1/evp_asn1.c \
     68 	asn1/f_enum.c \
     69 	asn1/f_int.c \
     70 	asn1/f_string.c \
     71 	asn1/i2d_pr.c \
     72 	asn1/i2d_pu.c \
     73 	asn1/n_pkey.c \
     74 	asn1/nsseq.c \
     75 	asn1/p5_pbe.c \
     76 	asn1/p5_pbev2.c \
     77 	asn1/p8_pkey.c \
     78 	asn1/t_bitst.c \
     79 	asn1/t_crl.c \
     80 	asn1/t_pkey.c \
     81 	asn1/t_req.c \
     82 	asn1/t_spki.c \
     83 	asn1/t_x509.c \
     84 	asn1/t_x509a.c \
     85 	asn1/tasn_dec.c \
     86 	asn1/tasn_enc.c \
     87 	asn1/tasn_fre.c \
     88 	asn1/tasn_new.c \
     89 	asn1/tasn_prn.c \
     90 	asn1/tasn_typ.c \
     91 	asn1/tasn_utl.c \
     92 	asn1/x_algor.c \
     93 	asn1/x_attrib.c \
     94 	asn1/x_bignum.c \
     95 	asn1/x_crl.c \
     96 	asn1/x_exten.c \
     97 	asn1/x_info.c \
     98 	asn1/x_long.c \
     99 	asn1/x_name.c \
    100 	asn1/x_nx509.c \
    101 	asn1/x_pkey.c \
    102 	asn1/x_pubkey.c \
    103 	asn1/x_req.c \
    104 	asn1/x_sig.c \
    105 	asn1/x_spki.c \
    106 	asn1/x_val.c \
    107 	asn1/x_x509.c \
    108 	asn1/x_x509a.c \
    109 	bf/bf_cfb64.c \
    110 	bf/bf_ecb.c \
    111 	bf/bf_enc.c \
    112 	bf/bf_ofb64.c \
    113 	bf/bf_skey.c \
    114 	bio/b_dump.c \
    115 	bio/b_print.c \
    116 	bio/b_sock.c \
    117 	bio/bf_buff.c \
    118 	bio/bf_nbio.c \
    119 	bio/bf_null.c \
    120 	bio/bio_cb.c \
    121 	bio/bio_err.c \
    122 	bio/bio_lib.c \
    123 	bio/bss_acpt.c \
    124 	bio/bss_bio.c \
    125 	bio/bss_conn.c \
    126 	bio/bss_dgram.c \
    127 	bio/bss_fd.c \
    128 	bio/bss_file.c \
    129 	bio/bss_log.c \
    130 	bio/bss_mem.c \
    131 	bio/bss_null.c \
    132 	bio/bss_sock.c \
    133 	bn/bn_add.c \
    134 	bn/bn_asm.c \
    135 	bn/bn_blind.c \
    136 	bn/bn_const.c \
    137 	bn/bn_ctx.c \
    138 	bn/bn_div.c \
    139 	bn/bn_err.c \
    140 	bn/bn_exp.c \
    141 	bn/bn_exp2.c \
    142 	bn/bn_gcd.c \
    143 	bn/bn_gf2m.c \
    144 	bn/bn_kron.c \
    145 	bn/bn_lib.c \
    146 	bn/bn_mod.c \
    147 	bn/bn_mont.c \
    148 	bn/bn_mpi.c \
    149 	bn/bn_mul.c \
    150 	bn/bn_nist.c \
    151 	bn/bn_prime.c \
    152 	bn/bn_print.c \
    153 	bn/bn_rand.c \
    154 	bn/bn_recp.c \
    155 	bn/bn_shift.c \
    156 	bn/bn_sqr.c \
    157 	bn/bn_sqrt.c \
    158 	bn/bn_word.c \
    159 	buffer/buf_err.c \
    160 	buffer/buffer.c \
    161 	comp/c_rle.c \
    162 	comp/c_zlib.c \
    163 	comp/comp_err.c \
    164 	comp/comp_lib.c \
    165 	conf/conf_api.c \
    166 	conf/conf_def.c \
    167 	conf/conf_err.c \
    168 	conf/conf_lib.c \
    169 	conf/conf_mall.c \
    170 	conf/conf_mod.c \
    171 	conf/conf_sap.c \
    172 	des/cbc_cksm.c \
    173 	des/cbc_enc.c \
    174 	des/cfb64ede.c \
    175 	des/cfb64enc.c \
    176 	des/cfb_enc.c \
    177 	des/des_enc.c \
    178 	des/des_old.c \
    179 	des/des_old2.c \
    180 	des/ecb3_enc.c \
    181 	des/ecb_enc.c \
    182 	des/ede_cbcm_enc.c \
    183 	des/enc_read.c \
    184 	des/enc_writ.c \
    185 	des/fcrypt.c \
    186 	des/fcrypt_b.c \
    187 	des/ofb64ede.c \
    188 	des/ofb64enc.c \
    189 	des/ofb_enc.c \
    190 	des/pcbc_enc.c \
    191 	des/qud_cksm.c \
    192 	des/rand_key.c \
    193 	des/read2pwd.c \
    194 	des/rpc_enc.c \
    195 	des/set_key.c \
    196 	des/str2key.c \
    197 	des/xcbc_enc.c \
    198 	dh/dh_ameth.c \
    199 	dh/dh_asn1.c \
    200 	dh/dh_check.c \
    201 	dh/dh_depr.c \
    202 	dh/dh_err.c \
    203 	dh/dh_gen.c \
    204 	dh/dh_key.c \
    205 	dh/dh_lib.c \
    206 	dh/dh_pmeth.c \
    207 	dsa/dsa_ameth.c \
    208 	dsa/dsa_asn1.c \
    209 	dsa/dsa_depr.c \
    210 	dsa/dsa_err.c \
    211 	dsa/dsa_gen.c \
    212 	dsa/dsa_key.c \
    213 	dsa/dsa_lib.c \
    214 	dsa/dsa_ossl.c \
    215 	dsa/dsa_pmeth.c \
    216 	dsa/dsa_prn.c \
    217 	dsa/dsa_sign.c \
    218 	dsa/dsa_vrf.c \
    219 	dso/dso_dl.c \
    220 	dso/dso_dlfcn.c \
    221 	dso/dso_err.c \
    222 	dso/dso_lib.c \
    223 	dso/dso_null.c \
    224 	dso/dso_openssl.c \
    225 	ec/ec2_mult.c \
    226 	ec/ec2_smpl.c \
    227 	ec/ec_ameth.c \
    228 	ec/ec_asn1.c \
    229 	ec/ec_check.c \
    230 	ec/ec_curve.c \
    231 	ec/ec_cvt.c \
    232 	ec/ec_err.c \
    233 	ec/ec_key.c \
    234 	ec/ec_lib.c \
    235 	ec/ec_mult.c \
    236 	ec/ec_pmeth.c \
    237 	ec/ec_print.c \
    238 	ec/eck_prn.c \
    239 	ec/ecp_mont.c \
    240 	ec/ecp_nist.c \
    241 	ec/ecp_smpl.c \
    242 	ecdh/ech_err.c \
    243 	ecdh/ech_key.c \
    244 	ecdh/ech_lib.c \
    245 	ecdh/ech_ossl.c \
    246 	ecdsa/ecs_asn1.c \
    247 	ecdsa/ecs_err.c \
    248 	ecdsa/ecs_lib.c \
    249 	ecdsa/ecs_ossl.c \
    250 	ecdsa/ecs_sign.c \
    251 	ecdsa/ecs_vrf.c \
    252 	err/err.c \
    253 	err/err_all.c \
    254 	err/err_prn.c \
    255 	evp/bio_b64.c \
    256 	evp/bio_enc.c \
    257 	evp/bio_md.c \
    258 	evp/bio_ok.c \
    259 	evp/c_all.c \
    260 	evp/c_allc.c \
    261 	evp/c_alld.c \
    262 	evp/digest.c \
    263 	evp/e_aes.c \
    264 	evp/e_bf.c \
    265 	evp/e_des.c \
    266 	evp/e_des3.c \
    267 	evp/e_null.c \
    268 	evp/e_old.c \
    269 	evp/e_rc2.c \
    270 	evp/e_rc4.c \
    271 	evp/e_rc5.c \
    272 	evp/e_xcbc_d.c \
    273 	evp/encode.c \
    274 	evp/evp_acnf.c \
    275 	evp/evp_enc.c \
    276 	evp/evp_err.c \
    277 	evp/evp_key.c \
    278 	evp/evp_lib.c \
    279 	evp/evp_pbe.c \
    280 	evp/evp_pkey.c \
    281 	evp/m_dss.c \
    282 	evp/m_dss1.c \
    283 	evp/m_ecdsa.c \
    284 	evp/m_md4.c \
    285 	evp/m_md5.c \
    286 	evp/m_mdc2.c \
    287 	evp/m_null.c \
    288 	evp/m_ripemd.c \
    289 	evp/m_sha1.c \
    290 	evp/m_sigver.c \
    291 	evp/m_wp.c \
    292 	evp/names.c \
    293 	evp/p5_crpt.c \
    294 	evp/p5_crpt2.c \
    295 	evp/p_dec.c \
    296 	evp/p_enc.c \
    297 	evp/p_lib.c \
    298 	evp/p_open.c \
    299 	evp/p_seal.c \
    300 	evp/p_sign.c \
    301 	evp/p_verify.c \
    302 	evp/pmeth_fn.c \
    303 	evp/pmeth_gn.c \
    304 	evp/pmeth_lib.c \
    305 	hmac/hm_ameth.c \
    306 	hmac/hm_pmeth.c \
    307 	hmac/hmac.c \
    308 	krb5/krb5_asn.c \
    309 	lhash/lh_stats.c \
    310 	lhash/lhash.c \
    311 	md4/md4_dgst.c \
    312 	md4/md4_one.c \
    313 	md5/md5_dgst.c \
    314 	md5/md5_one.c \
    315 	modes/cbc128.c \
    316 	modes/cfb128.c \
    317 	modes/ctr128.c \
    318 	modes/ofb128.c \
    319 	objects/o_names.c \
    320 	objects/obj_dat.c \
    321 	objects/obj_err.c \
    322 	objects/obj_lib.c \
    323 	objects/obj_xref.c \
    324 	ocsp/ocsp_asn.c \
    325 	ocsp/ocsp_cl.c \
    326 	ocsp/ocsp_err.c \
    327 	ocsp/ocsp_ext.c \
    328 	ocsp/ocsp_ht.c \
    329 	ocsp/ocsp_lib.c \
    330 	ocsp/ocsp_prn.c \
    331 	ocsp/ocsp_srv.c \
    332 	ocsp/ocsp_vfy.c \
    333 	pem/pem_all.c \
    334 	pem/pem_err.c \
    335 	pem/pem_info.c \
    336 	pem/pem_lib.c \
    337 	pem/pem_oth.c \
    338 	pem/pem_pk8.c \
    339 	pem/pem_pkey.c \
    340 	pem/pem_seal.c \
    341 	pem/pem_sign.c \
    342 	pem/pem_x509.c \
    343 	pem/pem_xaux.c \
    344 	pem/pvkfmt.c \
    345 	pkcs12/p12_add.c \
    346 	pkcs12/p12_asn.c \
    347 	pkcs12/p12_attr.c \
    348 	pkcs12/p12_crpt.c \
    349 	pkcs12/p12_crt.c \
    350 	pkcs12/p12_decr.c \
    351 	pkcs12/p12_init.c \
    352 	pkcs12/p12_key.c \
    353 	pkcs12/p12_kiss.c \
    354 	pkcs12/p12_mutl.c \
    355 	pkcs12/p12_npas.c \
    356 	pkcs12/p12_p8d.c \
    357 	pkcs12/p12_p8e.c \
    358 	pkcs12/p12_utl.c \
    359 	pkcs12/pk12err.c \
    360 	pkcs7/pk7_asn1.c \
    361 	pkcs7/pk7_attr.c \
    362 	pkcs7/pk7_doit.c \
    363 	pkcs7/pk7_lib.c	\
    364 	pkcs7/pk7_mime.c \
    365 	pkcs7/pk7_smime.c \
    366 	pkcs7/pkcs7err.c \
    367 	rand/md_rand.c \
    368 	rand/rand_egd.c \
    369 	rand/rand_err.c \
    370 	rand/rand_lib.c \
    371 	rand/rand_unix.c \
    372 	rand/randfile.c \
    373 	rc2/rc2_cbc.c \
    374 	rc2/rc2_ecb.c \
    375 	rc2/rc2_skey.c \
    376 	rc2/rc2cfb64.c \
    377 	rc2/rc2ofb64.c \
    378 	rc4/rc4_enc.c \
    379 	rc4/rc4_skey.c \
    380 	ripemd/rmd_dgst.c \
    381 	ripemd/rmd_one.c \
    382 	rsa/rsa_ameth.c \
    383 	rsa/rsa_asn1.c \
    384 	rsa/rsa_chk.c \
    385 	rsa/rsa_eay.c \
    386 	rsa/rsa_err.c \
    387 	rsa/rsa_gen.c \
    388 	rsa/rsa_lib.c \
    389 	rsa/rsa_none.c \
    390 	rsa/rsa_null.c \
    391 	rsa/rsa_oaep.c \
    392 	rsa/rsa_pk1.c \
    393 	rsa/rsa_pmeth.c \
    394 	rsa/rsa_prn.c \
    395 	rsa/rsa_pss.c \
    396 	rsa/rsa_saos.c \
    397 	rsa/rsa_sign.c \
    398 	rsa/rsa_ssl.c \
    399 	rsa/rsa_x931.c \
    400 	sha/sha1_one.c \
    401 	sha/sha1dgst.c \
    402 	sha/sha256.c \
    403 	sha/sha512.c \
    404 	sha/sha_dgst.c \
    405 	stack/stack.c \
    406 	ts/ts_err.c \
    407 	txt_db/txt_db.c \
    408 	ui/ui_compat.c \
    409 	ui/ui_err.c \
    410 	ui/ui_lib.c \
    411 	ui/ui_openssl.c \
    412 	ui/ui_util.c \
    413 	x509/by_dir.c \
    414 	x509/by_file.c \
    415 	x509/x509_att.c \
    416 	x509/x509_cmp.c \
    417 	x509/x509_d2.c \
    418 	x509/x509_def.c \
    419 	x509/x509_err.c \
    420 	x509/x509_ext.c \
    421 	x509/x509_lu.c \
    422 	x509/x509_obj.c \
    423 	x509/x509_r2x.c \
    424 	x509/x509_req.c \
    425 	x509/x509_set.c \
    426 	x509/x509_trs.c \
    427 	x509/x509_txt.c \
    428 	x509/x509_v3.c \
    429 	x509/x509_vfy.c \
    430 	x509/x509_vpm.c \
    431 	x509/x509cset.c \
    432 	x509/x509name.c \
    433 	x509/x509rset.c \
    434 	x509/x509spki.c \
    435 	x509/x509type.c \
    436 	x509/x_all.c \
    437 	x509v3/pcy_cache.c \
    438 	x509v3/pcy_data.c \
    439 	x509v3/pcy_lib.c \
    440 	x509v3/pcy_map.c \
    441 	x509v3/pcy_node.c \
    442 	x509v3/pcy_tree.c \
    443 	x509v3/v3_akey.c \
    444 	x509v3/v3_akeya.c \
    445 	x509v3/v3_alt.c \
    446 	x509v3/v3_bcons.c \
    447 	x509v3/v3_bitst.c \
    448 	x509v3/v3_conf.c \
    449 	x509v3/v3_cpols.c \
    450 	x509v3/v3_crld.c \
    451 	x509v3/v3_enum.c \
    452 	x509v3/v3_extku.c \
    453 	x509v3/v3_genn.c \
    454 	x509v3/v3_ia5.c \
    455 	x509v3/v3_info.c \
    456 	x509v3/v3_int.c \
    457 	x509v3/v3_lib.c \
    458 	x509v3/v3_ncons.c \
    459 	x509v3/v3_ocsp.c \
    460 	x509v3/v3_pci.c \
    461 	x509v3/v3_pcia.c \
    462 	x509v3/v3_pcons.c \
    463 	x509v3/v3_pku.c \
    464 	x509v3/v3_pmaps.c \
    465 	x509v3/v3_prn.c \
    466 	x509v3/v3_purp.c \
    467 	x509v3/v3_skey.c \
    468 	x509v3/v3_sxnet.c \
    469 	x509v3/v3_utl.c \
    470 	x509v3/v3err.c
    471 
    472 local_c_includes := \
    473 	external/openssl \
    474 	external/openssl/crypto/asn1 \
    475 	external/openssl/crypto/evp \
    476 	external/openssl/include \
    477 	external/openssl/include/openssl \
    478 	external/zlib
    479 
    480 local_c_flags := -DNO_WINDOWS_BRAINDEATH
    481 
    482 #######################################
    483 # target static library
    484 include $(CLEAR_VARS)
    485 include $(LOCAL_PATH)/../android-config.mk
    486 
    487 ifneq ($(TARGET_ARCH),x86)
    488 LOCAL_NDK_VERSION := 5
    489 LOCAL_SDK_VERSION := 9
    490 endif
    491 
    492 LOCAL_SRC_FILES += $(local_src_files)
    493 LOCAL_CFLAGS += $(local_c_flags)
    494 LOCAL_C_INCLUDES += $(local_c_includes)
    495 ifeq ($(TARGET_ARCH),arm)
    496 	LOCAL_SRC_FILES += $(arm_src_files)
    497 	LOCAL_CFLAGS += $(arm_cflags)
    498 else
    499 	LOCAL_SRC_FILES += $(non_arm_src_files)
    500 endif
    501 LOCAL_MODULE_TAGS := optional
    502 LOCAL_MODULE:= libcrypto_static
    503 include $(BUILD_STATIC_LIBRARY)
    504 
    505 #######################################
    506 # target shared library
    507 include $(CLEAR_VARS)
    508 include $(LOCAL_PATH)/../android-config.mk
    509 
    510 ifneq ($(TARGET_ARCH),x86)
    511 LOCAL_NDK_VERSION := 5
    512 LOCAL_SDK_VERSION := 9
    513 # Use the NDK prebuilt libz and libdl.
    514 LOCAL_LDFLAGS += -lz -ldl
    515 else
    516 LOCAL_SHARED_LIBRARIES += libz libdl
    517 endif
    518 
    519 LOCAL_SRC_FILES += $(local_src_files)
    520 LOCAL_CFLAGS += $(local_c_flags)
    521 LOCAL_C_INCLUDES += $(local_c_includes)
    522 ifeq ($(TARGET_ARCH),arm)
    523 	LOCAL_SRC_FILES += $(arm_src_files)
    524 	LOCAL_CFLAGS += $(arm_cflags)
    525 else
    526 	LOCAL_SRC_FILES += $(non_arm_src_files)
    527 endif
    528 LOCAL_MODULE_TAGS := optional
    529 LOCAL_MODULE:= libcrypto
    530 include $(BUILD_SHARED_LIBRARY)
    531 
    532 #######################################
    533 # host shared library
    534 include $(CLEAR_VARS)
    535 include $(LOCAL_PATH)/../android-config.mk
    536 LOCAL_SRC_FILES += $(local_src_files)
    537 LOCAL_CFLAGS += $(local_c_flags) -DPURIFY
    538 LOCAL_C_INCLUDES += $(local_c_includes)
    539 LOCAL_SRC_FILES += $(non_arm_src_files)
    540 LOCAL_STATIC_LIBRARIES += libz
    541 LOCAL_LDLIBS += -ldl
    542 LOCAL_MODULE_TAGS := optional
    543 LOCAL_MODULE:= libcrypto
    544 include $(BUILD_HOST_SHARED_LIBRARY)
    545 
    546 ########################################
    547 # host static library, which is used by some SDK tools.
    548 
    549 include $(CLEAR_VARS)
    550 include $(LOCAL_PATH)/../android-config.mk
    551 LOCAL_SRC_FILES += $(local_src_files)
    552 LOCAL_CFLAGS += $(local_c_flags) -DPURIFY
    553 LOCAL_C_INCLUDES += $(local_c_includes)
    554 LOCAL_SRC_FILES += $(non_arm_src_files)
    555 LOCAL_STATIC_LIBRARIES += libz
    556 LOCAL_LDLIBS += -ldl
    557 LOCAL_MODULE_TAGS := optional
    558 LOCAL_MODULE:= libcrypto_static
    559 include $(BUILD_HOST_STATIC_LIBRARY)
    560