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 #
  22 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 # 
  25 # See the README file in this directory for a description of how to cull
  26 # objects unused by the standalone boot applications from the OBJECTS list.
  27 #
  28 
  29 LIBRARY = libcrypto.a
  30 
  31 OBJECTS = cryptlib.o    mem.o           mem_dbg.o       ex_data.o       \
  32         cpt_err.o       o_time.o        mem_clr.o       o_dir.o         \
  33         \
  34         a_object.o      a_bitstr.o      a_utctm.o       a_gentm.o       \
  35         a_time.o        a_int.o         a_octet.o       a_print.o       \
  36         a_type.o        a_set.o         a_dup.o         a_d2i_fp.o      \
  37         a_i2d_fp.o      a_enum.o        a_utf8.o        a_sign.o        \
  38         a_digest.o      a_verify.o      a_mbstr.o       a_strex.o       \
  39         x_algor.o       x_val.o         x_pubkey.o      x_sig.o         \
  40         x_req.o         x_attrib.o      x_bignum.o      x_long.o        \
  41         x_name.o        x_x509.o        x_x509a.o       x_crl.o         \
  42         x_info.o        x_spki.o        nsseq.o         d2i_pu.o        \
  43         d2i_pr.o        i2d_pu.o        i2d_pr.o        t_x509.o        \
  44         t_x509a.o       t_pkey.o        tasn_new.o      tasn_fre.o      \
  45         tasn_enc.o      tasn_dec.o      tasn_utl.o      tasn_typ.o      \
  46         f_int.o         f_string.o      x_pkey.o        a_bool.o        \
  47         x_exten.o       asn1_par.o      asn1_lib.o      asn1_err.o      \
  48         a_bytes.o       a_strnid.o      evp_asn1.o      asn_pack.o      \
  49         p5_pbe.o        p5_pbev2.o      p8_pkey.o       asn1_gen.o      \
  50         \
  51         bf_skey.o       bf_ecb.o        bf_cfb64.o      bf_ofb64.o      \
  52         bf_enc.o                                                        \
  53         \
  54         bio_lib.o       bio_err.o       bss_file.o      bss_sock.o      \
  55         bf_buff.o       b_print.o       b_dump.o                        \
  56         \
  57         bn_add.o        bn_div.o        bn_exp.o        bn_lib.o        \
  58         bn_ctx.o        bn_mul.o        bn_mod.o        bn_print.o      \
  59         bn_rand.o       bn_shift.o      bn_word.o       bn_blind.o      \
  60         bn_gcd.o        bn_prime.o      bn_asm.o        bn_mont.o       \
  61         bn_err.o        bn_sqr.o        bn_recp.o       bn_exp2.o       \
  62         \
  63         buffer.o        buf_err.o                                       \
  64         \
  65         comp_lib.o                                                      \
  66         \
  67         conf_err.o      conf_lib.o      conf_api.o      conf_def.o      \
  68         conf_mod.o                                                      \
  69         \
  70         set_key.o       ecb_enc.o       ecb3_enc.o      ofb64enc.o      \
  71         cfb64enc.o      cfb64ede.o      cfb_enc.o       ofb64ede.o      \
  72         \
  73         xcbc_enc.o      des_enc.o                                       \
  74         \
  75         dh_asn1.o       dh_key.o        dh_lib.o        dh_check.o      \
  76         dh_err.o                                                        \
  77         \
  78         dsa_vrf.o       dsa_sign.o      dsa_err.o       dsa_ossl.o      \
  79         dsa_lib.o       dsa_asn1.o                                      \
  80         \
  81         dso_lib.o       dso_null.o      dso_openssl.o                   \
  82         \
  83         err.o           err_all.o       err_prn.o                       \
  84         \
  85         c_all.o         c_allc.o        c_alld.o        digest.o        \
  86         e_des3.o        e_null.o        e_rc2.o         e_xcbc_d.o      \
  87         e_bf.o          e_des.o         encode.o        evp_enc.o       \
  88         evp_err.o       evp_key.o       evp_lib.o       evp_pbe.o       \
  89         evp_pkey.o      m_dss.o         m_dss1.o        m_md5.o         \
  90         m_sha.o         m_sha1.o        names.o         p5_crpt.o       \
  91         p5_crpt2.o      p_lib.o         p_sign.o        p_verify.o      \
  92         \
  93         eng_list.o      eng_ctrl.o      eng_table.o     tb_cipher.o     \
  94         eng_err.o       tb_dh.o         tb_digest.o     eng_init.o      \
  95         tb_dsa.o        eng_lib.o       tb_rand.o       tb_rsa.o        \
  96         \
  97         hmac.o                                                          \
  98         \
  99         lhash.o                                                         \
 100         \
 101         md5_dgst.o      md5-sparcv9.o                                   \
 102         \
 103         o_names.o       obj_dat.o       obj_err.o       obj_lib.o       \
 104         \
 105         ocsp_asn.o      ocsp_err.o                                      \
 106         \
 107         pem_info.o      pem_lib.o       pem_all.o       pem_err.o       \
 108         pem_x509.o      pem_xaux.o      pem_oth.o       pem_pkey.o      \
 109         \
 110         p12_add.o       p12_asn.o       p12_crpt.o      p12_key.o       \
 111         p12_mutl.o      p12_utl.o       pk12err.o       p12_p8d.o       \
 112         p12_attr.o      p12_decr.o      p12_p8e.o                       \
 113         \
 114         pk7_asn1.o      pk7_lib.o       pkcs7err.o                      \
 115         \
 116         md_rand.o       randfile.o      rand_lib.o      rand_err.o      \
 117         rand_unix.o                                                     \
 118         \
 119         rc2_cbc.o       rc2_ecb.o       rc2_skey.o      rc2cfb64.o      \
 120         rc2ofb64.o                                                      \
 121         \
 122         rsa_eay.o       rsa_lib.o       rsa_sign.o      rsa_err.o       \
 123         rsa_pk1.o       rsa_ssl.o       rsa_none.o      rsa_oaep.o      \
 124         rsa_asn1.o      rsa_x931.o                                      \
 125         \
 126         sha_dgst.o      sha1dgst.o      sha256.o        sha512.o        \
 127         \
 128         stack.o                                                         \
 129         \
 130         ui_err.o                                                        \
 131         \
 132         x509_def.o      x509_d2.o       x509_cmp.o      x509_obj.o      \
 133         x509_req.o      x509_vfy.o      x509rset.o      x509_err.o      \
 134         x509name.o      x509_v3.o       x509_ext.o      x509_att.o      \
 135         x509type.o      x509_lu.o       x_all.o         x509_txt.o      \
 136         x509_trs.o      by_file.o       by_dir.o        x509_vpm.o      \
 137         \
 138         v3_ia5.o        v3_lib.o        v3_prn.o        v3_utl.o        \
 139         v3_pku.o        v3_int.o        v3_enum.o       v3err.o         \
 140         v3_alt.o        v3_genn.o       v3_pci.o        v3_pcia.o       \
 141         v3_purp.o       v3_info.o       v3_ocsp.o       v3_bitst.o      \
 142         v3_conf.o       v3_extku.o      v3_cpols.o      v3_crld.o       \
 143         v3_akey.o       v3_akeya.o      v3_skey.o       v3_sxnet.o      \
 144         v3_ncons.o      v3_bcons.o      v3_pcons.o      v3_pmaps.o      \
 145         \
 146         pcy_cache.o     pcy_tree.o      pcy_data.o      pcy_lib.o       \
 147         pcy_map.o       pcy_node.o                                      \
 148         \
 149         $($(MACH)_OBJECTS)
 150 
 151 
 152 include ../Makefile.com
 153 
 154 SRCDIR = $(TOPDIR)/common/openssl/crypto
 155 
 156 SRCS =  $(OBJECTS:%.o= \
 157         $(SRCDIR)/asn1/%.c           $(SRCDIR)/rc2/%.c            \
 158         $(SRCDIR)/bf/%.c             $(SRCDIR)/dsa/%.c            \
 159         $(SRCDIR)/bio/%.c            $(SRCDIR)/bn/%.c             \
 160         $(SRCDIR)/buffer/%.c                                      \
 161         $(SRCDIR)/comp/%.c           $(SRCDIR)/conf/%.c           \
 162         $(SRCDIR)/des/%.c            $(SRCDIR)/dh/%.c             \
 163         $(SRCDIR)/err/%.c            $(SRCDIR)/evp/%.c            \
 164         $(SRCDIR)/engine/%.c         $(SRCDIR)/hmac/%.c           \
 165         $(SRCDIR)/lhash/%.c          $(SRCDIR)/ocsp/%.c           \
 166         $(SRCDIR)/objects/%.c        $(SRCDIR)/pem/%.c            \
 167         $(SRCDIR)/pkcs12/%.c         $(SRCDIR)/pkcs7/%.c          \
 168         $(SRCDIR)/rand/%.c           $(SRCDIR)/rsa/%.c            \
 169         $(SRCDIR)/sha/%.c            $(SRCDIR)/stack/%.c          \
 170         $(SRCDIR)/txt_db/%.c         $(SRCDIR)/ui/%.c             \
 171         $(SRCDIR)/x509/%.c           $(SRCDIR)/x509v3/%.c         \
 172         $(SRCDIR)/md5/%.c)
 173 
 174 #
 175 # We don't have chmod() in the standalone environment.
 176 # We also need to prepend the OpenSSL CPPFLAGS.
 177 #
 178 CPPFLAGS += $(OPENSSL_BUILD_CPPFLAGS) -DNO_CHMOD -I../sock
 179 
 180 # The following blocks work around code in the OpenSSL open source distribution
 181 # that fail to follow Sun coding standards and fail to compile without warnings.
 182 # Instead of changing the shared openssl code, we supress compiler warnings for
 183 # them.
 184 CRYPTO_OBS = \
 185         a_strex.o  asn1_par.o bf_enc.o   x_algor.o  x_val.o    x_pubkey.o \
 186         x_sig.o    x_req.o    x_attrib.o x_name.o   x_x509.o   x_x509a.o  \
 187         x_crl.o    x_spki.o   nsseq.o    x_exten.o  p5_pbe.o   \
 188         p5_pbev2.o p8_pkey.o  dsa_asn1.o dh_asn1.o  p12_asn.o  pk7_asn1.o \
 189         rsa_asn1.o v3_bcons.o v3_extku.o v3_genn.o  v3_pku.o   v3_sxnet.o \
 190         v3_cpols.o v3_crld.o  v3_info.o  v3_akeya.o ocsp_asn.o 
 191 
 192 $(CRYPTO_OBS:%.o=objs/%.o) := CPPFLAGS += \
 193         -erroff=E_TYP_STORAGE_CLASS_OBSOLESCENT
 194 
 195 # Rather than change the shared openssl code, we permit incomplete
 196 # type-based arguments
 197 CRYPTO_INCOM = \
 198         err_all.o
 199 
 200 $(CRYPTO_INCOM:%.o=objs/%.o) := CPPFLAGS += \
 201         -erroff=E_ARRAY_OF_INCOMPLETE_NONAME
 202 
 203 # M_ASN1_I2D_finish(), M_ASN1_D2I_Finish() macros confuse compiler
 204 CRYPTO_FIN_OBJ = \
 205         p8_key.o   x_cinf.o   x_pkey.o   x509_vfy.o
 206 
 207 $(CRYPTO_FIN_OBJ:%.o=objs/%.o) := CPPFLAGS += \
 208         -erroff=E_STATEMENT_NOT_REACHED
 209 
 210 CRYPTO_ULONG_OBJ = \
 211         a_int.o         a_enum.o        a_strex.o       a_strnid.o      \
 212         bf_skey.o       bf_enc.o        bss_sock.o      bn_add.o        \
 213         bn_div.o        bn_lib.o        bn_shift.o      bn_word.o       \
 214         bn_mul.o        bn_asm.o        bn_mont.o       bn_sqr.o        \
 215         set_key.o       ecb_enc.o       des_enc.o       lhash.o         \
 216         sha1dgst.o      sha_dgst.o      x509_cmp.o
 217 
 218 $(CRYPTO_ULONG_OBJ:%.o=objs/%.o) := CPPFLAGS += \
 219         -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
 220 
 221 CERRWARN += -_gcc=-Wno-unused-value
 222 CERRWARN += -_gcc=-Wno-address
 223 CERRWARN += -_gcc=-Wno-uninitialized
 224 CERRWARN += -_gcc=-Wno-unused-variable
 225 
 226 objs/md5_dgst.o := CPPFLAGS += -DMD5_ASM
 227 objs/md5-sparcv9.o := CPPFLAGS += -DMD5_BLOCK_DATA_ORDER
 228 
 229 objs/%.o: $(SRCDIR)/asn1/%.c
 230         $(COMPILE.c) -o $@ $<
 231         $(POST_PROCESS_O)
 232 objs/%.o: $(SRCDIR)/bf/%.c
 233         $(COMPILE.c) -o $@ $<
 234         $(POST_PROCESS_O)
 235 objs/%.o: $(SRCDIR)/dsa/%.c
 236         $(COMPILE.c) -o $@ $<
 237         $(POST_PROCESS_O)
 238 objs/%.o: $(SRCDIR)/dso/%.c
 239         $(COMPILE.c) -o $@ $<
 240         $(POST_PROCESS_O)
 241 objs/%.o: $(SRCDIR)/bio/%.c
 242         $(COMPILE.c) -o $@ $<
 243         $(POST_PROCESS_O)
 244 objs/%.o: $(SRCDIR)/bn/%.c
 245         $(COMPILE.c) -o $@ $<
 246         $(POST_PROCESS_O)
 247 objs/%.o: $(SRCDIR)/buffer/%.c
 248         $(COMPILE.c) -o $@ $<
 249         $(POST_PROCESS_O)
 250 objs/%.o: $(SRCDIR)/comp/%.c
 251         $(COMPILE.c) -o $@ $<
 252         $(POST_PROCESS_O)
 253 objs/%.o: $(SRCDIR)/conf/%.c
 254         $(COMPILE.c) -o $@ $<
 255         $(POST_PROCESS_O)
 256 objs/%.o: $(SRCDIR)/des/%.c
 257         $(COMPILE.c) -o $@ $<
 258         $(POST_PROCESS_O)
 259 objs/%.o: $(SRCDIR)/dh/%.c
 260         $(COMPILE.c) -o $@ $<
 261         $(POST_PROCESS_O)
 262 objs/%.o: $(SRCDIR)/err/%.c
 263         $(COMPILE.c) -o $@ $<
 264         $(POST_PROCESS_O)
 265 objs/%.o: $(SRCDIR)/engine/%.c
 266         $(COMPILE.c) -o $@ $<
 267         $(POST_PROCESS_O)
 268 objs/%.o: $(SRCDIR)/evp/%.c
 269         $(COMPILE.c) -o $@ $<
 270         $(POST_PROCESS_O)
 271 objs/%.o: $(SRCDIR)/hmac/%.c
 272         $(COMPILE.c) -o $@ $<
 273         $(POST_PROCESS_O)
 274 objs/%.o: $(SRCDIR)/lhash/%.c
 275         $(COMPILE.c) -o $@ $<
 276         $(POST_PROCESS_O)
 277 objs/%.o: $(SRCDIR)/objects/%.c
 278         $(COMPILE.c) -o $@ $<
 279         $(POST_PROCESS_O)
 280 objs/%.o: $(SRCDIR)/ocsp/%.c
 281         $(COMPILE.c) -o $@ $<
 282         $(POST_PROCESS_O)
 283 objs/%.o: $(SRCDIR)/pem/%.c
 284         $(COMPILE.c) -o $@ $<
 285         $(POST_PROCESS_O)
 286 objs/%.o: $(SRCDIR)/pkcs12/%.c
 287         $(COMPILE.c) -o $@ $<
 288         $(POST_PROCESS_O)
 289 objs/%.o: $(SRCDIR)/pkcs7/%.c
 290         $(COMPILE.c) -o $@ $<
 291         $(POST_PROCESS_O)
 292 objs/%.o: $(SRCDIR)/rand/%.c
 293         $(COMPILE.c) -o $@ $<
 294         $(POST_PROCESS_O)
 295 objs/%.o: $(SRCDIR)/rc2/%.c
 296         $(COMPILE.c) -o $@ $<
 297         $(POST_PROCESS_O)
 298 objs/%.o: $(SRCDIR)/rsa/%.c
 299         $(COMPILE.c) -o $@ $<
 300         $(POST_PROCESS_O)
 301 objs/%.o: $(SRCDIR)/md5/%.c
 302         $(COMPILE.c) -o $@ $<
 303         $(POST_PROCESS_O)
 304 objs/%.o: $(SRCDIR)/md5/asm/%.S
 305         $(COMPILE.c) -o $@ $<
 306         $(POST_PROCESS_O)
 307 objs/%.o: $(SRCDIR)/sha/%.c
 308         $(COMPILE.c) -o $@ $<
 309         $(POST_PROCESS_O)
 310 objs/%.o: $(SRCDIR)/stack/%.c
 311         $(COMPILE.c) -o $@ $<
 312         $(POST_PROCESS_O)
 313 objs/%.o: $(SRCDIR)/txt_db/%.c
 314         $(COMPILE.c) -o $@ $<
 315         $(POST_PROCESS_O)
 316 objs/%.o: $(SRCDIR)/ui/%.c
 317         $(COMPILE.c) -o $@ $<
 318         $(POST_PROCESS_O)
 319 objs/%.o: $(SRCDIR)/x509/%.c
 320         $(COMPILE.c) -o $@ $<
 321         $(POST_PROCESS_O)
 322 objs/%.o: $(SRCDIR)/x509v3/%.c
 323         $(COMPILE.c) -o $@ $<
 324         $(POST_PROCESS_O)
 325 
 326 include ../Makefile.targ