xref: /titanic_50/usr/src/lib/pkcs11/pkcs11_kernel/Makefile.com (revision 3c4993fb5a74112f361d71dab20997bdc749a7fb)
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
60BLOWFISHDIR=	$(SRC)/common/crypto/blowfish
61ARCFOURDIR=	$(SRC)/common/crypto/arcfour
62DESDIR=		$(SRC)/common/crypto/des
63ST_DIR=		$(SRC)/lib/pkcs11/pkcs11_softtoken/common
64
65lint \
66pics/kernelAttributeUtil.o := \
67	CPPFLAGS += -I$(AESDIR) -I$(BLOWFISHDIR) -I$(ARCFOURDIR) -I$(DESDIR)
68pics/kernelSoftCommon.o := \
69	CPPFLAGS = -I$(ST_DIR) $(CPPFLAGS.master)
70
71include $(SRC)/lib/Makefile.lib
72
73#	set signing mode
74POST_PROCESS_SO	+=	; $(ELFSIGN_CRYPTO)
75
76SRCDIR=		../common
77CORESRCS =  \
78	$(CORE_OBJECTS:%.o=$(SRCDIR)/%.c)
79
80LIBS	=	$(DYNLIB)
81LDLIBS  +=      -lc -lcryptoutil -lmd
82
83CFLAGS  +=      $(CCVERBOSE)
84
85ROOTLIBDIR=     $(ROOT)/usr/lib/security
86ROOTLIBDIR64=   $(ROOT)/usr/lib/security/$(MACH64)
87
88.KEEP_STATE:
89
90all:    $(LIBS)
91
92# we don't need to lint ST_OBJECTS since they are linted elsewhere.
93lintcheck := SRCS = $(CORESRCS)
94lintother := OSRCS = ../common/kernelSoftCommon.c
95lintother := CPPFLAGS = -I$(ST_DIR) $(CPPFLAGS.master)
96
97lintother: $$(OSRCS)
98	$(LINT.c) $(LINTCHECKFLAGS) $(OSRCS) $(LDLIBS)
99
100lint: lintcheck lintother
101
102pics/%.o:	$(ST_DIR)/%.c
103	$(COMPILE.c) -o $@ $< -I$(ST_DIR)
104	$(POST_PROCESS_O)
105
106include $(SRC)/lib/Makefile.targ
107