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 # Copyright 2014 Alexander Pyhalov
  24 # Use is subject to license terms.
  25 #
  26 
  27 LIBRARY=        libsunw_ssl.a
  28 VERS=           .1
  29 
  30 OBJECTS=        bio_ssl.o  \
  31                 d1_both.o  \
  32                 d1_clnt.o  \
  33                 d1_enc.o   \
  34                 d1_lib.o   \
  35                 d1_meth.o  \
  36                 d1_pkt.o   \
  37                 d1_srtp.o  \
  38                 d1_srvr.o  \
  39                 kssl.o     \
  40                 s23_clnt.o \
  41                 s23_lib.o  \
  42                 s23_meth.o \
  43                 s23_pkt.o  \
  44                 s23_srvr.o \
  45                 s2_clnt.o  \
  46                 s2_enc.o   \
  47                 s2_lib.o   \
  48                 s2_meth.o  \
  49                 s2_pkt.o   \
  50                 s2_srvr.o  \
  51                 s3_both.o  \
  52                 s3_cbc.o   \
  53                 s3_clnt.o  \
  54                 s3_enc.o   \
  55                 s3_lib.o   \
  56                 s3_meth.o  \
  57                 s3_pkt.o   \
  58                 s3_srvr.o  \
  59                 ssl_algs.o \
  60                 ssl_asn1.o \
  61                 ssl_cert.o \
  62                 ssl_ciph.o \
  63                 ssl_err.o  \
  64                 ssl_err2.o \
  65                 ssl_lib.o  \
  66                 ssl_rsa.o  \
  67                 ssl_sess.o \
  68                 ssl_stat.o \
  69                 ssl_txt.o  \
  70                 t1_clnt.o  \
  71                 t1_enc.o   \
  72                 t1_lib.o   \
  73                 t1_meth.o  \
  74                 t1_reneg.o \
  75                 t1_srvr.o  \
  76                 tls_srp.o
  77 
  78 # include library definitions
  79 include $(SRC)/lib/Makefile.lib
  80 
  81 CLOBBERFILES += $(LIBLINKS)
  82 
  83 LIBS =          $(DYNLIB)
  84 
  85 LDLIBS += -lc -lsunw_crypto
  86 
  87 LINTFLAGS =     -uxn
  88 LINTFLAGS64 =   $(LINTFLAGS) -m64
  89 LINTOUT=        lint.out
  90 LINTSRC =       $(LINTLIB:%.ln=%)
  91 ROOTLINTDIR =   $(ROOTLIBDIR)
  92 ROOTLINT =      $(LINTSRC:%=$(ROOTLINTDIR)/%)
  93 
  94 CPPFLAGS +=     -I.. \
  95                 -I$(SRC)/lib/openssl/include
  96 
  97 CPPFLAGS +=     -D_REENTRANT
  98 CPPFLAGS +=     -DOPENSSL_THREADS
  99 CPPFLAGS +=     -DDSO_DLFCN
 100 CPPFLAGS +=     -DHAVE_DLFCN_H
 101 CPPFLAGS +=     -DSOLARIS_OPENSSL
 102 CPPFLAGS +=     -DNO_WINDOWS_BRAINDEATH
 103 CPPFLAGS +=     -DOPENSSL_BN_ASM_GF2m
 104 CPPFLAGS +=     -DSHA1_ASM
 105 CPPFLAGS +=     -DSHA256_ASM
 106 CPPFLAGS +=     -DSHA512_ASM
 107 CPPFLAGS +=     -DMD5_ASM
 108 CPPFLAGS +=     -DAES_ASM
 109 CPPFLAGS +=     -DVPAES_ASM
 110 CPPFLAGS +=     -DGHASH_ASM
 111 CPPFLAGS +=     -DVPAES_ASM
 112 CPPFLAGS +=     -DOPENSSL_BN_ASM_MONT
 113 
 114 CFLAGS +=       $(CCVERBOSE)
 115 
 116 CERRWARN +=     -erroff=E_END_OF_LOOP_CODE_NOT_REACHED
 117 CERRWARN +=     -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
 118 CERRWARN +=     -erroff=E_INIT_DOES_NOT_FIT
 119 
 120 $(LINTLIB) :=   LINTFLAGS = -nvx -I..
 121 $(LINTLIB) :=   LINTFLAGS64 = -nvx -m64 -I..
 122 
 123 .KEEP_STATE:
 124 
 125 all : $(LIBS)
 126 
 127 lint :  lintcheck
 128 
 129 # include library targets
 130 include $(SRC)/lib/Makefile.targ
 131 
 132 pics/%.o:       ../%.c
 133         $(COMPILE.c) -o $@ $<
 134 
 135 $(ROOTLINTDIR)/%: ../%
 136         $(INS.file)