xref: /illumos-gate/usr/src/lib/libgss/Makefile.com (revision 20a7641f9918de8574b8b3b47dbe35c4bfc78df1)
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# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
23#
24# Copyright (c) 2018, Joyent, Inc.
25
26LIBRARY = libgss.a
27VERS = .1
28
29GSSOBJECTS	= g_acquire_cred.o \
30	  g_acquire_cred_with_pw.o \
31	  g_store_cred.o \
32	  g_rel_cred.o \
33	  g_init_sec_context.o \
34	  g_accept_sec_context.o \
35	  g_process_context.o \
36	  g_delete_sec_context.o \
37	  g_imp_sec_context.o \
38	  g_exp_sec_context.o \
39	  g_context_time.o \
40	  g_sign.o \
41	  g_verify.o \
42	  g_seal.o \
43	  g_unseal.o \
44	  g_dsp_status.o \
45	  g_compare_name.o \
46	  g_dsp_name.o \
47	  g_imp_name.o \
48	  g_rel_name.o \
49	  g_rel_buffer.o \
50	  g_rel_oid_set.o \
51	  g_oid_ops.o \
52	  g_inquire_cred.o \
53	  g_inquire_context.o \
54	  g_inquire_names.o \
55	  g_initialize.o \
56	  g_glue.o \
57	  gssd_pname_to_uid.o \
58	  oid_ops.o \
59	  g_canon_name.o \
60	  g_dup_name.o \
61	  g_export_name.o \
62	  g_utils.o \
63	  g_userok.o \
64	  g_buffer_set.o \
65	  g_inq_context_oid.o \
66
67
68# defines the duplicate sources we share with gsscred
69GSSCRED_DIR =	$(SRC)/cmd/gss/gsscred
70GSSCREDOBJ =	gsscred_utils.o gsscred_file.o
71# defines the duplicate sources we share with krb5 mech
72KRB5DIR= $(SRC)/lib/gss_mechs/mech_krb5/mech
73KRB5OBJ= 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
76KRB5ETDIR= $(SRC)/lib/gss_mechs/mech_krb5/et
77KRB5ETOBJ= 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 \
80	      import_err.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
84UTSGSSDIR =	$(SRC)/uts/common/gssapi
85UTSGSSOBJ =	gen_oids.o
86
87SRCS +=		$(GSSCREDOBJ:%.o=$(GSSCRED_DIR)/%.c) \
88		$(KRB5OBJ:%.o=$(KRB5DIR)/%.c) \
89		$(KRB5ETOBJ:%.o=$(KRB5ETDIR)/%.c) \
90		$(UTSGSSOBJ:%.o=$(UTSGSSDIR)/%.c)
91OBJECTS =	$(GSSOBJECTS) $(GSSCREDOBJ) $(KRB5OBJ) $(UTSGSSOBJ) $(KRB5ETOBJ)
92
93# include library definitions
94include ../../Makefile.lib
95
96LIBS =	$(DYNLIB)
97
98LDLIBS +=	-lc
99
100CPPFLAGS +=	-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/ \
104		-DHAVE_STDLIB_H
105
106CERRWARN +=	-_gcc=-Wno-unused-function
107CERRWARN +=	$(CNOWARN_UNINIT)
108CERRWARN +=	-_gcc=-Wno-parentheses
109CERRWARN +=	-_gcc=-Wno-empty-body
110
111# not linted
112SMATCH=off
113
114.KEEP_STATE:
115
116all: $(LIBS)
117
118
119$(GSSCREDOBJ:%.o=pics/%.o):
120	$(COMPILE.c) -o $@ $(@:pics/%.o=$(GSSCRED_DIR)/%.c)
121	$(POST_PROCESS_O)
122
123# we need this in libgss so we don't have to link against mech_krb5
124pics/rel_buffer.o: $(KRB5DIR)/rel_buffer.c
125	$(COMPILE.c) -o $@ $(KRB5DIR)/rel_buffer.c
126	$(POST_PROCESS_O)
127
128# we need this in libgss so we don't have to link against mech_krb5
129pics/util_buffer_set.o: $(KRB5DIR)/util_buffer_set.c
130	$(COMPILE.c) -o $@ $(KRB5DIR)/util_buffer_set.c
131	$(POST_PROCESS_O)
132
133# we need this in libgss so we don't have to link against mech_krb5
134pics/disp_com_err_status.o: $(KRB5DIR)/disp_com_err_status.c
135	$(COMPILE.c) -o $@ $(KRB5DIR)/disp_com_err_status.c
136	$(POST_PROCESS_O)
137
138# we need this in libgss so we don't have to link against mech_krb5
139pics/util_buffer.o: $(KRB5DIR)/util_buffer.c
140	$(COMPILE.c) -o $@ $(KRB5DIR)/util_buffer.c
141	$(POST_PROCESS_O)
142
143# we need this in libgss so we don't have to link against mech_krb5
144pics/util_errmap.o: $(KRB5DIR)/util_errmap.c
145	$(COMPILE.c) -o $@ $(KRB5DIR)/util_errmap.c
146	$(POST_PROCESS_O)
147
148# we need this in libgss so we don't have to link against mech_krb5
149pics/error_message.o: $(KRB5ETDIR)/error_message.c
150	$(COMPILE.c) -o $@ $(KRB5ETDIR)/error_message.c
151	$(POST_PROCESS_O)
152
153# we need this in libgss so we don't have to link against mech_krb5
154pics/adb_err.o: $(KRB5ETDIR)/adb_err.c
155	$(COMPILE.c) -o $@ $(KRB5ETDIR)/adb_err.c
156	$(POST_PROCESS_O)
157
158pics/adm_err.o: $(KRB5ETDIR)/adm_err.c
159	$(COMPILE.c) -o $@ $(KRB5ETDIR)/adm_err.c
160	$(POST_PROCESS_O)
161
162# we need this in libgss so we don't have to link against mech_krb5
163pics/asn1_err.o: $(KRB5ETDIR)/asn1_err.c
164	$(COMPILE.c) -o $@ $(KRB5ETDIR)/asn1_err.c
165	$(POST_PROCESS_O)
166
167# we need this in libgss so we don't have to link against mech_krb5
168pics/chpass_util_strings.o: $(KRB5ETDIR)/chpass_util_strings.c
169	$(COMPILE.c) -o $@ $(KRB5ETDIR)/chpass_util_strings.c
170	$(POST_PROCESS_O)
171
172# we need this in libgss so we don't have to link against mech_krb5
173pics/gssapi_err_generic.o: $(KRB5ETDIR)/gssapi_err_generic.c
174	$(COMPILE.c) -o $@ $(KRB5ETDIR)/gssapi_err_generic.c
175	$(POST_PROCESS_O)
176
177# we need this in libgss so we don't have to link against mech_krb5
178pics/gssapi_err_krb5.o: $(KRB5ETDIR)/gssapi_err_krb5.c
179	$(COMPILE.c) -o $@ $(KRB5ETDIR)/gssapi_err_krb5.c
180	$(POST_PROCESS_O)
181
182
183# we need this in libgss so we don't have to link against mech_krb5
184pics/import_err.o: $(KRB5ETDIR)/import_err.c
185	$(COMPILE.c) -o $@ $(KRB5ETDIR)/import_err.c
186	$(POST_PROCESS_O)
187
188# we need this in libgss so we don't have to link against mech_krb5
189pics/kadm_err.o: $(KRB5ETDIR)/kadm_err.c
190	$(COMPILE.c) -o $@ $(KRB5ETDIR)/kadm_err.c
191	$(POST_PROCESS_O)
192
193# we need this in libgss so we don't have to link against mech_krb5
194pics/kdb5_err.o: $(KRB5ETDIR)/kdb5_err.c
195	$(COMPILE.c) -o $@ $(KRB5ETDIR)/kdb5_err.c
196	$(POST_PROCESS_O)
197
198# we need this in libgss so we don't have to link against mech_krb5
199pics/kdc5_err.o: $(KRB5ETDIR)/kdc5_err.c
200	$(COMPILE.c) -o $@ $(KRB5ETDIR)/kdc5_err.c
201	$(POST_PROCESS_O)
202
203# we need this in libgss so we don't have to link against mech_krb5
204pics/kpasswd_strings.o: $(KRB5ETDIR)/kpasswd_strings.c
205	$(COMPILE.c) -o $@ $(KRB5ETDIR)/kpasswd_strings.c
206	$(POST_PROCESS_O)
207
208# we need this in libgss so we don't have to link against mech_krb5
209pics/krb5_err.o: $(KRB5ETDIR)/krb5_err.c
210	$(COMPILE.c) -o $@ $(KRB5ETDIR)/krb5_err.c
211	$(POST_PROCESS_O)
212
213# we need this in libgss so we don't have to link against mech_krb5
214pics/kv5m_err.o: $(KRB5ETDIR)/kv5m_err.c
215	$(COMPILE.c) -o $@ $(KRB5ETDIR)/kv5m_err.c
216	$(POST_PROCESS_O)
217
218# we need this in libgss so we don't have to link against mech_krb5
219pics/prof_err.o: $(KRB5ETDIR)/prof_err.c
220	$(COMPILE.c) -o $@ $(KRB5ETDIR)/prof_err.c
221	$(POST_PROCESS_O)
222
223# we need this in libgss so we don't have to link against mech_krb5
224pics/pty_err.o: $(KRB5ETDIR)/pty_err.c
225	$(COMPILE.c) -o $@ $(KRB5ETDIR)/pty_err.c
226	$(POST_PROCESS_O)
227
228# we need this in libgss so we don't have to link against mech_krb5
229pics/ss_err.o: $(KRB5ETDIR)/ss_err.c
230	$(COMPILE.c) -o $@ $(KRB5ETDIR)/ss_err.c
231	$(POST_PROCESS_O)
232
233# gen_oids.c is kept in the kernel since the OIDs declared in them are
234# used by rpcsec module
235pics/gen_oids.o: $(SRC)/uts/common/gssapi/gen_oids.c
236	$(COMPILE.c) -o $@ $(SRC)/uts/common/gssapi/gen_oids.c
237	$(POST_PROCESS_O)
238
239# include library targets
240include ../../Makefile.targ
241