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