5869 Need AES CMAC support in KCF+PKCS11
[unleashed.git] / usr / src / lib / pkcs11 / pkcs11_kernel / Makefile.com
blobe44f6cfec0d5b85a30dc10bbabfaf5ea210f37be
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
22 # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23 # Use is subject to license terms.
26 LIBRARY= pkcs11_kernel.a
27 VERS= .1
29 CORE_OBJECTS= \
30         kernelGeneral.o         \
31         kernelSlottable.o       \
32         kernelSlotToken.o       \
33         kernelObject.o          \
34         kernelDigest.o          \
35         kernelSign.o            \
36         kernelVerify.o          \
37         kernelDualCrypt.o       \
38         kernelKeys.o            \
39         kernelRand.o            \
40         kernelSession.o         \
41         kernelSessionUtil.o     \
42         kernelUtil.o            \
43         kernelEncrypt.o         \
44         kernelDecrypt.o         \
45         kernelObjectUtil.o      \
46         kernelAttributeUtil.o   \
47         kernelEmulate.o
49 OTHER_OBJECTS = kernelSoftCommon.o
50 ST_OBJECTS = softDigestUtil.o softMAC.o
52 OBJECTS= \
53         $(CORE_OBJECTS)         \
54         $(OTHER_OBJECTS)        \
55         $(ST_OBJECTS)
57 AESDIR=         $(SRC)/common/crypto/aes
58 ARCFOURDIR=     $(SRC)/common/crypto/arcfour
59 BLOWFISHDIR=    $(SRC)/common/crypto/blowfish
60 DESDIR=         $(SRC)/common/crypto/des
61 ECCDIR=         $(SRC)/common/crypto/ecc
62 CRYPTDIR=       $(SRC)/common/crypto
63 ST_DIR=         $(SRC)/lib/pkcs11/pkcs11_softtoken/common
65 lint \
66 pics/kernelAttributeUtil.o := \
67         CPPFLAGS += -I$(AESDIR) -I$(BLOWFISHDIR) -I$(ARCFOURDIR) -I$(DESDIR) \
68         -I$(ECCDIR) -I$(CRYPTDIR)
69 pics/kernelKeys.o := \
70         CPPFLAGS += -I$(ECCDIR)
71 pics/kernelSoftCommon.o := \
72         CPPFLAGS = -I$(ST_DIR) $(CPPFLAGS.master)
74 include $(SRC)/lib/Makefile.lib
76 #       set signing mode
77 POST_PROCESS_SO +=      ; $(ELFSIGN_CRYPTO)
79 SRCDIR=         ../common
80 CORESRCS =  \
81         $(CORE_OBJECTS:%.o=$(SRCDIR)/%.c)
83 LIBS    =       $(DYNLIB)
84 LDLIBS  +=      -lc -lcryptoutil -lmd
86 CFLAGS  +=      $(CCVERBOSE)
88 CERRWARN +=     -_gcc=-Wno-uninitialized
89 CERRWARN +=     -_gcc=-Wno-unused-label
91 ROOTLIBDIR=     $(ROOT)/usr/lib/security
92 ROOTLIBDIR64=   $(ROOT)/usr/lib/security/$(MACH64)
94 .KEEP_STATE:
96 all:    $(LIBS)
98 # we don't need to lint ST_OBJECTS since they are linted elsewhere.
99 lintcheck := SRCS = $(CORESRCS)
100 lintother := OSRCS = ../common/kernelSoftCommon.c
101 lintother := CPPFLAGS = -I$(ST_DIR) $(CPPFLAGS.master)
103 lintother: $$(OSRCS)
104         $(LINT.c) $(LINTCHECKFLAGS) $(OSRCS) $(LDLIBS)
106 lint: lintcheck lintother
108 pics/%.o:       $(ST_DIR)/%.c
109         $(COMPILE.c) -o $@ $< -I$(ST_DIR)
110         $(POST_PROCESS_O)
112 include $(SRC)/lib/Makefile.targ