xref: /titanic_41/usr/src/lib/pkcs11/libsoftcrypto/Makefile.com (revision 5203bc321053fb87d7073c7640548fab73634793)
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#
23# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
24#
25
26# AES
27AES_DIR =		$(SRC)/common/crypto/aes
28AES_COMMON_OBJS =	aes_impl.o aes_modes.o
29AES_COMMON_SRC =	$(AES_COMMON_OBJS:%.o=$(AES_DIR)/%.c)
30AES_FLAGS =		-I$(AES_DIR)
31
32# Blowfish
33BLOWFISH_DIR =		$(SRC)/common/crypto/blowfish
34BLOWFISH_COMMON_OBJS =	blowfish_impl.o
35BLOWFISH_COMMON_SRC =	$(BLOWFISH_COMMON_OBJS:%.o=$(BLOWFISH_DIR)/%.c)
36BLOWFISH_FLAGS =	-I$(BLOWFISH_DIR)
37
38# ARCFour
39ARCFOUR_DIR =		$(SRC)/common/crypto/arcfour
40ARCFOUR_COMMON_OBJS =	arcfour_crypt.o
41ARCFOUR_COMMON_SRC =	$(ARCFOUR_COMMON_OBJS:%.o=$(ARCFOUR_DIR)/%.c)
42ARCFOUR_FLAGS =		-I$(ARCFOUR_DIR)
43
44# DES
45DES_DIR =		$(SRC)/common/crypto/des
46DES_COMMON_OBJS =	des_impl.o des_ks.o
47DES_COMMON_SRC =	$(DES_COMMON_OBJS:%.o=$(DES_DIR)/%.c)
48DES_FLAGS =		-I$(DES_DIR)
49
50# BIGNUM -- needed by DH, DSA, RSA
51BIGNUM_DIR =		$(SRC)/common/bignum
52BIGNUM_COMMON_OBJS =	bignumimpl.o
53BIGNUM_COMMON_SRC =	$(BIGNUM_COMMON_OBJS:%.o=$(BIGNUM_DIR)/%.c)
54BIGNUM_FLAGS =		-I$(BIGNUM_DIR)
55
56# Modes
57MODES_DIR =		$(SRC)/common/crypto/modes
58MODES_COMMON_OBJS =	modes.o ecb.o cbc.o ctr.o
59MODES_COMMON_SRC =	$(MODES_COMMON_OBJS:%.o=$(MODES_DIR)/%.c)
60MODES_FLAGS =		-I$(MODES_DIR)
61
62# DH
63DH_DIR =		$(SRC)/common/crypto/dh
64DH_COMMON_OBJS =	dh_impl.o
65DH_COMMON_SRC =		$(DH_COMMON_OBJS:%.o=$(DH_DIR)/%.c)
66DH_FLAGS =		$(BIGNUM_FLAGS) -I$(DH_DIR)
67
68# DSA
69DSA_DIR =		$(SRC)/common/crypto/dsa
70DSA_COMMON_OBJS =	dsa_impl.o
71DSA_COMMON_SRC =	$(DSA_COMMON_OBJS:%.o=$(DSA_DIR)/%.c)
72DSA_FLAGS =		$(BIGNUM_FLAGS) -I$(DSA_DIR)
73
74# RSA
75RSA_DIR =		$(SRC)/common/crypto/rsa
76RSA_COMMON_OBJS =	rsa_impl.o
77RSA_COMMON_SRC =	$(RSA_COMMON_OBJS:%.o=$(RSA_DIR)/%.c)
78RSA_FLAGS =		$(BIGNUM_FLAGS) -I$(RSA_DIR)
79
80# PADDING -- needed by RSA
81PAD_DIR =		$(SRC)/common/crypto/padding
82PAD_COMMON_OBJS =	pkcs1.o pkcs7.o
83PAD_COMMON_SRC =	$(PAD_COMMON_OBJS:%.o=$(PAD_DIR)/%.c)
84PAD_FLAGS =		-I$(PAD_DIR)
85
86# Object setup
87AES_OBJS =		$(AES_COMMON_OBJS)	$(AES_PSM_OBJS)
88ARCFOUR_OBJS =		$(ARCFOUR_COMMON_OBJS)	$(ARCFOUR_PSM_OBJS)
89BLOWFISH_OBJS =		$(BLOWFISH_COMMON_OBJS)	$(BLOWFISH_PSM_OBJS)
90DES_OBJS =		$(DES_COMMON_OBJS)	$(DES_PSM_OBJS)
91BIGNUM_OBJS =		$(BIGNUM_COMMON_OBJS)	$(BIGNUM_PSM_OBJS)
92MODES_OBJS =		$(MODES_COMMON_OBJS)	$(MODES_PSM_OBJS)
93DH_OBJS =		$(DH_COMMON_OBJS)	$(DH_PSM_OBJS)
94DSA_OBJS =		$(DSA_COMMON_OBJS)	$(DSA_PSM_OBJS)
95RSA_OBJS =		$(RSA_COMMON_OBJS)	$(RSA_PSM_OBJS)
96PAD_OBJS =		$(PAD_COMMON_OBJS)	$(PAD_PSM_OBJS)
97
98OBJECTS =		$(AES_OBJS) $(ARCFOUR_OBJS) $(BIGNUM_OBJS) \
99			$(BLOWFISH_OBJS) $(DES_OBJS) $(MODES_OBJS) $(DH_OBJS) \
100			$(DSA_OBJS) $(RSA_OBJS) $(PAD_OBJS)
101
102# Source file setup
103AES_SRC =		$(AES_COMMON_SRC)	$(AES_PSM_SRC)
104ARCFOUR_SRC =		$(ARCFOUR_COMMON_SRC)	$(ARCFOUR_PSM_SRC)
105BLOWFISH_SRC =		$(BLOWFISH_COMMON_SRC)	$(BLOWFISH_PSM_SRC)
106DES_SRC =		$(DES_COMMON_SRC)	$(DES_PSM_SRC)
107BIGNUM_SRC =		$(BIGNUM_COMMON_SRC)	$(BIGNUM_PSM_SRC)
108MODES_SRC =		$(MODES_COMMON_SRC)	$(MODES_PSM_SRC)
109DH_SRC =		$(DH_COMMON_SRC)	$(DH_PSM_SRC)
110DSA_SRC =		$(DSA_COMMON_SRC)	$(DSA_PSM_SRC)
111RSA_SRC =		$(RSA_COMMON_SRC)	$(RSA_PSM_SRC)
112PAD_SRC =		$(PAD_COMMON_SRC)	$(PAD_PSM_SRC)
113
114# Header include directories
115CRYPTODIR =		$(SRC)/common/crypto
116UTSDIR =		$(SRC)/uts/common/
117
118# Lint
119EXTRA_LINT_FLAGS =	$(AES_FLAGS) $(BLOWFISH_FLAGS) $(ARCFOUR_FLAGS) \
120			$(DES_FLAGS) $(BIGNUM_FLAGS) $(MODES_FLAGS) \
121			$(DH_FLAGS) $(DSA_FLAGS) $(RSA_FLAGS) $(PAD_FLAGS)
122