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