f2f4b83e5af251f0e9651875d5f9ee99e10a8e52
[nivanova/samba-autobuild/.git] / source3 / wscript_build
1 #!/usr/bin/env python
2
3 from samba_utils import *
4 import samba_version, samba3
5
6 PARAM_WITHOUT_REG_SRC = '''param/loadparm.c
7                            lib/sharesec.c lib/ldap_debug_handler.c lib/util_names.c'''
8
9 KRBCLIENT_SRC = '''libads/kerberos.c libads/ads_status.c'''
10
11 LIBGPO_SRC0 = '''../libgpo/gpo_ldap.c ../libgpo/gpo_ini.c ../libgpo/gpo_util.c
12               ../libgpo/gpo_fetch.c libgpo/gpo_filesync.c ../libgpo/gpo_sec.c
13               libgpo/gpo_reg.c'''
14 LIBGPO_SRC = '''${LIBGPO_SRC0}'''
15
16 LIBADS_SRC = '''libads/ldap.c
17              libads/sasl.c libads/sasl_wrapping.c
18              libads/krb5_setpw.c
19              libads/kerberos_util.c
20              libads/ldap_user.c
21              libads/ads_struct.c libads/kerberos_keytab.c
22              libads/disp_sec.c libads/ldap_utils.c
23              libads/ldap_schema.c libads/util.c libads/ndr.c'''
24
25 LIBADS_SERVER_SRC = '''libads/authdata.c'''
26
27 LIBADS_PRINTER_SRC = '''libads/ldap_printer.c'''
28
29 SECRETS_SRC = '''passdb/secrets.c passdb/machine_account_secrets.c
30                  passdb/machine_sid.c passdb/secrets_lsa.c'''
31
32 LIBNMB_SRC = '''libsmb/unexpected.c libsmb/namecache.c libsmb/nmblib.c
33              libsmb/namequery.c libsmb/conncache.c
34
35              libads/sitename_cache.c'''
36
37 LIBNTLMSSP_SRC = '''
38                libsmb/ntlmssp.c
39                libsmb/ntlmssp_wrap.c'''
40
41 TLDAP_SRC = '''lib/tldap.c lib/tldap_util.c lib/util_tsock.c'''
42
43 LIBSMB_SRC = '''libsmb/clientgen.c libsmb/cliconnect.c libsmb/clifile.c
44              libsmb/clispnego.c
45              libsmb/clirap.c libsmb/clierror.c libsmb/climessage.c
46              libsmb/clireadwrite.c libsmb/clilist.c libsmb/cliprint.c
47              libsmb/clitrans.c libsmb/clisecdesc.c libsmb/clidgram.c
48              libsmb/clistr.c libsmb/cliquota.c libsmb/clifsinfo.c libsmb/clidfs.c
49              libsmb/clioplock.c libsmb/clirap2.c
50              libsmb/async_smb.c
51              libsmb/smb2cli_tcon.c
52              libsmb/cli_np_tstream.c
53              libsmb/reparse_symlink.c
54              libsmb/clisymlink.c
55              libsmb/smbsock_connect.c
56              libsmb/cli_smb2_fnum.c'''
57
58 LIBMSRPC_SRC = '''
59                rpc_client/cli_pipe.c
60                rpc_client/rpc_transport_np.c
61                rpc_client/rpc_transport_sock.c
62                rpc_client/rpc_transport_tstream.c
63                librpc/rpc/dcerpc_helpers.c
64                '''
65
66 #
67 # registry-related objects
68 #
69
70 REG_INIT_SMBCONF_SRC = '''registry/reg_init_smbconf.c'''
71 REG_INIT_FULL_SRC = '''registry/reg_init_full.c'''
72
73 REG_API_REGF_SRC = '''registry/reg_api_regf.c'''
74
75 REG_BACKENDS_SMBCONF_SRC = '''registry/reg_backend_smbconf.c'''
76
77 REG_BACKENDS_EXTRA_SRC = '''registry/reg_backend_printing.c
78                          registry/reg_backend_shares.c
79                          registry/reg_backend_netlogon_params.c
80                          registry/reg_backend_prod_options.c
81                          registry/reg_backend_tcpip_params.c
82                          registry/reg_backend_hkpt_params.c
83                          registry/reg_backend_current_version.c
84                          registry/reg_backend_perflib.c'''
85
86 REG_BASE_SRC = '''registry/reg_api.c
87                registry/reg_dispatcher.c
88                registry/reg_cachehook.c
89                registry/reg_objects.c
90                registry/reg_util_internal.c
91                lib/util_nttoken.c
92                registry/reg_backend_db.c
93                registry/reg_parse_internal.c
94                lib/cbuf.c
95                lib/srprs.c
96                registry/reg_init_basic.c'''
97
98 REG_SMBCONF_SRC = '''
99                   ${REG_BACKENDS_SMBCONF_SRC}
100                   ${REG_INIT_SMBCONF_SRC}
101                   registry/reg_util_token.c
102                   registry/reg_api_util.c'''
103
104 REG_FULL_SRC = '''
105                ${REG_BACKENDS_EXTRA_SRC}
106                ${REG_INIT_FULL_SRC}
107                registry/reg_perfcount.c'''
108
109 SERVICES_SRC = '''services/svc_spoolss.c
110                   services/svc_rcinit.c
111                   services/svc_winreg_glue.c
112                   services/svc_netlogon.c
113                   services/svc_winreg.c
114                   services/svc_wins.c'''
115
116 LIB_EVENTLOG_SRC = '''lib/eventlog/eventlog.c'''
117
118 RPC_CLIENT_SCHANNEL_SRC = '''rpc_client/cli_pipe_schannel.c'''
119
120 LOCKING_SRC = '''locking/locking.c locking/brlock.c locking/posix.c locking/share_mode_lock.c'''
121
122 PRIVILEGES_SRC = '''lib/privileges.c'''
123
124 PASSDB_GET_SET_SRC = '''passdb/pdb_get_set.c'''
125
126 PASSDB_SRC = '''${PASSDB_GET_SET_SRC} passdb/passdb.c
127                 lib/util_wellknown.c lib/util_builtin.c passdb/pdb_compat.c
128                 lib/util_sid_passdb.c
129                 lib/util_unixsids.c passdb/lookup_sid.c
130                 passdb/login_cache.c
131                 passdb/account_pol.c ${PRIVILEGES_SRC}
132                 lib/util_nscd.c lib/winbind_util.c
133                 passdb/pdb_util.c passdb/pdb_interface.c
134                 passdb/pdb_secrets.c
135                 passdb/pdb_unixid.c'''
136 #FIXME: lib/winbind_util.c probably is not part of PASSDB_SRC
137
138 GROUPDB_SRC = '''groupdb/mapping.c groupdb/mapping_tdb.c'''
139
140 PROFILE_SRC = '''profile/profile.c'''
141 PROFILES_SRC = '''utils/profiles.c'''
142
143 OPLOCK_SRC = '''smbd/oplock.c smbd/oplock_irix.c smbd/oplock_linux.c'''
144
145 NOTIFY_SRC = '''smbd/notify.c smbd/notify_inotify.c smbd/notify_internal.c'''
146
147 FNAME_UTIL_SRC = '''lib/filename_util.c'''
148
149
150 PLAINTEXT_AUTH_SRC = '''auth/pampass.c auth/pass_check.c'''
151
152 SLCACHE_SRC = '''libsmb/samlogon_cache.c'''
153
154 DCUTIL_SRC  = '''libsmb/namequery_dc.c libsmb/trustdom_cache.c libsmb/dsgetdcname.c'''
155
156 MANGLE_SRC = '''smbd/mangle.c smbd/mangle_hash.c smbd/mangle_hash2.c'''
157
158 SMBD_SRC_MAIN = '''smbd/server.c'''
159
160 BUILDOPT_SRC = '''smbd/build_options.c'''
161
162 SMBD_SRC_SRV = '''smbd/server_reload.c smbd/files.c smbd/connection.c
163                smbd/utmp.c smbd/session.c
164                smbd/dfree.c smbd/dir.c smbd/password.c smbd/conn_msg.c
165                smbd/conn_idle.c
166                smbd/share_access.c smbd/fileio.c
167                smbd/ipc.c smbd/lanman.c smbd/negprot.c
168                smbd/message.c smbd/nttrans.c smbd/pipes.c
169                smbd/reply.c smbd/sesssetup.c smbd/trans2.c smbd/uid.c
170                smbd/dosmode.c smbd/filename.c smbd/open.c smbd/close.c
171                smbd/blocking.c smbd/sec_ctx.c smbd/srvstr.c
172                smbd/vfs.c smbd/perfcount.c smbd/statcache.c smbd/seal.c
173                smbd/posix_acls.c lib/sysacls.c
174                smbd/process.c smbd/service.c smbd/error.c
175                printing/printspoolss.c printing/spoolssd.c
176                lib/sysquotas.c lib/sysquotas_linux.c
177                lib/sysquotas_xfs.c lib/sysquotas_4A.c lib/sysquotas_4B.c
178                lib/sysquotas_nfs.c
179                lib/background.c
180                lib/sessionid_tdb.c
181                lib/conn_tdb.c
182                smbd/fake_file.c
183                smbd/quotas.c smbd/ntquotas.c smbd/msdfs.c
184                smbd/aio.c smbd/statvfs.c
185                smbd/dmapi.c smbd/signing.c
186                smbd/file_access.c
187                smbd/dnsregister.c smbd/globals.c
188                smbd/smb2_server.c
189                smbd/smb2_glue.c
190                smbd/smb2_negprot.c
191                smbd/smb2_sesssetup.c
192                smbd/smb2_tcon.c
193                smbd/smb2_create.c
194                smbd/smb2_close.c
195                smbd/smb2_flush.c
196                smbd/smb2_read.c
197                smbd/smb2_write.c
198                smbd/smb2_lock.c
199                smbd/smb2_ioctl.c
200                smbd/smb2_ioctl_dfs.c
201                smbd/smb2_ioctl_filesys.c
202                smbd/smb2_ioctl_named_pipe.c
203                smbd/smb2_ioctl_network_fs.c
204                smbd/smb2_keepalive.c
205                smbd/smb2_find.c
206                smbd/smb2_notify.c
207                smbd/smb2_getinfo.c
208                smbd/smb2_setinfo.c
209                smbd/smb2_break.c
210                smbd/smbXsrv_version.c
211                smbd/smbXsrv_session.c
212                smbd/smbXsrv_tcon.c
213                smbd/smbXsrv_open.c
214                smbd/server_exit.c
215                smbd/durable.c
216                smbd/scavenger.c
217                ${MANGLE_SRC}'''
218
219 SMBD_SRC_BASE = '''${SMBD_SRC_SRV}
220                 ${OPLOCK_SRC} ${NOTIFY_SRC}
221                 ${BUILDOPT_SRC}'''
222
223 PRINTING_SRC = '''printing/pcap.c printing/print_svid.c printing/print_aix.c
224                printing/print_cups.c printing/print_generic.c
225                printing/lpq_parse.c printing/load.c printing/print_standard.c
226                printing/print_iprint.c printing/printer_list.c'''
227
228 PRINTBASE_SRC = '''printing/notify.c printing/printing_db.c'''
229 PRINTBACKEND_SRC = '''printing/printing.c
230                       printing/nt_printing.c
231                       printing/nt_printing_tdb.c
232                       printing/nt_printing_migrate_internal.c
233                       printing/nt_printing_ads.c
234                       printing/queue_process.c'''
235
236 STATUS_SRC = '''utils/status.c utils/status_profile.c smbd/notify_internal.c'''
237
238 SMBCONTROL_SRC = '''utils/smbcontrol.c'''
239
240 SMBTREE_SRC = '''utils/smbtree.c'''
241
242 TESTPARM_SRC = 'utils/testparm.c'
243
244 SMBTA_UTIL_SRC = '''utils/smbta-util.c'''
245
246 TEST_LP_LOAD_SRC = '''param/test_lp_load.c'''
247
248 PASSWD_UTIL_SRC = 'utils/passwd_util.c'
249
250 SMBPASSWD_SRC = '''utils/smbpasswd.c'''
251
252 PDBEDIT_SRC = '''utils/pdbedit.c'''
253
254 SMBGET_SRC = '''utils/smbget.c'''
255
256 RPCCLIENT_SRC1 = '''rpcclient/rpcclient.c rpcclient/cmd_lsarpc.c
257                     rpcclient/cmd_samr.c rpcclient/cmd_spoolss.c
258                     rpcclient/cmd_netlogon.c rpcclient/cmd_srvsvc.c
259                     rpcclient/cmd_dfs.c rpcclient/cmd_epmapper.c
260                     rpcclient/cmd_dssetup.c rpcclient/cmd_echo.c
261                     rpcclient/cmd_shutdown.c rpcclient/cmd_test.c
262                     rpcclient/cmd_wkssvc.c rpcclient/cmd_ntsvcs.c
263                     rpcclient/cmd_drsuapi.c rpcclient/cmd_eventlog.c
264                     rpcclient/cmd_winreg.c rpcclient/cmd_fss.c'''
265
266 RPCCLIENT_SRC = '''${RPCCLIENT_SRC1}'''
267
268 LIBSMBCLIENT_THREAD_SRC = '''libsmb/libsmb_thread_impl.c
269                         libsmb/libsmb_thread_posix.c'''
270
271 LIBSMBSHAREMODES_SRC0 = 'libsmb/smb_share_modes.c'
272
273 LIBSMBSHAREMODES_SRC = '${LIBSMBSHAREMODES_SRC0}'
274
275 LIB_SMBCONF_SRC = 'lib/smbconf/smbconf_init.c lib/smbconf/smbconf_reg.c'
276
277 SMBCONFTORT_SRC0 = 'lib/smbconf/testsuite.c'
278
279 SMBCONFTORT_SRC = '''${SMBCONFTORT_SRC0}'''
280
281 LIBNET_SRC = 'libnet/libnet_join.c'
282
283
284 LIBNET_DSSYNC_SRC = '''libnet/libnet_dssync.c
285                        libnet/libnet_dssync_passdb.c
286                        libnet/libnet_dssync_keytab.c'''
287
288 LIBNET_SAMSYNC_SRC = '''libnet/libnet_samsync.c
289                         libnet/libnet_samsync_ldif.c
290                         libnet/libnet_samsync_passdb.c
291                         libnet/libnet_samsync_display.c
292                         libnet/libnet_samsync_keytab.c'''
293
294 NET_SRC1 = '''utils/net.c utils/net_ads.c utils/net_help.c
295               utils/net_rap.c utils/net_rpc.c utils/net_rpc_samsync.c
296               utils/net_time.c utils/net_lookup.c
297               utils/net_cache.c utils/net_groupmap.c
298               utils/net_idmap.c utils/net_idmap_check.c
299               utils/interact.c
300               utils/net_status.c utils/net_rpc_printer.c utils/net_rpc_rights.c
301               utils/net_rpc_service.c utils/net_rpc_registry.c utils/net_usershare.c
302               utils/netlookup.c utils/net_sam.c utils/net_rpc_shell.c
303               utils/net_util.c utils/net_rpc_sh_acct.c utils/net_rpc_audit.c
304               utils/net_dns.c utils/net_ads_gpo.c
305               utils/net_conf.c utils/net_join.c utils/net_user.c
306               utils/net_group.c utils/net_file.c utils/net_registry.c
307               utils/net_registry_check.c
308               utils/net_dom.c utils/net_share.c
309               utils/net_g_lock.c
310               utils/net_serverid.c
311               utils/net_eventlog.c
312               utils/net_printing.c
313               utils/net_rpc_trust.c
314               utils/net_rpc_conf.c
315               registry/reg_parse.c registry/reg_format.c
316               registry/reg_import.c
317               '''
318
319 NET_SRC2 = 'utils/net_registry_util.c utils/net_help_common.c'
320
321 NET_SRC = '''${NET_SRC1}
322              ${NET_SRC2}'''
323
324 CUPS_SRC = '''client/smbspool.c'''
325
326 NMBLOOKUP_SRC = '''utils/nmblookup.c'''
327
328 SMBTORTURE_SRC1 = '''torture/torture.c torture/nbio.c torture/scanner.c torture/utable.c
329                 torture/denytest.c torture/mangle_test.c
330                 torture/nbench.c
331                 torture/test_async_echo.c
332                 torture/test_addrchange.c
333                 torture/test_posix_append.c
334                 torture/test_nttrans_create.c
335                 torture/test_nttrans_fsctl.c
336                 torture/test_case_insensitive.c
337                 torture/test_notify_online.c
338                 torture/test_chain3.c
339                 torture/test_smb2.c
340                 torture/test_authinfo_structs.c
341                 torture/test_smbsock_any_connect.c
342                 torture/test_cleanup.c
343                 torture/test_ctdbconn.c
344                 torture/test_msg.c
345                 torture/test_notify.c
346                 lib/tevent_barrier.c
347                 torture/test_dbwrap_watch.c
348                 torture/test_idmap_tdb_common.c
349                 torture/test_dbwrap_ctdb.c
350                 torture/test_buffersize.c
351                 torture/t_strappend.c'''
352
353 SMBTORTURE_SRC = '''${SMBTORTURE_SRC1}
354         torture/wbc_async.c'''
355
356 MSGTEST_SRC = '''torture/msgtest.c'''
357
358 PDBTEST_SRC = '''torture/pdbtest.c'''
359
360 VFSTEST_SRC = '''torture/cmd_vfs.c torture/vfstest.c
361                 torture/vfstest_chain.c'''
362
363 LOG2PCAP_SRC = '''utils/log2pcaphex.c'''
364
365 LOCKTEST2_SRC = '''torture/locktest2.c'''
366
367 SMBCACLS_SRC = '''utils/smbcacls.c'''
368
369 SMBCQUOTAS_SRC = '''utils/smbcquotas.c'''
370
371 EVTLOGADM_SRC0 = 'utils/eventlogadm.c'
372
373 EVTLOGADM_SRC = '''${EVTLOGADM_SRC0}'''
374
375 SHARESEC_SRC0 = 'utils/sharesec.c'
376 SHARESEC_SRC  = '''${SHARESEC_SRC0}'''
377
378 DEBUG2HTML_SRC = '''utils/debug2html.c utils/debugparse.c'''
379
380 SMBFILTER_SRC = '''utils/smbfilter.c'''
381
382 WINBIND_WINS_NSS_SRC = '''../nsswitch/wins.c'''
383
384 NTLM_AUTH_SRC1 = '''utils/ntlm_auth.c utils/ntlm_auth_diagnostics.c'''
385
386 NTLM_AUTH_SRC = '''${NTLM_AUTH_SRC1}'''
387
388 VLP_SRC = '''printing/tests/vlp.c'''
389
390 RPC_OPEN_TCP_SRC = 'torture/rpc_open_tcp.c'
391
392 DBWRAP_TOOL_SRC = 'utils/dbwrap_tool.c'
393
394 DBWRAP_TORTURE_SRC = 'utils/dbwrap_torture.c'
395
396 SPLIT_TOKENS_SRC = 'utils/split_tokens.c'
397
398 LIBS='ICONV'
399
400 config_h = "../include/config.h"
401
402 bld.SAMBA_BLDOPTIONS('smbd/build_options.c')
403
404 t = bld.SAMBA_GENERATOR('build_env.h',
405                         source='script/build_env.sh',
406                         target='include/build_env.h',
407                         rule='${SRC} ${SRCDIR} ${BUILDDIR} ${CC} > ${TGT}')
408 # todo: work out what is really wanted here
409 t.env.SRCDIR = bld.path.abspath()
410 t.env.BUILDDIR = bld.path.abspath()
411
412 bld.SETUP_BUILD_GROUPS()
413
414 ######################## SUBSYSTEMS #################################
415
416 bld.SAMBA3_LIBRARY('netapi',
417                     source='''lib/netapi/netapi.c
418                     lib/netapi/cm.c
419                     lib/netapi/libnetapi.c
420                     lib/netapi/joindomain.c
421                     lib/netapi/serverinfo.c
422                     lib/netapi/getdc.c
423                     lib/netapi/user.c
424                     lib/netapi/group.c
425                     lib/netapi/localgroup.c
426                     lib/netapi/samr.c
427                     lib/netapi/sid.c
428                     lib/netapi/share.c
429                     lib/netapi/file.c
430                     lib/netapi/shutdown.c
431                     lib/netapi/netlogon.c''',
432                     public_deps='''
433                     talloc
434                     util_cmdline
435                     msrpc3
436                     ads
437                     NDR_LIBNETAPI
438                     LIBNET
439                     RPC_CLIENT_SCHANNEL
440                     libcli_netlogon3
441                     LIBCLI_SAMR
442                     INIT_SAMR
443                     auth
444                     ''',
445                     public_headers='../source3/lib/netapi/netapi.h',
446                     pc_files='libnet/netapi.pc',
447                     vnum='0')
448
449 bld.SAMBA3_LIBRARY('smbsharemodes',
450                     source=LIBSMBSHAREMODES_SRC,
451                     public_deps='''talloc tdb_compat''',
452                     deps='''ccan-hash''',
453                     public_headers='include/smb_share_modes.h',
454                     pc_files='libsmb/smbsharemodes.pc',
455                     vnum='0',
456                     vars=locals())
457
458 bld.SAMBA3_LIBRARY('nss_wins',
459                   source=WINBIND_WINS_NSS_SRC,
460                   deps='''param libsmb LIBTSOCKET''',
461                   realname='libnss_wins.so.2',
462                   soname='libnss_wins.so',
463                   vnum='2')
464
465 bld.SAMBA3_LIBRARY('gse',
466                    source='librpc/crypto/gse_krb5.c librpc/crypto/gse.c',
467                    deps='krb5samba gensec param KRBCLIENT secrets3',
468                    private_library=True)
469
470 bld.SAMBA3_LIBRARY('msrpc3',
471                    source='${LIBMSRPC_SRC}',
472                    deps='''ndr ndr-standard
473                     RPC_NDR_EPMAPPER NTLMSSP_COMMON COMMON_SCHANNEL LIBCLI_AUTH
474                     LIBTSOCKET gse dcerpc-binding
475                     libsmb
476                     ndr-table''',
477                    vars=locals(),
478                    private_library=True)
479
480 bld.SAMBA3_LIBRARY('gpo',
481                    source='${LIBGPO_SRC}',
482                    deps='talloc ads TOKEN_UTIL gpext auth',
483                    vars=locals(),
484                    private_library=True)
485
486 bld.SAMBA3_SUBSYSTEM('AVAHI',
487                     source='lib/avahi.c smbd/avahi_register.c',
488                     deps='avahi-common avahi-client',
489                     enabled=bld.env.with_avahi)
490
491 bld.SAMBA3_SUBSYSTEM('GROUPDB',
492                     source=GROUPDB_SRC,
493                     deps='tdb_compat')
494
495 bld.SAMBA3_SUBSYSTEM('TLDAP',
496                     source=TLDAP_SRC,
497                     deps='asn1util LIBTSOCKET')
498
499 # libpdb.so should not expose internal symbols that are only usable
500 # to the statically linked modules that are merged into libpdb.
501 # Note that we always filter these symbols out in libpdb, even
502 # when modules are not linked statically. In the latter case
503 # symbols will not be present in the libpdb anyway so no hurt is
504 # done to the version script.
505 static_pdb_match = ['tdbsam', 'smbpasswd', 'wbc_sam']
506 private_pdb_match = []
507
508 # AD DC module when linked statically will pull in few source4/winbind
509 # dependencies which are not used outside AD DC module
510 static_pdb_match.append('samba_dsdb')
511 private_pdb_match.append('!idmap_init')
512 private_pdb_match.append('!idmap_sids_to_xids')
513 private_pdb_match.append('!idmap_xids_to_sids')
514
515 # ldap module is actually three modules merged together: ldapsam, ipa, and nds
516 static_pdb_match = static_pdb_match + ['ldap', 'ipa', 'nds']
517 ldapsam_pdb_match = ['!priv2ld', '!smbldap_search_domain_info',
518                      '!ldapsam_*', '!groupmap_attr_list*', '!get_userattr_list',
519                      '!dominfo_attr_list', '!get_attr_key2string',
520                      '!sidmap_attr_list', '!attrib_map_*', '!idpool_attr_list',
521                      '!get_attr_list']
522 private_pdb_match.append('!pdb_nds_*')
523 private_pdb_match.append('!pdb_init_ldapsam')
524 private_pdb_match.append('!pdb_ldapsam_init*')
525 private_pdb_match = private_pdb_match + ldapsam_pdb_match
526
527 private_pdb_match = private_pdb_match + map(lambda x: '!pdb_%s_init' % x, static_pdb_match)
528
529 bld.SAMBA3_LIBRARY('pdb',
530                    source=PASSDB_SRC,
531                    deps='secrets3 GROUPDB SERVER_MUTEX wbclient LIBCLI_AUTH flag_mapping',
532                    private_library=False,
533                    pc_files=[],
534                    public_headers_install=True,
535                    public_headers='''
536                                 include/passdb.h
537                                 passdb/machine_sid.h
538                                 passdb/lookup_sid.h''',
539                    abi_match=private_pdb_match,
540                    abi_directory='passdb/ABI',
541                    vnum='0',
542                    vars=locals())
543
544 bld.SAMBA3_LIBRARY('smbldaphelper',
545                    source='passdb/pdb_ldap_schema.c passdb/pdb_ldap_util.c',
546                    deps='smbldap secrets3',
547                    allow_undefined_symbols=True,
548                    enabled=bld.CONFIG_SET('HAVE_LDAP'),
549                    private_library=True)
550
551 bld.SAMBA3_SUBSYSTEM('SERVER_MUTEX',
552                      source='lib/server_mutex.c',
553                      deps='talloc')
554
555 bld.SAMBA3_SUBSYSTEM('PARAM_UTIL',
556                      source='param/util.c',
557                      deps='talloc')
558
559 bld.SAMBA3_SUBSYSTEM('LOADPARM_CTX',
560                      source='param/loadparm_ctx.c',
561                      deps='''talloc s3_param_h param''',
562                      vars=locals())
563
564 bld.SAMBA_GENERATOR('param/param_global_h',
565                     source= '../script/mkparamdefs.pl param/loadparm.c ../lib/param/param_functions.c',
566                     target='param/param_global.h',
567                     rule='${PERL} ${SRC[0].abspath(env)} ${SRC[1].abspath(env)} ${SRC[2].abspath(env)} --file ${TGT} --generate-scope=GLOBAL')
568
569 bld.SAMBA3_SUBSYSTEM('param',
570                    source=PARAM_WITHOUT_REG_SRC,
571                    deps='samba-util PARAM_UTIL ldap lber LOADPARM_CTX samba3core smbconf param_local_h param/param_global_h cups''')
572
573 bld.SAMBA3_PYTHON('pys3param',
574                   source='param/pyparam.c',
575                   deps='param',
576                   public_deps='samba-hostconfig pytalloc-util talloc',
577                   realname='samba/samba3/param.so')
578     
579 bld.SAMBA3_SUBSYSTEM('param_service',
580                      source='param/service.c',
581                      deps = 'USER_UTIL param PRINTING')
582
583 # this includes only the low level parse code, not stuff
584 # that requires knowledge of security contexts
585 bld.SAMBA3_SUBSYSTEM('REG_PARSE_PRS',
586                      source='registry/reg_parse_prs.c')
587
588 bld.SAMBA3_SUBSYSTEM('REGFIO',
589                     source='registry/regfio.c',
590                     deps='samba-util REG_PARSE_PRS')
591
592 bld.SAMBA3_SUBSYSTEM('REG_API_REGF',
593                     source=REG_API_REGF_SRC,
594                     deps='samba-util',
595                     vars=locals())
596
597 bld.SAMBA3_LIBRARY('smbregistry',
598                    source=REG_BASE_SRC,
599                    deps='''smbd_shim tdb-wrap3 NDR_SECURITY util_tdb talloc
600                    replace util_reg samba-util samba-security
601                    errors3 dbwrap samba3-util''',
602                    allow_undefined_symbols=True,
603                    private_library=True)
604
605 bld.SAMBA3_SUBSYSTEM('REG_SMBCONF',
606                     source=REG_SMBCONF_SRC,
607                     deps='smbregistry',
608                     vars=locals())
609
610 bld.SAMBA3_SUBSYSTEM('REG_FULL',
611                     source=REG_FULL_SRC,
612                     deps='REG_SMBCONF tdb-wrap3',
613                     vars=locals())
614
615 bld.SAMBA3_LIBRARY('popt_samba3',
616                    source='lib/popt_common.c',
617                    deps='popt samba-util util_cmdline',
618                    private_library=True)
619
620 bld.SAMBA3_LIBRARY('util_cmdline',
621                    source='lib/util_cmdline.c',
622                    deps='secrets3',
623                    private_library=True)
624
625 bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
626                     source=KRBCLIENT_SRC,
627                     public_deps='krb5samba k5crypto gssapi LIBTSOCKET CLDAP LIBNMB',
628                     vars=locals())
629
630 bld.SAMBA3_SUBSYSTEM('samba3util',
631                    source='''lib/system.c
632                    lib/sendfile.c
633                    lib/recvfile.c
634                    lib/time.c
635                    lib/util_sid.c
636                    lib/util_file.c
637                    lib/util.c
638                    lib/util_sock.c
639                    lib/util_transfer_file.c
640                    lib/sock_exec.c''',
641                    deps='ndr samba-security NDR_SECURITY samba-util util_tdb ccan-hash')
642
643
644 bld.SAMBA3_SUBSYSTEM('TDB_LIB',
645                      source='''lib/dbwrap/dbwrap_open.c
646                      lib/dbwrap/dbwrap_ctdb.c
647                      lib/dbwrap/dbwrap_watch.c
648                      lib/g_lock.c''',
649                      deps='dbwrap')
650
651 bld.SAMBA3_SUBSYSTEM('samba3core',
652                    source='''lib/messages.c
653                    lib/messages_local.c
654                    lib/messages_ctdbd.c
655                    lib/ctdb_packet.c
656                    lib/ctdbd_conn.c
657                    lib/ctdb_conn.c
658                    lib/msg_channel.c
659                    lib/id_cache.c
660                    lib/talloc_dict.c
661                    lib/serverid.c
662                    lib/addrchange.c
663                    ../lib/util/debug_s3.c
664                    lib/dumpcore.c
665                    lib/interface.c
666                    lib/username.c
667                    lib/access.c lib/smbrun.c
668                    lib/wins_srv.c
669                    lib/substitute.c
670                    lib/substitute_generic.c
671                    lib/ms_fnmatch.c
672                    lib/tallocmsg.c
673                    lib/dmallocmsg.c
674                    intl/lang_tdb.c
675                    lib/gencache.c
676                    lib/events.c
677                    lib/server_contexts.c
678                    lib/server_prefork.c
679                    lib/server_prefork_util.c
680                    lib/ldap_escape.c
681                    lib/fncall.c
682                    libads/krb5_errs.c
683                    lib/system_smbd.c
684                    lib/audit.c
685                    lib/tevent_wait.c
686                    lib/idmap_cache.c
687                    lib/util_ea.c''',
688                    deps='''
689                         samba3util
690                         LIBTSOCKET
691                         NDR_MESSAGING
692                         LIBASYNC_REQ
693                         UTIL_PW
694                         SAMBA_VERSION
695                         PTHREADPOOL
696                         interfaces
697                         param
698                         dbwrap
699                         samba3-util
700                         errors3
701                         TDB_LIB''')
702
703 bld.SAMBA3_LIBRARY('smbd_shim',
704                    source='''lib/smbd_shim.c''',
705                    deps='talloc',
706                    private_library=True)
707
708 bld.SAMBA3_SUBSYSTEM('LIBNTLMSSP',
709                     source=LIBNTLMSSP_SRC,
710                     deps='NDR_NTLMSSP NTLMSSP_COMMON wbclient',
711                     vars=locals())
712
713 bld.SAMBA3_SUBSYSTEM('auth_generic',
714                     source='libsmb/auth_generic.c',
715                     deps='LIBNTLMSSP gse gensec',
716                     vars=locals())
717
718 bld.SAMBA3_LIBRARY('libsmb',
719                    source=LIBSMB_SRC,
720                    deps='''
721                    LIBNTLMSSP
722                    auth_generic
723                    CLDAP
724                    LIBNMB
725                    SPNEGO_PARSE
726                    LIBTSOCKET
727                    KRBCLIENT
728                    cli_smb_common
729                    util_cmdline
730                    tevent''',
731                    vars=locals(),
732                    private_library=True)
733
734 bld.SAMBA3_SUBSYSTEM('CLDAP',
735                     source='libads/cldap.c',
736                     deps='cli-ldap-common cli_cldap LIBTSOCKET',
737                     vars=locals())
738
739 # NOTE: The secrets3 library is a low level library used by several subsystems.
740 # PLEASE DO NOT make it depend on high level libraries like PDB, if you are
741 # doing that your design is wrong and needs changing. -SSS
742 bld.SAMBA3_LIBRARY('secrets3',
743                    source=SECRETS_SRC,
744                    deps='NDR_SECRETS param samba3util dbwrap',
745                    private_library=True,
746                    vars=locals())
747
748 bld.SAMBA3_LIBRARY('smbldap',
749                     source='lib/smbldap.c',
750                     deps='ldap lber samba-util param',
751                     enabled=bld.CONFIG_SET("HAVE_LDAP"),
752                     private_library=False,
753                     abi_directory='lib/ABI',
754                     abi_match='smbldap_*',
755                     pc_files=[],
756                     vnum='0',
757                     public_headers='include/smbldap.h include/smb_ldap.h')
758
759 bld.SAMBA3_LIBRARY('ads',
760                    source=LIBADS_SRC,
761                    deps='cli-ldap-common krb5samba ldap lber KRBCLIENT param LIBNMB libsmb DCUTIL smbldap',
762                    private_library=True,
763                    vars=locals())
764
765 bld.SAMBA3_SUBSYSTEM('LIBADS_SERVER',
766                     source=LIBADS_SERVER_SRC,
767                     deps='SERVER_MUTEX ndr-krb5pac krb5samba gssapi',
768                     vars=locals())
769
770 bld.SAMBA3_SUBSYSTEM('LIBADS_PRINTER',
771                     source=LIBADS_PRINTER_SRC,
772                     deps='samba-util krb5samba',
773                     vars=locals())
774
775 bld.SAMBA3_SUBSYSTEM('LIBAFS_SETTOKEN',
776                     source='lib/afs_settoken.c',
777                     deps='samba-util')
778
779 bld.SAMBA3_SUBSYSTEM('LIBAFS',
780                     source='lib/afs.c',
781                     deps='samba-util LIBAFS_SETTOKEN')
782
783 bld.SAMBA3_LIBRARY('smbconf',
784                    source=LIB_SMBCONF_SRC,
785                    deps='''
786                    CHARSET3
787                    LIBSMBCONF
788                    REG_SMBCONF
789                    SAMBA_VERSION
790                    cap
791                    charset
792                    cli_smb_common
793                    errors3
794                    param
795                    samba-util
796                    smbregistry
797                    talloc
798                    util_reg''',
799                    public_headers='../lib/smbconf/smbconf.h',
800                    pc_files=[],
801                    vnum='0')
802
803 bld.SAMBA3_LIBRARY('smbd_conn',
804                    source='smbd/conn.c',
805                    deps='samba3-util samba-util',
806                    private_library=True)
807
808 bld.SAMBA3_LIBRARY('smbd_base',
809                     source=SMBD_SRC_BASE,
810                     deps='''
811                     talloc
812                     tevent
813                     pdb
814                     libsmb
815                     msrpc3
816                     vfs
817                     vfs_default
818                     vfs_posixacl
819                     popt_samba3
820                     samba3core
821                     smbd_conn
822                     param_service
823                     AVAHI
824                     PRINTBASE
825                     PROFILE
826                     LOCKING
827                     LIBADS_SERVER
828                     LIBAFS
829                     RPC_SERVER
830                     NDR_SMBXSRV
831                     LIBASYS
832                     ccan-hash
833                     NDR_SMB_ACL
834                     netapi
835                     NDR_IOCTL
836                     ''' + bld.env['dmapi_lib'],
837                     private_library=True,
838                     vars=locals())
839
840 bld.SAMBA3_SUBSYSTEM('LOCKING',
841                     source='${LOCKING_SRC}',
842                     deps='''
843                     tdb_compat
844                     talloc
845                     NDR_OPEN_FILES
846                     FNAME_UTIL''',
847                     vars=locals())
848
849 bld.SAMBA3_SUBSYSTEM('PROFILE',
850                     source='${PROFILE_SRC}',
851                     deps='samba-util',
852                     vars=locals())
853
854 bld.SAMBA3_SUBSYSTEM('PRINTBASE',
855                     source=PRINTBASE_SRC,
856                     deps='samba-util tdb_compat',
857                     vars=locals())
858
859 bld.SAMBA3_SUBSYSTEM('PRINTBACKEND',
860                     source=PRINTBACKEND_SRC,
861                     deps='PRINTBASE LIBADS_PRINTER tdb_compat printing_migrate',
862                     vars=locals())
863
864 bld.SAMBA3_LIBRARY('printing_migrate',
865                     source='printing/nt_printing_migrate.c rpc_client/cli_winreg_spoolss.c printing/nt_printing_os2.c',
866                     deps='NDR_NTPRINTING cli_spoolss RPC_NDR_WINREG LIBCLI_WINREG param',
867                     vars=locals(),
868                     private_library=True)
869
870 bld.SAMBA3_SUBSYSTEM('PRINTING',
871                     source=PRINTING_SRC,
872                     deps='NDR_PRINTCAP tdb_compat cups',
873                     vars=locals())
874
875 bld.SAMBA3_SUBSYSTEM('PASSWD_UTIL',
876                     source=PASSWD_UTIL_SRC,
877                     deps='samba-util',
878                     vars=locals())
879
880 bld.SAMBA3_SUBSYSTEM('FNAME_UTIL',
881                     source=FNAME_UTIL_SRC,
882                     deps='samba-util',
883                     vars=locals())
884
885 bld.SAMBA3_SUBSYSTEM('LIBNET',
886                     source=LIBNET_SRC,
887                     deps='NDR_LIBNET_JOIN INIT_SAMR net_keytab pdb',
888                     vars=locals())
889
890 bld.SAMBA3_LIBRARY('net_keytab',
891                    source='libnet/libnet_keytab.c',
892                    deps='krb5samba ads',
893                    vars=locals(),
894                    private_library=True)
895
896
897 bld.SAMBA3_SUBSYSTEM('LIBNET_DSSYNC',
898                     source=LIBNET_DSSYNC_SRC,
899                     deps='LIBNET RPC_NDR_DRSUAPI',
900                     vars=locals())
901
902 bld.SAMBA3_SUBSYSTEM('LIBNET_SAMSYNC',
903                     source=LIBNET_SAMSYNC_SRC,
904                     deps='LIBNET LIBCLI_SAMSYNC',
905                     vars=locals())
906
907 bld.SAMBA3_SUBSYSTEM('LIBEVENTLOG',
908                     source=LIB_EVENTLOG_SRC,
909                     deps='NDR_EVENTLOG tdb_compat',
910                     vars=locals())
911
912 bld.SAMBA3_SUBSYSTEM('LIBNMB',
913                      source=LIBNMB_SRC,
914                      deps='addns lmhosts resolv',
915                      vars=locals())
916
917 bld.SAMBA3_SUBSYSTEM('SERVICES',
918                     source=SERVICES_SRC,
919                     deps='samba-util',
920                     vars=locals())
921
922 bld.SAMBA3_SUBSYSTEM('PLAINTEXT_AUTH',
923                     source=PLAINTEXT_AUTH_SRC,
924                     deps='pam PAM_ERRORS',
925                     vars=locals())
926
927 bld.SAMBA3_SUBSYSTEM('PASSCHANGE',
928                     source='libsmb/passchange.c',
929                     deps='''LIBCLI_SAMR
930                     INIT_LSA
931                     msrpc3
932                     krb5samba''')
933
934 bld.SAMBA3_SUBSYSTEM('SAMBA_VERSION',
935                     source='lib/version.c',
936                     deps='samba-util')
937
938 bld.SAMBA3_SUBSYSTEM('SLCACHE',
939                     source=SLCACHE_SRC,
940                     deps='samba-util tdb_compat',
941                     vars=locals())
942
943 bld.SAMBA3_SUBSYSTEM('DCUTIL',
944                     source=DCUTIL_SRC,
945                     deps='ads msrpc3 libcli_lsa3',
946                     vars=locals())
947
948 bld.SAMBA3_LIBRARY('trusts_util',
949                    source='libsmb/trusts_util.c',
950                    deps='libcli_netlogon3 msrpc3 pdb',
951                    vars=locals(),
952                    private_library=True)
953
954 bld.SAMBA3_SUBSYSTEM('tdb-wrap3',
955                     source='lib/util_tdb.c',
956                     deps='talloc samba3-util',
957                     vars=locals())
958
959 bld.SAMBA3_LIBRARY('samba3-util',
960                    source='''lib/util_sec.c lib/util_str.c lib/adt_tree.c lib/util_malloc.c lib/memcache.c lib/namearray.c lib/file_id.c''',
961                    deps='samba-util charset',
962                    private_library=True)
963
964 bld.SAMBA_LIBRARY('xattr_tdb',
965                   source='lib/xattr_tdb.c',
966                   deps='NDR_XATTR dbwrap samba3-util',
967                   private_library=True)
968
969 bld.SAMBA3_LIBRARY('CHARSET3',
970                     source='''lib/charcnv.c lib/fstring.c''',
971                     public_deps='ICONV_WRAPPER charset',
972                     deps='samba-util samba3-util',
973                    private_library=True)
974
975 bld.SAMBA3_SUBSYSTEM('errors3',
976                      source='libsmb/errormap.c libsmb/smberr.c lib/errmap_unix.c',
977                      deps='errors')
978
979 bld.SAMBA3_SUBSYSTEM('LIBCLI_SAMR',
980                     source='rpc_client/cli_samr.c',
981                     deps='RPC_NDR_SAMR')
982
983 bld.SAMBA3_LIBRARY('libcli_lsa3',
984                    source='rpc_client/cli_lsarpc.c',
985                    deps='RPC_NDR_LSA INIT_LSA',
986                    private_library=True)
987
988 bld.SAMBA3_LIBRARY('libcli_netlogon3',
989                    source='rpc_client/cli_netlogon.c rpc_client/util_netlogon.c',
990                    deps='RPC_NDR_NETLOGON INIT_NETLOGON cliauth param',
991                    private_library=True)
992
993 bld.SAMBA3_LIBRARY('cli_spoolss',
994                    source='''rpc_client/cli_spoolss.c
995                    rpc_client/init_spoolss.c''',
996                    deps='RPC_NDR_SPOOLSS param secrets3',
997                    private_library=True)
998
999 bld.SAMBA3_SUBSYSTEM('LIBCLI_WINREG',
1000                     source='rpc_client/cli_winreg.c',
1001                     deps='RPC_NDR_WINREG')
1002
1003 bld.SAMBA3_SUBSYSTEM('LIBCLI_WINREG_INTERNAL',
1004                     source='rpc_client/cli_winreg_int.c',
1005                     deps='LIBCLI_WINREG RPC_NCACN_NP')
1006
1007 bld.SAMBA3_SUBSYSTEM('RPC_CLIENT_SCHANNEL',
1008                     source=RPC_CLIENT_SCHANNEL_SRC,
1009                     deps='samba-util krb5samba',
1010                     vars=locals())
1011
1012 bld.SAMBA3_SUBSYSTEM('INIT_LSA',
1013                     source='rpc_client/init_lsa.c',
1014                     deps='samba-util')
1015
1016 bld.SAMBA3_SUBSYSTEM('INIT_NETLOGON',
1017                     source='rpc_client/init_netlogon.c',
1018                     deps='samba-util')
1019
1020 bld.SAMBA3_SUBSYSTEM('INIT_SAMR',
1021                     source='rpc_client/init_samr.c',
1022                     deps='samba-util')
1023
1024 ########################## BINARIES #################################
1025
1026 bld.SAMBA3_BINARY('smbd/smbd',
1027                  source='${SMBD_SRC_MAIN}',
1028                  deps='smbd_base EPMD LSASD',
1029                  install_path='${SBINDIR}',
1030                  vars=locals())
1031
1032 bld.SAMBA3_BINARY('nmbd/nmbd',
1033                  source='''nmbd/asyncdns.c nmbd/nmbd.c nmbd/nmbd_become_dmb.c
1034                  nmbd/nmbd_become_lmb.c nmbd/nmbd_browserdb.c
1035                  nmbd/nmbd_browsesync.c nmbd/nmbd_elections.c
1036                  nmbd/nmbd_incomingdgrams.c nmbd/nmbd_incomingrequests.c
1037                  nmbd/nmbd_lmhosts.c nmbd/nmbd_logonnames.c nmbd/nmbd_mynames.c
1038                  nmbd/nmbd_namelistdb.c nmbd/nmbd_namequery.c
1039                  nmbd/nmbd_nameregister.c nmbd/nmbd_namerelease.c
1040                  nmbd/nmbd_nodestatus.c nmbd/nmbd_packets.c
1041                  nmbd/nmbd_processlogon.c nmbd/nmbd_responserecordsdb.c
1042                  nmbd/nmbd_sendannounce.c nmbd/nmbd_serverlistdb.c
1043                  nmbd/nmbd_subnetdb.c nmbd/nmbd_winsproxy.c nmbd/nmbd_winsserver.c
1044                  nmbd/nmbd_workgroupdb.c nmbd/nmbd_synclists.c''',
1045                  deps='''
1046                  talloc
1047                  tevent
1048                  param
1049                  libsmb
1050                  popt_samba3
1051                  PROFILE''',
1052                  install_path='${SBINDIR}')
1053
1054
1055 bld.SAMBA3_SUBSYSTEM('TDB_VALIDATE',
1056                      source='lib/tdb_validate.c',
1057                      deps='samba-util')
1058
1059
1060 bld.SAMBA3_BINARY('winbindd/winbindd',
1061                  source='''winbindd/winbindd.c
1062                  winbindd/winbindd_group.c
1063                  winbindd/winbindd_util.c
1064                  winbindd/winbindd_cache.c
1065                  winbindd/winbindd_pam.c
1066                  winbindd/winbindd_misc.c
1067                  winbindd/winbindd_cm.c
1068                  winbindd/winbindd_wins_byip.c
1069                  winbindd/winbindd_wins_byname.c
1070                  winbindd/winbindd_msrpc.c
1071                  winbindd/winbindd_rpc.c
1072                  winbindd/winbindd_reconnect.c
1073                  winbindd/winbindd_ads.c
1074                  winbindd/winbindd_samr.c
1075                  winbindd/winbindd_dual.c
1076                  winbindd/winbindd_dual_ndr.c
1077                  winbindd/winbindd_dual_srv.c
1078                  winbindd/winbindd_async.c
1079                  winbindd/winbindd_creds.c
1080                  winbindd/winbindd_cred_cache.c
1081                  winbindd/winbindd_ccache_access.c
1082                  winbindd/winbindd_domain.c
1083                  winbindd/winbindd_idmap.c
1084                  winbindd/winbindd_locator.c
1085                  winbindd/winbindd_ndr.c
1086                  winbindd/wb_ping.c
1087                  winbindd/wb_lookupsid.c
1088                  winbindd/wb_lookupsids.c
1089                  winbindd/wb_lookupname.c
1090                  winbindd/wb_uid2sid.c
1091                  winbindd/wb_gid2sid.c
1092                  winbindd/wb_sids2xids.c
1093                  winbindd/wb_queryuser.c
1094                  winbindd/wb_lookupuseraliases.c
1095                  winbindd/wb_lookupusergroups.c
1096                  winbindd/wb_getpwsid.c
1097                  winbindd/wb_gettoken.c
1098                  winbindd/wb_seqnum.c
1099                  winbindd/wb_seqnums.c
1100                  winbindd/wb_group_members.c
1101                  winbindd/wb_getgrsid.c
1102                  winbindd/wb_query_user_list.c
1103                  winbindd/wb_fill_pwent.c
1104                  winbindd/wb_next_pwent.c
1105                  winbindd/wb_next_grent.c
1106                  winbindd/wb_dsgetdcname.c
1107                  winbindd/winbindd_lookupsid.c
1108                  winbindd/winbindd_lookupsids.c
1109                  winbindd/winbindd_lookupname.c
1110                  winbindd/winbindd_sid_to_uid.c
1111                  winbindd/winbindd_sid_to_gid.c
1112                  winbindd/winbindd_uid_to_sid.c
1113                  winbindd/winbindd_gid_to_sid.c
1114                  winbindd/winbindd_sids_to_xids.c
1115                  winbindd/winbindd_allocate_uid.c
1116                  winbindd/winbindd_allocate_gid.c
1117                  winbindd/winbindd_getpwsid.c
1118                  winbindd/winbindd_getpwnam.c
1119                  winbindd/winbindd_getpwuid.c
1120                  winbindd/winbindd_getsidaliases.c
1121                  winbindd/winbindd_getuserdomgroups.c
1122                  winbindd/winbindd_getgroups.c
1123                  winbindd/winbindd_show_sequence.c
1124                  winbindd/winbindd_getgrgid.c
1125                  winbindd/winbindd_getgrnam.c
1126                  winbindd/winbindd_getusersids.c
1127                  winbindd/winbindd_lookuprids.c
1128                  winbindd/winbindd_setpwent.c
1129                  winbindd/winbindd_getpwent.c
1130                  winbindd/winbindd_endpwent.c
1131                  winbindd/winbindd_setgrent.c
1132                  winbindd/winbindd_getgrent.c
1133                  winbindd/winbindd_endgrent.c
1134                  winbindd/winbindd_dsgetdcname.c
1135                  winbindd/winbindd_getdcname.c
1136                  winbindd/winbindd_list_users.c
1137                  winbindd/winbindd_list_groups.c
1138                  winbindd/winbindd_check_machine_acct.c
1139                  winbindd/winbindd_change_machine_acct.c
1140                  winbindd/winbindd_ping_dc.c
1141                  winbindd/winbindd_pam_auth.c
1142                  winbindd/winbindd_pam_logoff.c
1143                  winbindd/winbindd_pam_chauthtok.c
1144                  winbindd/winbindd_pam_auth_crap.c
1145                  winbindd/winbindd_pam_chng_pswd_auth_crap.c''',
1146                  deps='''
1147                  talloc
1148                  tevent
1149                  pdb
1150                  popt_samba3
1151                  idmap
1152                  ads
1153                  msrpc3
1154                  nss_info
1155                  LIBAFS
1156                  LIBADS_SERVER
1157                  LIBCLI_SAMR
1158                  SLCACHE
1159                  RPC_NDR_DSSETUP
1160                  RPC_NDR_WBINT
1161                  SRV_NDR_WBINT
1162                  RPC_SAMR
1163                  RPC_LSARPC
1164                  RPC_NCACN_NP
1165                  RPC_PIPE_REGISTER
1166                  WB_REQTRANS
1167                  TDB_VALIDATE
1168                  ''',
1169                  enabled=bld.env.build_winbind,
1170                  install_path='${SBINDIR}')
1171
1172 bld.SAMBA3_BINARY('rpcclient/rpcclient',
1173                  source=RPCCLIENT_SRC,
1174                  deps='''
1175                  talloc
1176                  popt_samba3
1177                  pdb
1178                  libsmb
1179                  param
1180                  ndr-standard
1181                  msrpc3
1182                  SMBREADLINE
1183                  trusts_util
1184                  RPC_NDR_WINREG
1185                  RPC_NDR_ECHO
1186                  RPC_CLIENT_SCHANNEL
1187                  DCUTIL
1188                  LIBCLI_SAMR
1189                  libcli_lsa3
1190                  libcli_netlogon3
1191                  cli_spoolss
1192                  RPC_NDR_SRVSVC
1193                  RPC_NDR_WKSSVC
1194                  RPC_NDR_DSSETUP
1195                  RPC_NDR_DFS
1196                  RPC_NDR_DRSUAPI
1197                  RPC_NDR_NTSVCS
1198                  RPC_NDR_EVENTLOG
1199                  INIT_SAMR
1200                  RPC_NDR_FSRVP
1201                  ''',
1202                  vars=locals())
1203
1204 bld.SAMBA3_BINARY('client/smbclient',
1205                  source='''client/client.c
1206                  client/clitar.c
1207                  client/dnsbrowse.c''',
1208                  deps='''
1209                  talloc
1210                  popt_samba3
1211                  param
1212                  ndr-standard
1213                  SMBREADLINE
1214                  libsmb
1215                  msrpc3
1216                  RPC_NDR_SRVSVC
1217                  cli_smb_common''')
1218
1219 bld.SAMBA3_BINARY('net',
1220                  source=NET_SRC,
1221                  deps='''
1222                  talloc
1223                  netapi
1224                  addns
1225                  samba_intl
1226                  popt_samba3
1227                  pdb
1228                  libsmb
1229                  param
1230                  KRBCLIENT
1231                  ndr-standard
1232                  msrpc3
1233                  gpo
1234                  ads
1235                  smbd_base
1236                  LIBADS_SERVER
1237                  LIBADS_PRINTER
1238                  SMBREADLINE
1239                  PASSWD_UTIL
1240                  LIBNET
1241                  LIBNET_DSSYNC
1242                  LIBNET_SAMSYNC
1243                  LIBEVENTLOG
1244                  REGFIO
1245                  NDR_NTPRINTING
1246                  RPC_NDR_WINREG
1247                  RPC_CLIENT_SCHANNEL
1248                  LIBCLI_SAMR
1249                  libcli_lsa3
1250                  libcli_netlogon3
1251                  cli_spoolss
1252                  RPC_NDR_SRVSVC
1253                  RPC_NDR_SVCCTL
1254                  RPC_NDR_DSSETUP
1255                  RPC_NDR_INITSHUTDOWN
1256                  printing_migrate
1257                  trusts_util''',
1258                  vars=locals())
1259
1260 bld.SAMBA3_BINARY('profiles',
1261                  source=PROFILES_SRC,
1262                  deps='''
1263                  talloc
1264                  popt_samba3
1265                  param
1266                  REGFIO''',
1267                  vars=locals())
1268
1269 bld.SAMBA3_BINARY('smbspool',
1270                  source=CUPS_SRC,
1271                  deps='''
1272                  talloc
1273                  popt_samba3
1274                  param
1275                  libsmb
1276                  samba3core''',
1277                  vars=locals())
1278
1279 bld.SAMBA3_BINARY('testparm',
1280                  source=TESTPARM_SRC,
1281                  deps='''
1282                  talloc
1283                  param
1284                  popt_samba3''',
1285                  vars=locals())
1286
1287 bld.SAMBA3_BINARY('smbta-util',
1288                  source=SMBTA_UTIL_SRC,
1289                  deps='''
1290                  talloc
1291                  secrets3
1292                  param''',
1293                  vars=locals())
1294
1295 bld.SAMBA3_BINARY('smbstatus',
1296                  source=STATUS_SRC,
1297                  deps='''
1298                  talloc
1299                  param
1300                  popt_samba3
1301                  smbd_base
1302                  LOCKING
1303                  PROFILE''',
1304                  vars=locals())
1305
1306 bld.SAMBA3_BINARY('smbcontrol',
1307                  source=SMBCONTROL_SRC,
1308                  deps='''
1309                  talloc
1310                  param
1311                  popt_samba3
1312                  PRINTBASE''',
1313                  vars=locals())
1314
1315 bld.SAMBA3_BINARY('smbtree',
1316                  source=SMBTREE_SRC,
1317                  deps='''
1318                  talloc
1319                  param
1320                  libsmb
1321                  msrpc3
1322                  popt_samba3
1323                  PROFILE
1324                  RPC_NDR_SRVSVC''',
1325                  vars=locals())
1326
1327 bld.SAMBA3_BINARY('smbpasswd',
1328                  source=SMBPASSWD_SRC,
1329                  deps='''
1330                  talloc
1331                  param
1332                  pdb
1333                  PASSWD_UTIL
1334                  PASSCHANGE''',
1335                  vars=locals())
1336
1337 bld.SAMBA3_BINARY('pdbedit',
1338                  source=PDBEDIT_SRC,
1339                  deps='''
1340                  talloc
1341                  param
1342                  popt_samba3
1343                  pdb
1344                  PASSWD_UTIL''',
1345                  vars=locals())
1346
1347 bld.SAMBA3_BINARY('smbget',
1348                  source=SMBGET_SRC,
1349                  deps='''
1350                  talloc
1351                  popt_samba3
1352                  smbclient''',
1353                  vars=locals())
1354
1355 bld.SAMBA3_BINARY('nmblookup',
1356                  source=NMBLOOKUP_SRC,
1357                  deps='''
1358                  talloc
1359                  param
1360                  popt_samba3
1361                  LIBNMB''',
1362                  vars=locals())
1363
1364 bld.SAMBA3_BINARY('smbtorture' + bld.env.suffix3,
1365                  source=SMBTORTURE_SRC,
1366                  deps='''
1367                  talloc
1368                  param
1369                  libsmb
1370                  msrpc3
1371                  TLDAP
1372                  RPC_NDR_ECHO
1373                  WB_REQTRANS
1374                  LOCKING
1375                  NDR_OPEN_FILES
1376                  idmap
1377                  ''',
1378                  install=False,
1379                  vars=locals())
1380
1381 bld.SAMBA3_BINARY('smbconftort',
1382                  source=SMBCONFTORT_SRC,
1383                  deps='''
1384                  talloc
1385                  param
1386                  popt_samba3''',
1387                  install=False,
1388                  vars=locals())
1389
1390 bld.SAMBA3_BINARY('replacetort',
1391                  source='../lib/replace/test/main.c',
1392                  deps='replace replace-test',
1393                  install=False)
1394
1395 bld.SAMBA3_BINARY('msgtest',
1396                  source=MSGTEST_SRC,
1397                  deps='''
1398                  talloc
1399                  param''',
1400                  install=False,
1401                  vars=locals())
1402
1403 bld.SAMBA3_BINARY('smbcacls',
1404                  source=SMBCACLS_SRC,
1405                  deps='''
1406                  talloc
1407                  popt_samba3
1408                  msrpc3
1409                  libcli_lsa3
1410                  krb5samba''',
1411                  vars=locals())
1412
1413 bld.SAMBA3_BINARY('smbcquotas',
1414                  source=SMBCQUOTAS_SRC,
1415                  deps='''
1416                  talloc
1417                  popt_samba3
1418                  libsmb
1419                  msrpc3
1420                  libcli_lsa3''',
1421                  vars=locals())
1422
1423 bld.SAMBA3_BINARY('eventlogadm',
1424                  source=EVTLOGADM_SRC,
1425                  deps='''
1426                  talloc
1427                  param
1428                  LIBEVENTLOG''',
1429                  vars=locals())
1430
1431 bld.SAMBA3_BINARY('sharesec',
1432                  source=SHARESEC_SRC,
1433                  deps='''
1434                  talloc
1435                  popt_samba3''',
1436                  vars=locals())
1437
1438 bld.SAMBA3_BINARY('pdbtest',
1439                  source=PDBTEST_SRC,
1440                  deps='''
1441                  talloc
1442                  pdb
1443                  popt_samba3
1444                  AUTH_COMMON
1445                  auth''',
1446                  install=False,
1447                  vars=locals())
1448
1449 bld.SAMBA3_BINARY('vfstest',
1450                  source=VFSTEST_SRC,
1451                  deps='''
1452                  vfs
1453                  popt_samba3
1454                  SMBREADLINE''',
1455                  install=False,
1456                  vars=locals())
1457
1458 bld.SAMBA3_BINARY('log2pcap',
1459                  source=LOG2PCAP_SRC,
1460                  deps='''talloc popt''',
1461                  install=False,
1462                  vars=locals())
1463
1464 bld.SAMBA3_BINARY('locktest2',
1465                  source=LOCKTEST2_SRC,
1466                  deps='''
1467                  talloc
1468                  param
1469                  libsmb
1470                  LOCKING''',
1471                  install=False,
1472                  vars=locals())
1473
1474 bld.SAMBA3_BINARY('debug2html',
1475                  source=DEBUG2HTML_SRC,
1476                  deps='''talloc popt''',
1477                  install=False,
1478                  vars=locals())
1479
1480 bld.SAMBA3_BINARY('smbfilter',
1481                  source=SMBFILTER_SRC,
1482                  deps='''
1483                  talloc
1484                  param
1485                  LIBNMB''',
1486                  install=False,
1487                  vars=locals())
1488
1489 bld.SAMBA3_BINARY('versiontest',
1490                  source='lib/version_test.c',
1491                  deps='''
1492                  SAMBA_VERSION
1493                  param''',
1494                  install=False,
1495                  vars=locals())
1496
1497 bld.SAMBA3_BINARY('ntlm_auth',
1498                  source=NTLM_AUTH_SRC,
1499                  deps='''
1500                  talloc
1501                  krb5samba
1502                  iniparser
1503                  libsmb
1504                  popt_samba3
1505                  LIBNTLMSSP gse gensec''',
1506                  vars=locals())
1507
1508 bld.SAMBA3_BINARY('timelimit',
1509                  source='script/tests/timelimit.c',
1510                  install=False,
1511                  vars=locals())
1512
1513 bld.SAMBA3_BINARY('rpc_open_tcp',
1514                  source=RPC_OPEN_TCP_SRC,
1515                  deps='''
1516                  talloc
1517                  msrpc3''',
1518                  install=False,
1519                  vars=locals())
1520
1521 bld.SAMBA3_BINARY('test_lp_load',
1522                  source=TEST_LP_LOAD_SRC,
1523                  deps='''
1524                  talloc
1525                  param
1526                  popt_samba3''',
1527                  install=False,
1528                  vars=locals())
1529
1530 bld.SAMBA3_BINARY('dbwrap_tool',
1531                  source=DBWRAP_TOOL_SRC,
1532                  deps='''
1533                  talloc
1534                  popt_samba3''',
1535                  vars=locals())
1536
1537 bld.SAMBA3_BINARY('dbwrap_torture',
1538                  source=DBWRAP_TORTURE_SRC,
1539                  deps='''
1540                  talloc
1541                  popt_samba3''',
1542                  install=False,
1543                  vars=locals())
1544
1545 bld.SAMBA3_BINARY('split_tokens',
1546                  source=SPLIT_TOKENS_SRC,
1547                  deps='''
1548                  talloc
1549                  popt_samba3''',
1550                  install=False,
1551                  vars=locals())
1552
1553 bld.SAMBA3_BINARY('vlp',
1554                  source=VLP_SRC,
1555                  deps='''
1556                  talloc
1557                  param''',
1558                  install=False,
1559                  vars=locals())
1560
1561 bld.SAMBA3_PYTHON('pysmbd',
1562                   source='smbd/pysmbd.c',
1563                   deps='smbd_base pyrpc_util',
1564                   realname='samba/samba3/smbd.so'
1565                   )
1566
1567 bld.SAMBA3_PYTHON('pylibsmb',
1568                   source='libsmb/pylibsmb.c',
1569                   deps='smbclient samba-credentials',
1570                   realname='samba/samba3/libsmb_samba_internal.so'
1571                   )
1572
1573 bld.SAMBA3_BINARY('samba-regedit',
1574                   source="""utils/regedit.c utils/regedit_samba3.c
1575                             utils/regedit_wrap.c utils/regedit_treeview.c
1576                             utils/regedit_valuelist.c utils/regedit_dialog.c
1577                             utils/regedit_hexedit.c""",
1578                   deps='ncurses menu panel form registry param popt_samba3 smbregistry',
1579                   enabled=bld.env.build_regedit,
1580                   vars=locals())
1581
1582 ########################## INCLUDES #################################
1583
1584 bld.RECURSE('auth')
1585 bld.RECURSE('libgpo/gpext')
1586 bld.RECURSE('lib/pthreadpool')
1587 bld.RECURSE('lib/asys')
1588 bld.RECURSE('librpc')
1589 bld.RECURSE('librpc/idl')
1590 bld.RECURSE('libsmb')
1591 bld.RECURSE('modules')
1592 bld.RECURSE('pam_smbpass')
1593 bld.RECURSE('passdb')
1594 bld.RECURSE('rpc_server')
1595 bld.RECURSE('script')
1596 bld.RECURSE('winbindd')
1597 bld.RECURSE('../examples/auth')
1598 bld.RECURSE('../examples/libsmbclient')
1599 bld.RECURSE('../examples/pdb')
1600 bld.RECURSE('../examples/VFS')
1601 bld.RECURSE('lib/netapi/tests')
1602 bld.RECURSE('lib/netapi/examples')
1603
1604 bld.ENFORCE_GROUP_ORDERING()
1605 bld.CHECK_PROJECT_RULES()
1606