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