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# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 22# 23 24LIBRARY= pkcs11_kms.a 25VERS= .1 26 27CORE_OBJECTS= \ 28 kmsAESCrypt.o \ 29 kmsAttributeUtil.o \ 30 kmsDecrypt.o \ 31 kmsDigest.o \ 32 kmsDualCrypt.o \ 33 kmsEncrypt.o \ 34 kmsGeneral.o \ 35 kmsKeys.o \ 36 kmsKeystoreUtil.o \ 37 kmsObject.o \ 38 kmsObjectUtil.o \ 39 kmsRand.o \ 40 kmsSession.o \ 41 kmsSessionUtil.o \ 42 kmsSign.o \ 43 kmsSlottable.o \ 44 kmsSlotToken.o \ 45 kmsVerify.o 46 47OBJECTS= $(CORE_OBJECTS) 48 49AESDIR= $(SRC)/common/crypto/aes 50KMSAGENTDIR= $(SRC)/lib/libkmsagent/common 51 52include $(SRC)/lib/Makefile.lib 53 54# set signing mode 55POST_PROCESS_SO += ; $(ELFSIGN_CRYPTO) 56 57SRCDIR= ../common 58CORESRCS = $(CORE_OBJECTS:%.o=$(SRCDIR)/%.c) 59 60LIBS = $(DYNLIB) 61LDLIBS += -lc -lcryptoutil -lsoftcrypto -lmd -lavl -lkmsagent 62 63CFLAGS += $(CCVERBOSE) 64 65CPPFLAGS += -DUSESOLARIS_AES -DKMSUSERPKCS12 66 67ROOTLIBDIR= $(ROOT)/usr/lib/security 68ROOTLIBDIR64= $(ROOT)/usr/lib/security/$(MACH64) 69 70lint \ 71pics/kmsAESCrypt.o \ 72pics/kmsEncrypt.o \ 73pics/kmsDecrypt.o \ 74pics/kmsSlotToken.o \ 75pics/kmsKeystoreUtil.o \ 76pics/kmsAttributeUtil.o := CPPFLAGS += -I$(AESDIR) -I$(SRC)/common/crypto 77 78CPPFLAGS += -I$(KMSAGENTDIR) 79 80.KEEP_STATE: 81 82all: $(LIBS) 83 84# 85# -lkmsagent is not here because it is C++ and we don't lint C++ code. 86# 87LINTLDLIBS = -lc -lcryptoutil -lavl -lmd -lsoftcrypto 88 89LINTFLAGS64 += -errchk=longptr64 -errtags=yes 90 91lintcheck := SRCS = $(CORESRCS) 92lintcheck := LDLIBS = -L$(ROOT)/lib -L$(ROOT)/usr/lib $(LINTLDLIBS) 93 94lintother: $$(OSRCS) 95 $(LINT.c) $(LINTCHECKFLAGS) $(OSRCS) $(LINTLDLIBS) 96 97lint: lintcheck 98 99include $(SRC)/lib/Makefile.targ 100