xref: /titanic_44/usr/src/lib/pkcs11/pkcs11_kernel/Makefile.com (revision f6e214c7418f43af38bd8c3a557e3d0a1d311cfa)
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 2007 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28LIBRARY= pkcs11_kernel.a
29VERS= .1
30
31CORE_OBJECTS= \
32	kernelGeneral.o 	\
33	kernelSlottable.o 	\
34	kernelSlotToken.o 	\
35	kernelObject.o 		\
36	kernelDigest.o	 	\
37	kernelSign.o 		\
38	kernelVerify.o 		\
39	kernelDualCrypt.o 	\
40	kernelKeys.o 		\
41	kernelRand.o		\
42	kernelSession.o		\
43	kernelSessionUtil.o	\
44	kernelUtil.o		\
45	kernelEncrypt.o		\
46	kernelDecrypt.o		\
47	kernelObjectUtil.o	\
48	kernelAttributeUtil.o	\
49	kernelEmulate.o
50
51OTHER_OBJECTS = kernelSoftCommon.o
52ST_OBJECTS = softDigestUtil.o softMAC.o
53
54OBJECTS= \
55	$(CORE_OBJECTS)		\
56	$(OTHER_OBJECTS)	\
57	$(ST_OBJECTS)
58
59AESDIR=		$(SRC)/common/crypto/aes
60ARCFOURDIR=	$(SRC)/common/crypto/arcfour
61BLOWFISHDIR=	$(SRC)/common/crypto/blowfish
62DESDIR=		$(SRC)/common/crypto/des
63ECCDIR=		$(SRC)/common/crypto/ecc
64ST_DIR=		$(SRC)/lib/pkcs11/pkcs11_softtoken/common
65
66lint \
67pics/kernelAttributeUtil.o := \
68	CPPFLAGS += -I$(AESDIR) -I$(BLOWFISHDIR) -I$(ARCFOURDIR) -I$(DESDIR) \
69	-I$(ECCDIR)
70pics/kernelKeys.o := \
71	CPPFLAGS += -I$(ECCDIR)
72pics/kernelSoftCommon.o := \
73	CPPFLAGS = -I$(ST_DIR) $(CPPFLAGS.master)
74
75include $(SRC)/lib/Makefile.lib
76
77#	set signing mode
78POST_PROCESS_SO	+=	; $(ELFSIGN_CRYPTO)
79
80SRCDIR=		../common
81CORESRCS =  \
82	$(CORE_OBJECTS:%.o=$(SRCDIR)/%.c)
83
84LIBS	=	$(DYNLIB)
85LDLIBS  +=      -lc -lcryptoutil -lmd
86
87CFLAGS  +=      $(CCVERBOSE)
88
89ROOTLIBDIR=     $(ROOT)/usr/lib/security
90ROOTLIBDIR64=   $(ROOT)/usr/lib/security/$(MACH64)
91
92.KEEP_STATE:
93
94all:    $(LIBS)
95
96# we don't need to lint ST_OBJECTS since they are linted elsewhere.
97lintcheck := SRCS = $(CORESRCS)
98lintother := OSRCS = ../common/kernelSoftCommon.c
99lintother := CPPFLAGS = -I$(ST_DIR) $(CPPFLAGS.master)
100
101lintother: $$(OSRCS)
102	$(LINT.c) $(LINTCHECKFLAGS) $(OSRCS) $(LDLIBS)
103
104lint: lintcheck lintother
105
106pics/%.o:	$(ST_DIR)/%.c
107	$(COMPILE.c) -o $@ $< -I$(ST_DIR)
108	$(POST_PROCESS_O)
109
110include $(SRC)/lib/Makefile.targ
111