s4:torture: Adapt KDC canon test to Heimdal upstream changes
[Samba.git] / source4 / heimdal / lib / gssapi / Makefile.am
blob744232e2e35b09c11b1d9d77092f99353dcebec6
1 # $Id$
3 include $(top_srcdir)/Makefile.am.common
5 AUTOMAKE_OPTIONS = subdir-objects
7 AM_CPPFLAGS += \
8         -I$(srcdir)/../krb5 \
9         -I$(srcdir) \
10         -I$(srcdir)/gssapi \
11         -I$(srcdir)/mech \
12         -I$(srcdir)/ntlm \
13         -I$(srcdir)/krb5 \
14         -I$(srcdir)/spnego \
15         -I$(srcdir)/sanon \
16         $(INCLUDE_libintl)
18 lib_LTLIBRARIES = libgssapi.la test_negoex_mech.la
20 krb5src = \
21         krb5/8003.c \
22         krb5/accept_sec_context.c \
23         krb5/acquire_cred.c \
24         krb5/add_cred.c \
25         krb5/address_to_krb5addr.c \
26         krb5/aeap.c \
27         krb5/arcfour.c \
28         krb5/canonicalize_name.c \
29         krb5/creds.c \
30         krb5/ccache_name.c \
31         krb5/cfx.c \
32         krb5/cfx.h \
33         krb5/compare_name.c \
34         krb5/compat.c \
35         krb5/context_time.c \
36         krb5/copy_ccache.c \
37         krb5/decapsulate.c \
38         krb5/delete_sec_context.c \
39         krb5/display_name.c \
40         krb5/display_status.c \
41         krb5/duplicate_cred.c \
42         krb5/duplicate_name.c \
43         krb5/encapsulate.c \
44         krb5/export_name.c \
45         krb5/export_sec_context.c \
46         krb5/external.c \
47         krb5/get_mic.c \
48         krb5/gsskrb5_locl.h \
49         $(srcdir)/krb5/gsskrb5-private.h \
50         krb5/import_name.c \
51         krb5/import_sec_context.c \
52         krb5/indicate_mechs.c \
53         krb5/init.c \
54         krb5/init_sec_context.c \
55         krb5/inquire_context.c \
56         krb5/inquire_cred.c \
57         krb5/inquire_cred_by_mech.c \
58         krb5/inquire_cred_by_oid.c \
59         krb5/inquire_mechs_for_name.c \
60         krb5/inquire_names_for_mech.c \
61         krb5/inquire_sec_context_by_oid.c \
62         krb5/pname_to_uid.c \
63         krb5/process_context_token.c \
64         krb5/prf.c \
65         krb5/release_buffer.c \
66         krb5/release_cred.c \
67         krb5/release_name.c \
68         krb5/sequence.c \
69         krb5/store_cred.c \
70         krb5/set_cred_option.c \
71         krb5/set_sec_context_option.c \
72         krb5/ticket_flags.c \
73         krb5/unwrap.c \
74         krb5/authorize_localname.c \
75         krb5/verify_mic.c \
76         krb5/wrap.c
78 mechsrc = \
79         mech/context.h \
80         mech/context.c \
81         mech/cred.h \
82         mech/cred.c \
83         mech/compat.h \
84         mech/doxygen.c \
85         mech/gss_accept_sec_context.c \
86         mech/gss_acquire_cred.c \
87         mech/gss_acquire_cred_from.c \
88         mech/gss_acquire_cred_impersonate_name.c \
89         mech/gss_acquire_cred_with_password.c \
90         mech/gss_add_cred.c \
91         mech/gss_add_cred_from.c \
92         mech/gss_add_cred_with_password.c \
93         mech/gss_add_oid_set_member.c \
94         mech/gss_aeap.c \
95         mech/gss_buffer_set.c \
96         mech/gss_canonicalize_name.c \
97         mech/gss_compare_name.c \
98         mech/gss_context_time.c \
99         mech/gss_create_empty_oid_set.c \
100         mech/gss_cred.c \
101         mech/gss_decapsulate_token.c \
102         mech/gss_delete_name_attribute.c \
103         mech/gss_delete_sec_context.c \
104         mech/gss_destroy_cred.c \
105         mech/gss_display_name.c \
106         mech/gss_display_name_ext.c \
107         mech/gss_display_status.c \
108         mech/gss_duplicate_cred.c \
109         mech/gss_duplicate_name.c \
110         mech/gss_duplicate_oid.c \
111         mech/gss_duplicate_oid_set.c \
112         mech/gss_encapsulate_token.c \
113         mech/gss_export_name.c \
114         mech/gss_export_name_composite.c \
115         mech/gss_export_sec_context.c \
116         mech/gss_get_mic.c \
117         mech/gss_get_neg_mechs.c \
118         mech/gss_get_name_attribute.c \
119         mech/gss_import_name.c \
120         mech/gss_import_sec_context.c \
121         mech/gss_indicate_mechs.c \
122         mech/gss_init_sec_context.c \
123         mech/gss_inquire_context.c \
124         mech/gss_inquire_cred.c \
125         mech/gss_inquire_cred_by_mech.c \
126         mech/gss_inquire_cred_by_oid.c \
127         mech/gss_inquire_mechs_for_name.c \
128         mech/gss_inquire_name.c \
129         mech/gss_inquire_names_for_mech.c \
130         mech/gss_krb5.c \
131         mech/gss_mech_switch.c \
132         mech/gss_mo.c \
133         mech/gss_names.c \
134         mech/gss_oid.c \
135         mech/gss_oid_equal.c \
136         mech/gss_oid_to_str.c \
137         mech/gss_pname_to_uid.c \
138         mech/gss_process_context_token.c \
139         mech/gss_pseudo_random.c \
140         mech/gss_release_buffer.c \
141         mech/gss_release_cred.c \
142         mech/gss_release_name.c \
143         mech/gss_release_oid.c \
144         mech/gss_release_oid_set.c \
145         mech/gss_rfc4121.c \
146         mech/gss_seal.c \
147         mech/gss_set_cred_option.c \
148         mech/gss_set_name_attribute.c \
149         mech/gss_set_neg_mechs.c \
150         mech/gss_set_sec_context_option.c \
151         mech/gss_sign.c \
152         mech/gss_store_cred.c \
153         mech/gss_store_cred_into.c \
154         mech/gss_test_oid_set_member.c \
155         mech/gss_unseal.c \
156         mech/gss_unwrap.c \
157         mech/gss_authorize_localname.c \
158         mech/gss_utils.c \
159         mech/gss_verify.c \
160         mech/gss_verify_mic.c \
161         mech/gss_wrap.c \
162         mech/gss_wrap_size_limit.c \
163         mech/gss_inquire_sec_context_by_oid.c \
164         mech/gssspi_exchange_meta_data.c \
165         mech/gssspi_query_mechanism_info.c \
166         mech/gssspi_query_meta_data.c \
167         mech/mech_switch.h \
168         mech/mech_locl.h \
169         mech/name.h \
170         mech/utils.h
172 spnegosrc = \
173         spnego/accept_sec_context.c \
174         spnego/compat.c \
175         spnego/context_storage.c \
176         spnego/context_stubs.c \
177         spnego/external.c \
178         spnego/init_sec_context.c \
179         spnego/negoex_ctx.c \
180         spnego/negoex_util.c \
181         spnego/spnego_locl.h \
182         spnego/negoex_locl.h \
183         $(srcdir)/spnego/spnego-private.h
185 ntlmsrc = \
186         ntlm/accept_sec_context.c \
187         ntlm/acquire_cred.c \
188         ntlm/add_cred.c \
189         ntlm/canonicalize_name.c \
190         ntlm/compare_name.c \
191         ntlm/context_time.c \
192         ntlm/creds.c \
193         ntlm/crypto.c \
194         ntlm/delete_sec_context.c \
195         ntlm/display_name.c \
196         ntlm/display_status.c \
197         ntlm/duplicate_name.c \
198         ntlm/export_name.c \
199         ntlm/export_sec_context.c \
200         ntlm/external.c \
201         ntlm/ntlm.h \
202         ntlm/import_name.c \
203         ntlm/import_sec_context.c \
204         ntlm/indicate_mechs.c \
205         ntlm/init_sec_context.c \
206         ntlm/inquire_context.c \
207         ntlm/inquire_cred_by_mech.c \
208         ntlm/inquire_mechs_for_name.c \
209         ntlm/inquire_names_for_mech.c \
210         ntlm/inquire_sec_context_by_oid.c \
211         ntlm/iter_cred.c \
212         ntlm/process_context_token.c \
213         ntlm/release_cred.c \
214         ntlm/release_name.c \
215         ntlm/set_sec_context_option.c \
216         ntlm/kdc.c
218 $(srcdir)/ntlm/ntlm-private.h: $(ntlmsrc)
219         cd $(srcdir) && perl ../../cf/make-proto.pl -q -P comment -p ntlm/ntlm-private.h $(ntlmsrc) || rm -f ntlm/ntlm-private.h
221 sanonsrc = \
222         sanon/accept_sec_context.c \
223         sanon/acquire_cred.c \
224         sanon/add_cred.c \
225         sanon/canonicalize_name.c \
226         sanon/compare_name.c \
227         sanon/context_time.c \
228         sanon/crypto.c \
229         sanon/delete_sec_context.c \
230         sanon/display_name.c \
231         sanon/display_status.c \
232         sanon/duplicate_cred.c \
233         sanon/duplicate_name.c \
234         sanon/export_name.c \
235         sanon/export_cred.c \
236         sanon/export_sec_context.c \
237         sanon/external.c \
238         sanon/import_cred.c \
239         sanon/import_name.c \
240         sanon/import_sec_context.c \
241         sanon/init_sec_context.c \
242         sanon/inquire_context.c \
243         sanon/inquire_cred.c \
244         sanon/inquire_cred_by_mech.c \
245         sanon/inquire_mechs_for_name.c \
246         sanon/inquire_names_for_mech.c \
247         sanon/inquire_sec_context_by_oid.c \
248         sanon/negoex.c \
249         sanon/process_context_token.c \
250         sanon/release_cred.c \
251         sanon/release_name.c \
252         sanon/sanon-private.h
254 dist_libgssapi_la_SOURCES  = \
255         $(krb5src) \
256         $(mechsrc) \
257         $(ntlmsrc) \
258         $(spnegosrc) \
259         $(sanonsrc)
261 nodist_libgssapi_la_SOURCES  = \
262         gkrb5_err.c \
263         gkrb5_err.h \
264         negoex_err.c \
265         negoex_err.h \
266         $(BUILT_SOURCES)
268 libgssapi_la_DEPENDENCIES = version-script.map
270 libgssapi_la_LDFLAGS = -version-info 3:0:0
272 if versionscript
273 libgssapi_la_LDFLAGS += $(LDFLAGS_VERSION_SCRIPT)$(srcdir)/version-script.map
274 endif
276 libgssapi_la_LIBADD = \
277         $(top_builddir)/lib/ntlm/libheimntlm.la \
278         $(top_builddir)/lib/krb5/libkrb5.la \
279         $(top_builddir)/lib/asn1/libasn1.la \
280         $(LIB_com_err) \
281         $(LIB_hcrypto) \
282         $(LIBADD_roken)
284 man_MANS = gssapi.3 gss_acquire_cred.3 mech/mech.5 gss-token.1
286 include_HEADERS = gssapi.h
287 noinst_HEADERS = \
288         gssapi_asn1.h \
289         gssapi_mech.h \
290         $(srcdir)/ntlm/ntlm-private.h \
291         $(srcdir)/spnego/spnego-private.h \
292         $(srcdir)/sanon/sanon-private.h \
293         $(srcdir)/krb5/gsskrb5-private.h
295 nobase_include_HEADERS = \
296         gssapi/gssapi.h \
297         gssapi/gssapi_krb5.h \
298         gssapi/gssapi_ntlm.h \
299         gssapi/gssapi_oid.h \
300         gssapi/gssapi_spnego.h
302 gssapidir = $(includedir)/gssapi
303 nodist_gssapi_HEADERS = gkrb5_err.h negoex_err.h
305 gssapi_files = asn1_GSSAPIContextToken.x
307 spnego_files =                                  \
308         asn1_ContextFlags.x                     \
309         asn1_MechType.x                         \
310         asn1_MechTypeList.x                     \
311         asn1_NegotiationToken.x                 \
312         asn1_NegotiationToken2.x                \
313         asn1_NegHints.x                         \
314         asn1_NegTokenInit.x                     \
315         asn1_NegTokenInit2.x                    \
316         asn1_NegTokenResp.x                     \
317         asn1_NegStateEnum.x
319 BUILTHEADERS = \
320         $(srcdir)/krb5/gsskrb5-private.h \
321         $(srcdir)/spnego/spnego-private.h \
322         $(srcdir)/sanon/sanon-private.h \
323         $(srcdir)/ntlm/ntlm-private.h
325 $(libgssapi_la_OBJECTS): $(BUILTHEADERS)
326 $(test_context_OBJECTS): $(BUILTHEADERS)
328 $(libgssapi_la_OBJECTS): $(srcdir)/version-script.map
330 BUILT_SOURCES = $(spnego_files:.x=.c) $(gssapi_files:.x=.c)
332 $(libgssapi_la_OBJECTS): gkrb5_err.h negoex_err.h
333 gkrb5_err.h: $(srcdir)/krb5/gkrb5_err.et
334 negoex_err.h: $(srcdir)/spnego/negoex_err.et
336 CLEANFILES = $(BUILT_SOURCES) \
337         gkrb5_err.[ch] negoex_err.[ch] \
338         $(spnego_files) spnego_asn1*.h* spnego_asn1_files spnego_asn1-template.[cx] \
339         $(gssapi_files) gssapi_asn1*.h* gssapi_asn1_files gssapi_asn1-template.[cx] \
340         gss-commands.h gss-commands.c
342 $(spnego_files) spnego_asn1.hx spnego_asn1-priv.hx: spnego_asn1_files
343 $(gssapi_files) gssapi_asn1.hx gssapi_asn1-priv.hx: gssapi_asn1_files
345 spnego_asn1_files: $(ASN1_COMPILE_DEP) $(srcdir)/spnego/spnego.asn1 $(srcdir)/spnego/spnego.opt
346         $(ASN1_COMPILE) --option-file=$(srcdir)/spnego/spnego.opt $(srcdir)/spnego/spnego.asn1 spnego_asn1
348 gssapi_asn1_files: $(ASN1_COMPILE_DEP) $(srcdir)/mech/gssapi.asn1
349         $(ASN1_COMPILE) $(srcdir)/mech/gssapi.asn1 gssapi_asn1
351 $(srcdir)/krb5/gsskrb5-private.h:
352         cd $(srcdir) && perl ../../cf/make-proto.pl -q -P comment -p krb5/gsskrb5-private.h $(krb5src) || rm -f krb5/gsskrb5-private.h
354 $(srcdir)/spnego/spnego-private.h:
355         cd $(srcdir) && perl ../../cf/make-proto.pl -q -P comment -p spnego/spnego-private.h $(spnegosrc) || rm -f spnego/spnego-private.h
357 $(srcdir)/sanon/sanon-private.h:
358         cd $(srcdir) && perl ../../cf/make-proto.pl -q -P comment -p sanon/sanon-private.h $(sanonsrc) || rm -f sanon/sanon-private.h
360 TESTS = test_oid test_names test_cfx
361 # test_sequence 
363 test_cfx_SOURCES = krb5/test_cfx.c
365 check_PROGRAMS = test_acquire_cred $(TESTS)
367 bin_PROGRAMS = gsstool gss-token
368 noinst_PROGRAMS = test_cred test_kcred test_context test_ntlm test_add_store_cred
370 test_context_SOURCES = test_context.c test_common.c test_common.h
371 test_ntlm_SOURCES = test_ntlm.c test_common.c test_common.h
372 test_acquire_cred_SOURCES = test_acquire_cred.c test_common.c test_common.h
374 test_add_store_cred_SOURCES = test_add_store_cred.c
376 test_ntlm_LDADD = \
377         $(top_builddir)/lib/ntlm/libheimntlm.la \
378         $(LDADD)
380 LDADD = libgssapi.la \
381         $(top_builddir)/lib/krb5/libkrb5.la \
382         $(LIB_roken)
384 # gss
386 dist_gsstool_SOURCES = gsstool.c
387 nodist_gsstool_SOURCES = gss-commands.c gss-commands.h
388 dist_gss_token_SOURCES = gss-token.c
390 gsstool_LDADD = libgssapi.la \
391         $(top_builddir)/lib/sl/libsl.la \
392         $(top_builddir)/lib/krb5/libkrb5.la \
393         $(LIB_readline) \
394         $(LIB_roken)
396 gss_token_LDADD = libgssapi.la \
397         $(top_builddir)/lib/krb5/libkrb5.la \
398         $(LIB_roken)
400 gss-commands.c gss-commands.h: gss-commands.in
401         $(SLC) $(srcdir)/gss-commands.in
403 $(gsstool_OBJECTS): gss-commands.h
405 EXTRA_DIST = \
406         NTMakefile \
407         libgssapi-version.rc \
408         libgssapi-exports.def \
409         $(man_MANS) \
410         gen-oid.pl \
411         gssapi/gssapi_netlogon.h \
412         krb5/test_acquire_cred.c \
413         krb5/test_cred.c \
414         krb5/test_kcred.c \
415         krb5/test_oid.c \
416         oid.txt \
417         krb5/gkrb5_err.et \
418         mech/gssapi.asn1 \
419         spnego/spnego.asn1 \
420         spnego/spnego.opt \
421         spnego/negoex_err.et \
422         test_negoex_mech.c \
423         version-script.map \
424         gss-commands.in
426 $(libgssapi_la_OBJECTS): gkrb5_err.h gssapi_asn1.h gssapi_asn1-priv.h
427 $(libgssapi_la_OBJECTS): spnego_asn1.h spnego_asn1-priv.h
428 $(libgssapi_la_OBJECTS): $(srcdir)/gssapi/gssapi_oid.h
430 gkrb5_err.h gkrb5_err.c: $(srcdir)/krb5/gkrb5_err.et
431         $(COMPILE_ET) $(srcdir)/krb5/gkrb5_err.et
433 negoex_err.h negoex_err.c: $(srcdir)/spnego/negoex_err.et
434         $(COMPILE_ET) $(srcdir)/spnego/negoex_err.et
436 $(srcdir)/gssapi/gssapi_oid.h $(srcdir)/mech/gss_oid.c:
437         perl $(srcdir)/gen-oid.pl -b base -h $(srcdir)/oid.txt > $(srcdir)/gssapi/gssapi_oid.h
438         perl $(srcdir)/gen-oid.pl -b base $(srcdir)/oid.txt > $(srcdir)/mech/gss_oid.c
441 # NegoEx test mechanism, uses decode_GSSAPIContextToken
444 test_negoex_mech_la_SOURCES = test_negoex_mech.c $(gssapi_files:.x=.c)
445 test_negoex_mech_la_LDFLAGS = -module
446 test_negoex_mech_la_LIBADD = \
447         $(top_builddir)/lib/asn1/libasn1.la \
448         libgssapi.la