Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino#
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino# CDDL HEADER START
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino#
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino# The contents of this file are subject to the terms of the
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino# Common Development and Distribution License (the "License").
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino# You may not use this file except in compliance with the License.
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino#
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino# or http://www.opensolaris.org/os/licensing.
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino# See the License for the specific language governing permissions
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino# and limitations under the License.
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino#
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino# When distributing Covered Code, include this CDDL HEADER in each
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino# If applicable, add the following below this CDDL HEADER, with the
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino# fields enclosed by brackets "[]" replaced with your own identifying
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino# information: Portions Copyright [yyyy] [name of copyright owner]
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino#
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino# CDDL HEADER END
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino#
726fad2a65f16c200a03969c29cb5c86c2d427dbDina K Nimeh
726fad2a65f16c200a03969c29cb5c86c2d427dbDina K Nimeh#
726fad2a65f16c200a03969c29cb5c86c2d427dbDina K Nimeh# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino#
726fad2a65f16c200a03969c29cb5c86c2d427dbDina K Nimeh
1e49577a7fcde812700ded04431b49d67cc57d6dRod EvansLIBRARY = libsoftcrypto.a
1e49577a7fcde812700ded04431b49d67cc57d6dRod EvansVERS = .1
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evansinclude ../Makefile.com
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino
1e49577a7fcde812700ded04431b49d67cc57d6dRod EvansAES_PSM_OBJS = aes_amd64.o aes_intel.o aeskey.o
1e49577a7fcde812700ded04431b49d67cc57d6dRod EvansARCFOUR_PSM_OBJS = arcfour-x86_64.o
1e49577a7fcde812700ded04431b49d67cc57d6dRod EvansBIGNUM_PSM_OBJS = bignum_amd64.o bignum_amd64_asm.o
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evansinclude $(SRC)/lib/Makefile.lib
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evansinclude $(SRC)/lib/Makefile.lib.64
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-type-limits
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-parentheses
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-uninitialized
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe
1e49577a7fcde812700ded04431b49d67cc57d6dRod EvansAES_PSM_SRC = $(AES_DIR)/$(MACH64)/aes_amd64.s \
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(AES_DIR)/$(MACH64)/aes_intel.s \
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(AES_DIR)/$(MACH64)/aeskey.c
1e49577a7fcde812700ded04431b49d67cc57d6dRod EvansARCFOUR_PSM_SRC = arcfour-x86_64.s
1e49577a7fcde812700ded04431b49d67cc57d6dRod EvansBIGNUM_PSM_SRC = $(BIGNUM_DIR)/$(MACH64)/bignum_amd64.c \
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino $(BIGNUM_DIR)/$(MACH64)/bignum_amd64_asm.s
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# Sources need to be redefined after Makefile.lib inclusion.
1e49577a7fcde812700ded04431b49d67cc57d6dRod EvansSRCS = $(AES_SRC) $(ARCFOUR_SRC) $(BIGNUM_SRC) $(BLOWFISH_SRC) \
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(DES_SRC) $(MODES_SRC) $(DH_SRC) $(DSA_SRC) $(RSA_SRC) \
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(PAD_SRC)
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod EvansSRCDIR = $(SRC)/lib/pkcs11/libsoftcrypto/common
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod EvansLIBS = $(DYNLIB) $(LINTLIB)
1e49577a7fcde812700ded04431b49d67cc57d6dRod EvansMAPFILEDIR = ../common
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod EvansCFLAGS += -xO4 -xcrossfile
1e49577a7fcde812700ded04431b49d67cc57d6dRod EvansCPPFLAGS += -I$(CRYPTODIR) -I$(UTSDIR) -D_POSIX_PTHREAD_SEMANTICS
1e49577a7fcde812700ded04431b49d67cc57d6dRod EvansASFLAGS += $(AS_PICFLAGS) -P -D__STDC__ -D_ASM
1e49577a7fcde812700ded04431b49d67cc57d6dRod EvansBIGNUM_FLAGS += -DPSR_MUL
1e49577a7fcde812700ded04431b49d67cc57d6dRod EvansCLEANFILES += arcfour-x86_64.s
1e49577a7fcde812700ded04431b49d67cc57d6dRod EvansLDLIBS += -lcryptoutil -lc
1e49577a7fcde812700ded04431b49d67cc57d6dRod EvansLINTFLAGS64 += $(EXTRA_LINT_FLAGS)
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans.KEEP_STATE:
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evansall: $(LIBS)
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evanslint: $(SRCS)
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evansinstall: all $(ROOTLIBS64) $(ROOTLINKS64) $(ROOTLINT64)
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evanspics/%.o: $(AES_DIR)/$(MACH64)/%.c
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(COMPILE.c) $(AES_FLAGS) -o $@ $<
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(POST_PROCESS_O)
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evanspics/%.o: $(AES_DIR)/$(MACH64)/%.s
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(COMPILE.s) $(AES_FLAGS) -o $@ $<
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(POST_PROCESS_O)
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evanspics/%.o: $(BIGNUM_DIR)/$(MACH64)/%.c
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(COMPILE.c) $(BIGNUM_FLAGS) -o $@ $<
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(POST_PROCESS_O)
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evanspics/%.o: $(BIGNUM_DIR)/$(MACH64)/%.s
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(COMPILE64.s) $(BIGNUM_FLAGS) -o $@ $<
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(POST_PROCESS_O)
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evansinclude ../Makefile.targ
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evansarcfour-x86_64.s: $(ARCFOUR_DIR)/amd64/arcfour-x86_64.pl
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(PERL) $? $@
71269a2275bf5a143dad6461eee2710a344e7261Anthony Scarpino
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evanspics/%.o: arcfour-x86_64.s
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(COMPILE64.s) $(ARCFOUR_FLAGS) -o $@ $<
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(POST_PROCESS_O)