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