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]
22 # Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright 2010 Nexenta Systems, Inc. All rights reserved.
25 # Copyright 2018, Joyent, Inc.
27 # lib/pkcs11/pkcs11_softtoken/Makefile.com
30 LIBRARY = pkcs11_softtoken.a
69 ASFLAGS = $(AS_PICFLAGS) -D_ASM $(CPPFLAGS)
72 ec.o ec2_163.o ec2_mont.o ecdecode.o ecl_mult.o ecp_384.o \
73 ecp_jac.o ec2_193.o ecl.o ecp_192.o ecp_521.o \
74 ecp_jm.o ec2_233.o ecl_curve.o ecp_224.o ecp_aff.o ecp_mont.o \
75 ec2_aff.o ec_naf.o ecl_gf.o ecp_256.o oid.o secitem.o \
78 MPI_COBJECTS = mp_gf2m.o mpi.o mplogic.o mpmontg.o mpprime.o
79 RNG_COBJECTS = fips_random.o
81 ECC_OBJECTS = $(ECC_COBJECTS) $(ECC_PSR_OBJECTS)
82 MPI_OBJECTS = $(MPI_COBJECTS) $(MPI_PSR_OBJECTS)
83 RNG_OBJECTS = $(RNG_COBJECTS)
84 BER_OBJECTS = bprint.o decode.o encode.o io.o
94 AESDIR= $(SRC)/common/crypto/aes
95 BLOWFISHDIR= $(SRC)/common/crypto/blowfish
96 ARCFOURDIR= $(SRC)/common/crypto/arcfour
97 DESDIR= $(SRC)/common/crypto/des
98 DHDIR= $(SRC)/common/crypto/dh
99 DSADIR= $(SRC)/common/crypto/dsa
100 ECCDIR= $(SRC)/common/crypto/ecc
101 MPIDIR= $(SRC)/common/mpi
102 RSADIR= $(SRC)/common/crypto/rsa
103 RNGDIR= $(SRC)/common/crypto/rng
104 SHA1DIR= $(SRC)/common/crypto/sha1
105 SHA2DIR= $(SRC)/common/crypto/sha2
106 BIGNUMDIR= $(SRC)/common/bignum
107 PADDIR= $(SRC)/common/crypto/padding
108 BERDIR= ../../../libldap5/sources/ldap/ber
110 include $(SRC)/lib/Makefile.lib
113 POST_PROCESS_SO += ; $(ELFSIGN_CRYPTO)
118 $(LCL_OBJECTS:%.o=$(SRCDIR)/%.c) \
119 $(MPI_COBJECTS:%.o=$(MPIDIR)/%.c) \
120 $(ECC_COBJECTS:%.o=$(ECCDIR)/%.c) \
121 $(RNG_COBJECTS:%.o=$(RNGDIR)/%.c)
123 # libelfsign needs a static pkcs11_softtoken
125 LDLIBS += -lc -lmd -lcryptoutil -lsoftcrypto -lgen
129 CERRWARN += -Wno-unused-label
130 CERRWARN += -Wno-parentheses
131 CERRWARN += -Wno-uninitialized
132 CERRWARN += -Wno-type-limits
133 CERRWARN += -Wno-unused-variable
134 CERRWARN += -Wno-empty-body
136 CPPFLAGS += -I$(AESDIR) -I$(BLOWFISHDIR) -I$(ARCFOURDIR) -I$(DESDIR) \
137 -I$(DHDIR) -I$(DSADIR) -I$(ECCDIR) -I$(SRC)/common/crypto \
138 -I$(MPIDIR) -I$(RSADIR) -I$(RNGDIR) \
139 -I$(SHA1DIR) -I$(SHA2DIR) -I$(SRCDIR) \
140 -I$(BIGNUMDIR) -I$(PADDIR) -D_POSIX_PTHREAD_SEMANTICS \
141 -DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B
142 CPPFLAGS += -I$(SRCTOP)/include
145 ROOTLIBDIR= $(ROOT)/usr/lib/security
146 ROOTLIBDIR64= $(ROOT)/usr/lib/security/$(MACH64)
152 pics/%.o: $(BERDIR)/%.c
153 $(COMPILE.c) -o $@ $< -D_SOLARIS_SDK -I$(BERDIR) \
154 -I../../../libldap5/include/ldap
157 pics/%.o: $(ECCDIR)/%.c
158 $(COMPILE.c) -o $@ $<
161 pics/%.o: $(MPIDIR)/%.c
162 $(COMPILE.c) -o $@ $<
165 pics/%.o: $(RNGDIR)/%.c
166 $(COMPILE.c) -o $@ $<
169 include $(SRC)/lib/Makefile.targ