49307f39b0deaee8459c624a624aea691b47dadd
[samba.git] / source4 / heimdal_build / wscript_build
1 #! /usr/bin/env python
2
3 # we sould call out to a new bld.SAMBA_XXXXX() function
4 # I want to hide gory details from samba devels inside the wafsamba tool
5
6 bld(
7     rule="${PYTHON} ${SRC[0].abspath()} ${SRC[1].abspath()} ${SRC[1].parent.abspath(env)}",
8     source = '../heimdal/lib/wind/gen-errorlist.py ../heimdal/lib/wind/rfc3454.txt ../heimdal/lib/wind/stringprep.py',
9     target = '../heimdal/lib/wind/errorlist_table.c ../heimdal/lib/wind/errorlist_table.h',
10     before = 'cc',
11     name="HEIMDAL_ERRORLIST"
12 )
13
14
15 # normalize_table.c rules
16 #$(heimdalsrcdir)/lib/wind/normalize_table.h $(heimdalsrcdir)/lib/wind/normalize_table.c: $(heimdalsrcdir)/lib/wind/UnicodeData.txt $(heimdalsrcdir)/lib/wind/CompositionExclusions-3.2.0.txt $(heimdalsrcdir)/lib/wind/gen-normalize.py
17 #        $(PYTHON) $(heimdalsrcdir)/lib/wind/gen-normalize.py $(heimdalsrcdir)/lib/wind/UnicodeData.txt $(heimdalsrcdir)/lib/wind/CompositionExclusions-3.2.0.txt $(heimdalsrcdir)/lib/wind/
18
19 bld(rule="${PYTHON} ${SRC[0].abspath()} ${SRC[1].abspath()} ${SRC[2].abspath()} ${SRC[1].parent.abspath(env)}",
20     source = '../heimdal/lib/wind/gen-normalize.py ../heimdal/lib/wind/UnicodeData.txt ../heimdal/lib/wind/CompositionExclusions-3.2.0.txt',
21     target = '../heimdal/lib/wind/normalize_table.h ../heimdal/lib/wind/normalize_table.c',
22     before = 'cc',
23     name = 'HEIMDAL_NORMALIZE_TABLE'
24 )
25
26 # combining_table.[ch] rules
27 #$(heimdalsrcdir)/lib/wind/combining_table.h $(heimdalsrcdir)/lib/wind/combining_table.c: $(heimdalsrcdir)/lib/wind/UnicodeData.txt $(heimdalsrcdir)/lib/wind/gen-combining.py
28 #       $(PYTHON) $(heimdalsrcdir)/lib/wind/gen-combining.py $(heimdalsrcdir)/lib/wind/UnicodeData.txt $(heimdalsrcdir)/lib/wind/
29
30
31 bld(rule="${PYTHON} ${SRC[0].abspath()} ${SRC[1].abspath()} ${SRC[1].parent.abspath(env)}",
32     source = '../heimdal/lib/wind/gen-combining.py ../heimdal/lib/wind/UnicodeData.txt',
33     target = '../heimdal/lib/wind/combining_table.h ../heimdal/lib/wind/combining_table.c',
34     before = 'cc',
35     name = 'HEIMDAL_COMBINING_TABLE'
36 )
37
38 # bidi_table rules
39 #$(heimdalsrcdir)/lib/wind/bidi_table.h $(heimdalsrcdir)/lib/wind/bidi_table.c: $(heimdalsrcdir)/lib/wind/rfc3454.txt $(heimdalsrcdir)/lib/wind/gen-bidi.py
40 #       $(PYTHON) $(heimdalsrcdir)/lib/wind/gen-bidi.py $(heimdalsrcdir)/lib/wind/rfc3454.txt $(heimdalsrcdir)/lib/wind/
41
42
43 bld(rule="${PYTHON} ${SRC[0].abspath()} ${SRC[1].abspath()} ${SRC[1].parent.abspath(env)}",
44     source = '../heimdal/lib/wind/gen-bidi.py ../heimdal/lib/wind/rfc3454.txt',
45     target = '../heimdal/lib/wind/bidi_table.h ../heimdal/lib/wind/bidi_table.c',
46     before = 'cc',
47     name = 'HEIMDAL_BIDI_TABLE'
48 )
49
50
51 # map_table rules
52 #$(heimdalsrcdir)/lib/wind/map_table.h $(heimdalsrcdir)/lib/wind/map_table.c: $(heimdalsrcdir)/lib/wind/rfc3454.txt $(heimdalsrcdir)/lib/wind/gen-map.py $(heimdalsrcdir)/lib/wind/stringprep.py
53 #       $(PYTHON) $(heimdalsrcdir)/lib/wind/gen-map.py $(heimdalsrcdir)/lib/wind/rfc3454.txt $(heimdalsrcdir)/lib/wind/
54
55
56 bld(rule="${PYTHON} ${SRC[0].abspath()} ${SRC[2].abspath()} ${SRC[2].parent.abspath(env)}",
57     source = '../heimdal/lib/wind/gen-map.py ../heimdal/lib/wind/stringprep.py ../heimdal/lib/wind/rfc3454.txt',
58     target = '../heimdal/lib/wind/map_table.h ../heimdal/lib/wind/map_table.c',
59     before = 'cc',
60     name = 'HEIMDAL_MAP_TABLE'
61 )
62
63
64 # look at the example below - the output dir is lib/gssapi, the source asn1 file is lib/gssapi/spnego/spnego.asn1
65 # well ... hmm, it depens if any heimdal C file uses a #include that depends on the path. We can try a different location
66 # but I'm guessing it will break the heimdal C files
67 # too hard to use a different output dir from input?
68 # the restriction is we can't modify the existing C source of heimdal.
69 # ok, symlink hacks to solve? it should be similar to the gen_ndr hackery of PIDL
70 # as that is also a different out dir from input file
71 # ok, but is it OK for PIDL? pidl is putting output in ../gen_ndr/ndr_$NAME.[ch] etc
72 bld.SAMBA_ASN1('HEIMDAL_SPNEGO_ASN1',
73         source='../heimdal/lib/gssapi/spnego/spnego.asn1',
74         options='--sequence=MechTypeList',
75         directory='lib/gssapi'
76         )
77
78
79 bld.SAMBA_ASN1('HEIMDAL_GSSAPI_ASN1',
80         '../heimdal/lib/gssapi/mech/gssapi.asn1',
81         directory='lib/gssapi'
82         )
83
84
85 bld.SAMBA_ASN1('HEIMDAL_KRB5_ASN1',
86         '../heimdal/lib/asn1/krb5.asn1',
87         option_file='../heimdal/lib/asn1/krb5.opt',
88         directory='lib/asn1'
89         )
90
91
92 bld.SAMBA_ASN1('HEIMDAL_DIGEST_ASN1',
93         '../heimdal/lib/asn1/digest.asn1',
94         directory='lib/asn1'
95         )
96
97
98 bld.SAMBA_ASN1('HEIMDAL_PKCS8_ASN1',
99         '../heimdal/lib/asn1/pkcs8.asn1',
100         directory='lib/asn1'
101         )
102
103
104 bld.SAMBA_ASN1('HEIMDAL_PKCS9_ASN1',
105         '../heimdal/lib/asn1/pkcs9.asn1',
106         directory='lib/asn1'
107         )
108
109
110 bld.SAMBA_ASN1('HEIMDAL_PKCS12_ASN1',
111         '../heimdal/lib/asn1/pkcs12.asn1',
112         directory='lib/asn1'
113         )
114
115
116 bld.SAMBA_ASN1('HEIMDAL_RFC2459_ASN1',
117         '../heimdal/lib/asn1/rfc2459.asn1',
118         options='--preserve-binary=TBSCertificate --preserve-binary=TBSCRLCertList --preserve-binary=Name --sequence=GeneralNames --sequence=Extensions --sequence=CRLDistributionPoints',
119         directory='lib/asn1'
120         )
121
122
123 bld.SAMBA_ASN1('HEIMDAL_PKINIT_ASN1',
124         '../heimdal/lib/asn1/pkinit.asn1',
125         directory='lib/asn1'
126         )
127
128
129 bld.SAMBA_ASN1('HEIMDAL_CMS_ASN1',
130         '../heimdal/lib/asn1/cms.asn1',
131         option_file='../heimdal/lib/asn1/cms.opt',
132         directory='lib/asn1'
133         )
134
135
136 bld.SAMBA_ASN1('HEIMDAL_OCSP_ASN1',
137         '../heimdal/lib/hx509/ocsp.asn1',
138         options='--preserve-binary=OCSPTBSRequest --preserve-binary=OCSPResponseData',
139         directory='lib/hx509'
140         )
141
142
143 bld.SAMBA_ASN1('HEIMDAL_KX509_ASN1',
144         '../heimdal/lib/asn1/kx509.asn1',
145         directory='lib/asn1'
146         )
147
148
149 bld.SAMBA_ASN1('HEIMDAL_PKCS10_ASN1',
150         '../heimdal/lib/hx509/pkcs10.asn1',
151         options='--preserve-binary=CertificationRequestInfo',
152         directory='lib/hx509'
153         )
154
155
156 bld.SAMBA_ASN1('HEIMDAL_HDB_ASN1',
157         '../heimdal/lib/hdb/hdb.asn1',
158         directory='lib/hdb'
159         )
160
161 bld.SAMBA_ERRTABLE('HEIMDAL_ASN1_ERR_ET',
162         '../heimdal/lib/asn1/asn1_err.et',
163         directory='lib/asn1'
164         )
165
166
167 bld.SAMBA_ERRTABLE('HEIMDAL_HDB_ERR_ET',
168         '../heimdal/lib/hdb/hdb_err.et',
169         directory='lib/hdb'
170         )
171
172
173 bld.SAMBA_ERRTABLE('HEIMDAL_HEIM_ERR_ET',
174         '../heimdal/lib/krb5/heim_err.et',
175         directory='lib/krb5'
176         )
177
178
179 bld.SAMBA_ERRTABLE('HEIMDAL_K524_ERR_ET',
180         '../heimdal/lib/krb5/k524_err.et',
181         directory='lib/krb5'
182         )
183
184
185 bld.SAMBA_ERRTABLE('HEIMDAL_KRB_ERR_ET',
186         '../heimdal/lib/krb5/krb_err.et',
187         directory='lib/krb5'
188         )
189
190
191 bld.SAMBA_ERRTABLE('HEIMDAL_KRB5_ERR_ET',
192         '../heimdal/lib/krb5/krb5_err.et',
193         directory='lib/krb5'
194         )
195
196
197 bld.SAMBA_ERRTABLE('HEIMDAL_GKRB5_ERR_ET',
198         '../heimdal/lib/gssapi/krb5/gkrb5_err.et',
199         directory='lib/gssapi'
200         )
201
202
203 bld.SAMBA_ERRTABLE('HEIMDAL_HX509_ERR_ET',
204         '../heimdal/lib/hx509/hx509_err.et',
205         directory='lib/hx509'
206         )
207
208
209 bld.SAMBA_ERRTABLE('HEIMDAL_WIND_ERR_ET',
210         '../heimdal/lib/wind/wind_err.et',
211         directory='lib/wind'
212         )
213
214
215 # try it here
216 bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN',
217         '../heimdal/lib/roken/base64.c ../heimdal/lib/roken/ct.c ../heimdal/lib/roken/hex.c ../heimdal/lib/roken/bswap.c ../heimdal/lib/roken/dumpdata.c ../heimdal/lib/roken/emalloc.c ../heimdal/lib/roken/ecalloc.c ../heimdal/lib/roken/getarg.c ../heimdal/lib/roken/get_window_size.c ../heimdal/lib/roken/getdtablesize.c ../heimdal/lib/roken/h_errno.c ../heimdal/lib/roken/issuid.c ../heimdal/lib/roken/net_read.c ../heimdal/lib/roken/net_write.c ../heimdal/lib/roken/socket.c ../heimdal/lib/roken/parse_time.c ../heimdal/lib/roken/parse_units.c ../heimdal/lib/roken/resolve.c ../heimdal/lib/roken/roken_gethostby.c ../heimdal/lib/roken/signal.c ../heimdal/lib/roken/vis.c ../heimdal/lib/roken/strlwr.c ../heimdal/lib/roken/strsep_copy.c ../heimdal/lib/roken/strsep.c ../heimdal/lib/roken/strupr.c ../heimdal/lib/roken/strpool.c ../heimdal/lib/roken/estrdup.c ../heimdal/lib/roken/erealloc.c ../heimdal/lib/roken/simple_exec.c ../heimdal/lib/roken/strcollect.c ../heimdal/lib/roken/rtbl.c ../heimdal/lib/roken/cloexec.c ../heimdal/lib/roken/xfree.c replace.c',
218         includes='. ../heimdal/lib/roken ../heimdal/include ../../lib/socket_wrapper',
219         deps='HEIMDAL_ROKEN_PROGNAME HEIMDAL_ROKEN_CLOSEFROM resolv LIBREPLACE_NETWORK UID_WRAPPER'
220         )
221
222
223 bld.SAMBA_SUBSYSTEM('HEIMDAL_KDC',
224                     source='../heimdal/kdc/default_config.c ../heimdal/kdc/kerberos5.c ../heimdal/kdc/krb5tgs.c ../heimdal/kdc/pkinit.c ../heimdal/kdc/log.c ../heimdal/kdc/misc.c ../heimdal/kdc/kaserver.c ../heimdal/kdc/digest.c ../heimdal/kdc/process.c ../heimdal/kdc/windc.c ../heimdal/kdc/kx509.c',
225                     includes='. ../heimdal/kdc',
226                     heimdal_autoproto='../heimdal/kdc/kdc-protos.h',
227                     heimdal_autoproto_private='../heimdal/kdc/kdc-private.h',
228                     deps='HEIMDAL_ROKEN HEIMDAL_KRB5 HEIMDAL_HDB HEIMDAL_HEIM_ASN1 HEIMDAL_DIGEST_ASN1 HEIMDAL_KX509_ASN1 HEIMDAL_NTLM HEIMDAL_HCRYPTO'
229                     )
230
231
232 bld.SAMBA_SUBSYSTEM('HEIMDAL_NTLM',
233                     source='../heimdal/lib/ntlm/ntlm.c',
234                     includes='. ../heimdal/lib/ntlm',
235                     heimdal_autoproto='../heimdal/lib/ntlm/heimntlm-protos.h',
236                     deps='HEIMDAL_ROKEN HEIMDAL_HCRYPTO HEIMDAL_KRB5'
237         )
238
239
240 bld.SAMBA_SUBSYSTEM('HEIMDAL_HDB_KEYS',
241         '../heimdal/lib/hdb/keys.c',
242         includes='. ../heimdal/lib/hdb',
243         deps='HEIMDAL_ROKEN HEIMDAL_HCRYPTO HEIMDAL_KRB5 HEIMDAL_HDB_ASN1'
244         )
245
246
247 bld.SAMBA_SUBSYSTEM('HEIMDAL_HDB',
248                     source='''../heimdal/lib/hdb/db.c ../heimdal/lib/hdb/dbinfo.c ../heimdal/lib/hdb/ext.c ../heimdal/lib/hdb/keytab.c
249                               ../heimdal/lib/hdb/mkey.c ../heimdal/lib/hdb/ndbm.c ../heimdal/lib/hdb/hdb_err.c hdb-glue.c''',
250                     includes='. ../heimdal/lib/hdb',
251                     heimdal_autoproto='../heimdal/lib/hdb/hdb-protos.h',
252                     heimdal_autoproto_private='../heimdal/lib/hdb/hdb-private.h',
253                     deps='HDB_LDB HEIMDAL_KRB5 HEIMDAL_HDB_KEYS HEIMDAL_ROKEN HEIMDAL_HCRYPTO HEIMDAL_COM_ERR HEIMDAL_HDB_ASN1'
254         )
255
256
257 bld.SAMBA_SUBSYSTEM('HEIMDAL_GSSAPI',
258                     '''
259 ../heimdal/lib/gssapi/spnego/init_sec_context.c ../heimdal/lib/gssapi/spnego/external.c ../heimdal/lib/gssapi/spnego/compat.c
260 ../heimdal/lib/gssapi/spnego/context_stubs.c ../heimdal/lib/gssapi/spnego/cred_stubs.c ../heimdal/lib/gssapi/spnego/accept_sec_context.c
261 ../heimdal/lib/gssapi/krb5/copy_ccache.c ../heimdal/lib/gssapi/krb5/delete_sec_context.c ../heimdal/lib/gssapi/krb5/init_sec_context.c
262 ../heimdal/lib/gssapi/krb5/context_time.c ../heimdal/lib/gssapi/krb5/init.c ../heimdal/lib/gssapi/krb5/address_to_krb5addr.c
263 ../heimdal/lib/gssapi/krb5/get_mic.c ../heimdal/lib/gssapi/krb5/inquire_context.c ../heimdal/lib/gssapi/krb5/add_cred.c
264 ../heimdal/lib/gssapi/krb5/inquire_cred.c ../heimdal/lib/gssapi/krb5/inquire_cred_by_oid.c ../heimdal/lib/gssapi/krb5/inquire_cred_by_mech.c
265 ../heimdal/lib/gssapi/krb5/inquire_mechs_for_name.c ../heimdal/lib/gssapi/krb5/inquire_names_for_mech.c ../heimdal/lib/gssapi/krb5/indicate_mechs.c
266 ../heimdal/lib/gssapi/krb5/inquire_sec_context_by_oid.c ../heimdal/lib/gssapi/krb5/export_sec_context.c ../heimdal/lib/gssapi/krb5/import_sec_context.c
267 ../heimdal/lib/gssapi/krb5/duplicate_name.c ../heimdal/lib/gssapi/krb5/import_name.c ../heimdal/lib/gssapi/krb5/compare_name.c
268 ../heimdal/lib/gssapi/krb5/export_name.c ../heimdal/lib/gssapi/krb5/canonicalize_name.c ../heimdal/lib/gssapi/krb5/unwrap.c
269 ../heimdal/lib/gssapi/krb5/wrap.c ../heimdal/lib/gssapi/krb5/release_name.c ../heimdal/lib/gssapi/krb5/cfx.c
270 ../heimdal/lib/gssapi/krb5/8003.c ../heimdal/lib/gssapi/krb5/arcfour.c ../heimdal/lib/gssapi/krb5/encapsulate.c
271 ../heimdal/lib/gssapi/krb5/display_name.c ../heimdal/lib/gssapi/krb5/sequence.c ../heimdal/lib/gssapi/krb5/display_status.c
272 ../heimdal/lib/gssapi/krb5/release_buffer.c ../heimdal/lib/gssapi/krb5/external.c ../heimdal/lib/gssapi/krb5/compat.c
273 ../heimdal/lib/gssapi/krb5/creds.c ../heimdal/lib/gssapi/krb5/acquire_cred.c ../heimdal/lib/gssapi/krb5/release_cred.c
274 ../heimdal/lib/gssapi/krb5/store_cred.c ../heimdal/lib/gssapi/krb5/set_cred_option.c ../heimdal/lib/gssapi/krb5/decapsulate.c
275 ../heimdal/lib/gssapi/krb5/verify_mic.c ../heimdal/lib/gssapi/krb5/accept_sec_context.c ../heimdal/lib/gssapi/krb5/set_sec_context_option.c
276 ../heimdal/lib/gssapi/krb5/process_context_token.c ../heimdal/lib/gssapi/krb5/prf.c ../heimdal/lib/gssapi/krb5/aeap.c
277 ../heimdal/lib/gssapi/mech/context.c ../heimdal/lib/gssapi/mech/gss_krb5.c ../heimdal/lib/gssapi/mech/gss_mech_switch.c
278 ../heimdal/lib/gssapi/mech/gss_process_context_token.c ../heimdal/lib/gssapi/mech/gss_buffer_set.c
279 ../heimdal/lib/gssapi/mech/gss_aeap.c ../heimdal/lib/gssapi/mech/gss_add_cred.c ../heimdal/lib/gssapi/mech/gss_cred.c
280 ../heimdal/lib/gssapi/mech/gss_add_oid_set_member.c ../heimdal/lib/gssapi/mech/gss_compare_name.c ../heimdal/lib/gssapi/mech/gss_release_oid_set.c
281 ../heimdal/lib/gssapi/mech/gss_create_empty_oid_set.c ../heimdal/lib/gssapi/mech/gss_decapsulate_token.c ../heimdal/lib/gssapi/mech/gss_inquire_cred_by_oid.c
282 ../heimdal/lib/gssapi/mech/gss_canonicalize_name.c ../heimdal/lib/gssapi/mech/gss_inquire_sec_context_by_oid.c ../heimdal/lib/gssapi/mech/gss_inquire_names_for_mech.c
283 ../heimdal/lib/gssapi/mech/gss_inquire_mechs_for_name.c ../heimdal/lib/gssapi/mech/gss_wrap_size_limit.c ../heimdal/lib/gssapi/mech/gss_names.c
284 ../heimdal/lib/gssapi/mech/gss_verify.c ../heimdal/lib/gssapi/mech/gss_display_name.c
285 ../heimdal/lib/gssapi/mech/gss_duplicate_oid.c ../heimdal/lib/gssapi/mech/gss_display_status.c ../heimdal/lib/gssapi/mech/gss_release_buffer.c
286 ../heimdal/lib/gssapi/mech/gss_release_oid.c ../heimdal/lib/gssapi/mech/gss_test_oid_set_member.c
287 ../heimdal/lib/gssapi/mech/gss_release_cred.c
288 ../heimdal/lib/gssapi/mech/gss_set_sec_context_option.c ../heimdal/lib/gssapi/mech/gss_export_name.c ../heimdal/lib/gssapi/mech/gss_seal.c
289 ../heimdal/lib/gssapi/mech/gss_acquire_cred.c ../heimdal/lib/gssapi/mech/gss_unseal.c ../heimdal/lib/gssapi/mech/gss_verify_mic.c
290 ../heimdal/lib/gssapi/mech/gss_accept_sec_context.c ../heimdal/lib/gssapi/mech/gss_inquire_cred_by_mech.c ../heimdal/lib/gssapi/mech/gss_indicate_mechs.c
291 ../heimdal/lib/gssapi/mech/gss_delete_sec_context.c ../heimdal/lib/gssapi/mech/gss_sign.c ../heimdal/lib/gssapi/mech/gss_utils.c
292 ../heimdal/lib/gssapi/mech/gss_init_sec_context.c ../heimdal/lib/gssapi/mech/gss_oid_equal.c ../heimdal/lib/gssapi/mech/gss_oid_to_str.c
293 ../heimdal/lib/gssapi/mech/gss_context_time.c ../heimdal/lib/gssapi/mech/gss_encapsulate_token.c ../heimdal/lib/gssapi/mech/gss_get_mic.c
294 ../heimdal/lib/gssapi/mech/gss_import_sec_context.c ../heimdal/lib/gssapi/mech/gss_inquire_cred.c ../heimdal/lib/gssapi/mech/gss_wrap.c
295 ../heimdal/lib/gssapi/mech/gss_import_name.c ../heimdal/lib/gssapi/mech/gss_duplicate_name.c ../heimdal/lib/gssapi/mech/gss_unwrap.c
296 ../heimdal/lib/gssapi/mech/gss_export_sec_context.c ../heimdal/lib/gssapi/mech/gss_inquire_context.c ../heimdal/lib/gssapi/mech/gss_release_name.c
297 ../heimdal/lib/gssapi/mech/gss_set_cred_option.c  ../heimdal/lib/gssapi/mech/gss_pseudo_random.c gssapi-glue.c''',
298         includes='. ../heimdal/lib/gssapi ../heimdal/lib/gssapi/gssapi ../heimdal/lib/gssapi/spnego ../heimdal/lib/gssapi/krb5 ../heimdal/lib/gssapi/mech',
299         deps='HEIMDAL_HCRYPTO HEIMDAL_HEIM_ASN1 HEIMDAL_SPNEGO_ASN1 HEIMDAL_GSSAPI_ASN1 HEIMDAL_ROKEN HEIMDAL_KRB5'
300         )
301
302
303 bld.SAMBA_SUBSYSTEM('HEIMDAL_KRB5',
304         '../heimdal/lib/krb5/acache.c ../heimdal/lib/krb5/add_et_list.c ../heimdal/lib/krb5/addr_families.c ../heimdal/lib/krb5/appdefault.c ../heimdal/lib/krb5/asn1_glue.c ../heimdal/lib/krb5/auth_context.c ../heimdal/lib/krb5/build_ap_req.c ../heimdal/lib/krb5/build_auth.c ../heimdal/lib/krb5/cache.c ../heimdal/lib/krb5/changepw.c ../heimdal/lib/krb5/codec.c ../heimdal/lib/krb5/config_file.c ../heimdal/lib/krb5/constants.c ../heimdal/lib/krb5/context.c ../heimdal/lib/krb5/convert_creds.c ../heimdal/lib/krb5/copy_host_realm.c ../heimdal/lib/krb5/crc.c ../heimdal/lib/krb5/creds.c ../heimdal/lib/krb5/crypto.c ../heimdal/lib/krb5/data.c ../heimdal/lib/krb5/eai_to_heim_errno.c ../heimdal/lib/krb5/error_string.c ../heimdal/lib/krb5/expand_hostname.c ../heimdal/lib/krb5/fcache.c ../heimdal/lib/krb5/free.c ../heimdal/lib/krb5/free_host_realm.c ../heimdal/lib/krb5/generate_seq_number.c ../heimdal/lib/krb5/generate_subkey.c ../heimdal/lib/krb5/get_addrs.c ../heimdal/lib/krb5/get_cred.c ../heimdal/lib/krb5/get_default_principal.c ../heimdal/lib/krb5/get_default_realm.c ../heimdal/lib/krb5/get_for_creds.c ../heimdal/lib/krb5/get_host_realm.c ../heimdal/lib/krb5/get_in_tkt.c ../heimdal/lib/krb5/get_port.c ../heimdal/lib/krb5/init_creds.c ../heimdal/lib/krb5/init_creds_pw.c ../heimdal/lib/krb5/kcm.c ../heimdal/lib/krb5/keyblock.c ../heimdal/lib/krb5/keytab.c ../heimdal/lib/krb5/keytab_any.c ../heimdal/lib/krb5/keytab_file.c ../heimdal/lib/krb5/keytab_memory.c ../heimdal/lib/krb5/keytab_keyfile.c ../heimdal/lib/krb5/krbhst.c ../heimdal/lib/krb5/log.c ../heimdal/lib/krb5/mcache.c ../heimdal/lib/krb5/misc.c ../heimdal/lib/krb5/mk_error.c ../heimdal/lib/krb5/mk_priv.c ../heimdal/lib/krb5/mk_rep.c ../heimdal/lib/krb5/mk_req.c ../heimdal/lib/krb5/mk_req_ext.c ../heimdal/lib/krb5/mit_glue.c ../heimdal/lib/krb5/n-fold.c ../heimdal/lib/krb5/padata.c ../heimdal/lib/krb5/pkinit.c ../heimdal/lib/krb5/plugin.c ../heimdal/lib/krb5/principal.c ../heimdal/lib/krb5/prog_setup.c ../heimdal/lib/krb5/pac.c ../heimdal/lib/krb5/prompter_posix.c ../heimdal/lib/krb5/rd_cred.c ../heimdal/lib/krb5/rd_error.c ../heimdal/lib/krb5/rd_priv.c ../heimdal/lib/krb5/rd_rep.c ../heimdal/lib/krb5/rd_req.c ../heimdal/lib/krb5/replay.c ../heimdal/lib/krb5/send_to_kdc.c ../heimdal/lib/krb5/set_default_realm.c ../heimdal/lib/krb5/store.c ../heimdal/lib/krb5/store_emem.c ../heimdal/lib/krb5/store_fd.c ../heimdal/lib/krb5/store_mem.c ../heimdal/lib/krb5/ticket.c ../heimdal/lib/krb5/time.c ../heimdal/lib/krb5/transited.c ../heimdal/lib/krb5/v4_glue.c ../heimdal/lib/krb5/version.c ../heimdal/lib/krb5/warn.c ../heimdal/lib/krb5/krb5_err.c ../heimdal/lib/krb5/heim_err.c ../heimdal/lib/krb5/k524_err.c krb5-glue.c',
305         includes='. ../heimdal/lib/krb5 ../heimdal/lib/asn1 ../heimdal/lib/com_err',
306         public_deps='HEIMDAL_COM_ERR',
307         heimdal_autoproto='../heimdal/lib/krb5/krb5-protos.h',
308         heimdal_autoproto_private='../heimdal/lib/krb5/krb5-private.h',
309         deps='HEIMDAL_ROKEN HEIMDAL_PKINIT_ASN1 HEIMDAL_WIND HEIMDAL_KRB5_ASN1 HEIMDAL_HX509 HEIMDAL_HCRYPTO LIBNETIF LIBSAMBA-HOSTCONFIG INTL'
310         )
311
312
313 bld.SAMBA_SUBSYSTEM('HEIMDAL_HEIM_ASN1',
314         '../heimdal/lib/asn1/der_get.c ../heimdal/lib/asn1/der_put.c ../heimdal/lib/asn1/der_free.c ../heimdal/lib/asn1/der_format.c ../heimdal/lib/asn1/der_length.c ../heimdal/lib/asn1/der_copy.c ../heimdal/lib/asn1/der_cmp.c ../heimdal/lib/asn1/extra.c ../heimdal/lib/asn1/timegm.c ../heimdal/lib/asn1/asn1_err.c',
315         includes='. ../heimdal/lib/asn1',
316         deps='HEIMDAL_ROKEN HEIMDAL_COM_ERR'
317         )
318
319
320 bld.SAMBA_SUBSYSTEM('HEIMDAL_HCRYPTO_IMATH',
321         '../heimdal/lib/hcrypto/imath/imath.c ../heimdal/lib/hcrypto/imath/iprime.c',
322         includes='. ../heimdal/lib/hcrypto/imath',
323         deps='HEIMDAL_ROKEN'
324         )
325
326
327 bld.SAMBA_SUBSYSTEM('HEIMDAL_HCRYPTO',
328         '../heimdal/lib/hcrypto/aes.c ../heimdal/lib/hcrypto/bn.c ../heimdal/lib/hcrypto/dh.c ../heimdal/lib/hcrypto/dh-imath.c ../heimdal/lib/hcrypto/des.c ../heimdal/lib/hcrypto/dsa.c ../heimdal/lib/hcrypto/engine.c ../heimdal/lib/hcrypto/md2.c ../heimdal/lib/hcrypto/md4.c ../heimdal/lib/hcrypto/md5.c ../heimdal/lib/hcrypto/rsa.c ../heimdal/lib/hcrypto/rsa-imath.c ../heimdal/lib/hcrypto/rc2.c ../heimdal/lib/hcrypto/rc4.c ../heimdal/lib/hcrypto/rijndael-alg-fst.c ../heimdal/lib/hcrypto/rnd_keys.c ../heimdal/lib/hcrypto/sha.c ../heimdal/lib/hcrypto/sha256.c ../heimdal/lib/hcrypto/ui.c ../heimdal/lib/hcrypto/evp.c ../heimdal/lib/hcrypto/evp-hcrypto.c ../heimdal/lib/hcrypto/evp-cc.c ../heimdal/lib/hcrypto/pkcs5.c ../heimdal/lib/hcrypto/pkcs12.c ../heimdal/lib/hcrypto/rand.c ../heimdal/lib/hcrypto/rand-egd.c ../heimdal/lib/hcrypto/rand-unix.c ../heimdal/lib/hcrypto/rand-fortuna.c ../heimdal/lib/hcrypto/rand-timer.c ../heimdal/lib/hcrypto/hmac.c ../heimdal/lib/hcrypto/camellia.c ../heimdal/lib/hcrypto/camellia-ntt.c',
329         includes='. ../heimdal/lib/hcrypto ../heimdal/lib',
330         deps='HEIMDAL_ROKEN HEIMDAL_HEIM_ASN1 HEIMDAL_HCRYPTO_IMATH HEIMDAL_RFC2459_ASN1'
331         )
332
333
334 bld.SAMBA_SUBSYSTEM('HEIMDAL_HX509',
335         '../heimdal/lib/hx509/ca.c ../heimdal/lib/hx509/cert.c ../heimdal/lib/hx509/cms.c ../heimdal/lib/hx509/collector.c ../heimdal/lib/hx509/crypto.c ../heimdal/lib/hx509/error.c ../heimdal/lib/hx509/env.c ../heimdal/lib/hx509/file.c ../heimdal/lib/hx509/keyset.c ../heimdal/lib/hx509/ks_dir.c ../heimdal/lib/hx509/ks_file.c ../heimdal/lib/hx509/ks_keychain.c ../heimdal/lib/hx509/ks_mem.c ../heimdal/lib/hx509/ks_null.c ../heimdal/lib/hx509/ks_p11.c ../heimdal/lib/hx509/ks_p12.c ../heimdal/lib/hx509/lock.c ../heimdal/lib/hx509/name.c ../heimdal/lib/hx509/peer.c ../heimdal/lib/hx509/print.c ../heimdal/lib/hx509/req.c ../heimdal/lib/hx509/revoke.c ../heimdal/lib/hx509/sel.c ../heimdal/lib/hx509/hx509_err.c ../heimdal/lib/hx509/sel-lex.c ../heimdal/lib/hx509/sel-gram.c',
336         includes='. ../heimdal/lib/hx509',
337         deps='HEIMDAL_ROKEN HEIMDAL_COM_ERR HEIMDAL_HEIM_ASN1 HEIMDAL_HCRYPTO HEIMDAL_CMS_ASN1 HEIMDAL_RFC2459_ASN1 HEIMDAL_OCSP_ASN1 HEIMDAL_PKCS8_ASN1 HEIMDAL_PKCS9_ASN1 HEIMDAL_PKCS12_ASN1 HEIMDAL_PKINIT_ASN1 HEIMDAL_PKCS10_ASN1 HEIMDAL_WIND'
338         )
339
340
341 bld.SAMBA_SUBSYSTEM('HEIMDAL_WIND',
342         '../heimdal/lib/wind/wind_err.c ../heimdal/lib/wind/stringprep.c ../heimdal/lib/wind/errorlist.c ../heimdal/lib/wind/errorlist_table.c ../heimdal/lib/wind/normalize.c ../heimdal/lib/wind/normalize_table.c ../heimdal/lib/wind/combining.c ../heimdal/lib/wind/combining_table.c ../heimdal/lib/wind/utf8.c ../heimdal/lib/wind/bidi.c ../heimdal/lib/wind/bidi_table.c ../heimdal/lib/wind/ldap.c ../heimdal/lib/wind/map.c ../heimdal/lib/wind/map_table.c',
343         includes='. ../heimdal/lib/wind',
344         deps='HEIMDAL_ROKEN HEIMDAL_COM_ERR'
345         )
346
347
348 bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_PROGNAME',
349         '../heimdal/lib/roken/getprogname.c ../heimdal/lib/roken/setprogname.c',
350         includes='../heimdal/lib/roken',
351         config_option='HAVE_GETPROGNAME'
352         )
353
354
355 bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_CLOSEFROM',
356         '../heimdal/lib/roken/closefrom.c',
357         includes='../heimdal/lib/roken',
358         config_option='HAVE_CLOSEFROM'
359         )
360
361
362 bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_PROGNAME_H',
363         '../heimdal/lib/roken/getprogname.c ../heimdal/lib/roken/setprogname.c',
364         cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1',
365         includes='../heimdal/lib/roken',
366         config_option='HAVE_GETPROGNAME'
367         )
368
369
370 bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_CLOSEFROM_H',
371         '../heimdal/lib/roken/closefrom.c',
372         cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1',
373         includes='../heimdal/lib/roken',
374         config_option='HAVE_CLOSEFROM'
375         )
376
377
378 bld.SAMBA_SUBSYSTEM('HEIMDAL_ROKEN_H',
379         '../heimdal/lib/roken/base64.c ../heimdal/lib/roken/ct.c ../heimdal/lib/roken/hex.c ../heimdal/lib/roken/bswap.c ../heimdal/lib/roken/dumpdata.c ../heimdal/lib/roken/emalloc.c ../heimdal/lib/roken/ecalloc.c ../heimdal/lib/roken/getarg.c ../heimdal/lib/roken/get_window_size.c ../heimdal/lib/roken/getdtablesize.c ../heimdal/lib/roken/h_errno.c ../heimdal/lib/roken/issuid.c ../heimdal/lib/roken/net_read.c ../heimdal/lib/roken/net_write.c ../heimdal/lib/roken/socket.c ../heimdal/lib/roken/parse_time.c ../heimdal/lib/roken/parse_units.c ../heimdal/lib/roken/resolve.c ../heimdal/lib/roken/roken_gethostby.c ../heimdal/lib/roken/signal.c ../heimdal/lib/roken/vis.c ../heimdal/lib/roken/strlwr.c ../heimdal/lib/roken/strsep_copy.c ../heimdal/lib/roken/strsep.c ../heimdal/lib/roken/strupr.c ../heimdal/lib/roken/strpool.c ../heimdal/lib/roken/estrdup.c ../heimdal/lib/roken/erealloc.c ../heimdal/lib/roken/simple_exec.c ../heimdal/lib/roken/strcollect.c ../heimdal/lib/roken/rtbl.c ../heimdal/lib/roken/cloexec.c ../heimdal/lib/roken/xfree.c replace.c',
380         includes='. ../heimdal/lib/roken',
381         cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1',
382         deps='HEIMDAL_ROKEN_PROGNAME_H HEIMDAL_ROKEN_CLOSEFROM_H resolv LIBREPLACE_NETWORK'
383         )
384
385
386 bld.SAMBA_SUBSYSTEM('HEIMDAL_COM_ERR',
387         '../heimdal/lib/com_err/com_err.c ../heimdal/lib/com_err/error.c',
388         includes='. ../heimdal/lib/com_err',
389         deps='HEIMDAL_ROKEN',
390         config_option='HAVE_COM_ERR'
391         )
392
393
394 # here is the asn1 compiler build rule
395 bld.SAMBA_BINARY('asn1_compile',
396         '../heimdal/lib/asn1/main.c ../heimdal/lib/asn1/gen.c ../heimdal/lib/asn1/gen_copy.c ../heimdal/lib/asn1/gen_decode.c ../heimdal/lib/asn1/gen_encode.c ../heimdal/lib/asn1/gen_free.c ../heimdal/lib/asn1/gen_glue.c ../heimdal/lib/asn1/gen_length.c ../heimdal/lib/asn1/gen_seq.c ../heimdal/lib/asn1/hash.c ../heimdal/lib/asn1/symbol.c ../heimdal/lib/asn1/asn1parse.c ../heimdal/lib/asn1/lex.c ../heimdal/lib/vers/print_version.c',
397         use_hostcc=True,
398         cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1 -D_SAMBA_HOSTCC_',
399         includes='. ../heimdal/lib/asn1 ../heimdal/lib/roken',
400         group='build_compilers',
401         deps='HEIMDAL_ROKEN_H replace',
402         )
403
404
405 bld.SAMBA_BINARY('compile_et',
406         '../heimdal/lib/vers/print_version.c ../heimdal/lib/com_err/parse.c ../heimdal/lib/com_err/lex.c ../heimdal/lib/com_err/compile_et.c',
407         use_hostcc=True,
408         group='build_compilers',
409         cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1 -D_SAMBA_HOSTCC_',
410         includes='.',
411         deps='HEIMDAL_ROKEN_H replace'
412         )
413
414
415 bld.SAMBA_BINARY('samba4kinit',
416         '../heimdal/kuser/kinit.c ../heimdal/lib/vers/print_version.c',
417         includes='../heimdal/lib/roken',
418         deps='HEIMDAL_KRB5 HEIMDAL_NTLM'
419         )
420
421
422 bld.SAMBA_BINARY('samba4kpasswd',
423         '../heimdal/kpasswd/kpasswd.c ../heimdal/lib/vers/print_version.c',
424         includes='../heimdal/lib/roken',
425         deps='HEIMDAL_KRB5 HEIMDAL_NTLM'
426         )
427
428
429 bld.SAMBA_BINARY('rkpty',
430         '../heimdal/lib/roken/rkpty.c ../../lib/socket_wrapper/socket_wrapper.c',
431         deps='HEIMDAL_ROKEN OPENPTY'
432         )
433
434 HEIMDAL_GSSAPI_SPNEGO_SOURCE = '''
435         ../heimdal/lib/gssapi/spnego/init_sec_context.c
436         ../heimdal/lib/gssapi/spnego/external.c
437         ../heimdal/lib/gssapi/spnego/compat.c
438         ../heimdal/lib/gssapi/spnego/context_stubs.c
439         ../heimdal/lib/gssapi/spnego/cred_stubs.c
440         ../heimdal/lib/gssapi/spnego/accept_sec_context.c
441 '''
442
443 bld.HEIMDAL_AUTOPROTO_PRIVATE('../heimdal/lib/gssapi/spnego/spnego-private.h',
444                               HEIMDAL_GSSAPI_SPNEGO_SOURCE)
445
446
447 HEIMDAL_GSSAPI_KRB5_SOURCE = '''
448         ../heimdal/lib/gssapi/krb5/copy_ccache.c
449         ../heimdal/lib/gssapi/krb5/delete_sec_context.c
450         ../heimdal/lib/gssapi/krb5/init_sec_context.c
451         ../heimdal/lib/gssapi/krb5/context_time.c
452         ../heimdal/lib/gssapi/krb5/init.c
453         ../heimdal/lib/gssapi/krb5/address_to_krb5addr.c
454         ../heimdal/lib/gssapi/krb5/get_mic.c
455         ../heimdal/lib/gssapi/krb5/inquire_context.c
456         ../heimdal/lib/gssapi/krb5/add_cred.c
457         ../heimdal/lib/gssapi/krb5/inquire_cred.c
458         ../heimdal/lib/gssapi/krb5/inquire_cred_by_oid.c
459         ../heimdal/lib/gssapi/krb5/inquire_cred_by_mech.c
460         ../heimdal/lib/gssapi/krb5/inquire_mechs_for_name.c
461         ../heimdal/lib/gssapi/krb5/inquire_names_for_mech.c
462         ../heimdal/lib/gssapi/krb5/indicate_mechs.c
463         ../heimdal/lib/gssapi/krb5/inquire_sec_context_by_oid.c
464         ../heimdal/lib/gssapi/krb5/export_sec_context.c
465         ../heimdal/lib/gssapi/krb5/import_sec_context.c
466         ../heimdal/lib/gssapi/krb5/duplicate_name.c
467         ../heimdal/lib/gssapi/krb5/import_name.c
468         ../heimdal/lib/gssapi/krb5/compare_name.c
469         ../heimdal/lib/gssapi/krb5/export_name.c
470         ../heimdal/lib/gssapi/krb5/canonicalize_name.c
471         ../heimdal/lib/gssapi/krb5/unwrap.c
472         ../heimdal/lib/gssapi/krb5/wrap.c
473         ../heimdal/lib/gssapi/krb5/release_name.c
474         ../heimdal/lib/gssapi/krb5/cfx.c
475         ../heimdal/lib/gssapi/krb5/8003.c
476         ../heimdal/lib/gssapi/krb5/arcfour.c
477         ../heimdal/lib/gssapi/krb5/encapsulate.c
478         ../heimdal/lib/gssapi/krb5/display_name.c
479         ../heimdal/lib/gssapi/krb5/sequence.c
480         ../heimdal/lib/gssapi/krb5/display_status.c
481         ../heimdal/lib/gssapi/krb5/release_buffer.c
482         ../heimdal/lib/gssapi/krb5/external.c
483         ../heimdal/lib/gssapi/krb5/compat.c
484         ../heimdal/lib/gssapi/krb5/creds.c
485         ../heimdal/lib/gssapi/krb5/acquire_cred.c
486         ../heimdal/lib/gssapi/krb5/release_cred.c
487         ../heimdal/lib/gssapi/krb5/store_cred.c
488         ../heimdal/lib/gssapi/krb5/set_cred_option.c
489         ../heimdal/lib/gssapi/krb5/decapsulate.c
490         ../heimdal/lib/gssapi/krb5/verify_mic.c
491         ../heimdal/lib/gssapi/krb5/accept_sec_context.c
492         ../heimdal/lib/gssapi/krb5/set_sec_context_option.c
493         ../heimdal/lib/gssapi/krb5/process_context_token.c
494         ../heimdal/lib/gssapi/krb5/prf.c
495         ../heimdal/lib/gssapi/krb5/aeap.c
496 '''
497
498 bld.HEIMDAL_AUTOPROTO_PRIVATE('../heimdal/lib/gssapi/krb5/gsskrb5-private.h',
499                               HEIMDAL_GSSAPI_KRB5_SOURCE)
500
501
502 HEIMDAL_HX509_OBJH_SOURCE = '''
503         ../heimdal/lib/hx509/ca.c
504         ../heimdal/lib/hx509/cert.c
505         ../heimdal/lib/hx509/cms.c
506         ../heimdal/lib/hx509/collector.c
507         ../heimdal/lib/hx509/crypto.c
508         ../heimdal/lib/hx509/error.c
509         ../heimdal/lib/hx509/env.c
510         ../heimdal/lib/hx509/file.c
511         ../heimdal/lib/hx509/keyset.c
512         ../heimdal/lib/hx509/ks_dir.c
513         ../heimdal/lib/hx509/ks_file.c
514         ../heimdal/lib/hx509/ks_keychain.c
515         ../heimdal/lib/hx509/ks_mem.c
516         ../heimdal/lib/hx509/ks_null.c
517         ../heimdal/lib/hx509/ks_p11.c
518         ../heimdal/lib/hx509/ks_p12.c
519         ../heimdal/lib/hx509/lock.c
520         ../heimdal/lib/hx509/name.c
521         ../heimdal/lib/hx509/peer.c
522         ../heimdal/lib/hx509/print.c
523         ../heimdal/lib/hx509/req.c
524         ../heimdal/lib/hx509/revoke.c
525         ../heimdal/lib/hx509/sel.c
526         ../heimdal/lib/hx509/hx509_err.c
527 '''
528
529 bld.HEIMDAL_AUTOPROTO('../heimdal/lib/hx509/hx509-protos.h',
530                       HEIMDAL_GSSAPI_KRB5_SOURCE,
531                       options="-R '^(_|^C)' -E HX509_LIB -q -P comment -o")
532
533 bld.HEIMDAL_AUTOPROTO('../heimdal/lib/hx509/hx509-private.h',
534                       HEIMDAL_GSSAPI_KRB5_SOURCE,
535                       options="-q -P comment -p")
536
537 HEIMDAL_HEIM_ASN1_DER_SOURCE = '''
538         ../heimdal/lib/asn1/der_get.c
539         ../heimdal/lib/asn1/der_put.c
540         ../heimdal/lib/asn1/der_free.c
541         ../heimdal/lib/asn1/der_format.c
542         ../heimdal/lib/asn1/der_length.c
543         ../heimdal/lib/asn1/der_copy.c
544         ../heimdal/lib/asn1/der_cmp.c
545 '''
546
547 bld.HEIMDAL_AUTOPROTO('../heimdal/lib/asn1/der-protos.h',
548                       HEIMDAL_HEIM_ASN1_DER_SOURCE,
549                       group = 'build_compilers',
550                       options="-q -P comment -o")
551