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