35e45d758c1a0d849adab36d7237de17c5f8fa4d
[kai/samba-autobuild/.git] / source3 / wscript_build
1 #!/usr/bin/env python
2
3 from samba_utils import *
4 import samba_version
5
6 TDB_LIB_SRC = '''
7           lib/dbwrap.c lib/dbwrap_tdb.c
8           lib/dbwrap_ctdb.c
9           lib/g_lock.c
10           lib/dbwrap_rbt.c'''
11
12 TDB_VALIDATE_SRC = '''lib/tdb_validate.c'''
13
14 SMBLDAP = bld.env.SMBLDAP or ""
15 SMBLDAPUTIL = bld.env.SMBLDAPUTIL or ""
16
17 SMBLDAP_SRC = '''${SMBLDAP} ${SMBLDAPUTIL}'''
18
19 VERSION_SRC = '''lib/version.c'''
20
21 WBCOMMON_SRC = '../nsswitch/wb_common.c'
22
23 AFS_SRC = 'lib/afs.c'
24
25 AFS_SETTOKEN_SRC = 'lib/afs_settoken.c'
26
27 AVAHI_SRC = 'lib/avahi.c smbd/avahi_register.c'
28
29 SERVER_MUTEX_SRC = 'lib/server_mutex.c'
30
31 PASSCHANGE_SRC = '''libsmb/passchange.c'''
32
33 COMPRESSION_SRC = '../lib/compression/mszip.c'
34
35 DRSUAPI_SRC = '''${COMPRESSION_SRC}'''
36
37 LIBNDR_SRC = '''librpc/ndr/util.c'''
38
39 LIBCLI_SPOOLSS_SRC = '''rpc_client/cli_spoolss.c
40                      rpc_client/init_spoolss.c'''
41
42 LIBCLI_LSA_SRC = '''rpc_client/cli_lsarpc.c'''
43
44 LIBCLI_SAMR_SRC = 'rpc_client/cli_samr.c'
45
46 LIBRPCCLI_NETLOGON_SRC = 'rpc_client/cli_netlogon.c rpc_client/util_netlogon.c'
47
48 LIBCLI_WINREG_SRC = '''rpc_client/cli_winreg.c
49                        rpc_client/cli_winreg_int.c'''
50
51 # this includes only the low level parse code, not stuff
52 # that requires knowledge of security contexts
53 REG_PARSE_PRS_SRC = '''registry/reg_parse_prs.c'''
54
55 LIBREPLACE_SRC = '''${LIBREPLACE_SRCS}'''
56
57 LIBSAMBAUTIL_SRC = '''${LIBREPLACE_SRC}'''
58
59 UTIL_SRC = '''../lib/util/rbtree.c ../lib/util/signal.c ../lib/util/time.c
60                    ../lib/util/xfile.c ../lib/util/util_strlist.c
61                    ../lib/util/util_file.c ../lib/util/data_blob.c
62                    ../lib/util/util.c ../lib/util/fsusage.c
63                    ../lib/util/params.c ../lib/util/talloc_stack.c
64                    ../lib/util/genrand.c ../lib/util/util_net.c
65                    ../lib/util/become_daemon.c ../lib/util/system.c
66                    ../lib/util/tevent_unix.c ../lib/util/tevent_ntstatus.c
67                    ../lib/util/tevent_werror.c
68                    ../lib/util/smb_threads.c ../lib/util/util_id.c
69                    ../lib/util/blocking.c ../lib/util/rfc1738.c
70                    ../lib/util/select.c'''
71
72 LIBTEVENT_SRC0 = ''
73
74 PTHREADPOOL_SRC = ''
75
76 LIBREPLACE_SRCS = ''
77
78 LIB_SRC = '''${LIBSAMBAUTIL_SRC}
79           lib/messages.c lib/messages_local.c
80           lib/messages_ctdbd.c lib/packet.c lib/ctdbd_conn.c
81           lib/interfaces.c lib/memcache.c
82           lib/talloc_dict.c
83           lib/util_sconn.c
84           lib/serverid.c
85           lib/util_transfer_file.c
86           lib/addrchange.c
87           ${TDB_LIB_SRC}
88           lib/debug.c lib/fault.c
89           lib/interface.c lib/pidfile.c
90           lib/system.c lib/sendfile.c lib/recvfile.c lib/time.c
91           lib/username.c
92           ../libds/common/flag_mapping.c
93           lib/access.c lib/smbrun.c
94           lib/bitmap.c lib/dprintf.c ${UTIL_REG_SRC}
95           lib/wins_srv.c
96           lib/clobber.c lib/util_sid.c
97           lib/util_file.c
98           lib/util.c lib/util_names.c
99           lib/util_sock.c lib/sock_exec.c lib/util_sec.c
100           lib/substitute.c lib/dbwrap_util.c
101           lib/ms_fnmatch.c lib/errmap_unix.c
102           lib/tallocmsg.c lib/dmallocmsg.c
103           libsmb/clisigning.c libsmb/smb_signing.c
104           intl/lang_tdb.c
105           lib/conn_tdb.c lib/adt_tree.c lib/gencache.c
106           lib/sessionid_tdb.c
107           lib/module.c lib/events.c ${LIBTEVENT_SRC0}
108           lib/server_contexts.c
109           lib/ldap_escape.c
110           lib/secdesc.c ${PTHREADPOOL_SRC}
111           lib/fncall.c
112           libads/krb5_errs.c lib/system_smbd.c lib/audit.c
113           lib/file_id.c lib/idmap_cache.c'''
114
115 LIB_DUMMY_SRC = '''lib/dummysmbd.c lib/dummyroot.c'''
116 LIB_NONSMBD_SRC = '''${LIB_DUMMY_SRC}'''
117
118 POPT_LIB_SRC = '''lib/popt_common.c'''
119
120 PARAM_UTIL_SRC = '''param/util.c'''
121
122 PARAM_WITHOUT_REG_SRC = '''param/loadparm.c param/loadparm_server_role.c
123                            lib/sharesec.c lib/ldap_debug_handler.c'''
124
125 KRBCLIENT_SRC = '''libads/kerberos.c libads/ads_status.c'''
126
127 LIBGPO_SRC0 = '''../libgpo/gpo_ldap.c ../libgpo/gpo_ini.c ../libgpo/gpo_util.c
128               ../libgpo/gpo_fetch.c libgpo/gpo_filesync.c ../libgpo/gpo_sec.c
129               libgpo/gpo_reg.c'''
130 LIBGPO_SRC = '''${LIBGPO_SRC0}'''
131
132 LIBADS_SRC = '''libads/ldap.c
133              libads/sasl.c libads/sasl_wrapping.c
134              libads/krb5_setpw.c
135              libads/kerberos_util.c
136              libads/ldap_user.c
137              libads/ads_struct.c libads/kerberos_keytab.c
138              libads/disp_sec.c libads/ldap_utils.c
139              libads/ldap_schema.c libads/util.c libads/ndr.c'''
140
141 LIBADS_SERVER_SRC = '''libads/kerberos_verify.c libads/authdata.c'''
142
143 LIBADS_PRINTER_SRC = '''libads/ldap_printer.c'''
144
145 SECRETS_SRC = '''passdb/secrets.c passdb/machine_account_secrets.c
146                  passdb/machine_sid.c'''
147
148 LIBNMB_SRC = '''libsmb/unexpected.c libsmb/namecache.c libsmb/nmblib.c
149              libsmb/namequery.c ../libcli/nbt/lmhosts.c libsmb/conncache.c
150              libads/dns.c libads/sitename_cache.c'''
151
152 NTERR_SRC = '''libsmb/smberr.c'''
153 ERRORMAP_SRC = 'libsmb/errormap.c'
154 DCE_RPC_ERR_SRC = '../librpc/rpc/dcerpc_error.c'
155
156 LIBSMB_ERR_SRC = '''${NTERR_SRC} ${ERRORMAP_SRC} ${DCE_RPC_ERR_SRC}'''
157
158 LIBSMB_SRC0 = '''
159                libsmb/ntlmssp.c
160                libsmb/ntlmssp_wrap.c
161                ../libcli/auth/ntlmssp.c
162                ../libcli/auth/ntlmssp_sign.c
163                ../libcli/auth/ntlmssp_ndr.c
164                ../libcli/auth/ntlmssp_server.c'''
165
166 LIBSAMBA_SRC = '${LIBSMB_SRC0}'
167
168 CLDAP_SRC = '''libads/cldap.c
169         ../libcli/cldap/cldap.c
170         ../lib/util/idtree.c'''
171
172 TLDAP_SRC = '''lib/tldap.c lib/tldap_util.c lib/util_tsock.c'''
173
174 SCHANNEL_SRC = '''../libcli/auth/schannel_sign.c'''
175
176 LIBSMB_SRC = '''libsmb/clientgen.c libsmb/cliconnect.c libsmb/clifile.c
177              libsmb/clikrb5.c libsmb/clispnego.c
178              libsmb/clirap.c libsmb/clierror.c libsmb/climessage.c
179              libsmb/clireadwrite.c libsmb/clilist.c libsmb/cliprint.c
180              libsmb/clitrans.c libsmb/clisecdesc.c libsmb/clidgram.c
181              libsmb/clistr.c libsmb/cliquota.c libsmb/clifsinfo.c libsmb/clidfs.c
182              libsmb/clioplock.c libsmb/clirap2.c
183              libsmb/smb_seal.c libsmb/async_smb.c
184              libsmb/cli_np_tstream.c
185              libsmb/smbsock_connect.c'''
186
187 LIBMSRPC_SRC = '''
188                ${SCHANNEL_SRC}
189                rpc_client/cli_pipe.c
190                librpc/crypto/gse_krb5.c
191                librpc/crypto/gse.c
192                librpc/crypto/cli_spnego.c
193                librpc/rpc/rpc_common.c
194                rpc_client/rpc_transport_np.c
195                rpc_client/rpc_transport_sock.c
196                rpc_client/rpc_transport_tstream.c
197                ../librpc/rpc/binding.c
198                ../librpc/rpc/dcerpc_util.c
199                librpc/rpc/dcerpc_helpers.c
200                ../librpc/rpc/binding_handle.c'''
201
202 #
203 # registry-related objects
204 #
205 UTIL_REG_SRC = '''../libcli/registry/util_reg.c'''
206
207 REG_INIT_BASIC_SRC = '''registry/reg_init_basic.c'''
208 REG_INIT_SMBCONF_SRC = '''registry/reg_init_smbconf.c'''
209 REG_INIT_FULL_SRC = '''registry/reg_init_full.c'''
210
211 REGFIO_SRC = '''registry/regfio.c ${REG_PARSE_PRS_SRC}'''
212
213 REG_API_REGF_SRC = '''registry/reg_api_regf.c'''
214
215 REGSRCS_SRC = '''registry/reg_objects.c'''
216
217 REG_BACKENDS_BASE_SRC = '''registry/reg_backend_db.c'''
218
219 REG_BACKENDS_SMBCONF_SRC = '''registry/reg_backend_smbconf.c'''
220
221 REG_BACKENDS_EXTRA_SRC = '''registry/reg_backend_printing.c
222                          registry/reg_backend_shares.c
223                          registry/reg_backend_netlogon_params.c
224                          registry/reg_backend_prod_options.c
225                          registry/reg_backend_tcpip_params.c
226                          registry/reg_backend_hkpt_params.c
227                          registry/reg_backend_current_version.c
228                          registry/reg_backend_perflib.c'''
229
230 REG_BASE_SRC = '''registry/reg_api.c
231                registry/reg_dispatcher.c
232                registry/reg_cachehook.c
233                ${REGSRCS_SRC}
234                registry/reg_util_internal.c
235                lib/util_nttoken.c
236                ${REG_BACKENDS_BASE_SRC}
237                ${REG_INIT_BASIC_SRC}'''
238
239 REG_SMBCONF_SRC = '''
240                   ${REG_BACKENDS_SMBCONF_SRC}
241                   ${REG_INIT_SMBCONF_SRC}
242                   registry/reg_util_token.c
243                   registry/reg_api_util.c'''
244
245 REG_FULL_SRC = '''
246                ${REG_BACKENDS_EXTRA_SRC}
247                ${REG_INIT_FULL_SRC}
248                registry/reg_perfcount.c'''
249
250 SERVICES_SRC = '''services/svc_spoolss.c
251                   services/svc_rcinit.c
252                   services/svc_winreg_glue.c
253                   services/svc_netlogon.c
254                   services/svc_winreg.c
255                   services/svc_wins.c'''
256
257 LIB_EVENTLOG_SRC = '''lib/eventlog/eventlog.c'''
258
259 RPC_CLIENT_SCHANNEL_SRC = '''rpc_client/cli_pipe_schannel.c'''
260
261 LOCKING_SRC = '''locking/locking.c locking/brlock.c locking/posix.c'''
262
263 PRIVILEGES_SRC = '''lib/privileges.c'''
264
265 PASSDB_GET_SET_SRC = '''passdb/pdb_get_set.c'''
266
267 PASSDB_SRC = '''${PASSDB_GET_SET_SRC} passdb/passdb.c
268                 passdb/util_wellknown.c passdb/util_builtin.c passdb/pdb_compat.c
269                 passdb/util_unixsids.c passdb/lookup_sid.c
270                 passdb/login_cache.c
271                 passdb/account_pol.c ${PRIVILEGES_SRC}
272                 lib/util_nscd.c lib/winbind_util.c ${SERVER_MUTEX_SRC}'''
273 #FIXME: lib/winbind_util.c probably is not part of PASSDB_SRC
274
275 GROUPDB_SRC = '''groupdb/mapping.c groupdb/mapping_tdb.c'''
276
277 PROFILE_SRC = '''profile/profile.c'''
278 PROFILES_SRC = '''utils/profiles.c'''
279
280 OPLOCK_SRC = '''smbd/oplock.c smbd/oplock_irix.c smbd/oplock_linux.c
281              smbd/oplock_onefs.c'''
282
283 NOTIFY_SRC = '''smbd/notify.c smbd/notify_inotify.c smbd/notify_internal.c'''
284
285 FNAME_UTIL_SRC = '''smbd/filename_util.c'''
286
287
288 PLAINTEXT_AUTH_SRC = '''auth/pampass.c auth/pass_check.c'''
289
290 SLCACHE_SRC = '''libsmb/samlogon_cache.c'''
291
292 DCUTIL_SRC  = '''libsmb/namequery_dc.c libsmb/trustdom_cache.c libsmb/trusts_util.c libsmb/dsgetdcname.c'''
293
294 WINBINDD_SRC1 = '''winbindd/winbindd.c
295                    winbindd/winbindd_group.c
296                    winbindd/winbindd_util.c
297                    winbindd/winbindd_cache.c
298                    winbindd/winbindd_pam.c
299                    winbindd/winbindd_misc.c
300                    winbindd/winbindd_cm.c
301                    winbindd/winbindd_wins.c
302                    winbindd/winbindd_msrpc.c
303                    winbindd/winbindd_rpc.c
304                    winbindd/winbindd_reconnect.c
305                    winbindd/winbindd_ads.c
306                    winbindd/winbindd_samr.c
307                    winbindd/winbindd_dual.c
308                    winbindd/winbindd_dual_ndr.c
309                    winbindd/winbindd_dual_srv.c
310                    winbindd/winbindd_async.c
311                    winbindd/winbindd_creds.c
312                    winbindd/winbindd_cred_cache.c
313                    winbindd/winbindd_ccache_access.c
314                    winbindd/winbindd_domain.c
315                    winbindd/winbindd_idmap.c
316                    winbindd/winbindd_locator.c
317                    winbindd/winbindd_ndr.c
318                    winbindd/wb_ping.c
319                    winbindd/wb_lookupsid.c
320                    winbindd/wb_lookupname.c
321                    winbindd/wb_sid2uid.c
322                    winbindd/wb_sid2gid.c
323                    winbindd/wb_uid2sid.c
324                    winbindd/wb_gid2sid.c
325                    winbindd/wb_queryuser.c
326                    winbindd/wb_lookupuseraliases.c
327                    winbindd/wb_lookupusergroups.c
328                    winbindd/wb_getpwsid.c
329                    winbindd/wb_gettoken.c
330                    winbindd/wb_seqnum.c
331                    winbindd/wb_seqnums.c
332                    winbindd/wb_group_members.c
333                    winbindd/wb_getgrsid.c
334                    winbindd/wb_query_user_list.c
335                    winbindd/wb_fill_pwent.c
336                    winbindd/wb_next_pwent.c
337                    winbindd/wb_next_grent.c
338                    winbindd/wb_dsgetdcname.c
339                    winbindd/winbindd_lookupsid.c
340                    winbindd/winbindd_lookupname.c
341                    winbindd/winbindd_sid_to_uid.c
342                    winbindd/winbindd_sid_to_gid.c
343                    winbindd/winbindd_uid_to_sid.c
344                    winbindd/winbindd_gid_to_sid.c
345                    winbindd/winbindd_allocate_uid.c
346                    winbindd/winbindd_allocate_gid.c
347                    winbindd/winbindd_getpwsid.c
348                    winbindd/winbindd_getpwnam.c
349                    winbindd/winbindd_getpwuid.c
350                    winbindd/winbindd_getsidaliases.c
351                    winbindd/winbindd_getuserdomgroups.c
352                    winbindd/winbindd_getgroups.c
353                    winbindd/winbindd_show_sequence.c
354                    winbindd/winbindd_getgrgid.c
355                    winbindd/winbindd_getgrnam.c
356                    winbindd/winbindd_getusersids.c
357                    winbindd/winbindd_lookuprids.c
358                    winbindd/winbindd_setpwent.c
359                    winbindd/winbindd_getpwent.c
360                    winbindd/winbindd_endpwent.c
361                    winbindd/winbindd_setgrent.c
362                    winbindd/winbindd_getgrent.c
363                    winbindd/winbindd_endgrent.c
364                    winbindd/winbindd_dsgetdcname.c
365                    winbindd/winbindd_getdcname.c
366                    winbindd/winbindd_list_users.c
367                    winbindd/winbindd_list_groups.c
368                    winbindd/winbindd_check_machine_acct.c
369                    winbindd/winbindd_change_machine_acct.c
370                    winbindd/winbindd_ping_dc.c
371                    winbindd/winbindd_pam_auth.c
372                    winbindd/winbindd_pam_logoff.c
373                    winbindd/winbindd_pam_chauthtok.c
374                    winbindd/winbindd_pam_auth_crap.c
375                    winbindd/winbindd_pam_chng_pswd_auth_crap.c
376                    auth/auth_util.c
377                    auth/user_util.c
378                    auth/check_samsec.c
379                    auth/server_info.c
380                    auth/server_info_sam.c
381                    auth/user_info.c
382                    auth/user_util.c
383                    lib/wb_reqtrans.c'''
384
385 WINBINDD_SRC = '''${WINBINDD_SRC1}
386                   ${TDB_VALIDATE_SRC}'''
387
388 MANGLE_SRC = '''smbd/mangle.c smbd/mangle_hash.c smbd/mangle_hash2.c'''
389
390 SMBD_SRC_MAIN = '''smbd/server.c smbd/server_exit.c'''
391
392 BUILDOPT_SRC = '''smbd/build_options.c'''
393
394 SMBD_SRC_SRV = '''smbd/server_reload.c smbd/files.c smbd/connection.c
395                smbd/utmp.c smbd/session.c
396                smbd/dfree.c smbd/dir.c smbd/password.c smbd/conn.c
397                smbd/share_access.c smbd/fileio.c
398                smbd/ipc.c smbd/lanman.c smbd/negprot.c
399                smbd/message.c smbd/nttrans.c smbd/pipes.c
400                smbd/reply.c smbd/sesssetup.c smbd/trans2.c smbd/uid.c
401                smbd/dosmode.c smbd/filename.c smbd/open.c smbd/close.c
402                smbd/blocking.c smbd/sec_ctx.c smbd/srvstr.c
403                smbd/vfs.c smbd/perfcount.c smbd/statcache.c smbd/seal.c
404                smbd/posix_acls.c lib/sysacls.c
405                smbd/process.c smbd/service.c smbd/error.c
406                printing/printspoolss.c
407                lib/sysquotas.c lib/sysquotas_linux.c
408                lib/sysquotas_xfs.c lib/sysquotas_4A.c
409                lib/sysquotas_nfs.c
410                smbd/fake_file.c
411                smbd/quotas.c smbd/ntquotas.c smbd/msdfs.c
412                smbd/aio.c smbd/statvfs.c
413                smbd/dmapi.c smbd/signing.c
414                smbd/file_access.c
415                smbd/dnsregister.c smbd/globals.c
416                smbd/smb2_server.c
417                smbd/smb2_signing.c
418                smbd/smb2_glue.c
419                smbd/smb2_negprot.c
420                smbd/smb2_sesssetup.c
421                smbd/smb2_tcon.c
422                smbd/smb2_create.c
423                smbd/smb2_close.c
424                smbd/smb2_flush.c
425                smbd/smb2_read.c
426                smbd/smb2_write.c
427                smbd/smb2_lock.c
428                smbd/smb2_ioctl.c
429                smbd/smb2_keepalive.c
430                smbd/smb2_find.c
431                smbd/smb2_notify.c
432                smbd/smb2_getinfo.c
433                smbd/smb2_setinfo.c
434                smbd/smb2_break.c
435                ${MANGLE_SRC}'''
436
437 SMBD_SRC_BASE = '''${SMBD_SRC_SRV}
438                 ${OPLOCK_SRC} ${NOTIFY_SRC}
439                 ${BUILDOPT_SRC}'''
440
441 PRINTING_SRC = '''printing/pcap.c printing/print_svid.c printing/print_aix.c
442                printing/print_cups.c printing/print_generic.c
443                printing/lpq_parse.c printing/load.c printing/print_standard.c
444                printing/print_iprint.c printing/printer_list.c'''
445
446 PRINTBASE_SRC = '''printing/notify.c printing/printing_db.c'''
447 PRINTBACKEND_SRC = '''printing/printing.c
448                       printing/nt_printing.c
449                       printing/nt_printing_tdb.c
450                       printing/nt_printing_migrate.c
451                       printing/nt_printing_ads.c'''
452
453 SMBD_SRC = '''${SMBD_SRC_BASE} ${SMBD_SRC_MAIN}'''
454
455 NMBD_SRC1 = '''nmbd/asyncdns.c nmbd/nmbd.c nmbd/nmbd_become_dmb.c
456             nmbd/nmbd_become_lmb.c nmbd/nmbd_browserdb.c
457             nmbd/nmbd_browsesync.c nmbd/nmbd_elections.c
458             nmbd/nmbd_incomingdgrams.c nmbd/nmbd_incomingrequests.c
459             nmbd/nmbd_lmhosts.c nmbd/nmbd_logonnames.c nmbd/nmbd_mynames.c
460             nmbd/nmbd_namelistdb.c nmbd/nmbd_namequery.c
461             nmbd/nmbd_nameregister.c nmbd/nmbd_namerelease.c
462             nmbd/nmbd_nodestatus.c nmbd/nmbd_packets.c
463             nmbd/nmbd_processlogon.c nmbd/nmbd_responserecordsdb.c
464             nmbd/nmbd_sendannounce.c nmbd/nmbd_serverlistdb.c
465             nmbd/nmbd_subnetdb.c nmbd/nmbd_winsproxy.c nmbd/nmbd_winsserver.c
466             nmbd/nmbd_workgroupdb.c nmbd/nmbd_synclists.c'''
467
468 NMBD_SRC = '${NMBD_SRC1}'
469
470 SWAT_SRC1 = '''web/cgi.c web/diagnose.c web/startstop.c web/statuspage.c
471                web/swat.c web/neg_lang.c'''
472
473 SWAT_SRC = '''${SWAT_SRC1}'''
474
475 STATUS_SRC = '''utils/status.c utils/status_profile.c'''
476
477 SMBCONTROL_SRC = '''utils/smbcontrol.c'''
478
479 SMBTREE_SRC = '''utils/smbtree.c'''
480
481 TESTPARM_SRC = 'utils/testparm.c'
482
483 SMBTA_UTIL_SRC = '''utils/smbta-util.c'''
484
485 TEST_LP_LOAD_SRC = '''param/test_lp_load.c'''
486
487 PASSWD_UTIL_SRC = 'utils/passwd_util.c'
488
489 SMBPASSWD_SRC = '''utils/smbpasswd.c'''
490
491 PDBEDIT_SRC = '''utils/pdbedit.c'''
492
493 SMBGET_SRC = '''utils/smbget.c'''
494
495 RPCCLIENT_SRC1 = '''rpcclient/rpcclient.c rpcclient/cmd_lsarpc.c
496                     rpcclient/cmd_samr.c rpcclient/cmd_spoolss.c
497                     rpcclient/cmd_netlogon.c rpcclient/cmd_srvsvc.c
498                     rpcclient/cmd_dfs.c rpcclient/cmd_epmapper.c
499                     rpcclient/cmd_dssetup.c rpcclient/cmd_echo.c
500                     rpcclient/cmd_shutdown.c rpcclient/cmd_test.c
501                     rpcclient/cmd_wkssvc.c rpcclient/cmd_ntsvcs.c
502                     rpcclient/cmd_drsuapi.c rpcclient/cmd_eventlog.c
503                     rpcclient/cmd_winreg.c'''
504
505 RPCCLIENT_SRC = '''${RPCCLIENT_SRC1}'''
506
507 PAM_WINBIND_SRC = '../nsswitch/pam_winbind.c'
508
509 LIBSMBCLIENT_THREAD_SRC = '''libsmb/libsmb_thread_impl.c
510                         libsmb/libsmb_thread_posix.c'''
511
512 LIBSMBCLIENT_SRC0 = '''libsmb/libsmb_cache.c
513                     libsmb/libsmb_compat.c
514                     libsmb/libsmb_context.c
515                     libsmb/libsmb_dir.c
516                     libsmb/libsmb_file.c
517                     libsmb/libsmb_misc.c
518                     libsmb/libsmb_path.c
519                     libsmb/libsmb_printjob.c
520                     libsmb/libsmb_server.c
521                     libsmb/libsmb_stat.c
522                     libsmb/libsmb_xattr.c
523                     libsmb/libsmb_setget.c'''
524
525 LIBSMBCLIENT_SRC1 = '''${LIBSMBCLIENT_SRC0}'''
526
527 LIBSMBCLIENT_SRC = '${LIBSMBCLIENT_SRC1}'
528
529 LIBSMBSHAREMODES_SRC0 = 'libsmb/smb_share_modes.c'
530
531 LIBSMBSHAREMODES_SRC = '${LIBSMBSHAREMODES_SRC0}'
532
533 LIBNETAPI_SRC0 = '''lib/netapi/netapi.c
534                     lib/netapi/cm.c
535                     lib/netapi/libnetapi.c
536                     lib/netapi/joindomain.c
537                     lib/netapi/serverinfo.c
538                     lib/netapi/getdc.c
539                     lib/netapi/user.c
540                     lib/netapi/group.c
541                     lib/netapi/localgroup.c
542                     lib/netapi/samr.c
543                     lib/netapi/sid.c
544                     lib/netapi/share.c
545                     lib/netapi/file.c
546                     lib/netapi/shutdown.c
547                     lib/netapi/netlogon.c'''
548
549 LIBNETAPI_SRC = '''${LIBNETAPI_SRC0}'''
550
551 # FIXME:  bigballofmud
552
553 CLIENT_SRC1 = '''client/client.c client/clitar.c
554                  client/dnsbrowse.c'''
555
556 CLIENT_SRC = '''${CLIENT_SRC1}'''
557
558 LIB_SMBCONF_SRC = 'lib/smbconf/smbconf_init.c lib/smbconf/smbconf_reg.c'
559
560 SMBCONFTORT_SRC0 = 'lib/smbconf/testsuite.c'
561
562 SMBCONFTORT_SRC = '''${SMBCONFTORT_SRC0}'''
563
564 LIBNET_SRC = 'libnet/libnet_join.c libnet/libnet_keytab.c'
565
566
567 LIBNET_DSSYNC_SRC = '''libnet/libnet_dssync.c
568                        libnet/libnet_dssync_passdb.c
569                        libnet/libnet_dssync_keytab.c'''
570
571 LIBNET_SAMSYNC_SRC = '''libnet/libnet_samsync.c
572                         libnet/libnet_samsync_ldif.c
573                         libnet/libnet_samsync_passdb.c
574                         libnet/libnet_samsync_display.c
575                         libnet/libnet_samsync_keytab.c'''
576
577 NET_SRC1 = '''utils/net.c utils/net_ads.c utils/net_help.c
578               utils/net_rap.c utils/net_rpc.c utils/net_rpc_samsync.c
579               utils/net_rpc_join.c utils/net_time.c utils/net_lookup.c
580               utils/net_cache.c utils/net_groupmap.c utils/net_idmap.c
581               utils/net_status.c utils/net_rpc_printer.c utils/net_rpc_rights.c
582               utils/net_rpc_service.c utils/net_rpc_registry.c utils/net_usershare.c
583               utils/netlookup.c utils/net_sam.c utils/net_rpc_shell.c
584               utils/net_util.c utils/net_rpc_sh_acct.c utils/net_rpc_audit.c
585               utils/net_dns.c utils/net_ads_gpo.c
586               utils/net_conf.c utils/net_join.c utils/net_user.c
587               utils/net_group.c utils/net_file.c utils/net_registry.c
588               utils/net_dom.c utils/net_share.c
589               utils/net_g_lock.c
590               utils/net_serverid.c
591               utils/net_eventlog.c
592               utils/net_printing.c
593               registry/reg_parse.c registry/reg_format.c
594               registry/reg_parse_internal.c registry/reg_import.c
595               lib/cbuf.c lib/srprs.c'''
596
597 NET_SRC2 = 'utils/net_registry_util.c utils/net_help_common.c'
598
599 NET_SRC = '''${NET_SRC1}
600              ${NET_SRC2}'''
601
602 CUPS_SRC = '''client/smbspool.c'''
603
604 NMBLOOKUP_SRC = '''utils/nmblookup.c'''
605
606 SMBTORTURE_SRC1 = '''torture/torture.c torture/nbio.c torture/scanner.c torture/utable.c
607                 torture/denytest.c torture/mangle_test.c
608                 torture/nbench.c
609                 torture/test_async_echo.c
610                 torture/test_addrchange.c
611                 torture/test_posix_append.c
612                 torture/test_smbsock_any_connect.c'''
613
614 SMBTORTURE_SRC = '''${SMBTORTURE_SRC1}
615         torture/wbc_async.c
616         lib/wb_reqtrans.c'''
617
618 MASKTEST_SRC = '''torture/masktest.c'''
619
620 MSGTEST_SRC = '''torture/msgtest.c'''
621
622 LOCKTEST_SRC = '''torture/locktest.c'''
623
624 NSSTEST_SRC = '''../nsswitch/nsstest.c ${LIBSAMBAUTIL_SRC}'''
625
626 PDBTEST_SRC = '''torture/pdbtest.c'''
627
628 VFSTEST_SRC = '''torture/cmd_vfs.c torture/vfstest.c'''
629
630 SMBICONV_SRC = '''torture/smbiconv.c'''
631
632 LOG2PCAP_SRC = '''utils/log2pcaphex.c'''
633
634 LOCKTEST2_SRC = '''torture/locktest2.c'''
635
636 SMBCACLS_SRC = '''utils/smbcacls.c'''
637
638 SMBCQUOTAS_SRC = '''utils/smbcquotas.c'''
639
640 EVTLOGADM_SRC0 = 'utils/eventlogadm.c'
641
642 EVTLOGADM_SRC = '''${EVTLOGADM_SRC0}'''
643
644 SHARESEC_SRC0 = 'utils/sharesec.c'
645 SHARESEC_SRC  = '''${SHARESEC_SRC0}'''
646
647 DEBUG2HTML_SRC = '''utils/debug2html.c utils/debugparse.c'''
648
649 SMBFILTER_SRC = '''utils/smbfilter.c'''
650
651 WINBIND_WINS_NSS_SRC = '''../nsswitch/wins.c'''
652
653 WBINFO_SRC = '''../nsswitch/wbinfo.c'''
654
655 NTLM_AUTH_SRC1 = '''utils/ntlm_auth.c utils/ntlm_auth_diagnostics.c'''
656
657 NTLM_AUTH_SRC = '''${NTLM_AUTH_SRC1}
658                 libsmb/clikrb5.c libads/kerberos.c'''
659
660
661 VLP_SRC = '''printing/tests/vlp.c'''
662
663 RPC_OPEN_TCP_SRC = 'torture/rpc_open_tcp.c'
664
665 DBWRAP_TOOL_SRC = 'utils/dbwrap_tool.c'
666
667 DBWRAP_TORTURE_SRC = 'utils/dbwrap_torture.c'
668
669 SPLIT_TOKENS_SRC = 'utils/split_tokens.c'
670
671 LIBS='ICONV'
672
673 bld.SAMBA_GENERATOR('build_options',
674                     source='include/config.h script/mkbuildoptions-waf.awk',
675                     target='smbd/build_options.c',
676                     rule='${AWK} -f ${SRC[1].abspath(env)} > ${TGT} < ${SRC[0].abspath(env)}')
677
678 t = bld.SAMBA_GENERATOR('build_env.h',
679                         source='script/build_env.sh',
680                         target='include/build_env.h',
681                         rule='${SRC} ${SRCDIR} ${BUILDDIR} ${CC} > ${TGT}')
682 # todo: work out what is really wanted here
683 t.env.SRCDIR = bld.path.abspath()
684 t.env.BUILDDIR = bld.path.abspath()
685
686
687 bld.SETUP_BUILD_GROUPS()
688
689 samba_version.load_version(bld.env)
690
691 bld.SAMBA_MKVERSION('include/version.h')
692
693 bld.RECURSE('../lib/replace')
694 print "SBINDIR=%s" % bld.env.SBINDIR
695 bld.RECURSE('build')
696
697 ######################## SUBSYSTEMS #################################
698
699 bld.SAMBA_SUBSYSTEM('winbind-client',
700                     source=WBCOMMON_SRC,
701                     deps='replace',
702                     cflags='-DSOCKET_WRAPPER_DISABLE=1 -DWINBINDD_SOCKET_DIR=\"%s\"' % bld.env.WINBINDD_SOCKET_DIR)
703
704 bld.SAMBA_LIBRARY('netapi',
705                     source=LIBNETAPI_SRC,
706                     public_deps='''talloc tdb cap wbclient LIB_NONSMBD LIBSMB KRBCLIENT
707                     PASSDB SMBLDAP GROUPDB PARAM_WITHOUT_REG DYNCONFIG
708                     LIBMSRPC_GEN LIBMSRPC LIBADS LIBNET DCUTIL NDR_LIBNETAPI
709                     RPC_CLIENT_SCHANNEL LIB_SMBCONF REG_SMBCONF TOKEN_UTIL
710                     LIBCLI_SAMR LIBCLI_LSA LIBRPCCLI_NETLOGON
711                     RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_INITSHUTDOWN
712                     INIT_NETLOGON INIT_SAMR''',
713                     public_headers='lib/netapi/netapi.h',
714                     vnum='0',
715                     vars=locals())
716
717 bld.SAMBA_LIBRARY('smbclient',
718                     source=LIBSMBCLIENT_SRC,
719                     public_deps='''talloc tdb wbclient cap PARAM LIB_NONSMBD LIBSMB KRBCLIENT PASSDB SMBLDAP GROUPDB
720                     LIBMSRPC_GEN LIBMSRPC LIBCLI_LSA RPC_NDR_SRVSVC''',
721                     public_headers='include/libsmbclient.h',
722                     vnum='0',
723                     vars=locals())
724
725 bld.SAMBA_LIBRARY('smbsharemodes',
726                     source=LIBSMBSHAREMODES_SRC,
727                     public_deps='''talloc tdb''',
728                     public_headers='include/smb_share_modes.h',
729                     vnum='0',
730                     vars=locals())
731
732 bld.SAMBA_LIBRARY('nss_winbind',
733                   source='../nsswitch/winbind_nss_linux.c',
734                   deps='winbind-client',
735                   realname='libnss_winbind.so.2',
736                   vnum='2')
737
738 bld.SAMBA_LIBRARY('nss_wins',
739                   source=WINBIND_WINS_NSS_SRC,
740                   deps='''winbind-client PARAM LIBSMB LIB_NONSMBD LIBTSOCKET KRBCLIENT
741                   cap wbclient''',
742                   realname='libnss_wins.so.2',
743                   vnum='2')
744
745 if bld.CONFIG_SET('WITH_PAM_MODULES'):
746         bld.SAMBA_LIBRARY('pamwinbind',
747                           source=PAM_WINBIND_SRC,
748                           deps='intl talloc wbclient winbind-client LIBINIPARSER pam',
749                           cflags='-DLOCALEDIR=\"%s/locale\"' % bld.env.DATADIR,
750                           realname='pam_winbind.so')
751
752 if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):
753         bld.SAMBA_LIBRARY('winbind_krb5_locator',
754                           source='../nsswitch/winbind_krb5_locator.c',
755                           deps='wbclient krb5',
756                           realname='winbind_krb5_locator.so')
757
758 bld.SAMBA_SUBSYSTEM('LIBMSRPC',
759                     source='${LIBMSRPC_SRC}',
760                     deps='''ndr ndr-util NDR_SECURITY NDR_DCERPC NDR_SCHANNEL
761                     RPC_NDR_EPMAPPER COMMON_SCHANNELDB LIBCLI_AUTH''',
762                     vars=locals())
763
764 bld.SAMBA_SUBSYSTEM('LIBMSRPC_GEN',
765                     source='',
766                     deps='''ndr-standard NDR_DSSETUP NDR_SPOOLSS''',
767                     vars=locals())
768
769 bld.SAMBA_SUBSYSTEM('LIBGPO',
770                     source='${LIBGPO_SRC}',
771                     deps='gpext',
772                     vars=locals())
773
774 bld.SAMBA_SUBSYSTEM('ASN1_UTIL',
775                     source='../lib/util/asn1.c',
776                     deps='talloc',
777                     local_include=False)
778
779 bld.SAMBA_SUBSYSTEM('AVAHI',
780                     source=AVAHI_SRC,
781                     deps='avahi-common avahi-client',
782                     enabled=bld.env.with_avahi)
783
784 bld.SAMBA_SUBSYSTEM('GROUPDB',
785                     source=GROUPDB_SRC)
786
787 bld.SAMBA_SUBSYSTEM('TLDAP',
788                     source=TLDAP_SRC,
789                     deps='ASN1_UTIL LIBTSOCKET')
790
791 bld.SAMBA_SUBSYSTEM('PASSDB',
792                     source=PASSDB_SRC,
793                     deps='''GROUPDB TLDAP SECRETS SMBLDAP pdb''',
794                     vars=locals())
795
796 bld.SAMBA_SUBSYSTEM('PARAM_UTIL',
797                     source=PARAM_UTIL_SRC)
798
799 bld.SAMBA_SUBSYSTEM('PARAM_WITHOUT_REG',
800                     source=PARAM_WITHOUT_REG_SRC,
801                     deps='''PARAM_UTIL''',
802                     vars=locals())
803
804 bld.SAMBA_SUBSYSTEM('PARAM',
805                     source='',
806                     deps='PARAM_WITHOUT_REG DYNCONFIG LIB_SMBCONF',
807                     vars=locals())
808
809 bld.SAMBA_SUBSYSTEM('REGFIO',
810                     source=REGFIO_SRC,
811                     vars=locals())
812
813 bld.SAMBA_SUBSYSTEM('REG_API_REGF',
814                     source=REG_API_REGF_SRC,
815                     vars=locals())
816
817 bld.SAMBA_SUBSYSTEM('REG_BASE',
818                     source=REG_BASE_SRC,
819                     vars=locals())
820
821 bld.SAMBA_SUBSYSTEM('REG_SMBCONF',
822                     source=REG_SMBCONF_SRC,
823                     deps='REG_BASE',
824                     vars=locals())
825
826 bld.SAMBA_SUBSYSTEM('REG_FULL',
827                     source=REG_FULL_SRC,
828                     deps='REG_SMBCONF',
829                     vars=locals())
830
831 bld.SAMBA_SUBSYSTEM('POPT_SAMBA',
832                     source=POPT_LIB_SRC,
833                     vars=locals())
834
835 bld.SAMBA_SUBSYSTEM('KRBCLIENT',
836                     source=KRBCLIENT_SRC,
837                     deps='krb5 k5crypto com_err gssapi gssapi_krb5',
838                     vars=locals())
839
840 bld.SAMBA_SUBSYSTEM('LIBS',
841                     source=LIB_SRC,
842                     deps='LIBCRYPTO ndr ndr-util security NDR_SECURITY charset NDR_MESSAGING LIBASYNC_REQ tdb-wrap samba-util CHARSET UTIL_TDB SAMBA_VERSION',
843                     vars=locals())
844
845 bld.SAMBA_SUBSYSTEM('LIB_NONSMBD',
846                     source=LIB_NONSMBD_SRC,
847                     deps='LIBS',
848                     vars=locals())
849
850 bld.SAMBA_SUBSYSTEM('LIBSMB_ERR',
851                     source=LIBSMB_ERR_SRC,
852                     deps='errors SECRETS ldap lber MSRPC_PARSE LIBCLI_AUTH',
853                     vars=locals())
854
855 bld.SAMBA_SUBSYSTEM('LIBSAMBA',
856                     source=LIBSAMBA_SRC,
857                     deps='LIBSMB_ERR NDR_NTLMSSP ntlm_check',
858                     vars=locals())
859
860 bld.SAMBA_SUBSYSTEM('LIBSMB',
861                     source=LIBSMB_SRC,
862                     deps='LIBSAMBA CLDAP LIBNMB LIBNBT LIBDRSUAPI SPNEGO_PARSE',
863                     vars=locals())
864
865 bld.SAMBA_SUBSYSTEM('LIBDRSUAPI',
866                     source=DRSUAPI_SRC,
867                     deps='z LZXPRESS NDR_DRSUAPI NDR_DRSBLOBS',
868                     vars=locals())
869
870 bld.SAMBA_SUBSYSTEM('CLDAP',
871                     source=CLDAP_SRC,
872                     deps='LIBCLI_LDAP_MESSAGE LIBCLI_LDAP_NDR',
873                     vars=locals())
874
875 bld.SAMBA_SUBSYSTEM('SECRETS',
876                     source=SECRETS_SRC,
877                     deps='NDR_SECRETS',
878                     vars=locals())
879
880 bld.SAMBA_SUBSYSTEM('SMBLDAP',
881                     source=SMBLDAP_SRC,
882                     deps='ldap lber',
883                     vars=locals())
884
885 bld.SAMBA_SUBSYSTEM('LIBADS',
886                     source=LIBADS_SRC,
887                     deps='LIBCLI_LDAP_NDR',
888                     vars=locals())
889
890 bld.SAMBA_SUBSYSTEM('LIBADS_SERVER',
891                     source=LIBADS_SERVER_SRC,
892                     deps='NDR_KRB5PAC',
893                     vars=locals())
894
895 bld.SAMBA_SUBSYSTEM('LIBADS_PRINTER',
896                     source=LIBADS_PRINTER_SRC,
897                     vars=locals())
898
899 bld.SAMBA_SUBSYSTEM('LIBAFS',
900                     source=AFS_SRC,
901                     vars=locals())
902
903 bld.SAMBA_SUBSYSTEM('LIBAFS_SETTOKEN',
904                     source=AFS_SETTOKEN_SRC,
905                     vars=locals())
906
907 bld.SAMBA_SUBSYSTEM('LIB_SMBCONF',
908                     source=LIB_SMBCONF_SRC,
909                     deps='LIBSMBCONF REG_BASE REG_SMBCONF',
910                     vars=locals())
911
912 bld.SAMBA_SUBSYSTEM('SMBD_BASE',
913                     source=SMBD_SRC_BASE,
914                     deps='''tdb tevent dl krb5 ldap gssapi gssapi_krb5
915                     DYNCONFIG wbclient crypt nsl cups cap resolv z PASSDB
916                     PARAM_WITHOUT_REG LIBS LIBSMB POPT_SAMBA KRBCLIENT AVAHI
917                     LIBMSRPC_GEN LIBMSRPC LIBADS LIBADS_SERVER LIBADS_PRINTER
918                     vfs vfs_default vfs_posixacl auth rpc LOCKING LIBAFS LIBAFS_SETTOKEN PROFILE
919                     PRINTING PRINTBACKEND NDR_XATTR NDR_NOTIFY REGFIO
920                     LIB_SMBCONF REG_FULL FNAME_UTIL
921                     LIBCLI_SAMR LIBCLI_LSA LIBRPCCLI_NETLOGON LIBCLI_SPOOLSS
922                     RPC_NDR_SRVSVC NAMED_PIPE_AUTH_TSTREAM INIT_NETLOGON INIT_SAMR
923                     LIBCLI_SMB_COMMON RPC_SERVER
924                     ''',
925                     vars=locals())
926
927 bld.SAMBA_SUBSYSTEM('LOCKING',
928                     source='${LOCKING_SRC}',
929                     deps='''tdb talloc''',
930                     vars=locals())
931
932 bld.SAMBA_SUBSYSTEM('PROFILE',
933                     source='${PROFILE_SRC}',
934                     vars=locals())
935
936 bld.SAMBA_SUBSYSTEM('PRINTBASE',
937                     source=PRINTBASE_SRC,
938                     vars=locals())
939
940 bld.SAMBA_SUBSYSTEM('PRINTBACKEND',
941                     source=PRINTBACKEND_SRC,
942                     deps='PRINTBASE NDR_NTPRINTING LIBADS_PRINTER',
943                     vars=locals())
944
945 bld.SAMBA_SUBSYSTEM('PRINTING',
946                     source=PRINTING_SRC,
947                     vars=locals())
948
949 bld.SAMBA_SUBSYSTEM('PASSWD_UTIL',
950                     source=PASSWD_UTIL_SRC,
951                     vars=locals())
952
953 bld.SAMBA_SUBSYSTEM('FNAME_UTIL',
954                     source=FNAME_UTIL_SRC,
955                     vars=locals())
956
957 bld.SAMBA_SUBSYSTEM('UTIL_TDB',
958         source='../lib/util/util_tdb.c',
959         local_include=False,
960         public_deps='tdb talloc'
961         )
962
963 bld.SAMBA_SUBSYSTEM('LIBNET',
964                     source=LIBNET_SRC,
965                     deps='NDR_LIBNET_JOIN',
966                     vars=locals())
967
968 bld.SAMBA_SUBSYSTEM('LIBNET_DSSYNC',
969                     source=LIBNET_DSSYNC_SRC,
970                     deps='LIBNET LIBCLI_DRSUAPI',
971                     vars=locals())
972
973 bld.SAMBA_SUBSYSTEM('LIBNET_SAMSYNC',
974                     source=LIBNET_SAMSYNC_SRC,
975                     deps='LIBNET LIBCLI_SAMSYNC',
976                     vars=locals())
977
978 bld.SAMBA_SUBSYSTEM('LIBEVENTLOG',
979                     source=LIB_EVENTLOG_SRC,
980                     deps='NDR_EVENTLOG',
981                     vars=locals())
982
983 bld.SAMBA_SUBSYSTEM('LIBNMB',
984                     source=LIBNMB_SRC,
985                     vars=locals())
986
987 bld.SAMBA_SUBSYSTEM('LIBNBT',
988                     source='',
989                     deps='NDR_SVCCTL NDR_NBT NDR_NBT_BUF LIBCLI_NETLOGON LIBCLI_NDR_NETLOGON',
990                     vars=locals())
991
992 bld.SAMBA_SUBSYSTEM('SERVICES',
993                     source=SERVICES_SRC,
994                     vars=locals())
995
996 bld.SAMBA_SUBSYSTEM('PLAINTEXT_AUTH',
997                     source=PLAINTEXT_AUTH_SRC,
998                     deps='pam PAM_ERRORS',
999                     vars=locals())
1000
1001 bld.SAMBA_SUBSYSTEM('PASSCHANGE',
1002                     source=PASSCHANGE_SRC,
1003                     deps='LIBCLI_SAMR',
1004                     vars=locals())
1005
1006 bld.SAMBA_SUBSYSTEM('SAMBA_VERSION',
1007                     source=VERSION_SRC,
1008                     vars=locals())
1009
1010 bld.SAMBA_SUBSYSTEM('SLCACHE',
1011                     source=SLCACHE_SRC,
1012                     vars=locals())
1013
1014 bld.SAMBA_SUBSYSTEM('SPNEGO_PARSE',
1015                     source='../libcli/auth/spnego_parse.c',
1016                     vars=locals())
1017
1018 bld.SAMBA_SUBSYSTEM('DCUTIL',
1019                     source=DCUTIL_SRC,
1020                     vars=locals())
1021
1022 bld.SAMBA_SUBSYSTEM('ndr-util',
1023                     source=LIBNDR_SRC,
1024                     vars=locals())
1025
1026 bld.SAMBA_SUBSYSTEM('tdb-wrap',
1027                     source='lib/util_tdb.c',
1028                     vars=locals())
1029
1030 bld.SAMBA_SUBSYSTEM('CHARSET',
1031                     source='''lib/util_str.c lib/util_unistr.c lib/charcnv.c lib/iconv.c''',
1032                     public_deps='iconv',
1033                     deps='DYNCONFIG')
1034
1035 bld.SAMBA_SUBSYSTEM('samba-util',
1036                     source=UTIL_SRC,
1037                     deps='talloc CHARSET LIBCRYPTO',
1038                     vars=locals())
1039 #FIXME
1040 bld.SAMBA_SUBSYSTEM('ndr-standard',
1041                     source='',
1042                     deps='''
1043                     NDR_SECURITY NDR_LSA NDR_SAMR NDR_NETLOGON NDR_EVENTLOG NDR_DFS
1044                     NDR_NTSVCS NDR_SVCCTL NDR_INITSHUTDOWN NDR_WKSSVC NDR_SRVSVC NDR_WINREG
1045                     NDR_ECHO security NDR_DNS
1046                     ''',
1047                     vars=locals())
1048
1049 #FIXME
1050 bld.SAMBA_SUBSYSTEM('dcerpc', '')
1051
1052 bld.SAMBA_SUBSYSTEM('ldb',
1053                     source='lib/ldb_compat.c')
1054
1055 bld.SAMBA_SUBSYSTEM('LZXPRESS',
1056                     deps='replace',
1057                     source='../lib/compression/lzxpress.c')
1058
1059 bld.SAMBA_SUBSYSTEM('NDR_SECURITY',
1060                     source='''../librpc/gen_ndr/ndr_security.c ../librpc/ndr/ndr_sec_helper.c''',
1061                     deps='ndr',
1062                     vars=locals())
1063
1064 bld.SAMBA_SUBSYSTEM('NDR_DCERPC',
1065                     source='../librpc/gen_ndr/ndr_dcerpc.c',
1066                     vars=locals())
1067
1068 bld.SAMBA_SUBSYSTEM('errors',
1069         source='../libcli/util/doserr.c libsmb/nterr.c')
1070
1071 bld.SAMBA_SUBSYSTEM('NDR_NBT_BUF',
1072         source='../libcli/nbt/nbtname.c',
1073         deps='talloc',
1074         autoproto='nbtname.h')
1075
1076 bld.SAMBA_SUBSYSTEM('LIBCLI_SAMR',
1077                     source=LIBCLI_SAMR_SRC,
1078                     deps='RPC_NDR_SAMR')
1079
1080 bld.SAMBA_SUBSYSTEM('LIBCLI_LSA',
1081                     source=LIBCLI_LSA_SRC,
1082                     deps='RPC_NDR_LSA INIT_LSA')
1083
1084 bld.SAMBA_SUBSYSTEM('LIBRPCCLI_NETLOGON',
1085                     source=LIBRPCCLI_NETLOGON_SRC,
1086                     deps='RPC_NDR_NETLOGON')
1087
1088 bld.SAMBA_SUBSYSTEM('LIBCLI_SPOOLSS',
1089                     source=LIBCLI_SPOOLSS_SRC,
1090                     deps='RPC_NDR_SPOOLSS')
1091
1092 bld.SAMBA_SUBSYSTEM('LIBCLI_WINREG',
1093                     source=LIBCLI_WINREG_SRC,
1094                     deps='RPC_NDR_WINREG')
1095
1096 bld.SAMBA_SUBSYSTEM('RPC_CLIENT_SCHANNEL',
1097         source=RPC_CLIENT_SCHANNEL_SRC,
1098         vars=locals())
1099
1100 bld.SAMBA_SUBSYSTEM('INIT_LSA',
1101                     source='rpc_client/init_lsa.c')
1102
1103 bld.SAMBA_SUBSYSTEM('INIT_NETLOGON',
1104                     source='rpc_client/init_netlogon.c')
1105
1106 bld.SAMBA_SUBSYSTEM('INIT_SAMR',
1107                     source='rpc_client/init_samr.c')
1108
1109 ########################## BINARIES #################################
1110
1111 bld.SAMBA_BINARY('smbd/smbd',
1112                  source='${SMBD_SRC_MAIN}',
1113                  deps='''SMBD_BASE''',
1114                  install_path='${SBINDIR}',
1115                  vars=locals())
1116
1117 bld.SAMBA_BINARY('nmbd/nmbd',
1118                  source=NMBD_SRC,
1119                  deps='''talloc tdb tevent z cap resolv wbclient dl
1120                  PASSDB PARAM ldap LIB_NONSMBD LIBSMB
1121                  POPT_SAMBA KRBCLIENT NDR_SAMR NDR_LSA''',
1122                  install_path='${SBINDIR}',
1123                  vars=locals())
1124
1125 bld.SAMBA_BINARY('winbindd/winbindd',
1126                  source=WINBINDD_SRC,
1127                  deps='''talloc tdb tevent cap dl z
1128                  wbclient PASSDB ldap resolv PARAM LIB_NONSMBD LIBSMB
1129                  POPT_SAMBA KRBCLIENT LIBMSRPC_GEN LIBMSRPC LIBADS LIBADS_SERVER
1130                  SRV_NDR_WBINT RPC_NDR_WBINT LIBAFS
1131                  LIBAFS_SETTOKEN PROFILE SLCACHE DCUTIL idmap nss_info
1132                  TOKEN_UTIL
1133                  LIBCLI_SAMR LIBCLI_LSA LIBRPCCLI_NETLOGON
1134                  RPC_NDR_DSSETUP NAMED_PIPE_AUTH_TSTREAM INIT_NETLOGON
1135                  RPC_NCACN_NP RPC_PIPE_REGISTER RPC_SAMR RPC_LSARPC
1136                  PAM_ERRORS
1137                  ''',
1138                  enabled=bld.env.build_winbind,
1139                  install_path='${SBINDIR}',
1140                  vars=locals())
1141
1142 bld.SAMBA_BINARY('web/swat',
1143                  source=SWAT_SRC,
1144                  deps='''talloc tevent cap LIBS LIBSMB wbclient PARAM
1145                  LIB_NONSMBD resolv PASSDB POPT_SAMBA KRBCLIENT cups
1146                  LIBMSRPC_GEN LIBMSRPC LOCKING PLAINTEXT_AUTH PRINTBASE PRINTING FNAME_UTIL
1147                  LIBCLI_SAMR INIT_LSA PASSCHANGE''',
1148                  enabled=bld.env.build_swat,
1149                  install_path='${SBINDIR}',
1150                  vars=locals())
1151
1152 bld.SAMBA_BINARY('rpcclient/rpcclient',
1153                  source=RPCCLIENT_SRC,
1154                  deps='''talloc tdb cap resolv POPT_SAMBA PASSDB LIBSMB LIB_NONSMBD
1155                  PARAM_WITHOUT_REG wbclient PARAM KRBCLIENT LIBMSRPC_GEN LIBMSRPC
1156                  LIBADS SMBREADLINE DCUTIL RPC_NDR_WINREG RPC_NDR_ECHO
1157                  RPC_CLIENT_SCHANNEL
1158                  LIBCLI_SAMR LIBCLI_LSA LIBRPCCLI_NETLOGON LIBCLI_SPOOLSS
1159                  RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_DSSETUP RPC_NDR_DFS
1160                  RPC_NDR_DRSUAPI RPC_NDR_NTSVCS RPC_NDR_EVENTLOG INIT_NETLOGON
1161                  INIT_SAMR
1162                  ''',
1163                  vars=locals())
1164
1165 bld.SAMBA_BINARY('client/smbclient',
1166                  source=CLIENT_SRC,
1167                  deps='''talloc tdb cap resolv POPT_SAMBA PASSDB LIBSMB LIB_NONSMBD
1168                  PARAM_WITHOUT_REG wbclient PARAM KRBCLIENT LIBMSRPC_GEN
1169                  LIBMSRPC SMBREADLINE smbclient RPC_NDR_SRVSVC INIT_LSA''',
1170                  vars=locals())
1171
1172 bld.SAMBA_BINARY('net',
1173                  source=NET_SRC,
1174                  deps='''talloc tdb netapi addns cap resolv POPT_SAMBA PASSDB LIBSMB LIB_NONSMBD
1175                  PARAM_WITHOUT_REG wbclient PARAM KRBCLIENT LIBMSRPC_GEN LIBMSRPC LIBGPO LIBADS LIBADS_SERVER LIBADS_PRINTER
1176                  LOCALE_DIR LIBAFS LIBAFS_SETTOKEN SMBREADLINE PASSWD_UTIL LIBNET
1177                  LIBNET_DSSYNC LIBNET_SAMSYNC LIBEVENTLOG DCUTIL
1178                  REGFIO NDR_NTPRINTING RPC_NDR_WINREG
1179                  RPC_CLIENT_SCHANNEL TOKEN_UTIL
1180                  LIBCLI_SAMR LIBCLI_LSA LIBRPCCLI_NETLOGON LIBCLI_SPOOLSS
1181                  RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_SVCCTL RPC_NDR_DSSETUP
1182                  RPC_NDR_INITSHUTDOWN RPC_NDR_DRSUAPI INIT_NETLOGON INIT_SAMR
1183                  ''',
1184                  vars=locals())
1185
1186 bld.SAMBA_BINARY('profiles',
1187                  source=PROFILES_SRC,
1188                  deps='''talloc tdb cap tevent POPT_SAMBA PARAM LIBS LIBSMB_ERR LIB_NONSMBD REGFIO''',
1189                  vars=locals())
1190
1191 bld.SAMBA_BINARY('smbspool',
1192                  source=CUPS_SRC,
1193                  deps='''talloc tdb tevent resolv cap wbclient POPT_SAMBA PARAM LIBSMB LIB_NONSMBD LIBS
1194                  KRBCLIENT ASN1_UTIL LIBTSOCKET NDR_SAMR NDR_LSA''',
1195                  vars=locals())
1196
1197 bld.SAMBA_BINARY('testparm',
1198                  source=TESTPARM_SRC,
1199                  deps='''talloc tevent ldap cap 
1200                  wbclient ASN1_UTIL LIBTSOCKET PASSDB PARAM LIB_NONSMBD
1201                  LIBSMB_ERR POPT_SAMBA''',
1202                  vars=locals())
1203
1204 bld.SAMBA_BINARY('smbta-util',
1205                  source=SMBTA_UTIL_SRC,
1206                  deps='''talloc tdb tevent cap PARAM POPT_SAMBA LIB_NONSMBD
1207                  LIBSMB_ERR''',
1208                  vars=locals())
1209
1210 bld.SAMBA_BINARY('smbstatus',
1211                  source=STATUS_SRC,
1212                  deps='''talloc tdb tevent cap PARAM POPT_SAMBA LIB_NONSMBD
1213                  LIBSMB_ERR LOCKING PROFILE FNAME_UTIL''',
1214                  vars=locals())
1215
1216 bld.SAMBA_BINARY('smbcontrol',
1217                  source=SMBCONTROL_SRC,
1218                  deps='''talloc tdb tevent cap PARAM LIB_NONSMBD LIBSMB_ERR POPT_SAMBA PRINTBASE''',
1219                  vars=locals())
1220
1221 bld.SAMBA_BINARY('smbtree',
1222                  source=SMBTREE_SRC,
1223                  deps='''talloc tdb tevent cap resolv wbclient PARAM LIB_NONSMBD
1224                  LIBSMB LIBSMB_ERR POPT_SAMBA KRBCLIENT PASSDB SMBLDAP GROUPDB LIBMSRPC_GEN LIBMSRPC PROFILE
1225                  RPC_NDR_SRVSVC''',
1226                  vars=locals())
1227
1228 bld.SAMBA_BINARY('smbpasswd',
1229                  source=SMBPASSWD_SRC,
1230                  deps='''talloc tdb tevent cap resolv wbclient PARAM LIB_NONSMBD
1231                  LIBSMB LIBSMB_ERR POPT_SAMBA KRBCLIENT PASSDB SMBLDAP GROUPDB LIBMSRPC_GEN LIBMSRPC PASSWD_UTIL
1232                  LIBCLI_SAMR INIT_LSA PASSCHANGE''',
1233                  vars=locals())
1234
1235 bld.SAMBA_BINARY('pdbedit',
1236                  source=PDBEDIT_SRC,
1237                  deps='''talloc tdb tevent cap resolv wbclient PARAM LIB_NONSMBD
1238                  LIBSAMBA LIBSMB_ERR POPT_SAMBA PASSDB SMBLDAP GROUPDB
1239                  PASSWD_UTIL LIBCLI_LDAP_NDR''',
1240                  vars=locals())
1241
1242 bld.SAMBA_BINARY('smbget',
1243                  source=SMBGET_SRC,
1244                  deps='''talloc tdb smbclient POPT_SAMBA''',
1245                  vars=locals())
1246
1247 bld.SAMBA_BINARY('nmblookup',
1248                  source=NMBLOOKUP_SRC,
1249                  deps='''talloc tdb tevent cap resolv PARAM LIB_NONSMBD POPT_SAMBA LIBSMB_ERR LIBNMB''',
1250                  vars=locals())
1251
1252 bld.SAMBA_BINARY('smbtorture',
1253                  source=SMBTORTURE_SRC,
1254                  deps='''talloc tdb tevent cap resolv wbclient PARAM LIBSMB KRBCLIENT TLDAP
1255                  LIB_NONSMBD POPT_SAMBA ASN1_UTIL LIBTSOCKET NDR_LSA LIBMSRPC LIBMSRPC_GEN RPC_NDR_ECHO''',
1256                  vars=locals())
1257
1258 bld.SAMBA_BINARY('smbconftort',
1259                  source=SMBCONFTORT_SRC,
1260                  deps='''talloc tdb tevent cap resolv wbclient PARAM LIB_NONSMBD LIBSMB_ERR POPT_SAMBA''',
1261                  vars=locals())
1262
1263 bld.SAMBA_BINARY('masktest',
1264                  source=MASKTEST_SRC,
1265                  deps='''talloc tdb cap resolv wbclient PARAM LIB_NONSMBD LIBSMB KRBCLIENT
1266                  ASN1_UTIL LIBTSOCKET NDR_SAMR NDR_LSA''',
1267                  vars=locals())
1268
1269 bld.SAMBA_BINARY('msgtest',
1270                  source=MSGTEST_SRC,
1271                  deps='''talloc tdb tevent cap resolv PARAM LIBSMB_ERR LIB_NONSMBD''',
1272                  vars=locals())
1273
1274 bld.SAMBA_BINARY('smbcacls',
1275                  source=SMBCACLS_SRC,
1276                  deps='''talloc tdb cap resolv wbclient PARAM LIBSMB KRBCLIENT
1277                  LIB_NONSMBD PASSDB GROUPDB POPT_SAMBA SMBLDAP LIBMSRPC_GEN
1278                  LIBMSRPC LIBCLI_LSA''',
1279                  vars=locals())
1280
1281 bld.SAMBA_BINARY('smbcquotas',
1282                  source=SMBCQUOTAS_SRC,
1283                  deps='''talloc tdb cap resolv wbclient PARAM LIB_NONSMBD LIBSMB KRBCLIENT
1284                  POPT_SAMBA PASSDB SMBLDAP GROUPDB LIBMSRPC_GEN LIBMSRPC
1285                  LIBCLI_LSA''',
1286                  vars=locals())
1287
1288 bld.SAMBA_BINARY('eventlogadm',
1289                  source=EVTLOGADM_SRC,
1290                  deps='''talloc tevent cap POPT_SAMBA LIBS PARAM
1291                  LIB_NONSMBD LIBSMB_ERR PASSDB wbclient LIBEVENTLOG''',
1292                  vars=locals())
1293
1294 bld.SAMBA_BINARY('sharesec',
1295                  source=SHARESEC_SRC,
1296                  deps='''talloc tdb tevent cap resolv wbclient PARAM LIB_NONSMBD LIBSMB_ERR POPT_SAMBA''',
1297                  vars=locals())
1298
1299 bld.SAMBA_BINARY('locktest',
1300                  source=LOCKTEST_SRC,
1301                  deps='''talloc tdb tevent cap resolv wbclient PARAM KRBCLIENT LIBSMB LIB_NONSMBD
1302                  ASN1_UTIL LIBTSOCKET NDR_SAMR NDR_LSA LOCKING FNAME_UTIL''',
1303                  vars=locals())
1304
1305 bld.SAMBA_BINARY('nsstest',
1306                  source=NSSTEST_SRC,
1307                  deps='dl',
1308                  vars=locals())
1309
1310 bld.SAMBA_BINARY('pdbtest',
1311                  source=PDBTEST_SRC,
1312                  deps='''talloc tdb cap resolv wbclient PARAM LIBSMB KRBCLIENT LIB_NONSMBD PASSDB GROUPDB
1313                  SMBLDAP POPT_SAMBA NDR_SAMR NDR_LSA''',
1314                  vars=locals())
1315
1316 bld.SAMBA_BINARY('vfstest',
1317                  source=VFSTEST_SRC,
1318                  deps='''SMBD_BASE SMBREADLINE''',
1319                  vars=locals())
1320
1321 bld.SAMBA_BINARY('smbiconv',
1322                  source=SMBICONV_SRC,
1323                  deps='''talloc tdb tevent cap PARAM LIB_NONSMBD POPT_SAMBA LIBSMB_ERR''',
1324                  vars=locals())
1325
1326 bld.SAMBA_BINARY('log2pcap',
1327                  source=LOG2PCAP_SRC,
1328                  deps='''talloc popt''',
1329                  vars=locals())
1330
1331 bld.SAMBA_BINARY('locktest2',
1332                  source=LOCKTEST2_SRC,
1333                  deps='''talloc tdb tevent cap resolv wbclient PARAM KRBCLIENT LIBSMB LIB_NONSMBD
1334                  ASN1_UTIL LIBTSOCKET NDR_SAMR NDR_LSA LOCKING FNAME_UTIL''',
1335                  vars=locals())
1336
1337 bld.SAMBA_BINARY('debug2html',
1338                  source=DEBUG2HTML_SRC,
1339                  deps='''talloc popt''',
1340                  vars=locals())
1341
1342 bld.SAMBA_BINARY('smbfilter',
1343                  source=SMBFILTER_SRC,
1344                  deps='''talloc tevent cap resolv wbclient PARAM LIBSMB LIB_NONSMBD KRBCLIENT ASN1_UTIL LIBTSOCKET
1345                  NDR_SAMR NDR_LSA''',
1346                  vars=locals())
1347
1348 bld.SAMBA_BINARY('versiontest',
1349                  source='lib/version_test.c',
1350                  deps='SAMBA_VERSION',
1351                  vars=locals())
1352
1353 bld.SAMBA_BINARY('wbinfo',
1354                  source=WBINFO_SRC,
1355                  deps='''talloc wbclient tevent cap
1356                  ASN1_UTIL LIBTSOCKET PASSDB ldap PARAM LIB_NONSMBD
1357                  LIBSAMBA POPT_SAMBA LIBAFS_SETTOKEN''',
1358                  vars=locals())
1359
1360 bld.SAMBA_BINARY('ntlm_auth',
1361                  source=NTLM_AUTH_SRC,
1362                  deps='''tdb talloc cap resolv krb5 k5crypto com_err wbclient PARAM LIB_NONSMBD
1363                  LIBS LIBSAMBA POPT_SAMBA ASN1_UTIL LIBTSOCKET
1364                  PASSDB GROUPDB SMBLDAP winbind-client LIBINIPARSER LIBADS_SERVER
1365                  NDR_SAMR NDR_LSA NDR_NETLOGON LIBCLI_LDAP_NDR LIBNMB SLCACHE SPNEGO_PARSE''',
1366                  vars=locals())
1367
1368 bld.SAMBA_BINARY('timelimit',
1369                  source='script/tests/timelimit.c',
1370                  vars=locals())
1371
1372 bld.SAMBA_BINARY('rpc_open_tcp',
1373                  source=RPC_OPEN_TCP_SRC,
1374                  deps='''talloc tdb tevent resolv cap wbclient KRBCLIENT PARAM LIBS LIBSMB LIB_NONSMBD
1375                  LIBSMB_ERR ASN1_UTIL LIBTSOCKET LIBMSRPC_GEN LIBMSRPC''',
1376                  vars=locals())
1377
1378 bld.SAMBA_BINARY('test_lp_load',
1379                  source=TEST_LP_LOAD_SRC,
1380                  deps='''talloc tdb tevent cap wbclient PARAM LIB_NONSMBD POPT_SAMBA LIBSAMBA''',
1381                  vars=locals())
1382
1383 bld.SAMBA_BINARY('dbwrap_tool',
1384                  source=DBWRAP_TOOL_SRC,
1385                  deps='''talloc tdb tevent cap PARAM LIB_NONSMBD LIBSMB_ERR''',
1386                  vars=locals())
1387
1388 bld.SAMBA_BINARY('dbwrap_torture',
1389                  source=DBWRAP_TORTURE_SRC,
1390                  deps='''talloc tdb tevent cap PARAM LIB_NONSMBD LIBSMB_ERR
1391                  POPT_SAMBA''',
1392                  vars=locals())
1393
1394 bld.SAMBA_BINARY('split_tokens',
1395                  source=SPLIT_TOKENS_SRC,
1396                  deps='''talloc tdb tevent cap wbclient PARAM LIB_NONSMBD POPT_SAMBA
1397                  LIBSAMBA''',
1398                  vars=locals())
1399
1400 bld.SAMBA_BINARY('vlp',
1401                  source=VLP_SRC,
1402                  deps='''talloc tdb PARAM_UTIL UTIL_TDB''',
1403                  vars=locals())
1404
1405 swat_files=recursive_dirlist('../swat', '../swat', '*')
1406 bld.INSTALL_FILES('${SWATDIR}', swat_files, base_name='../swat')
1407
1408 ########################## INCLUDES #################################
1409
1410 bld.RECURSE('../lib/addns')
1411 bld.RECURSE('../lib/async_req')
1412 bld.RECURSE('../libcli/auth')
1413 bld.RECURSE('../libcli/drsuapi')
1414 bld.RECURSE('../libcli/ldap')
1415 bld.RECURSE('../libcli/named_pipe_auth')
1416 bld.RECURSE('../libcli/netlogon')
1417 bld.RECURSE('../libcli/samsync')
1418 bld.RECURSE('../libcli/security')
1419 bld.RECURSE('../libcli/smb')
1420 bld.RECURSE('../libcli/smbreadline')
1421 bld.RECURSE('../lib/crypto')
1422 bld.RECURSE('../lib/iniparser/src')
1423 bld.RECURSE('../lib/nss_wrapper')
1424 bld.RECURSE('../lib/popt')
1425 bld.RECURSE('../librpc')
1426 bld.RECURSE('../lib/smbconf')
1427 bld.RECURSE('../lib/socket_wrapper')
1428 bld.RECURSE('../lib/talloc')
1429 bld.RECURSE('../lib/tdb')
1430 bld.RECURSE('../lib/tevent')
1431 bld.RECURSE('../lib/tsocket')
1432 bld.RECURSE('../lib/zlib')
1433 bld.RECURSE('../nsswitch/libwbclient')
1434 bld.RECURSE('auth')
1435 bld.RECURSE('libgpo/gpext')
1436 bld.RECURSE('librpc')
1437 bld.RECURSE('librpc/idl')
1438 bld.RECURSE('modules')
1439 bld.RECURSE('pam_smbpass')
1440 bld.RECURSE('passdb')
1441 bld.RECURSE('rpc_server')
1442 bld.RECURSE('winbindd')
1443
1444 bld.ENFORCE_GROUP_ORDERING()
1445 bld.CHECK_PROJECT_RULES()