Unleashed v1.4
[unleashed.git] / usr / src / lib / libgss / Makefile.com
blob7bf4f98ed0d2113ad97cb4d0895b8615a5caaaba
2 # CDDL HEADER START
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]
19 # CDDL HEADER END
22 # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright (c) 2018, Joyent, Inc.
26 LIBRARY = libgss.a
27 VERS = .1
29 GSSOBJECTS      = 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 \
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 \
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
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
96 LIBS =  $(DYNLIB)
98 LDLIBS +=       -lc
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/ \
104                 -DHAVE_STDLIB_H
106 CERRWARN +=     -Wno-unused-function
107 CERRWARN +=     -Wno-uninitialized
108 CERRWARN +=     -Wno-parentheses
109 CERRWARN +=     -Wno-empty-body
111 # not linted
112 SMATCH=off
114 .KEEP_STATE:
116 all: $(LIBS)
118 $(GSSCREDOBJ:%.o=pics/%.o):
119         $(COMPILE.c) -o $@ $(@:pics/%.o=$(GSSCRED_DIR)/%.c)
120         $(POST_PROCESS_O)
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
125         $(POST_PROCESS_O)
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
130         $(POST_PROCESS_O)
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
135         $(POST_PROCESS_O)
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
140         $(POST_PROCESS_O)
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
145         $(POST_PROCESS_O)
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
150         $(POST_PROCESS_O)
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
155         $(POST_PROCESS_O)
157 pics/adm_err.o: $(KRB5ETDIR)/adm_err.c
158         $(COMPILE.c) -o $@ $(KRB5ETDIR)/adm_err.c
159         $(POST_PROCESS_O)
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
164         $(POST_PROCESS_O)
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
169         $(POST_PROCESS_O)
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
174         $(POST_PROCESS_O)
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
179         $(POST_PROCESS_O)
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
185         $(POST_PROCESS_O)
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
190         $(POST_PROCESS_O)
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
195         $(POST_PROCESS_O)
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
200         $(POST_PROCESS_O)
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
205         $(POST_PROCESS_O)
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
210         $(POST_PROCESS_O)
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
215         $(POST_PROCESS_O)
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
220         $(POST_PROCESS_O)
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
225         $(POST_PROCESS_O)
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
230         $(POST_PROCESS_O)
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
236         $(POST_PROCESS_O)       
238 # include library targets
239 include ../../Makefile.targ