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