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