xref: /titanic_50/usr/src/lib/pkcs11/pkcs11_kernel/Makefile.com (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5f808c858Sraf# Common Development and Distribution License (the "License").
6f808c858Sraf# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
22ba5f469cSkrishna# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
257c478bd9Sstevel@tonic-gate
267c478bd9Sstevel@tonic-gateLIBRARY= pkcs11_kernel.a
277c478bd9Sstevel@tonic-gateVERS= .1
287c478bd9Sstevel@tonic-gate
29ba5f469cSkrishnaCORE_OBJECTS= \
307c478bd9Sstevel@tonic-gate	kernelGeneral.o 	\
317c478bd9Sstevel@tonic-gate	kernelSlottable.o 	\
327c478bd9Sstevel@tonic-gate	kernelSlotToken.o 	\
337c478bd9Sstevel@tonic-gate	kernelObject.o 		\
347c478bd9Sstevel@tonic-gate	kernelDigest.o	 	\
357c478bd9Sstevel@tonic-gate	kernelSign.o 		\
367c478bd9Sstevel@tonic-gate	kernelVerify.o 		\
377c478bd9Sstevel@tonic-gate	kernelDualCrypt.o 	\
387c478bd9Sstevel@tonic-gate	kernelKeys.o 		\
397c478bd9Sstevel@tonic-gate	kernelRand.o		\
407c478bd9Sstevel@tonic-gate	kernelSession.o		\
417c478bd9Sstevel@tonic-gate	kernelSessionUtil.o	\
427c478bd9Sstevel@tonic-gate	kernelUtil.o		\
437c478bd9Sstevel@tonic-gate	kernelEncrypt.o		\
447c478bd9Sstevel@tonic-gate	kernelDecrypt.o		\
457c478bd9Sstevel@tonic-gate	kernelObjectUtil.o	\
46ba5f469cSkrishna	kernelAttributeUtil.o	\
47ba5f469cSkrishna	kernelEmulate.o
48ba5f469cSkrishna
49ba5f469cSkrishnaOTHER_OBJECTS = kernelSoftCommon.o
50ba5f469cSkrishnaST_OBJECTS = softDigestUtil.o softMAC.o
51ba5f469cSkrishna
52ba5f469cSkrishnaOBJECTS= \
53ba5f469cSkrishna	$(CORE_OBJECTS)		\
54ba5f469cSkrishna	$(OTHER_OBJECTS)	\
55ba5f469cSkrishna	$(ST_OBJECTS)
567c478bd9Sstevel@tonic-gate
577c478bd9Sstevel@tonic-gateAESDIR=		$(SRC)/common/crypto/aes
587c478bd9Sstevel@tonic-gateARCFOURDIR=	$(SRC)/common/crypto/arcfour
59f9fbec18SmcpowersBLOWFISHDIR=	$(SRC)/common/crypto/blowfish
607c478bd9Sstevel@tonic-gateDESDIR=		$(SRC)/common/crypto/des
61f9fbec18SmcpowersECCDIR=		$(SRC)/common/crypto/ecc
62ba5f469cSkrishnaST_DIR=		$(SRC)/lib/pkcs11/pkcs11_softtoken/common
637c478bd9Sstevel@tonic-gate
647c478bd9Sstevel@tonic-gatelint \
657c478bd9Sstevel@tonic-gatepics/kernelAttributeUtil.o := \
66f9fbec18Smcpowers	CPPFLAGS += -I$(AESDIR) -I$(BLOWFISHDIR) -I$(ARCFOURDIR) -I$(DESDIR) \
67f9fbec18Smcpowers	-I$(ECCDIR)
68f9fbec18Smcpowerspics/kernelKeys.o := \
69f9fbec18Smcpowers	CPPFLAGS += -I$(ECCDIR)
70ba5f469cSkrishnapics/kernelSoftCommon.o := \
71ba5f469cSkrishna	CPPFLAGS = -I$(ST_DIR) $(CPPFLAGS.master)
727c478bd9Sstevel@tonic-gate
737c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/Makefile.lib
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gate#	set signing mode
767c478bd9Sstevel@tonic-gatePOST_PROCESS_SO	+=	; $(ELFSIGN_CRYPTO)
777c478bd9Sstevel@tonic-gate
787c478bd9Sstevel@tonic-gateSRCDIR=		../common
79ba5f469cSkrishnaCORESRCS =  \
80ba5f469cSkrishna	$(CORE_OBJECTS:%.o=$(SRCDIR)/%.c)
817c478bd9Sstevel@tonic-gate
827c478bd9Sstevel@tonic-gateLIBS	=	$(DYNLIB)
83ba5f469cSkrishnaLDLIBS  +=      -lc -lcryptoutil -lmd
847c478bd9Sstevel@tonic-gate
857c478bd9Sstevel@tonic-gateCFLAGS  +=      $(CCVERBOSE)
867c478bd9Sstevel@tonic-gate
87*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-uninitialized
88*7014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-label
89*7014882cSRichard Lowe
907c478bd9Sstevel@tonic-gateROOTLIBDIR=     $(ROOT)/usr/lib/security
917c478bd9Sstevel@tonic-gateROOTLIBDIR64=   $(ROOT)/usr/lib/security/$(MACH64)
927c478bd9Sstevel@tonic-gate
937c478bd9Sstevel@tonic-gate.KEEP_STATE:
947c478bd9Sstevel@tonic-gate
957c478bd9Sstevel@tonic-gateall:    $(LIBS)
967c478bd9Sstevel@tonic-gate
97ba5f469cSkrishna# we don't need to lint ST_OBJECTS since they are linted elsewhere.
98ba5f469cSkrishnalintcheck := SRCS = $(CORESRCS)
99ba5f469cSkrishnalintother := OSRCS = ../common/kernelSoftCommon.c
100ba5f469cSkrishnalintother := CPPFLAGS = -I$(ST_DIR) $(CPPFLAGS.master)
101ba5f469cSkrishna
102ba5f469cSkrishnalintother: $$(OSRCS)
103ba5f469cSkrishna	$(LINT.c) $(LINTCHECKFLAGS) $(OSRCS) $(LDLIBS)
104ba5f469cSkrishna
105ba5f469cSkrishnalint: lintcheck lintother
106ba5f469cSkrishna
107ba5f469cSkrishnapics/%.o:	$(ST_DIR)/%.c
108ba5f469cSkrishna	$(COMPILE.c) -o $@ $< -I$(ST_DIR)
109ba5f469cSkrishna	$(POST_PROCESS_O)
1107c478bd9Sstevel@tonic-gate
1117c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/Makefile.targ
112