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 .KEEP_STATE:
  26 
  27 # aes/*.s
  28 ASM_SOURCES =   x86_64cpuid.s \
  29                 aes-x86_64.s \
  30                 aesni-sha1-x86_64.s \
  31                 aesni-x86_64.s \
  32                 bsaes-x86_64.s \
  33                 vpaes-x86_64.s \
  34                 modexp512-x86_64.s \
  35                 x86_64-gf2m.s \
  36                 x86_64-mont.s \
  37                 x86_64-mont5.s \
  38                 cmll-x86_64.s \
  39                 md5-x86_64.s \
  40                 ghash-x86_64.s \
  41                 rc4-md5-x86_64.s \
  42                 rc4-x86_64.s \
  43                 sha1-x86_64.s \
  44                 sha256-x86_64.s \
  45                 sha512-x86_64.s
  46 
  47 OBJECTS +=      $(ASM_SOURCES:%.s=%.o)
  48 
  49 OBJECTS64 =     bf_enc.o \
  50                 x86_64-gcc.o \
  51                 cmll_misc.o \
  52                 des_enc.o \
  53                 fcrypt_b.o
  54 
  55 OBJECTS +=      $(OBJECTS64)
  56 
  57 CLEANFILES +=   $(ASM_SOURCES)
  58 
  59 include ../Makefile.com
  60 include ../../../Makefile.lib.64
  61 
  62 CPPFLAGS += -DL_ENDIAN
  63 CPPFLAGS += -DOPENSSL_IA32_SSE2
  64 CPPFLAGS += -DOPENSSL_BN_ASM_MONT5
  65 CPPFLAGS += -DBSAES_ASM
  66 CPPFLAGS += -DPK11_LIB_LOCATION=\"/usr/lib/64/libpkcs11.so.1\"
  67 
  68 # OpenSSL interface is a mess
  69 MAPFILES =
  70 
  71 all:  $(ROOTLIBDIR64) $(LIBS) $(LIBLINKS)
  72 
  73 $(LIBLINKS):    FRC
  74         $(RM) $@; $(SYMLINK) $(DYNLIB) $@
  75 
  76 $(ROOTLIBDIR64):
  77         $(INS.dir)
  78 
  79 # sha512-x86_64.pl generates both sha512-x86_64.s and sha256-x86_64.s
  80 # sha256-x86_64.s is generated by default
  81 sha256-x86_64.s:        ../pl/sha512-x86_64.pl
  82         $(PERL)  ../pl/sha512-x86_64.pl elf $@
  83 
  84 sha512-x86_64.s:        ../pl/sha512-x86_64.pl
  85         $(PERL)  ../pl/sha512-x86_64.pl elf $@
  86 
  87 install: all $(ROOTLIBS64) $(ROOTLINKS64)
  88 
  89 FRC: