xref: /titanic_50/usr/src/lib/libgss/Makefile.com (revision 380acbbe9da7dc2cbab5b6db169ec6968dd927fa)
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
25LIBRARY = libgss.a
26VERS = .1
27
28GSSOBJECTS	= g_acquire_cred.o \
29	  g_acquire_cred_with_pw.o \
30	  g_store_cred.o \
31	  g_rel_cred.o \
32	  g_init_sec_context.o \
33	  g_accept_sec_context.o \
34	  g_process_context.o \
35	  g_delete_sec_context.o \
36	  g_imp_sec_context.o \
37	  g_exp_sec_context.o \
38	  g_context_time.o \
39	  g_sign.o \
40	  g_verify.o \
41	  g_seal.o \
42	  g_unseal.o \
43	  g_dsp_status.o \
44	  g_compare_name.o \
45	  g_dsp_name.o \
46	  g_imp_name.o \
47	  g_rel_name.o \
48	  g_rel_buffer.o \
49	  g_rel_oid_set.o \
50	  g_oid_ops.o \
51	  g_inquire_cred.o \
52	  g_inquire_context.o \
53	  g_inquire_names.o \
54	  g_initialize.o \
55	  g_glue.o \
56	  gssd_pname_to_uid.o \
57	  oid_ops.o \
58	  g_canon_name.o \
59	  g_dup_name.o \
60	  g_export_name.o \
61	  g_utils.o \
62	  g_userok.o \
63	  g_buffer_set.o \
64	  g_inq_context_oid.o \
65
66
67# defines the duplicate sources we share with gsscred
68GSSCRED_DIR =	$(SRC)/cmd/gss/gsscred
69GSSCREDOBJ =	gsscred_utils.o gsscred_file.o
70# defines the duplicate sources we share with krb5 mech
71KRB5DIR= $(SRC)/lib/gss_mechs/mech_krb5/mech
72KRB5OBJ= rel_buffer.o util_buffer_set.o disp_com_err_status.o \
73	      util_buffer.o  util_errmap.o
74# defines the duplicate sources we share with krb5 mech error table
75KRB5ETDIR= $(SRC)/lib/gss_mechs/mech_krb5/et
76KRB5ETOBJ= error_message.o adb_err.o adm_err.o asn1_err.o \
77	      chpass_util_strings.o \
78	      gssapi_err_krb5.o gssapi_err_generic.o \
79	      import_err.o \
80	      kadm_err.o kdb5_err.o kdc5_err.o kpasswd_strings.o krb5_err.o \
81	      kv5m_err.o prof_err.o pty_err.o ss_err.o
82# defines the duplicate sources we share with kernel module
83UTSGSSDIR =	$(SRC)/uts/common/gssapi
84UTSGSSOBJ =	gen_oids.o
85
86SRCS +=		$(GSSCREDOBJ:%.o=$(GSSCRED_DIR)/%.c) \
87		$(KRB5OBJ:%.o=$(KRB5DIR)/%.c) \
88		$(KRB5ETOBJ:%.o=$(KRB5ETDIR)/%.c) \
89		$(UTSGSSOBJ:%.o=$(UTSGSSDIR)/%.c)
90GSSLINTSRC =	$(GSSOBJECTS:%.o=$(SRCDIR)/%.c) \
91		$(GSSCREDOBJ:%.o=$(GSSCRED_DIR)/%.c) \
92		$(UTSGSSOBJ:%.o=$(UTSGSSDIR)/%.c)
93OBJECTS =	$(GSSOBJECTS) $(GSSCREDOBJ) $(KRB5OBJ) $(UTSGSSOBJ) $(KRB5ETOBJ)
94
95# include library definitions
96include ../../Makefile.lib
97
98LIBS =	$(DYNLIB) $(LINTLIB)
99
100$(LINTLIB):=	SRCS = $(SRCDIR)/$(LINTSRC)
101LDLIBS += 	-lc
102
103CPPFLAGS += 	-I$(GSSCRED_DIR) -I$(SRC)/uts/common/gssapi/include \
104		 -I$(SRC)/uts/common/gssapi/mechs/krb5/include \
105		 -I$(SRC)/uts/common/gssapi/ \
106		 -I$(SRC)/lib/gss_mechs/mech_krb5/include/ \
107		-DHAVE_STDLIB_H
108
109$(EXPORT_RELEASE_BUILD)include $(CLOSED)/lib/libgss/Makefile.export
110
111.KEEP_STATE:
112
113all: $(LIBS)
114
115lintcheck:=	SRCS= $(GSSLINTSRC)
116
117lint:  lintcheck
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