components/openssl/openssl-1.0.0/Makefile
branchs11-update
changeset 2593 b92e6df5eaf0
parent 2592 a7d8d41eeab2
child 2594 27f414f634e9
equal deleted inserted replaced
2592:a7d8d41eeab2 2593:b92e6df5eaf0
     1 #
       
     2 # CDDL HEADER START
       
     3 #
       
     4 # The contents of this file are subject to the terms of the
       
     5 # Common Development and Distribution License (the "License").
       
     6 # You may not use this file except in compliance with the License.
       
     7 #
       
     8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
       
     9 # or http://www.opensolaris.org/os/licensing.
       
    10 # See the License for the specific language governing permissions
       
    11 # and limitations under the License.
       
    12 #
       
    13 # When distributing Covered Code, include this CDDL HEADER in each
       
    14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
       
    15 # If applicable, add the following below this CDDL HEADER, with the
       
    16 # fields enclosed by brackets "[]" replaced with your own identifying
       
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
       
    18 #
       
    19 # CDDL HEADER END
       
    20 #
       
    21 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
       
    22 #
       
    23 include ../../../make-rules/shared-macros.mk
       
    24 
       
    25 COMPONENT_NAME =	openssl
       
    26 # When new version of OpenSSL comes in, you must update both COMPONENT_VERSION
       
    27 # and IPS_COMPONENT_VERSION.
       
    28 # When upgrading OpenSSL, please, DON'T FORGET TO TEST WANBOOT too. 
       
    29 # For more information about wanboot-openssl testing, please refer to
       
    30 # ../README.
       
    31 COMPONENT_VERSION =    1.0.0k
       
    32 # Version for IPS. It is easier to do it manually than convert the letter to a
       
    33 # number while taking into account that there might be no letter at all.
       
    34 IPS_COMPONENT_VERSION = 1.0.0.11
       
    35 COMPONENT_PROJECT_URL=	http://www.openssl.org/
       
    36 COMPONENT_SRC =		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
       
    37 COMPONENT_ARCHIVE =	$(COMPONENT_SRC).tar.gz
       
    38 COMPONENT_ARCHIVE_HASH=	\
       
    39     sha256:2982b2e9697a857b336c5c1b1b7b463747e5c1d560f25f6ace95365791b1efd1
       
    40 COMPONENT_ARCHIVE_URL =	$(COMPONENT_PROJECT_URL)source/$(COMPONENT_ARCHIVE)
       
    41 COMPONENT_BUGDB=	utility/openssl
       
    42 
       
    43 # Architecture-specific patches
       
    44 EXTRA_PATCHES.i386 = $(PATCH_DIR)/openssl-1.0.0d-aesni-v4.i386-patch
       
    45 EXTRA_PATCHES.sparc = $(PATCH_DIR)/openssl-1.0.0d-t4-engine.sparc-patch
       
    46 EXTRA_PATCHES = $(EXTRA_PATCHES.$(MACH))
       
    47 
       
    48 include $(WS_TOP)/make-rules/prep.mk
       
    49 include $(WS_TOP)/make-rules/configure.mk
       
    50 include $(WS_TOP)/make-rules/ips.mk
       
    51 include $(WS_TOP)/make-rules/lint-libraries.mk
       
    52 
       
    53 PATH=$(SPRO_VROOT)/bin:/usr/bin:/usr/gnu/bin:/usr/perl5/bin
       
    54 
       
    55 # Variant of OpenSSL for wanboot is built in build/sparcv9-wanboot.
       
    56 BUILD_DIR_WANBOOT = $(BUILD_DIR)/$(MACH64)-wanboot
       
    57 
       
    58 # OpenSSL does not use autoconf but its own configure system.
       
    59 CONFIGURE_SCRIPT = $(SOURCE_DIR)/Configure
       
    60 
       
    61 # This is to force OpenSSL's Configure script to use gmake for 'make links'. 
       
    62 # Otherwise it fails with:
       
    63 #     mksh: Fatal error in reader: Unmatched `(' on line
       
    64 CONFIGURE_ENV += MAKE="$(GMAKE)"
       
    65 
       
    66 # Used in the configure options below.
       
    67 PKCS11_LIB32 = /usr/lib/libpkcs11.so.1
       
    68 PKCS11_LIB64 = /usr/lib/64/libpkcs11.so.1
       
    69 ENGINESDIR_32 = /lib/openssl/engines
       
    70 ENGINESDIR_64 = /lib/openssl/engines/64
       
    71 
       
    72 # Configure options common to both regular OpenSSL and OpenSSL for wanboot.
       
    73 CONFIGURE_OPTIONS =  -DSOLARIS_OPENSSL -DNO_WINDOWS_BRAINDEATH
       
    74 CONFIGURE_OPTIONS += --openssldir=/etc/openssl
       
    75 CONFIGURE_OPTIONS += --prefix=/usr
       
    76 # We use OpenSSL install code for installing only manual pages and we do that
       
    77 # for 32-bit version only.
       
    78 CONFIGURE_OPTIONS += --install_prefix=$(PROTO_DIR)
       
    79 CONFIGURE_OPTIONS += no-ec
       
    80 CONFIGURE_OPTIONS += no-ecdh
       
    81 CONFIGURE_OPTIONS += no-ecdsa
       
    82 CONFIGURE_OPTIONS += no-rc3
       
    83 CONFIGURE_OPTIONS += no-rc5
       
    84 CONFIGURE_OPTIONS += no-mdc2
       
    85 CONFIGURE_OPTIONS += no-idea
       
    86 CONFIGURE_OPTIONS += no-hw_4758_cca
       
    87 CONFIGURE_OPTIONS += no-hw_aep
       
    88 CONFIGURE_OPTIONS += no-hw_atalla
       
    89 CONFIGURE_OPTIONS += no-hw_chil
       
    90 CONFIGURE_OPTIONS += no-hw_gmp
       
    91 CONFIGURE_OPTIONS += no-hw_ncipher
       
    92 CONFIGURE_OPTIONS += no-hw_nuron
       
    93 CONFIGURE_OPTIONS += no-hw_padlock
       
    94 CONFIGURE_OPTIONS += no-hw_sureware
       
    95 CONFIGURE_OPTIONS += no-hw_ubsec
       
    96 CONFIGURE_OPTIONS += no-hw_cswift
       
    97 # MD2 is not enabled by default in OpensSSL but some software we have in
       
    98 # Userland needs it. One example is nmap.
       
    99 CONFIGURE_OPTIONS += enable-md2
       
   100 CONFIGURE_OPTIONS += no-seed
       
   101 # We use both no-whirlpool and no-whrlpool since there is an inconsistency in
       
   102 # the OpenSSL code and one needs both to build OpenSSL successfully with
       
   103 # Whirlpool implementation removed.
       
   104 CONFIGURE_OPTIONS += no-whirlpool
       
   105 CONFIGURE_OPTIONS += no-whrlpool
       
   106 # Some additional options needed for our engines.
       
   107 CONFIGURE_OPTIONS += --pk11-libname=$(PKCS11_LIB$(BITS))
       
   108 CONFIGURE_OPTIONS += --enginesdir=$(ENGINESDIR_$(BITS))
       
   109 
       
   110 # We define our own compiler and linker option sets for Solaris. See Configure
       
   111 # for more information.
       
   112 CONFIGURE_OPTIONS32_i386 =	solaris-x86-cc-sunw
       
   113 CONFIGURE_OPTIONS32_sparc =	solaris-sparcv9-cc-sunw
       
   114 CONFIGURE_OPTIONS64_i386 =	solaris64-x86_64-cc-sunw
       
   115 CONFIGURE_OPTIONS64_sparc =	solaris64-sparcv9-cc-sunw
       
   116 
       
   117 # Options specific to regular build.
       
   118 # They must not be specified as common, as they cannot be overridden.
       
   119 $(BUILD_DIR)/$(MACH32)/.configured:	CONFIGURE_OPTIONS += threads
       
   120 $(BUILD_DIR)/$(MACH64)/.configured:	CONFIGURE_OPTIONS += threads
       
   121 $(BUILD_DIR)/$(MACH32)/.configured:	CONFIGURE_OPTIONS += shared
       
   122 $(BUILD_DIR)/$(MACH64)/.configured:	CONFIGURE_OPTIONS += shared
       
   123 $(BUILD_DIR)/$(MACH32)/.configured:	CONFIGURE_OPTIONS += shared
       
   124 $(BUILD_DIR)/$(MACH64)/.configured:	CONFIGURE_OPTIONS += shared
       
   125 $(BUILD_DIR)/$(MACH32)/.configured:	CONFIGURE_OPTIONS += \
       
   126 	$(CONFIGURE_OPTIONS32_$(MACH))
       
   127 $(BUILD_DIR)/$(MACH64)/.configured:	CONFIGURE_OPTIONS += \
       
   128 	$(CONFIGURE_OPTIONS64_$(MACH))
       
   129 
       
   130 # OpenSSL for wanboot specific options
       
   131 $(BUILD_DIR_WANBOOT)/.configured:	BITS=64
       
   132 $(BUILD_DIR_WANBOOT)/.configured:	CONFIGURE_OPTIONS += -DNO_CHMOD
       
   133 $(BUILD_DIR_WANBOOT)/.configured:	CONFIGURE_OPTIONS += -D_BOOT
       
   134 $(BUILD_DIR_WANBOOT)/.configured:	CONFIGURE_OPTIONS += -DOPENSSL_NO_DTLS1
       
   135 $(BUILD_DIR_WANBOOT)/.configured:	CONFIGURE_OPTIONS += no-cast
       
   136 $(BUILD_DIR_WANBOOT)/.configured:	CONFIGURE_OPTIONS += no-dso
       
   137 $(BUILD_DIR_WANBOOT)/.configured:	CONFIGURE_OPTIONS += no-rc4
       
   138 $(BUILD_DIR_WANBOOT)/.configured:	CONFIGURE_OPTIONS += no-ripemd
       
   139 $(BUILD_DIR_WANBOOT)/.configured:	CONFIGURE_OPTIONS += no-hw
       
   140 $(BUILD_DIR_WANBOOT)/.configured:	CONFIGURE_OPTIONS += no-threads
       
   141 $(BUILD_DIR_WANBOOT)/.configured:	CONFIGURE_OPTIONS += no-shared
       
   142 $(BUILD_DIR_WANBOOT)/.configured:	CONFIGURE_OPTIONS += \
       
   143 	solaris64-sparcv9-cc-sunw-wanboot
       
   144 
       
   145 
       
   146 # OpenSSL has its own configure system which must be run from the fully
       
   147 # populated source code directory. However, the Userland configuration phase is
       
   148 # run from the build directory. So, we must get the full source code into the
       
   149 # build directory.
       
   150 COMPONENT_PRE_CONFIGURE_ACTION = \
       
   151     ( $(CLONEY) $(SOURCE_DIR) $(BUILD_DIR)/$(MACH$(BITS)); )
       
   152 
       
   153 $(BUILD_DIR_WANBOOT)/.configured:	COMPONENT_PRE_CONFIGURE_ACTION = \
       
   154 	    ( $(CLONEY) $(SOURCE_DIR) $(BUILD_DIR_WANBOOT); )
       
   155 
       
   156 # We deliver only one opensslconf.h file which must be suitable for both 32 and
       
   157 # 64 bits. Depending on the configuration option, OpenSSL's Configure script
       
   158 # creates opensslconf.h for either 32 or 64 bits. A patch makes the resulting
       
   159 # header file usable on both architectures. The patch was generated against the
       
   160 # opensslconf.h version from the 32 bit build.
       
   161 COMPONENT_POST_CONFIGURE_ACTION = \
       
   162     ( [ $(BITS) -eq 32 ] && $(GPATCH) -p1 $(@D)/crypto/opensslconf.h \
       
   163       patches-post-config/opensslconf.patch; cd $(@D); $(MAKE) depend; )
       
   164 
       
   165 
       
   166 # We do not ship our engines as patches since it would be more difficult to
       
   167 # update the files which have been under continuous development. We rather copy
       
   168 # the files to the right directories.
       
   169 # Same holds for wanboot-stubs.c, which stubs out several functions, that are
       
   170 # not available in the stand-alone environment of wanboot.
       
   171 COMPONENT_PRE_BUILD_ACTION = \
       
   172     ( echo "Cloning engines..."; \
       
   173       $(LN) -fs $(COMPONENT_DIR)/engines/aesni/eng_aesni.c	$(@D)/crypto/engine; \
       
   174       $(LN) -fs $(COMPONENT_DIR)/engines/aesni/aesni-x86*.pl	$(@D)/crypto/aes/asm; \
       
   175       $(LN) -fs $(COMPONENT_DIR)/engines/devcrypto/*.[ch]	$(@D)/engines; \
       
   176       $(LN) -fs $(COMPONENT_DIR)/engines/pkcs11/*.[ch]		$(@D)/crypto/engine; \
       
   177       $(LN) -fs $(COMPONENT_DIR)/engines/t4/eng_t4*.[ch]	$(@D)/crypto/engine; \
       
   178       $(LN) -fs $(COMPONENT_DIR)/engines/t4/t4_aes.S		$(@D)/crypto/aes/asm; \
       
   179       $(LN) -fs $(COMPONENT_DIR)/engines/t4/t4_des.S		$(@D)/crypto/des/asm; \
       
   180       $(LN) -fs $(COMPONENT_DIR)/engines/t4/t4_md5.S		$(@D)/crypto/md5/asm; \
       
   181       $(LN) -fs $(COMPONENT_DIR)/engines/t4/t4_sha?.S		$(@D)/crypto/sha/asm; \
       
   182       $(LN) -fs $(COMPONENT_DIR)/wanboot-openssl/wanboot-stubs.c	$(@D)/crypto; )
       
   183 
       
   184 # OpenSSL for wanboot is built on sparc only.
       
   185 ifeq ($(MACH), sparc)
       
   186 BUILD_64 +=	$(BUILD_DIR_WANBOOT)/.built
       
   187 endif
       
   188 
       
   189 build:		$(BUILD_32_and_64)
       
   190 
       
   191 # Object files for wanboot-openssl.o have to be listed explicitly.
       
   192 WANBOOT_OBJS =  \
       
   193     crypto/aes/aes-sparcv9.o crypto/aes/aes_cbc.o crypto/aes/aes_cfb.o \
       
   194     crypto/aes/aes_core.o crypto/aes/aes_ecb.o crypto/aes/aes_ofb.o \
       
   195     crypto/aes/aes_wrap.o crypto/asn1/a_bitstr.o crypto/asn1/a_bool.o \
       
   196     crypto/asn1/a_bytes.o crypto/asn1/a_d2i_fp.o crypto/asn1/a_digest.o \
       
   197     crypto/asn1/a_dup.o crypto/asn1/a_enum.o crypto/asn1/a_gentm.o \
       
   198     crypto/asn1/a_i2d_fp.o crypto/asn1/a_int.o crypto/asn1/a_mbstr.o \
       
   199     crypto/asn1/a_object.o crypto/asn1/a_octet.o crypto/asn1/a_print.o \
       
   200     crypto/asn1/a_set.o crypto/asn1/a_sign.o crypto/asn1/a_strex.o \
       
   201     crypto/asn1/a_strnid.o crypto/asn1/a_time.o crypto/asn1/a_type.o \
       
   202     crypto/asn1/a_utctm.o crypto/asn1/a_utf8.o crypto/asn1/a_verify.o \
       
   203     crypto/asn1/ameth_lib.o crypto/asn1/asn1_err.o crypto/asn1/asn1_gen.o \
       
   204     crypto/asn1/asn1_lib.o crypto/asn1/asn1_par.o crypto/asn1/asn_mime.o \
       
   205     crypto/asn1/asn_pack.o crypto/asn1/bio_asn1.o crypto/asn1/bio_ndef.o \
       
   206     crypto/asn1/d2i_pr.o crypto/asn1/evp_asn1.o crypto/asn1/f_int.o \
       
   207     crypto/asn1/f_string.o crypto/asn1/i2d_pr.o crypto/asn1/nsseq.o \
       
   208     crypto/asn1/p5_pbe.o crypto/asn1/p5_pbev2.o crypto/asn1/p8_pkey.o \
       
   209     crypto/asn1/t_pkey.o crypto/asn1/t_x509.o crypto/asn1/t_x509a.o \
       
   210     crypto/asn1/tasn_dec.o crypto/asn1/tasn_enc.o crypto/asn1/tasn_fre.o \
       
   211     crypto/asn1/tasn_new.o crypto/asn1/tasn_prn.o crypto/asn1/tasn_typ.o \
       
   212     crypto/asn1/tasn_utl.o crypto/asn1/x_algor.o crypto/asn1/x_attrib.o \
       
   213     crypto/asn1/x_bignum.o crypto/asn1/x_crl.o crypto/asn1/x_exten.o \
       
   214     crypto/asn1/x_info.o crypto/asn1/x_long.o crypto/asn1/x_name.o \
       
   215     crypto/asn1/x_pkey.o crypto/asn1/x_pubkey.o crypto/asn1/x_req.o \
       
   216     crypto/asn1/x_sig.o crypto/asn1/x_spki.o crypto/asn1/x_val.o \
       
   217     crypto/asn1/x_x509.o crypto/asn1/x_x509a.o crypto/bf/bf_cfb64.o \
       
   218     crypto/bf/bf_ecb.o crypto/bf/bf_enc.o crypto/bf/bf_ofb64.o \
       
   219     crypto/bf/bf_skey.o crypto/bio/b_dump.o crypto/bio/b_print.o \
       
   220     crypto/bio/bf_buff.o crypto/bio/bio_err.o crypto/bio/bio_lib.o \
       
   221     crypto/bio/bss_file.o crypto/bio/bss_mem.o crypto/bio/bss_null.o \
       
   222     crypto/bio/bss_sock.o crypto/bn/bn-sparcv9.o crypto/bn/bn_add.o \
       
   223     crypto/bn/bn_blind.o crypto/bn/bn_ctx.o crypto/bn/bn_div.o \
       
   224     crypto/bn/bn_err.o crypto/bn/bn_exp.o crypto/bn/bn_exp2.o \
       
   225     crypto/bn/bn_gcd.o crypto/bn/bn_lib.o crypto/bn/bn_mod.o \
       
   226     crypto/bn/bn_mont.o crypto/bn/bn_mul.o crypto/bn/bn_prime.o \
       
   227     crypto/bn/bn_print.o crypto/bn/bn_rand.o crypto/bn/bn_recp.o \
       
   228     crypto/bn/bn_shift.o crypto/bn/bn_sqr.o crypto/bn/bn_word.o \
       
   229     crypto/bn/sparcv9-mont.o crypto/bn/sparcv9a-mont.o \
       
   230     crypto/buffer/buf_err.o crypto/buffer/buffer.o crypto/camellia/camellia.o \
       
   231     crypto/camellia/cmll_cbc.o crypto/camellia/cmll_cfb.o \
       
   232     crypto/camellia/cmll_ecb.o crypto/camellia/cmll_misc.o \
       
   233     crypto/camellia/cmll_ofb.o crypto/cms/cms_asn1.o crypto/cms/cms_att.o \
       
   234     crypto/cms/cms_dd.o crypto/cms/cms_enc.o crypto/cms/cms_env.o \
       
   235     crypto/cms/cms_err.o crypto/cms/cms_io.o crypto/cms/cms_lib.o \
       
   236     crypto/cms/cms_sd.o crypto/comp/c_zlib.o crypto/comp/comp_err.o \
       
   237     crypto/comp/comp_lib.o crypto/conf/conf_api.o crypto/conf/conf_def.o \
       
   238     crypto/conf/conf_err.o crypto/conf/conf_lib.o crypto/conf/conf_mod.o \
       
   239     crypto/cpt_err.o crypto/cryptlib.o crypto/des/cfb64ede.o \
       
   240     crypto/des/cfb64enc.o crypto/des/cfb_enc.o crypto/des/des_enc-sparc.o \
       
   241     crypto/des/ecb3_enc.o crypto/des/ecb_enc.o crypto/des/ofb64ede.o \
       
   242     crypto/des/ofb64enc.o crypto/des/set_key.o crypto/des/xcbc_enc.o \
       
   243     crypto/dh/dh_ameth.o crypto/dh/dh_asn1.o crypto/dh/dh_check.o \
       
   244     crypto/dh/dh_err.o crypto/dh/dh_gen.o crypto/dh/dh_key.o \
       
   245     crypto/dh/dh_lib.o crypto/dh/dh_pmeth.o crypto/dsa/dsa_ameth.o \
       
   246     crypto/dsa/dsa_asn1.o crypto/dsa/dsa_err.o crypto/dsa/dsa_gen.o \
       
   247     crypto/dsa/dsa_key.o crypto/dsa/dsa_lib.o crypto/dsa/dsa_ossl.o \
       
   248     crypto/dsa/dsa_pmeth.o crypto/dsa/dsa_sign.o crypto/dsa/dsa_vrf.o \
       
   249     crypto/dso/dso_lib.o crypto/dso/dso_null.o crypto/dso/dso_openssl.o \
       
   250     crypto/engine/eng_ctrl.o crypto/engine/eng_err.o crypto/engine/eng_init.o \
       
   251     crypto/engine/eng_lib.o crypto/engine/eng_list.o crypto/engine/eng_pkey.o \
       
   252     crypto/engine/eng_table.o crypto/engine/tb_asnmth.o \
       
   253     crypto/engine/tb_cipher.o crypto/engine/tb_dh.o crypto/engine/tb_digest.o \
       
   254     crypto/engine/tb_dsa.o crypto/engine/tb_pkmeth.o crypto/engine/tb_rand.o \
       
   255     crypto/engine/tb_rsa.o crypto/err/err.o crypto/err/err_all.o \
       
   256     crypto/err/err_prn.o crypto/evp/bio_b64.o crypto/evp/bio_enc.o \
       
   257     crypto/evp/bio_md.o crypto/evp/c_all.o crypto/evp/c_allc.o \
       
   258     crypto/evp/c_alld.o crypto/evp/digest.o crypto/evp/e_aes.o \
       
   259     crypto/evp/e_bf.o crypto/evp/e_camellia.o crypto/evp/e_des.o \
       
   260     crypto/evp/e_des3.o crypto/evp/e_null.o crypto/evp/e_rc2.o \
       
   261     crypto/evp/e_xcbc_d.o crypto/evp/encode.o crypto/evp/evp_enc.o \
       
   262     crypto/evp/evp_err.o crypto/evp/evp_key.o crypto/evp/evp_lib.o \
       
   263     crypto/evp/evp_pbe.o crypto/evp/evp_pkey.o crypto/evp/m_dss.o \
       
   264     crypto/evp/m_dss1.o crypto/evp/m_md4.o crypto/evp/m_md5.o \
       
   265     crypto/evp/m_sha.o crypto/evp/m_sha1.o crypto/evp/m_sigver.o \
       
   266     crypto/evp/names.o crypto/evp/p5_crpt.o crypto/evp/p5_crpt2.o \
       
   267     crypto/evp/p_lib.o crypto/evp/p_sign.o crypto/evp/p_verify.o \
       
   268     crypto/evp/pmeth_fn.o crypto/evp/pmeth_gn.o crypto/evp/pmeth_lib.o \
       
   269     crypto/ex_data.o crypto/hmac/hm_ameth.o crypto/hmac/hm_pmeth.o \
       
   270     crypto/hmac/hmac.o crypto/lhash/lhash.o crypto/md4/md4_dgst.o \
       
   271     crypto/md5/md5_dgst.o crypto/mem.o crypto/mem_dbg.o crypto/modes/cbc128.o \
       
   272     crypto/modes/cfb128.o crypto/modes/ofb128.o crypto/o_dir.o \
       
   273     crypto/o_time.o crypto/objects/o_names.o crypto/objects/obj_dat.o \
       
   274     crypto/objects/obj_err.o crypto/objects/obj_lib.o \
       
   275     crypto/objects/obj_xref.o crypto/ocsp/ocsp_asn.o crypto/ocsp/ocsp_err.o \
       
   276     crypto/pem/pem_all.o crypto/pem/pem_err.o crypto/pem/pem_info.o \
       
   277     crypto/pem/pem_lib.o crypto/pem/pem_oth.o crypto/pem/pem_pk8.o \
       
   278     crypto/pem/pem_pkey.o crypto/pem/pem_x509.o crypto/pem/pem_xaux.o \
       
   279     crypto/pkcs12/p12_add.o crypto/pkcs12/p12_asn.o crypto/pkcs12/p12_attr.o \
       
   280     crypto/pkcs12/p12_crpt.o crypto/pkcs12/p12_decr.o crypto/pkcs12/p12_key.o \
       
   281     crypto/pkcs12/p12_mutl.o crypto/pkcs12/p12_p8d.o crypto/pkcs12/p12_p8e.o \
       
   282     crypto/pkcs12/p12_utl.o crypto/pkcs12/pk12err.o crypto/pkcs7/pk7_asn1.o \
       
   283     crypto/pkcs7/pk7_attr.o crypto/pkcs7/pk7_doit.o crypto/pkcs7/pk7_lib.o \
       
   284     crypto/pkcs7/pkcs7err.o crypto/rand/md_rand.o crypto/rand/rand_err.o \
       
   285     crypto/rand/rand_lib.o crypto/rand/rand_unix.o crypto/rand/randfile.o \
       
   286     crypto/rc2/rc2_cbc.o crypto/rc2/rc2_ecb.o crypto/rc2/rc2_skey.o \
       
   287     crypto/rc2/rc2cfb64.o crypto/rc2/rc2ofb64.o crypto/rsa/rsa_ameth.o \
       
   288     crypto/rsa/rsa_asn1.o crypto/rsa/rsa_eay.o crypto/rsa/rsa_err.o \
       
   289     crypto/rsa/rsa_gen.o crypto/rsa/rsa_lib.o crypto/rsa/rsa_none.o \
       
   290     crypto/rsa/rsa_oaep.o crypto/rsa/rsa_pk1.o crypto/rsa/rsa_pmeth.o \
       
   291     crypto/rsa/rsa_pss.o crypto/rsa/rsa_sign.o crypto/rsa/rsa_ssl.o \
       
   292     crypto/rsa/rsa_x931.o crypto/sha/sha1-sparcv9.o crypto/sha/sha1dgst.o \
       
   293     crypto/sha/sha256-sparcv9.o crypto/sha/sha256.o \
       
   294     crypto/sha/sha512-sparcv9.o crypto/sha/sha512.o crypto/sha/sha_dgst.o \
       
   295     crypto/sparccpuid.o crypto/sparcv9cap.o crypto/stack/stack.o \
       
   296     crypto/wanboot-stubs.o \
       
   297     crypto/ts/ts_err.o crypto/ui/ui_err.o crypto/x509/by_dir.o \
       
   298     crypto/x509/by_file.o crypto/x509/x509_att.o crypto/x509/x509_cmp.o \
       
   299     crypto/x509/x509_d2.o crypto/x509/x509_def.o crypto/x509/x509_err.o \
       
   300     crypto/x509/x509_ext.o crypto/x509/x509_lu.o crypto/x509/x509_obj.o \
       
   301     crypto/x509/x509_req.o crypto/x509/x509_trs.o crypto/x509/x509_txt.o \
       
   302     crypto/x509/x509_v3.o crypto/x509/x509_vfy.o crypto/x509/x509_vpm.o \
       
   303     crypto/x509/x509name.o crypto/x509/x509rset.o crypto/x509/x509type.o \
       
   304     crypto/x509/x_all.o crypto/x509v3/pcy_cache.o crypto/x509v3/pcy_data.o \
       
   305     crypto/x509v3/pcy_lib.o crypto/x509v3/pcy_map.o crypto/x509v3/pcy_node.o \
       
   306     crypto/x509v3/pcy_tree.o crypto/x509v3/v3_akey.o crypto/x509v3/v3_akeya.o \
       
   307     crypto/x509v3/v3_alt.o crypto/x509v3/v3_bcons.o crypto/x509v3/v3_bitst.o \
       
   308     crypto/x509v3/v3_conf.o crypto/x509v3/v3_cpols.o crypto/x509v3/v3_crld.o \
       
   309     crypto/x509v3/v3_enum.o crypto/x509v3/v3_extku.o crypto/x509v3/v3_genn.o \
       
   310     crypto/x509v3/v3_ia5.o crypto/x509v3/v3_info.o crypto/x509v3/v3_int.o \
       
   311     crypto/x509v3/v3_lib.o crypto/x509v3/v3_ncons.o crypto/x509v3/v3_ocsp.o \
       
   312     crypto/x509v3/v3_pci.o crypto/x509v3/v3_pcia.o crypto/x509v3/v3_pcons.o \
       
   313     crypto/x509v3/v3_pku.o crypto/x509v3/v3_pmaps.o crypto/x509v3/v3_prn.o \
       
   314     crypto/x509v3/v3_purp.o crypto/x509v3/v3_skey.o crypto/x509v3/v3_sxnet.o \
       
   315     crypto/x509v3/v3_utl.o crypto/x509v3/v3err.o ssl/s3_both.o ssl/s3_clnt.o \
       
   316     ssl/s3_enc.o ssl/s3_lib.o ssl/s3_pkt.o ssl/ssl_algs.o ssl/ssl_asn1.o \
       
   317     ssl/ssl_cert.o ssl/ssl_ciph.o ssl/ssl_err.o ssl/ssl_err2.o ssl/ssl_lib.o \
       
   318     ssl/ssl_rsa.o ssl/ssl_sess.o ssl/t1_enc.o ssl/t1_lib.o ssl/t1_reneg.o
       
   319 
       
   320 # Linking of openssl bits for wanboot.
       
   321 # Interface for wanboot is specified in mapfile.wanboot. Object files are
       
   322 # compiled to have functions in separate sections, unused sections get
       
   323 # discarded.
       
   324 CREATE_BIG_OBJECT_FILE = ( \
       
   325     cd $(BUILD_DIR_WANBOOT); \
       
   326     $(LD) -o wanboot-openssl.o -r -M../../mapfile.wanboot -Breduce \
       
   327         -zdiscard-unused=sections,files -zguidance \
       
   328         $(WANBOOT_OBJS); \
       
   329     )
       
   330 
       
   331 $(BUILD_DIR_WANBOOT)/.built:	COMPONENT_POST_BUILD_ACTION = \
       
   332     ($(CREATE_BIG_OBJECT_FILE); )
       
   333 
       
   334 # OpenSSL uses sections man[1357] by default so we must create the man
       
   335 # directories we use for OpenSSL man pages in Solaris. Note that we patch the
       
   336 # OpenSSL man page install script to use the correct directories.
       
   337 MANDIR_SECTIONS =  $(PROTO_DIR)/usr/share/man/man1openssl
       
   338 MANDIR_SECTIONS += $(PROTO_DIR)/usr/share/man/man3openssl
       
   339 MANDIR_SECTIONS += $(PROTO_DIR)/usr/share/man/man5openssl
       
   340 MANDIR_SECTIONS += $(PROTO_DIR)/usr/share/man/man7openssl
       
   341 
       
   342 # We must create man page directories manually since we patched OpenSSL install
       
   343 # code to install into manXopenssl instead of manX. Also, OpenSSL does not
       
   344 # install into <dir>/$(MACH64) for 64-bit install so no such directory is
       
   345 # created and Userland install code would fail when installing lint libraries.
       
   346 COMPONENT_PRE_INSTALL_ACTION = ( $(MKDIR) $(MANDIR_SECTIONS); \
       
   347     $(MKDIR) $(PROTO_DIR)/usr/lib/$(MACH64); )
       
   348 
       
   349 # The install_docs target will install man pages into $(PROTO_DIR)/$(MANDIR). We
       
   350 # also add /usr/perl5/bin to PATH so that OpenSSL install code can locate the
       
   351 # system pod2man. If not set, OpenSSL make would use an internal implementation
       
   352 # from the tarball which would corrupt some man pages.
       
   353 COMPONENT_INSTALL_ARGS += PATH=$(PATH) MANDIR=/usr/share/man
       
   354 
       
   355 WANBOOT_TO      = $(PROTO_DIR)/lib/openssl/wanboot/$(MACH64)
       
   356 
       
   357 # We could run OpenSSL install code for 32 bits only to process header files and
       
   358 # manual pages. However, lint libraries depend on install stamps so we run
       
   359 # install for 64 bit as well. Note that we must take built binary files from
       
   360 # build directories, not from the proto area which contains whatever was
       
   361 # installed first.
       
   362 # OpenSSL for wanboot is built on sparc only.
       
   363 ifeq ($(MACH), sparc)
       
   364 install:	$(INSTALL_32_and_64) $(BUILD_DIR_WANBOOT)/.built
       
   365 	$(MKDIR) -p $(WANBOOT_TO);
       
   366 	$(CP) $(BUILD_DIR_WANBOOT)/wanboot-openssl.o $(WANBOOT_TO);
       
   367 else
       
   368 install:	$(INSTALL_32_and_64)
       
   369 endif
       
   370 
       
   371 # We need to modify the default lint flags to include patched opensslconf.h from
       
   372 # the build directory. If we do not do that, lint will complain about md2.h
       
   373 # which is not enabled by default but it is in our opensslconf.h.
       
   374 LFLAGS_32 := -I$(BUILD_DIR_32)/include $(LINT_FLAGS) -lsoftcrypto
       
   375 LFLAGS_64 := -I$(BUILD_DIR_64)/include $(LINT_FLAGS) -lsoftcrypto
       
   376 
       
   377 # Set modified lint flags for our lint library targets.
       
   378 $(BUILD_DIR_32)/llib-lcrypto.ln: LINT_FLAGS="$(LFLAGS_32)"
       
   379 $(BUILD_DIR_32)/llib-lssl.ln: LINT_FLAGS="$(LFLAGS_32)"
       
   380 $(BUILD_DIR_64)/llib-lcrypto.ln: LINT_FLAGS="$(LFLAGS_64)"
       
   381 $(BUILD_DIR_64)/llib-lssl.ln: LINT_FLAGS="$(LFLAGS_64)"
       
   382 
       
   383 test:		$(NO_TESTS)
       
   384 
       
   385 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
       
   386 
       
   387 include $(WS_TOP)/make-rules/depend.mk