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