Sync usage with man page.
[netbsd-mini2440.git] / lib / libgssapi / Makefile
blobcf4e1a5030e07f21d6ac29bf0e60a350ceee44e5
1 # $NetBSD: Makefile,v 1.21 2008/08/29 00:02:22 gmcgarry Exp $
3 USE_FORT?= yes # network protocol library
5 NOLINT= # defined
7 .include <bsd.own.mk>
9 DIST= ${NETBSDSRCDIR}/crypto/dist
10 .PATH: ${DIST}/heimdal/lib/gssapi \
11 ${DIST}/heimdal/lib/gssapi/krb5 \
12 ${DIST}/heimdal/lib/gssapi/mech \
13 ${DIST}/heimdal/lib/gssapi/spnego \
14 ${DIST}/heimdal/lib/gssapi/ntlm
16 WARNS?= 1
18 LIB= gssapi
20 LIBDPLIBS+= krb5 ${.CURDIR}/../libkrb5 \
21 asn1 ${.CURDIR}/../libasn1 \
22 com_err ${.CURDIR}/../libcom_err \
23 roken ${.CURDIR}/../libroken \
24 crypto ${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto \
25 heimntlm ${.CURDIR}/../libheimntlm
27 .if ${USETOOLS} != "yes"
28 COMPILEETOBJ!= cd ${NETBSDSRCDIR}/lib/libcom_err/compile_et && ${PRINTOBJDIR}
29 TOOL_COMPILE_ET= ${COMPILEETOBJ}/compile_et
31 ASN1COMPILEOBJ!= cd ${NETBSDSRCDIR}/lib/libasn1/asn1_compile && ${PRINTOBJDIR}
32 TOOL_ASN1_COMPILE= ${ASN1COMPILEOBJ}/asn1_compile
33 .endif
35 gkrb5_err.c gkrb5_err.h: krb5/gkrb5_err.et ${TOOL_COMPILE_ET}
36 ${TOOL_COMPILE_ET} ${DIST}/heimdal/lib/gssapi/krb5/gkrb5_err.et
38 gssapi_files = asn1_GSSAPIContextToken.x
39 spnego_files = \
40 asn1_ContextFlags.x \
41 asn1_MechType.x \
42 asn1_MechTypeList.x \
43 asn1_NegotiationToken.x \
44 asn1_NegotiationTokenWin.x \
45 asn1_NegHints.x \
46 asn1_NegTokenInit.x \
47 asn1_NegTokenInitWin.x \
48 asn1_NegTokenResp.x
50 DPSRCS= spnego_asn1.h gssapi_asn1.h gkrb5_err.h
52 BUILT_SOURCES= \
53 ${gssapi_files:.x=.c} \
54 ${spnego_files:.x=.c} \
55 gkrb5_err.c
57 krb5src= \
58 krb5__8003.c \
59 krb5__accept_sec_context.c \
60 krb5__acquire_cred.c \
61 krb5__add_cred.c \
62 krb5__address_to_krb5addr.c \
63 krb5__arcfour.c \
64 krb5__canonicalize_name.c \
65 krb5__ccache_name.c \
66 krb5__cfx.c \
67 krb5__compare_name.c \
68 krb5__compat.c \
69 krb5__context_time.c \
70 krb5__copy_ccache.c \
71 krb5__decapsulate.c \
72 krb5__delete_sec_context.c \
73 krb5__display_name.c \
74 krb5__display_status.c \
75 krb5__duplicate_name.c \
76 krb5__encapsulate.c \
77 krb5__export_name.c \
78 krb5__export_sec_context.c \
79 krb5__external.c \
80 krb5__get_mic.c \
81 krb5__import_name.c \
82 krb5__import_sec_context.c \
83 krb5__indicate_mechs.c \
84 krb5__init.c \
85 krb5__init_sec_context.c \
86 krb5__inquire_context.c \
87 krb5__inquire_cred.c \
88 krb5__inquire_cred_by_mech.c \
89 krb5__inquire_cred_by_oid.c \
90 krb5__inquire_mechs_for_name.c \
91 krb5__inquire_names_for_mech.c \
92 krb5__inquire_sec_context_by_oid.c \
93 krb5__process_context_token.c \
94 krb5__prf.c \
95 krb5__release_buffer.c \
96 krb5__release_cred.c \
97 krb5__release_name.c \
98 krb5__sequence.c \
99 krb5__set_cred_option.c \
100 krb5__set_sec_context_option.c \
101 krb5__ticket_flags.c \
102 krb5__unwrap.c \
103 krb5__v1.c \
104 krb5__verify_mic.c \
105 krb5__wrap.c
107 mechsrc= \
108 mech__context.c \
109 mech__gss_accept_sec_context.c \
110 mech__gss_acquire_cred.c \
111 mech__gss_add_cred.c \
112 mech__gss_add_oid_set_member.c \
113 mech__gss_buffer_set.c \
114 mech__gss_canonicalize_name.c \
115 mech__gss_compare_name.c \
116 mech__gss_context_time.c \
117 mech__gss_create_empty_oid_set.c \
118 mech__gss_decapsulate_token.c \
119 mech__gss_delete_sec_context.c \
120 mech__gss_display_name.c \
121 mech__gss_display_status.c \
122 mech__gss_duplicate_name.c \
123 mech__gss_duplicate_oid.c \
124 mech__gss_encapsulate_token.c \
125 mech__gss_export_name.c \
126 mech__gss_export_sec_context.c \
127 mech__gss_get_mic.c \
128 mech__gss_import_name.c \
129 mech__gss_import_sec_context.c \
130 mech__gss_indicate_mechs.c \
131 mech__gss_init_sec_context.c \
132 mech__gss_inquire_context.c \
133 mech__gss_inquire_cred.c \
134 mech__gss_inquire_cred_by_mech.c \
135 mech__gss_inquire_cred_by_oid.c \
136 mech__gss_inquire_mechs_for_name.c \
137 mech__gss_inquire_names_for_mech.c \
138 mech__gss_krb5.c \
139 mech__gss_mech_switch.c \
140 mech__gss_names.c \
141 mech__gss_oid_equal.c \
142 mech__gss_oid_to_str.c \
143 mech__gss_process_context_token.c \
144 mech__gss_pseudo_random.c \
145 mech__gss_release_buffer.c \
146 mech__gss_release_cred.c \
147 mech__gss_release_name.c \
148 mech__gss_release_oid.c \
149 mech__gss_release_oid_set.c \
150 mech__gss_seal.c \
151 mech__gss_set_cred_option.c \
152 mech__gss_set_sec_context_option.c \
153 mech__gss_sign.c \
154 mech__gss_test_oid_set_member.c \
155 mech__gss_unseal.c \
156 mech__gss_unwrap.c \
157 mech__gss_utils.c \
158 mech__gss_verify.c \
159 mech__gss_verify_mic.c \
160 mech__gss_wrap.c \
161 mech__gss_wrap_size_limit.c \
162 mech__gss_inquire_sec_context_by_oid.c
164 spnegosrc= \
165 spnego__accept_sec_context.c \
166 spnego__compat.c \
167 spnego__context_stubs.c \
168 spnego__cred_stubs.c \
169 spnego__external.c \
170 spnego__init_sec_context.c
172 ntlmsrc= \
173 ntlm__accept_sec_context.c \
174 ntlm__acquire_cred.c \
175 ntlm__add_cred.c \
176 ntlm__canonicalize_name.c \
177 ntlm__compare_name.c \
178 ntlm__context_time.c \
179 ntlm__crypto.c \
180 ntlm__delete_sec_context.c \
181 ntlm__display_name.c \
182 ntlm__display_status.c \
183 ntlm__duplicate_name.c \
184 ntlm__export_name.c \
185 ntlm__export_sec_context.c \
186 ntlm__external.c \
187 ntlm__import_name.c \
188 ntlm__import_sec_context.c \
189 ntlm__indicate_mechs.c \
190 ntlm__init_sec_context.c \
191 ntlm__inquire_context.c \
192 ntlm__inquire_cred.c \
193 ntlm__inquire_cred_by_mech.c \
194 ntlm__inquire_mechs_for_name.c \
195 ntlm__inquire_names_for_mech.c \
196 ntlm__process_context_token.c \
197 ntlm__release_cred.c \
198 ntlm__release_name.c \
199 ntlm__digest.c
201 SRCS= ${krb5src} ${mechsrc} ${spnegosrc} ${ntlmsrc} ${BUILT_SOURCES}
203 .for i in ${krb5src} ${mechsrc} ${spnegosrc} ${ntlmsrc}
204 BUILDSYMLINKS+= ${i:S@__@/@} ${i}
205 .endfor
207 MAN= \
208 gssapi.3 \
209 gss_acquire_cred.3 \
210 mech.5
212 MLINKS= \
213 gss_acquire_cred.3 gss_accept_sec_context.3 \
214 gss_acquire_cred.3 gss_add_cred.3 \
215 gss_acquire_cred.3 gss_add_oid_set_member.3 \
216 gss_acquire_cred.3 gss_canonicalize_name.3 \
217 gss_acquire_cred.3 gss_compare_name.3 \
218 gss_acquire_cred.3 gss_context_time.3 \
219 gss_acquire_cred.3 gss_create_empty_oid_set.3 \
220 gss_acquire_cred.3 gss_delete_sec_context.3 \
221 gss_acquire_cred.3 gss_display_name.3 \
222 gss_acquire_cred.3 gss_display_status.3 \
223 gss_acquire_cred.3 gss_duplicate_name.3 \
224 gss_acquire_cred.3 gss_export_name.3 \
225 gss_acquire_cred.3 gss_export_sec_context.3 \
226 gss_acquire_cred.3 gss_get_mic.3 \
227 gss_acquire_cred.3 gss_import_name.3 \
228 gss_acquire_cred.3 gss_import_sec_context.3 \
229 gss_acquire_cred.3 gss_indicate_mechs.3 \
230 gss_acquire_cred.3 gss_init_sec_context.3 \
231 gss_acquire_cred.3 gss_inquire_context.3 \
232 gss_acquire_cred.3 gss_inquire_cred.3 \
233 gss_acquire_cred.3 gss_inquire_cred_by_mech.3 \
234 gss_acquire_cred.3 gss_inquire_mechs_for_name.3 \
235 gss_acquire_cred.3 gss_inquire_names_for_mech.3 \
236 gss_acquire_cred.3 gss_krb5_ccache_name.3 \
237 gss_acquire_cred.3 gss_krb5_compat_des3_mic.3 \
238 gss_acquire_cred.3 gss_krb5_copy_ccache.3 \
239 gss_acquire_cred.3 gss_krb5_get_tkt_flags.3 \
240 gss_acquire_cred.3 gss_krb5_import_ccache.3 \
241 gss_acquire_cred.3 gss_krb5_import_cred.3 \
242 gss_acquire_cred.3 gss_process_context_token.3 \
243 gss_acquire_cred.3 gss_release_buffer.3 \
244 gss_acquire_cred.3 gss_release_cred.3 \
245 gss_acquire_cred.3 gss_release_name.3 \
246 gss_acquire_cred.3 gss_release_oid_set.3 \
247 gss_acquire_cred.3 gss_seal.3 \
248 gss_acquire_cred.3 gss_sign.3 \
249 gss_acquire_cred.3 gss_test_oid_set_member.3 \
250 gss_acquire_cred.3 gss_unseal.3 \
251 gss_acquire_cred.3 gss_unwrap.3 \
252 gss_acquire_cred.3 gss_verify.3 \
253 gss_acquire_cred.3 gss_verify_mic.3 \
254 gss_acquire_cred.3 gss_wrap.3 \
255 gss_acquire_cred.3 gss_wrap_size_limit.3 \
256 gss_acquire_cred.3 gsskrb5_extract_authz_data_from_sec_context.3 \
257 gss_acquire_cred.3 gsskrb5_register_acceptor_identity.3
259 INCS= gssapi.h
260 INCS+= gssapi/gssapi.h gssapi/gssapi_krb5.h gssapi/gssapi_spnego.h
261 INCSDIR= /usr/include
263 CLEANFILES+= ${BUILT_SOURCES} \
264 ${spnego_files} spnego_asn1_files \
265 spnego_asn1.h spnego_asn1.hx \
266 ${gssapi_files} gssapi_asn1_files \
267 gssapi_asn1.h gssapi_asn1.hx \
268 gkrb5_err.h \
269 ${krb5src} ${mechsrc} ${spnegosrc} ${ntlmsrc}
271 ${spnego_files} spnego_asn1.hx: spnego_asn1_files
272 ${gssapi_files} gssapi_asn1.hx: gssapi_asn1_files
274 spnego_asn1_files: spnego/spnego.asn1 ${TOOL_ASN1_COMPILE}
275 ${TOOL_ASN1_COMPILE} \
276 --sequence=MechTypeList \
277 ${DIST}/heimdal/lib/gssapi/spnego/spnego.asn1 spnego_asn1
279 gssapi_asn1_files: mech/gssapi.asn1 ${TOOL_ASN1_COMPILE}
280 ${TOOL_ASN1_COMPILE} \
281 ${DIST}/heimdal/lib/gssapi/mech/gssapi.asn1 gssapi_asn1
283 ASN1!= cd ${NETBSDSRCDIR}/lib/libasn1 && ${PRINTOBJDIR}
284 KRB5!= cd ${NETBSDSRCDIR}/lib/libkrb5 && ${PRINTOBJDIR}
286 CPPFLAGS+= -I. \
287 -I${NETBSDSRCDIR}/include/heimdal \
288 -I${DIST}/heimdal/include \
289 -I${DIST}/heimdal/lib/com_err \
290 -I${DIST}/heimdal/lib/roken \
291 -I${ASN1} \
292 -I${DIST}/heimdal/lib/asn1 \
293 -I${KRB5} \
294 -I${DIST}/heimdal/lib/krb5 \
295 -I${DIST}/heimdal/lib/gssapi \
296 -I${DIST}/heimdal/lib/gssapi/mech \
297 -I${DIST}/heimdal/lib/ntlm \
298 -DHAVE_CONFIG_H
300 .if (${USE_INET6} != "no")
301 CPPFLAGS+=-DHAVE_IPV6
302 .endif
304 .if (defined(HAVE_GCC) && ${HAVE_GCC} == 4) || defined(HAVE_PCC)
305 COPTS+= -Wno-pointer-sign
306 .endif
308 .include <bsd.lib.mk>
310 .SUFFIXES: .hx .x
312 .hx.h:
313 @cmp -s $< $@ 2> /dev/null || cp $< $@
315 .x.c:
316 @cmp -s $< $@ 2> /dev/null || cp $< $@