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) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright (c) 2018, Joyent, Inc.
29 GSSOBJECTS = g_acquire_cred.o \
30 g_acquire_cred_with_pw.o \
33 g_init_sec_context.o \
34 g_accept_sec_context.o \
36 g_delete_sec_context.o \
68 # defines the duplicate sources we share with gsscred
69 GSSCRED_DIR = $(SRC)/cmd/gss/gsscred
70 GSSCREDOBJ = gsscred_utils.o gsscred_file.o
71 # defines the duplicate sources we share with krb5 mech
72 KRB5DIR= $(SRC)/lib/gss_mechs/mech_krb5/mech
73 KRB5OBJ= rel_buffer.o util_buffer_set.o disp_com_err_status.o \
74 util_buffer.o util_errmap.o
75 # defines the duplicate sources we share with krb5 mech error table
76 KRB5ETDIR= $(SRC)/lib/gss_mechs/mech_krb5/et
77 KRB5ETOBJ= error_message.o adb_err.o adm_err.o asn1_err.o \
78 chpass_util_strings.o \
79 gssapi_err_krb5.o gssapi_err_generic.o \
81 kadm_err.o kdb5_err.o kdc5_err.o kpasswd_strings.o krb5_err.o \
82 kv5m_err.o prof_err.o pty_err.o ss_err.o
83 # defines the duplicate sources we share with kernel module
84 UTSGSSDIR = $(SRC)/uts/common/gssapi
85 UTSGSSOBJ = gen_oids.o
87 SRCS += $(GSSCREDOBJ:%.o=$(GSSCRED_DIR)/%.c) \
88 $(KRB5OBJ:%.o=$(KRB5DIR)/%.c) \
89 $(KRB5ETOBJ:%.o=$(KRB5ETDIR)/%.c) \
90 $(UTSGSSOBJ:%.o=$(UTSGSSDIR)/%.c)
91 OBJECTS = $(GSSOBJECTS) $(GSSCREDOBJ) $(KRB5OBJ) $(UTSGSSOBJ) $(KRB5ETOBJ)
93 # include library definitions
94 include ../../Makefile.lib
100 CPPFLAGS += -I$(GSSCRED_DIR) -I$(SRC)/uts/common/gssapi/include \
101 -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
102 -I$(SRC)/uts/common/gssapi/ \
103 -I$(SRC)/lib/gss_mechs/mech_krb5/include/ \
106 CERRWARN += -Wno-unused-function
107 CERRWARN += -Wno-uninitialized
108 CERRWARN += -Wno-parentheses
109 CERRWARN += -Wno-empty-body
118 $(GSSCREDOBJ:%.o=pics/%.o):
119 $(COMPILE.c) -o $@ $(@:pics/%.o=$(GSSCRED_DIR)/%.c)
122 # we need this in libgss so we don't have to link against mech_krb5
123 pics/rel_buffer.o: $(KRB5DIR)/rel_buffer.c
124 $(COMPILE.c) -o $@ $(KRB5DIR)/rel_buffer.c
127 # we need this in libgss so we don't have to link against mech_krb5
128 pics/util_buffer_set.o: $(KRB5DIR)/util_buffer_set.c
129 $(COMPILE.c) -o $@ $(KRB5DIR)/util_buffer_set.c
132 # we need this in libgss so we don't have to link against mech_krb5
133 pics/disp_com_err_status.o: $(KRB5DIR)/disp_com_err_status.c
134 $(COMPILE.c) -o $@ $(KRB5DIR)/disp_com_err_status.c
137 # we need this in libgss so we don't have to link against mech_krb5
138 pics/util_buffer.o: $(KRB5DIR)/util_buffer.c
139 $(COMPILE.c) -o $@ $(KRB5DIR)/util_buffer.c
142 # we need this in libgss so we don't have to link against mech_krb5
143 pics/util_errmap.o: $(KRB5DIR)/util_errmap.c
144 $(COMPILE.c) -o $@ $(KRB5DIR)/util_errmap.c
147 # we need this in libgss so we don't have to link against mech_krb5
148 pics/error_message.o: $(KRB5ETDIR)/error_message.c
149 $(COMPILE.c) -o $@ $(KRB5ETDIR)/error_message.c
152 # we need this in libgss so we don't have to link against mech_krb5
153 pics/adb_err.o: $(KRB5ETDIR)/adb_err.c
154 $(COMPILE.c) -o $@ $(KRB5ETDIR)/adb_err.c
157 pics/adm_err.o: $(KRB5ETDIR)/adm_err.c
158 $(COMPILE.c) -o $@ $(KRB5ETDIR)/adm_err.c
161 # we need this in libgss so we don't have to link against mech_krb5
162 pics/asn1_err.o: $(KRB5ETDIR)/asn1_err.c
163 $(COMPILE.c) -o $@ $(KRB5ETDIR)/asn1_err.c
166 # we need this in libgss so we don't have to link against mech_krb5
167 pics/chpass_util_strings.o: $(KRB5ETDIR)/chpass_util_strings.c
168 $(COMPILE.c) -o $@ $(KRB5ETDIR)/chpass_util_strings.c
171 # we need this in libgss so we don't have to link against mech_krb5
172 pics/gssapi_err_generic.o: $(KRB5ETDIR)/gssapi_err_generic.c
173 $(COMPILE.c) -o $@ $(KRB5ETDIR)/gssapi_err_generic.c
176 # we need this in libgss so we don't have to link against mech_krb5
177 pics/gssapi_err_krb5.o: $(KRB5ETDIR)/gssapi_err_krb5.c
178 $(COMPILE.c) -o $@ $(KRB5ETDIR)/gssapi_err_krb5.c
182 # we need this in libgss so we don't have to link against mech_krb5
183 pics/import_err.o: $(KRB5ETDIR)/import_err.c
184 $(COMPILE.c) -o $@ $(KRB5ETDIR)/import_err.c
187 # we need this in libgss so we don't have to link against mech_krb5
188 pics/kadm_err.o: $(KRB5ETDIR)/kadm_err.c
189 $(COMPILE.c) -o $@ $(KRB5ETDIR)/kadm_err.c
192 # we need this in libgss so we don't have to link against mech_krb5
193 pics/kdb5_err.o: $(KRB5ETDIR)/kdb5_err.c
194 $(COMPILE.c) -o $@ $(KRB5ETDIR)/kdb5_err.c
197 # we need this in libgss so we don't have to link against mech_krb5
198 pics/kdc5_err.o: $(KRB5ETDIR)/kdc5_err.c
199 $(COMPILE.c) -o $@ $(KRB5ETDIR)/kdc5_err.c
202 # we need this in libgss so we don't have to link against mech_krb5
203 pics/kpasswd_strings.o: $(KRB5ETDIR)/kpasswd_strings.c
204 $(COMPILE.c) -o $@ $(KRB5ETDIR)/kpasswd_strings.c
207 # we need this in libgss so we don't have to link against mech_krb5
208 pics/krb5_err.o: $(KRB5ETDIR)/krb5_err.c
209 $(COMPILE.c) -o $@ $(KRB5ETDIR)/krb5_err.c
212 # we need this in libgss so we don't have to link against mech_krb5
213 pics/kv5m_err.o: $(KRB5ETDIR)/kv5m_err.c
214 $(COMPILE.c) -o $@ $(KRB5ETDIR)/kv5m_err.c
217 # we need this in libgss so we don't have to link against mech_krb5
218 pics/prof_err.o: $(KRB5ETDIR)/prof_err.c
219 $(COMPILE.c) -o $@ $(KRB5ETDIR)/prof_err.c
222 # we need this in libgss so we don't have to link against mech_krb5
223 pics/pty_err.o: $(KRB5ETDIR)/pty_err.c
224 $(COMPILE.c) -o $@ $(KRB5ETDIR)/pty_err.c
227 # we need this in libgss so we don't have to link against mech_krb5
228 pics/ss_err.o: $(KRB5ETDIR)/ss_err.c
229 $(COMPILE.c) -o $@ $(KRB5ETDIR)/ss_err.c
232 # gen_oids.c is kept in the kernel since the OIDs declared in them are
233 # used by rpcsec module
234 pics/gen_oids.o: $(SRC)/uts/common/gssapi/gen_oids.c
235 $(COMPILE.c) -o $@ $(SRC)/uts/common/gssapi/gen_oids.c
238 # include library targets
239 include ../../Makefile.targ