xref: /titanic_50/usr/src/lib/libgss/Makefile.com (revision 0a47c91c895e274dd0990009919e30e984364a8b)
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
109CERRWARN +=	-_gcc=-Wno-unused-function
110CERRWARN +=	-_gcc=-Wno-uninitialized
111CERRWARN +=	-_gcc=-Wno-parentheses
112CERRWARN +=	-_gcc=-Wno-empty-body
113
114.KEEP_STATE:
115
116all: $(LIBS)
117
118lintcheck:=	SRCS= $(GSSLINTSRC)
119
120lint:  lintcheck
121
122$(GSSCREDOBJ:%.o=pics/%.o):
123	$(COMPILE.c) -o $@ $(@:pics/%.o=$(GSSCRED_DIR)/%.c)
124	$(POST_PROCESS_O)
125
126# we need this in libgss so we don't have to link against mech_krb5
127pics/rel_buffer.o: $(KRB5DIR)/rel_buffer.c
128	$(COMPILE.c) -o $@ $(KRB5DIR)/rel_buffer.c
129	$(POST_PROCESS_O)
130
131# we need this in libgss so we don't have to link against mech_krb5
132pics/util_buffer_set.o: $(KRB5DIR)/util_buffer_set.c
133	$(COMPILE.c) -o $@ $(KRB5DIR)/util_buffer_set.c
134	$(POST_PROCESS_O)
135
136# we need this in libgss so we don't have to link against mech_krb5
137pics/disp_com_err_status.o: $(KRB5DIR)/disp_com_err_status.c
138	$(COMPILE.c) -o $@ $(KRB5DIR)/disp_com_err_status.c
139	$(POST_PROCESS_O)
140
141# we need this in libgss so we don't have to link against mech_krb5
142pics/util_buffer.o: $(KRB5DIR)/util_buffer.c
143	$(COMPILE.c) -o $@ $(KRB5DIR)/util_buffer.c
144	$(POST_PROCESS_O)
145
146# we need this in libgss so we don't have to link against mech_krb5
147pics/util_errmap.o: $(KRB5DIR)/util_errmap.c
148	$(COMPILE.c) -o $@ $(KRB5DIR)/util_errmap.c
149	$(POST_PROCESS_O)
150
151# we need this in libgss so we don't have to link against mech_krb5
152pics/error_message.o: $(KRB5ETDIR)/error_message.c
153	$(COMPILE.c) -o $@ $(KRB5ETDIR)/error_message.c
154	$(POST_PROCESS_O)
155
156# we need this in libgss so we don't have to link against mech_krb5
157pics/adb_err.o: $(KRB5ETDIR)/adb_err.c
158	$(COMPILE.c) -o $@ $(KRB5ETDIR)/adb_err.c
159	$(POST_PROCESS_O)
160
161pics/adm_err.o: $(KRB5ETDIR)/adm_err.c
162	$(COMPILE.c) -o $@ $(KRB5ETDIR)/adm_err.c
163	$(POST_PROCESS_O)
164
165# we need this in libgss so we don't have to link against mech_krb5
166pics/asn1_err.o: $(KRB5ETDIR)/asn1_err.c
167	$(COMPILE.c) -o $@ $(KRB5ETDIR)/asn1_err.c
168	$(POST_PROCESS_O)
169
170# we need this in libgss so we don't have to link against mech_krb5
171pics/chpass_util_strings.o: $(KRB5ETDIR)/chpass_util_strings.c
172	$(COMPILE.c) -o $@ $(KRB5ETDIR)/chpass_util_strings.c
173	$(POST_PROCESS_O)
174
175# we need this in libgss so we don't have to link against mech_krb5
176pics/gssapi_err_generic.o: $(KRB5ETDIR)/gssapi_err_generic.c
177	$(COMPILE.c) -o $@ $(KRB5ETDIR)/gssapi_err_generic.c
178	$(POST_PROCESS_O)
179
180# we need this in libgss so we don't have to link against mech_krb5
181pics/gssapi_err_krb5.o: $(KRB5ETDIR)/gssapi_err_krb5.c
182	$(COMPILE.c) -o $@ $(KRB5ETDIR)/gssapi_err_krb5.c
183	$(POST_PROCESS_O)
184
185
186# we need this in libgss so we don't have to link against mech_krb5
187pics/import_err.o: $(KRB5ETDIR)/import_err.c
188	$(COMPILE.c) -o $@ $(KRB5ETDIR)/import_err.c
189	$(POST_PROCESS_O)
190
191# we need this in libgss so we don't have to link against mech_krb5
192pics/kadm_err.o: $(KRB5ETDIR)/kadm_err.c
193	$(COMPILE.c) -o $@ $(KRB5ETDIR)/kadm_err.c
194	$(POST_PROCESS_O)
195
196# we need this in libgss so we don't have to link against mech_krb5
197pics/kdb5_err.o: $(KRB5ETDIR)/kdb5_err.c
198	$(COMPILE.c) -o $@ $(KRB5ETDIR)/kdb5_err.c
199	$(POST_PROCESS_O)
200
201# we need this in libgss so we don't have to link against mech_krb5
202pics/kdc5_err.o: $(KRB5ETDIR)/kdc5_err.c
203	$(COMPILE.c) -o $@ $(KRB5ETDIR)/kdc5_err.c
204	$(POST_PROCESS_O)
205
206# we need this in libgss so we don't have to link against mech_krb5
207pics/kpasswd_strings.o: $(KRB5ETDIR)/kpasswd_strings.c
208	$(COMPILE.c) -o $@ $(KRB5ETDIR)/kpasswd_strings.c
209	$(POST_PROCESS_O)
210
211# we need this in libgss so we don't have to link against mech_krb5
212pics/krb5_err.o: $(KRB5ETDIR)/krb5_err.c
213	$(COMPILE.c) -o $@ $(KRB5ETDIR)/krb5_err.c
214	$(POST_PROCESS_O)
215
216# we need this in libgss so we don't have to link against mech_krb5
217pics/kv5m_err.o: $(KRB5ETDIR)/kv5m_err.c
218	$(COMPILE.c) -o $@ $(KRB5ETDIR)/kv5m_err.c
219	$(POST_PROCESS_O)
220
221# we need this in libgss so we don't have to link against mech_krb5
222pics/prof_err.o: $(KRB5ETDIR)/prof_err.c
223	$(COMPILE.c) -o $@ $(KRB5ETDIR)/prof_err.c
224	$(POST_PROCESS_O)
225
226# we need this in libgss so we don't have to link against mech_krb5
227pics/pty_err.o: $(KRB5ETDIR)/pty_err.c
228	$(COMPILE.c) -o $@ $(KRB5ETDIR)/pty_err.c
229	$(POST_PROCESS_O)
230
231# we need this in libgss so we don't have to link against mech_krb5
232pics/ss_err.o: $(KRB5ETDIR)/ss_err.c
233	$(COMPILE.c) -o $@ $(KRB5ETDIR)/ss_err.c
234	$(POST_PROCESS_O)
235
236# gen_oids.c is kept in the kernel since the OIDs declared in them are
237# used by rpcsec module
238pics/gen_oids.o: $(SRC)/uts/common/gssapi/gen_oids.c
239	$(COMPILE.c) -o $@ $(SRC)/uts/common/gssapi/gen_oids.c
240	$(POST_PROCESS_O)
241
242# include library targets
243include ../../Makefile.targ
244