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