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 (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 23# 24# lib/pkcs11/pkcs11_softtoken/Makefile.com 25# 26 27LIBRARY = pkcs11_softtoken.a 28VERS= .1 29 30LCL_OBJECTS = \ 31 softGeneral.o \ 32 softSlotToken.o \ 33 softSession.o \ 34 softObject.o \ 35 softDigest.o \ 36 softSign.o \ 37 softVerify.o \ 38 softDualCrypt.o \ 39 softKeys.o \ 40 softRand.o \ 41 softSessionUtil.o \ 42 softDigestUtil.o \ 43 softAttributeUtil.o \ 44 softObjectUtil.o \ 45 softDESCrypt.o \ 46 softEncrypt.o \ 47 softDecrypt.o \ 48 softEncryptUtil.o \ 49 softDecryptUtil.o \ 50 softSignUtil.o \ 51 softVerifyUtil.o \ 52 softMAC.o \ 53 softRSA.o \ 54 softKeysUtil.o \ 55 softARCFourCrypt.o \ 56 softDSA.o \ 57 softDH.o \ 58 softAESCrypt.o \ 59 softKeystore.o \ 60 softKeystoreUtil.o \ 61 softSSL.o \ 62 softASN1.o \ 63 softBlowfishCrypt.o \ 64 softEC.o \ 65 softFipsPost.o \ 66 softFipsPostUtil.o 67 68ASFLAGS = $(AS_PICFLAGS) -P -D__STDC__ -D_ASM $(CPPFLAGS) 69 70ECC_COBJECTS = \ 71 ec.o ec2_163.o ec2_mont.o ecdecode.o ecl_mult.o ecp_384.o \ 72 ecp_jac.o ec2_193.o ecl.o ecp_192.o ecp_521.o \ 73 ecp_jm.o ec2_233.o ecl_curve.o ecp_224.o ecp_aff.o ecp_mont.o \ 74 ec2_aff.o ec_naf.o ecl_gf.o ecp_256.o oid.o secitem.o \ 75 ec2_test.o ecp_test.o 76 77MPI_COBJECTS = mp_gf2m.o mpi.o mplogic.o mpmontg.o mpprime.o 78RNG_COBJECTS = fips_random.o 79FIPS_COBJECTS = fips_aes_util.o fips_des_util.o \ 80 fips_sha1_util.o fips_sha2_util.o \ 81 fips_dsa_util.o fips_rsa_util.o \ 82 fips_ecc_util.o fips_random_util.o 83 84ECC_OBJECTS = $(ECC_COBJECTS) $(ECC_PSR_OBJECTS) 85MPI_OBJECTS = $(MPI_COBJECTS) $(MPI_PSR_OBJECTS) 86RNG_OBJECTS = $(RNG_COBJECTS) 87FIPS_OBJECTS = $(FIPS_COBJECTS) 88BER_OBJECTS = bprint.o decode.o encode.o io.o 89 90OBJECTS = \ 91 $(LCL_OBJECTS) \ 92 $(MPI_OBJECTS) \ 93 $(RNG_OBJECTS) \ 94 $(FIPS_OBJECTS) \ 95 $(BIGNUM_OBJECTS) \ 96 $(BER_OBJECTS) \ 97 $(ECC_OBJECTS) 98 99AESDIR= $(SRC)/common/crypto/aes 100BLOWFISHDIR= $(SRC)/common/crypto/blowfish 101ARCFOURDIR= $(SRC)/common/crypto/arcfour 102DESDIR= $(SRC)/common/crypto/des 103DHDIR= $(SRC)/common/crypto/dh 104DSADIR= $(SRC)/common/crypto/dsa 105ECCDIR= $(SRC)/common/crypto/ecc 106MPIDIR= $(SRC)/common/mpi 107RSADIR= $(SRC)/common/crypto/rsa 108RNGDIR= $(SRC)/common/crypto/rng 109FIPSDIR= $(SRC)/common/crypto/fips 110SHA1DIR= $(SRC)/common/crypto/sha1 111SHA2DIR= $(SRC)/common/crypto/sha2 112BIGNUMDIR= $(SRC)/common/bignum 113PADDIR= $(SRC)/common/crypto/padding 114BERDIR= ../../../libldap5/sources/ldap/ber 115 116include $(SRC)/lib/Makefile.lib 117 118# set signing mode 119POST_PROCESS_SO += ; $(ELFSIGN_CRYPTO) 120 121SRCDIR= ../common 122 123SRCS = \ 124 $(LCL_OBJECTS:%.o=$(SRCDIR)/%.c) \ 125 $(MPI_COBJECTS:%.o=$(MPIDIR)/%.c) \ 126 $(ECC_COBJECTS:%.o=$(ECCDIR)/%.c) \ 127 $(RNG_COBJECTS:%.o=$(RNGDIR)/%.c) \ 128 $(FIPS_COBJECTS:%.o=$(FIPSDIR)/%.c) 129 130# libelfsign needs a static pkcs11_softtoken 131LIBS = $(DYNLIB) 132LDLIBS += -lc -lmd -lcryptoutil -lsoftcrypto -lgen 133 134CFLAGS += $(CCVERBOSE) 135 136CPPFLAGS += -I$(AESDIR) -I$(BLOWFISHDIR) -I$(ARCFOURDIR) -I$(DESDIR) \ 137 -I$(DHDIR) -I$(DSADIR) -I$(ECCDIR) -I$(SRC)/common/crypto \ 138 -I$(MPIDIR) -I$(RSADIR) -I$(RNGDIR) \ 139 -I$(FIPSDIR) -I$(SHA1DIR) -I$(SHA2DIR) -I$(SRCDIR) \ 140 -I$(BIGNUMDIR) -I$(PADDIR) -D_POSIX_PTHREAD_SEMANTICS \ 141 -DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B 142 143LINTFLAGS64 += -errchk=longptr64 144 145ROOTLIBDIR= $(ROOT)/usr/lib/security 146ROOTLIBDIR64= $(ROOT)/usr/lib/security/$(MACH64) 147 148LINTSRC = \ 149 $(LCL_OBJECTS:%.o=$(SRCDIR)/%.c) \ 150 $(RNG_COBJECTS:%.o=$(RNGDIR)/%.c) \ 151 $(FIPS_COBJECTS:%.o=$(FIPSDIR)/%.c) 152 153.KEEP_STATE: 154 155all: $(LIBS) 156 157lint: $$(LINTSRC) 158 $(LINT.c) $(LINTCHECKFLAGS) $(LINTSRC) $(LDLIBS) 159 160pics/%.o: $(BERDIR)/%.c 161 $(COMPILE.c) -o $@ $< -D_SOLARIS_SDK -I$(BERDIR) \ 162 -I../../../libldap5/include/ldap 163 $(POST_PROCESS_O) 164 165pics/%.o: $(ECCDIR)/%.c 166 $(COMPILE.c) -o $@ $< 167 $(POST_PROCESS_O) 168 169pics/%.o: $(MPIDIR)/%.c 170 $(COMPILE.c) -o $@ $< 171 $(POST_PROCESS_O) 172 173pics/%.o: $(RNGDIR)/%.c 174 $(COMPILE.c) -o $@ $< 175 $(POST_PROCESS_O) 176 177pics/%.o: $(FIPSDIR)/%.c 178 $(COMPILE.c) -o $@ $< 179 $(POST_PROCESS_O) 180 181include $(SRC)/lib/Makefile.targ 182