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