docs-xml/manpages: Add warning about write-behind translator for vfs_glusterfs
[Samba.git] / source3 / wscript_build
blob10d9f71ae7689534bb4c3f082148146fa73905ae
1 #!/usr/bin/env python
3 LIBS='ICONV'
5 config_h = "../include/config.h"
7 bld.SAMBA_BLDOPTIONS('smbd/build_options.c')
9 bld.SETUP_BUILD_GROUPS()
11 ######################## SUBSYSTEMS #################################
13 bld.SAMBA3_LIBRARY('netapi',
14 source='''lib/netapi/netapi.c
15 lib/netapi/cm.c
16 lib/netapi/libnetapi.c
17 lib/netapi/joindomain.c
18 lib/netapi/serverinfo.c
19 lib/netapi/wkstainfo.c
20 lib/netapi/getdc.c
21 lib/netapi/user.c
22 lib/netapi/group.c
23 lib/netapi/localgroup.c
24 lib/netapi/samr.c
25 lib/netapi/sid.c
26 lib/netapi/share.c
27 lib/netapi/file.c
28 lib/netapi/shutdown.c
29 lib/netapi/netlogon.c''',
30 public_deps='''
31 talloc
32 util_cmdline
33 msrpc3
34 ads
35 NDR_LIBNETAPI
36 LIBNET
37 RPC_CLIENT_SCHANNEL
38 libcli_netlogon3
39 LIBCLI_SAMR
40 INIT_SAMR
41 auth
42 ''',
43 public_headers='../source3/lib/netapi/netapi.h',
44 pc_files='libnet/netapi.pc',
45 vnum='0')
47 bld.SAMBA3_LIBRARY('gse',
48 source='librpc/crypto/gse_krb5.c librpc/crypto/gse.c',
49 deps='krb5samba gensec smbconf KRBCLIENT secrets3',
50 private_library=True)
52 bld.SAMBA3_LIBRARY('msrpc3',
53 source='''
54 rpc_client/cli_pipe.c
55 rpc_client/rpc_transport_np.c
56 rpc_client/rpc_transport_sock.c
57 rpc_client/rpc_transport_tstream.c
58 librpc/rpc/dcerpc_helpers.c
59 ''',
60 deps='''
61 ndr
62 ndr-standard
63 RPC_NDR_EPMAPPER
64 NTLMSSP_COMMON
65 COMMON_SCHANNEL
66 LIBCLI_AUTH
67 LIBTSOCKET
68 gse
69 dcerpc-binding
70 libsmb
71 ndr-table
72 NETLOGON_CREDS_CLI
73 ''',
74 private_library=True)
76 bld.SAMBA3_SUBSYSTEM('AVAHI',
77 source='''
78 lib/avahi.c
79 smbd/avahi_register.c
80 ''',
81 deps='''
82 avahi-common
83 avahi-client
84 ''',
85 enabled=bld.env.with_avahi)
87 bld.SAMBA3_SUBSYSTEM('GROUPDB',
88 source='''
89 groupdb/mapping.c
90 groupdb/mapping_tdb.c
91 ''',
92 deps='tdb')
94 bld.SAMBA3_SUBSYSTEM('TLDAP',
95 source='''
96 lib/tldap.c
97 lib/tldap_util.c
98 lib/tldap_gensec_bind.c
99 ''',
100 deps='''
101 asn1util
102 LIBTSOCKET
103 samba3util
104 ''')
106 bld.SAMBA3_BINARY('test_tldap',
107 source='lib/test_tldap.c',
108 deps='''
109 asn1util
110 LIBTSOCKET
111 samba3util
112 smbconf
113 cmocka
114 ''',
115 for_selftest=True)
117 # libpdb.so should not expose internal symbols that are only usable
118 # to the statically linked modules that are merged into libpdb.
119 # Note that we always filter these symbols out in libpdb, even
120 # when modules are not linked statically. In the latter case
121 # symbols will not be present in the libpdb anyway so no hurt is
122 # done to the version script.
123 private_pdb_match = []
124 private_pdb_match.append('!idmap_init')
125 private_pdb_match.append('!idmap_sids_to_xids')
126 private_pdb_match.append('!idmap_xids_to_sids')
128 ldapsam_pdb_match = ['!priv2ld', '!smbldap_search_domain_info',
129 '!ldapsam_*', '!groupmap_attr_list*', '!get_userattr_list',
130 '!dominfo_attr_list', '!get_attr_key2string',
131 '!sidmap_attr_list', '!attrib_map_*', '!idpool_attr_list',
132 '!get_attr_list']
133 private_pdb_match.append('!pdb_nds_*')
134 private_pdb_match.append('!pdb_ldapsam_init*')
135 private_pdb_match.append('!pdb_*_init')
136 private_pdb_match = private_pdb_match + ldapsam_pdb_match
138 bld.SAMBA3_LIBRARY('samba-passdb',
139 source='',
140 deps='pdb',
141 private_library=False,
142 grouping_library=True,
143 pc_files=[],
144 public_headers_install=True,
145 public_headers='''
146 include/passdb.h
147 passdb/machine_sid.h
148 passdb/lookup_sid.h
149 ''',
150 abi_match=private_pdb_match,
151 abi_directory='passdb/ABI',
152 vnum='0.28.0')
154 bld.SAMBA3_SUBSYSTEM('pdb',
155 source='''
156 passdb/pdb_get_set.c
157 passdb/passdb.c
158 lib/util_wellknown.c
159 lib/util_builtin.c
160 passdb/pdb_compat.c
161 lib/util_sid_passdb.c
162 lib/util_unixsids.c
163 passdb/lookup_sid.c
164 passdb/login_cache.c
165 passdb/account_pol.c
166 lib/privileges.c
167 lib/util_nscd.c
168 lib/winbind_util.c
169 passdb/pdb_util.c
170 passdb/pdb_interface.c
171 passdb/pdb_secrets.c''',
172 deps='''
173 secrets3
174 GROUPDB
175 SERVER_MUTEX
176 wbclient
177 LIBCLI_AUTH
178 flag_mapping
179 samba-credentials
180 samba-modules
181 nscd
182 ''')
184 bld.SAMBA3_LIBRARY('smbldaphelper',
185 source='''
186 passdb/pdb_ldap_schema.c
187 passdb/pdb_ldap_util.c
188 ''',
189 deps='smbldap secrets3',
190 allow_undefined_symbols=True,
191 enabled=bld.CONFIG_SET('HAVE_LDAP'),
192 private_library=True)
194 bld.SAMBA3_SUBSYSTEM('SERVER_MUTEX',
195 source='lib/server_mutex.c',
196 deps='talloc')
198 # this includes only the low level parse code, not stuff
199 # that requires knowledge of security contexts
200 bld.SAMBA3_SUBSYSTEM('REG_PARSE_PRS',
201 source='registry/reg_parse_prs.c')
203 bld.SAMBA3_SUBSYSTEM('REGFIO',
204 source='registry/regfio.c',
205 deps='samba-util REG_PARSE_PRS')
207 bld.SAMBA_BINARY('test_registry_regfio',
208 source='registry/tests/test_regfio.c',
209 deps='cmocka samba3-util smbconf REGFIO',
210 local_include=False,
211 for_selftest=True)
213 # Do not link against this use 'smbconf'
214 bld.SAMBA3_SUBSYSTEM('SMBREGISTRY',
215 source='''
216 registry/reg_api.c
217 registry/reg_dispatcher.c
218 registry/reg_cachehook.c
219 registry/reg_objects.c
220 registry/reg_util_internal.c
221 lib/util_nttoken.c
222 registry/reg_backend_db.c
223 registry/reg_parse_internal.c
224 registry/reg_parse.c
225 lib/srprs.c
226 registry/reg_init_basic.c
227 ''',
228 deps='''
229 smbd_shim
230 tdb-wrap3
231 NDR_SECURITY
232 util_tdb
233 talloc
234 replace
235 util_reg
236 samba-util
237 samba-security
238 errors3
239 dbwrap
240 samba3-util
241 ''')
243 # Do not link against this use 'smbconf'
244 bld.SAMBA3_SUBSYSTEM('REG_SMBCONF',
245 source='''
246 registry/reg_backend_smbconf.c
247 registry/reg_init_smbconf.c
248 registry/reg_util_token.c
249 registry/reg_api_util.c
250 ''',
251 deps='SMBREGISTRY')
253 bld.SAMBA3_SUBSYSTEM('REG_FULL',
254 source='''
255 registry/reg_backend_printing.c
256 registry/reg_backend_shares.c
257 registry/reg_backend_netlogon_params.c
258 registry/reg_backend_prod_options.c
259 registry/reg_backend_tcpip_params.c
260 registry/reg_backend_hkpt_params.c
261 registry/reg_backend_current_version.c
262 registry/reg_backend_perflib.c
263 registry/reg_init_full.c
264 registry/reg_perfcount.c''',
265 deps='''
266 smbconf
267 tdb-wrap3
268 ''')
270 bld.SAMBA3_LIBRARY('popt_samba3',
271 source='lib/popt_common.c',
272 deps='popt samba-util smbconf',
273 private_library=True)
275 bld.SAMBA3_LIBRARY('popt_samba3_cmdline',
276 source='lib/popt_common_cmdline.c',
277 deps='popt_samba3 util_cmdline cmdline_contexts',
278 private_library=True)
280 bld.SAMBA3_LIBRARY('util_cmdline',
281 source='lib/util_cmdline.c',
282 deps='secrets3 samba-credentials',
283 private_library=True)
285 bld.SAMBA3_LIBRARY('cmdline_contexts',
286 source='lib/cmdline_contexts.c',
287 deps='samba3core',
288 private_library=True)
290 bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
291 source='libads/kerberos.c libads/ads_status.c',
292 public_deps='krb5samba asn1util k5crypto gssapi LIBTSOCKET CLDAP LIBNMB')
294 bld.SAMBA3_SUBSYSTEM('samba3util',
295 source='''
296 lib/system.c
297 lib/sendfile.c
298 lib/recvfile.c
299 lib/time.c
300 lib/util_sid.c
301 lib/util_specialsids.c
302 lib/util_file.c
303 lib/util.c
304 lib/util_path.c
305 lib/util_procid.c
306 lib/util_sock.c
307 lib/util_tsock.c
308 lib/util_transfer_file.c
309 lib/util_macstreams.c
310 ''',
311 deps='''
312 CHARSET3
314 LIBTSOCKET
315 samba-security
316 NDR_SECURITY
317 samba-util
318 util_tdb
319 sys_rw
320 iov_buf
321 ''')
323 if bld.env.with_ctdb:
324 SAMBA_CLUSTER_SUPPORT_SOURCES='''
325 lib/cluster_support.c
326 lib/dbwrap/dbwrap_ctdb.c
327 lib/messages_ctdb.c
328 lib/messages_ctdb_ref.c
329 lib/ctdbd_conn.c
331 SAMBA_CLUSTER_SUPPORT_DEPS='''
332 talloc
333 tevent
336 else:
337 SAMBA_CLUSTER_SUPPORT_SOURCES='''
338 lib/cluster_support.c
339 lib/ctdb_dummy.c
341 SAMBA_CLUSTER_SUPPORT_DEPS='''
342 talloc
343 tevent
346 bld.SAMBA3_LIBRARY('samba-cluster-support',
347 source=SAMBA_CLUSTER_SUPPORT_SOURCES,
348 deps=SAMBA_CLUSTER_SUPPORT_DEPS,
349 allow_undefined_symbols=True,
350 private_library=True)
352 bld.SAMBA3_SUBSYSTEM('TDB_LIB',
353 source='''
354 lib/dbwrap/dbwrap_open.c
355 lib/dbwrap/dbwrap_watch.c
356 lib/g_lock.c
357 ''',
358 deps='''
359 dbwrap
360 samba-cluster-support
361 ''')
363 bld.SAMBA3_LIBRARY('messages_dgm',
364 source='''
365 lib/messages_dgm.c
366 lib/messages_dgm_ref.c
367 ''',
368 deps='''
369 talloc
370 samba-debug
371 PTHREADPOOL
372 msghdr
373 genrand
374 samba-util
375 ''',
376 private_library=True)
378 bld.SAMBA3_LIBRARY('messages_util',
379 source='''lib/messages_util.c''',
380 deps='samba-util',
381 private_library=True)
383 bld.SAMBA3_SUBSYSTEM('samba3core',
384 source='''
385 lib/messages.c
386 lib/util_cluster.c
387 lib/id_cache.c
388 lib/serverid.c
389 lib/server_id_watch.c
390 lib/server_id_db_util.c
391 lib/addrchange.c
392 ../lib/util/debug_s3.c
393 lib/dumpcore.c
394 lib/interface.c
395 lib/username.c
396 lib/smbrun.c
397 lib/wins_srv.c
398 lib/substitute.c
399 lib/substitute_generic.c
400 lib/ms_fnmatch.c
401 lib/tallocmsg.c
402 lib/dmallocmsg.c
403 lib/gencache.c
404 lib/util_event.c
405 lib/global_contexts.c
406 lib/server_prefork.c
407 lib/server_prefork_util.c
408 lib/ldap_escape.c
409 libads/krb5_errs.c
410 lib/system_smbd.c
411 lib/audit.c
412 lib/tevent_wait.c
413 lib/idmap_cache.c
414 lib/namemap_cache.c
415 lib/util_ea.c
416 lib/background.c
417 ''',
418 deps='''
419 samba3util
420 LIBTSOCKET
421 NDR_MESSAGING
422 LIBASYNC_REQ
423 UTIL_PW
424 SAMBA_VERSION
425 PTHREADPOOL
426 interfaces
427 smbconf
428 dbwrap
429 samba3-util
430 errors3
431 server_id_db
432 messages_util
433 messages_dgm
434 talloc_report_printf
435 access
436 TDB_LIB
438 ''')
440 bld.SAMBA3_LIBRARY('smbd_shim',
441 source='''lib/smbd_shim.c''',
442 deps='talloc',
443 private_library=True)
445 bld.SAMBA3_SUBSYSTEM('auth_generic',
446 source='libsmb/auth_generic.c',
447 deps='gse gensec')
449 bld.SAMBA3_LIBRARY('libsmb',
450 source='''
451 libsmb/clientgen.c
452 libsmb/cliconnect.c
453 libsmb/clifile.c
454 libsmb/clispnego.c
455 libsmb/clirap.c
456 libsmb/clierror.c
457 libsmb/climessage.c
458 libsmb/clireadwrite.c
459 libsmb/clilist.c
460 libsmb/cliprint.c
461 libsmb/clitrans.c
462 libsmb/clisecdesc.c
463 libsmb/clidgram.c
464 libsmb/clistr.c
465 libsmb/cliquota.c
466 libsmb/clifsinfo.c
467 libsmb/clidfs.c
468 libsmb/clioplock.c
469 libsmb/clirap2.c
470 libsmb/async_smb.c
471 libsmb/reparse_symlink.c
472 libsmb/clisymlink.c
473 libsmb/smbsock_connect.c
474 libsmb/cli_smb2_fnum.c
475 ''',
476 deps='''
477 auth_generic
478 CLDAP
479 LIBNMB
480 SPNEGO_PARSE
481 LIBTSOCKET
482 KRBCLIENT
483 NDR_IOCTL
484 NDR_QUOTA
485 cli_smb_common
486 util_cmdline
487 tevent
488 ''',
489 private_library=True)
491 bld.SAMBA3_SUBSYSTEM('CLDAP',
492 source='libads/cldap.c',
493 deps='cli-ldap-common cli_cldap LIBTSOCKET')
495 # NOTE: The secrets3 library is a low level library used by several subsystems.
496 # PLEASE DO NOT make it depend on high level libraries like PDB, if you are
497 # doing that your design is wrong and needs changing. -SSS
498 bld.SAMBA3_LIBRARY('secrets3',
499 source='''
500 passdb/secrets.c
501 passdb/machine_account_secrets.c
502 passdb/machine_sid.c
503 passdb/secrets_lsa.c
504 ''',
505 deps='''
506 NDR_SECRETS
507 smbconf
508 samba3util
509 dbwrap
510 krb5samba
511 LIBCLI_AUTH
512 ''',
513 private_library=True)
515 bld.SAMBA3_LIBRARY('smbldap',
516 source='lib/smbldap.c',
517 deps='ldap lber samba-util smbconf',
518 enabled=bld.CONFIG_SET("HAVE_LDAP"),
519 private_library=False,
520 abi_directory='lib/ABI',
521 abi_match='smbldap_*',
522 pc_files=[],
523 vnum='2',
524 public_headers='include/smbldap.h include/smb_ldap.h')
526 bld.SAMBA3_LIBRARY('ads',
527 source='''
528 libads/ldap.c
529 libads/sasl.c
530 libads/sasl_wrapping.c
531 libads/krb5_setpw.c
532 libads/kerberos_util.c
533 libads/ldap_user.c
534 libads/ads_struct.c
535 libads/kerberos_keytab.c
536 libads/disp_sec.c
537 libads/ldap_utils.c
538 libads/ldap_schema.c
539 libads/util.c
540 libads/ndr.c
541 libads/net_ads_setspn.c
542 ''',
543 deps='''
544 cli-ldap-common
545 krb5samba
546 ldap
547 lber
548 KRBCLIENT
549 smbconf
550 LIBNMB
551 libsmb
552 DCUTIL
553 smbldap
554 trusts_util
555 ''',
556 private_library=True)
558 bld.SAMBA3_SUBSYSTEM('LIBADS_SERVER',
559 source='libads/authdata.c',
560 deps='SERVER_MUTEX ndr-krb5pac krb5samba gssapi')
562 bld.SAMBA3_SUBSYSTEM('LIBADS_PRINTER',
563 source='libads/ldap_printer.c',
564 deps='samba-util krb5samba')
566 # Only smbconf should link against this subsystem, else we will create
567 # a circular dependency.
568 bld.SAMBA3_SUBSYSTEM('SMBCONF_PARAM',
569 source='''
570 param/loadparm.c
571 lib/sharesec.c
572 lib/ldap_debug_handler.c
573 lib/util_names.c
574 ''',
575 deps='''
576 samba-util
577 PARAM_UTIL
578 ldap
579 lber
580 LOADPARM_CTX
581 samba3core
582 param_local.h
583 param_global.h
584 cups
585 ''')
587 bld.SAMBA3_LIBRARY('smbconf',
588 source='''
589 lib/smbconf/smbconf_init.c
590 lib/smbconf/smbconf_reg.c
591 ''',
592 deps='''
593 LIBSMBCONF
594 REG_SMBCONF
595 SAMBA_VERSION
597 charset
598 samba-hostconfig
599 errors3
600 SMBCONF_PARAM
601 samba-util
602 talloc
603 util_reg
604 ''',
605 public_headers='../lib/smbconf/smbconf.h',
606 pc_files=[],
607 vnum='0')
609 bld.SAMBA3_LIBRARY('smbd_conn',
610 source='smbd/conn.c',
611 deps='samba3-util samba-util',
612 private_library=True)
614 bld.SAMBA3_SUBSYSTEM('sysquotas',
615 source='''
616 lib/sysquotas.c
617 lib/sysquotas_linux.c
618 lib/sysquotas_xfs.c
619 lib/sysquotas_4A.c
620 lib/sysquotas_4B.c
621 lib/sysquotas_jfs2.c
622 lib/sysquotas_nfs.c
623 ''',
624 allow_warnings=True,
625 deps='samba3-util samba-util tirpc')
627 NOTIFY_SOURCES=''
628 NOTIFY_DEPS=''
630 if bld.CONFIG_SET("HAVE_INOTIFY"):
631 NOTIFY_SOURCES += ' smbd/notify_inotify.c'
633 if bld.CONFIG_SET('SAMBA_FAM_LIBS'):
634 NOTIFY_SOURCES += ' smbd/notify_fam.c'
635 NOTIFY_DEPS += ' ' + bld.CONFIG_GET('SAMBA_FAM_LIBS')
637 bld.SAMBA3_LIBRARY('smbd_base',
638 source='''
639 smbd/server_reload.c
640 smbd/files.c
641 smbd/connection.c
642 smbd/utmp.c
643 smbd/session.c
644 smbd/dfree.c
645 smbd/dir.c
646 smbd/password.c
647 smbd/conn_msg.c
648 smbd/conn_idle.c
649 smbd/share_access.c
650 smbd/fileio.c
651 smbd/ipc.c
652 smbd/lanman.c
653 smbd/negprot.c
654 smbd/message.c
655 smbd/nttrans.c
656 smbd/pipes.c
657 smbd/reply.c
658 smbd/sesssetup.c
659 smbd/trans2.c
660 smbd/uid.c
661 smbd/dosmode.c
662 smbd/filename.c
663 smbd/open.c
664 smbd/close.c
665 smbd/blocking.c
666 smbd/sec_ctx.c
667 smbd/srvstr.c
668 smbd/vfs.c
669 smbd/perfcount.c
670 smbd/statcache.c
671 smbd/seal.c
672 smbd/posix_acls.c
673 lib/sysacls.c
674 smbd/process.c
675 smbd/service.c
676 smbd/error.c
677 printing/printspoolss.c
678 lib/sessionid_tdb.c
679 lib/cleanupdb.c
680 smbd/fake_file.c
681 smbd/quotas.c
682 smbd/ntquotas.c
683 smbd/msdfs.c
684 smbd/aio.c smbd/statvfs.c
685 smbd/dmapi.c
686 smbd/signing.c
687 smbd/file_access.c
688 smbd/dnsregister.c smbd/globals.c
689 smbd/smb2_server.c
690 smbd/smb2_glue.c
691 smbd/smb2_negprot.c
692 smbd/smb2_sesssetup.c
693 smbd/smb2_tcon.c
694 smbd/smb2_create.c
695 smbd/smb2_close.c
696 smbd/smb2_flush.c
697 smbd/smb2_read.c
698 smbd/smb2_write.c
699 smbd/smb2_lock.c
700 smbd/smb2_ioctl.c
701 smbd/smb2_ioctl_dfs.c
702 smbd/smb2_ioctl_filesys.c
703 smbd/smb2_ioctl_named_pipe.c
704 smbd/smb2_ioctl_network_fs.c
705 smbd/smb2_keepalive.c
706 smbd/smb2_query_directory.c
707 smbd/smb2_notify.c
708 smbd/smb2_getinfo.c
709 smbd/smb2_setinfo.c
710 smbd/smb2_break.c
711 smbd/smbXsrv_version.c
712 smbd/smbXsrv_client.c
713 smbd/smbXsrv_session.c
714 smbd/smbXsrv_tcon.c
715 smbd/smbXsrv_open.c
716 smbd/server_exit.c
717 smbd/durable.c
718 smbd/scavenger.c
719 smbd/mangle.c
720 smbd/mangle_hash.c
721 smbd/mangle_hash2.c
722 smbd/oplock.c
723 smbd/oplock_linux.c
724 smbd/notify.c
725 smbd/notify_msg.c
726 smbd/build_options.c
727 smbd/smb1_utils.c
728 ''' + NOTIFY_SOURCES,
729 deps='''
730 talloc
731 tevent
733 libsmb
734 msrpc3
736 vfs_default
737 vfs_posixacl
738 inotify
739 samba3core
740 smbd_conn
741 param_service
742 AVAHI
743 PRINTBASE
744 PROFILE
745 LOCKING
746 LIBADS_SERVER
747 LIBAFS
748 RPC_SERVICE
749 NDR_SMBXSRV
750 LEASES_DB
751 LEASES_UTIL
752 sysquotas
753 NDR_SMB_ACL
754 netapi
755 NDR_IOCTL
756 notifyd
757 vfs_acl_common
758 NDR_QUOTA
759 GNUTLS_HELPERS
760 ''' +
761 bld.env['dmapi_lib'] +
762 bld.env['legacy_quota_libs'] +
763 NOTIFY_DEPS,
764 private_library=True)
766 bld.SAMBA3_SUBSYSTEM('LOCKING',
767 source='''
768 locking/locking.c
769 locking/brlock.c
770 locking/posix.c
771 locking/share_mode_lock.c
772 ''',
773 deps='''
775 talloc
776 LEASES_DB
777 LEASES_UTIL
778 NDR_OPEN_FILES
779 FNAME_UTIL
780 ''')
782 bld.SAMBA3_SUBSYSTEM('LEASES_DB',
783 source='locking/leases_db.c',
784 deps='NDR_LEASES_DB')
786 bld.SAMBA3_SUBSYSTEM('LEASES_UTIL',
787 source='locking/leases_util.c',
788 deps='NDR_OPEN_FILES')
790 if bld.CONFIG_GET("WITH_PROFILE"):
791 bld.SAMBA3_SUBSYSTEM('PROFILE',
792 source='profile/profile.c',
793 deps='''
794 samba-util
795 gnutls
796 ''')
797 else:
798 bld.SAMBA3_SUBSYSTEM('PROFILE',
799 source='profile/profile_dummy.c',
800 deps='')
802 bld.SAMBA3_SUBSYSTEM('PRINTBASE',
803 source='''
804 printing/notify.c
805 printing/printing_db.c
806 ''',
807 deps='''
808 samba-util
810 ''')
812 bld.SAMBA3_SUBSYSTEM('PRINTBACKEND',
813 source='''
814 printing/printing.c
815 printing/nt_printing.c
816 printing/nt_printing_tdb.c
817 printing/nt_printing_migrate_internal.c
818 printing/nt_printing_ads.c
819 printing/queue_process.c
820 ''',
821 deps='''
822 PRINTBASE
823 LIBADS_PRINTER
825 printing_migrate
826 SPOOLSSD
827 ''')
829 bld.SAMBA3_LIBRARY('printing_migrate',
830 source='''
831 printing/nt_printing_migrate.c
832 rpc_client/cli_winreg_spoolss.c
833 printing/nt_printing_os2.c
834 ''',
835 deps='''
836 NDR_NTPRINTING
837 cli_spoolss
838 RPC_NDR_WINREG
839 LIBCLI_WINREG
840 smbconf
841 ''',
842 private_library=True)
844 bld.SAMBA3_SUBSYSTEM('PRINTING',
845 source='''
846 printing/pcap.c
847 printing/print_svid.c
848 printing/print_aix.c
849 printing/print_cups.c
850 printing/print_generic.c
851 printing/lpq_parse.c
852 printing/load.c
853 printing/print_standard.c
854 printing/print_iprint.c
855 printing/printer_list.c
856 ''',
857 deps='''
858 NDR_PRINTCAP
860 cups
861 ''')
863 bld.SAMBA3_SUBSYSTEM('FNAME_UTIL',
864 source='lib/filename_util.c',
865 deps='samba-util')
867 bld.SAMBA3_SUBSYSTEM('LIBNET',
868 source='libnet/libnet_join.c',
869 deps='NDR_LIBNET_JOIN INIT_SAMR net_keytab pdb')
871 bld.SAMBA3_LIBRARY('net_keytab',
872 source='libnet/libnet_keytab.c',
873 deps='krb5samba ads',
874 private_library=True)
877 bld.SAMBA3_SUBSYSTEM('LIBNET_DSSYNC',
878 source='''
879 libnet/libnet_dssync.c
880 libnet/libnet_dssync_passdb.c
881 libnet/libnet_dssync_keytab.c
882 ''',
883 deps='''
884 LIBNET
885 RPC_NDR_DRSUAPI
886 ''')
888 bld.SAMBA3_SUBSYSTEM('LIBEVENTLOG',
889 source='lib/eventlog/eventlog.c',
890 deps='NDR_EVENTLOG tdb')
892 bld.SAMBA3_SUBSYSTEM('LIBNMB',
893 source='''
894 libsmb/unexpected.c
895 libsmb/namecache.c
896 libsmb/nmblib.c
897 libsmb/namequery.c
898 libsmb/conncache.c
899 libads/sitename_cache.c
900 ''',
901 deps='''
902 LIBTSOCKET
903 samba3util
904 addns
905 lmhosts
906 resolv
907 ''')
909 bld.SAMBA3_SUBSYSTEM('SERVICES',
910 source='''
911 services/svc_spoolss.c
912 services/svc_rcinit.c
913 services/svc_winreg_glue.c
914 services/svc_netlogon.c
915 services/svc_winreg.c
916 services/svc_wins.c
917 ''',
918 deps='samba-util')
920 bld.SAMBA3_SUBSYSTEM('PLAINTEXT_AUTH',
921 source='''
922 auth/pampass.c
923 auth/pass_check.c
924 ''',
925 deps='''
926 crypt
928 PAM_ERRORS
929 ''')
931 bld.SAMBA3_SUBSYSTEM('PASSCHANGE',
932 source='libsmb/passchange.c',
933 deps='''
934 LIBCLI_SAMR
935 INIT_LSA
936 msrpc3
937 krb5samba
938 ''')
940 bld.SAMBA3_SUBSYSTEM('SAMBA_VERSION',
941 source='lib/version.c',
942 deps='samba-util')
944 bld.SAMBA3_SUBSYSTEM('SLCACHE',
945 source='libsmb/samlogon_cache.c',
946 deps='''
947 samba-util
949 ''')
951 bld.SAMBA3_SUBSYSTEM('DCUTIL',
952 source='''
953 libsmb/namequery_dc.c
954 libsmb/dsgetdcname.c
955 ''',
956 deps='''
958 msrpc3
959 libcli_lsa3
960 ''')
962 bld.SAMBA3_LIBRARY('trusts_util',
963 source='libsmb/trusts_util.c',
964 deps='''
965 libcli_netlogon3
966 msrpc3
967 samba-passdb
968 ''',
969 private_library=True)
971 bld.SAMBA3_SUBSYSTEM('tdb-wrap3',
972 source='lib/util_tdb.c',
973 deps='talloc samba3-util')
975 bld.SAMBA3_LIBRARY('samba3-util',
976 source='''
977 lib/util_sec.c
978 lib/util_str.c
979 lib/adt_tree.c
980 lib/util_malloc.c
981 lib/namearray.c
982 lib/file_id.c
983 lib/cbuf.c
984 lib/per_thread_cwd.c
985 ''',
986 deps='''
987 samba-util
988 charset
989 ''',
990 private_library=True)
992 bld.SAMBA_LIBRARY('xattr_tdb',
993 source='lib/xattr_tdb.c',
994 deps='NDR_XATTR dbwrap samba3-util',
995 private_library=True)
997 bld.SAMBA3_LIBRARY('CHARSET3',
998 source='''
999 lib/charcnv.c
1000 lib/fstring.c
1001 ''',
1002 public_deps='''
1003 ICONV_WRAPPER
1004 charset
1005 ''',
1006 deps='''
1007 samba-util
1008 samba3-util
1009 ''',
1010 private_library=True)
1012 bld.SAMBA3_SUBSYSTEM('errors3',
1013 source='''
1014 libsmb/errormap.c
1015 libsmb/smberr.c
1016 lib/errmap_unix.c
1017 ''',
1018 deps='samba-errors')
1020 bld.SAMBA3_SUBSYSTEM('LIBCLI_SAMR',
1021 source='rpc_client/cli_samr.c',
1022 deps='RPC_NDR_SAMR INIT_SAMR')
1024 bld.SAMBA3_LIBRARY('libcli_lsa3',
1025 source='rpc_client/cli_lsarpc.c',
1026 deps='RPC_NDR_LSA INIT_LSA',
1027 private_library=True)
1029 bld.SAMBA3_LIBRARY('libcli_netlogon3',
1030 source='''
1031 rpc_client/cli_netlogon.c
1032 rpc_client/util_netlogon.c
1033 ''',
1034 deps='''
1035 msrpc3
1036 RPC_NDR_NETLOGON
1037 cliauth
1038 smbconf
1039 NETLOGON_CREDS_CLI''',
1040 private_library=True)
1042 bld.SAMBA3_LIBRARY('cli_spoolss',
1043 source='''
1044 rpc_client/cli_spoolss.c
1045 rpc_client/init_spoolss.c
1046 ''',
1047 deps='''
1048 RPC_NDR_SPOOLSS
1049 smbconf
1050 secrets3''',
1051 private_library=True)
1053 bld.SAMBA3_SUBSYSTEM('LIBCLI_WINREG',
1054 source='rpc_client/cli_winreg.c',
1055 deps='RPC_NDR_WINREG')
1057 bld.SAMBA3_SUBSYSTEM('LIBCLI_WINREG_INTERNAL',
1058 source='rpc_client/cli_winreg_int.c',
1059 deps='LIBCLI_WINREG RPC_SERVER')
1061 bld.SAMBA3_SUBSYSTEM('RPC_CLIENT_SCHANNEL',
1062 source='rpc_client/cli_pipe_schannel.c',
1063 deps='samba-util krb5samba')
1065 bld.SAMBA3_SUBSYSTEM('RPCCLI_MDSSVC',
1066 source='''
1067 rpc_client/cli_mdssvc.c
1068 rpc_client/cli_mdssvc_util.c
1069 ''',
1070 deps='mdssvc RPC_NDR_MDSSVC')
1072 bld.SAMBA3_SUBSYSTEM('INIT_LSA',
1073 source='rpc_client/init_lsa.c',
1074 deps='samba-util')
1076 bld.SAMBA3_SUBSYSTEM('INIT_SAMR',
1077 source='rpc_client/init_samr.c',
1078 deps='samba-util GNUTLS_HELPERS')
1080 bld.SAMBA3_SUBSYSTEM('LIBLSA',
1081 source='lib/lsa.c')
1083 bld.SAMBA3_SUBSYSTEM('SPOOLSSD',
1084 source='printing/spoolssd.c',
1085 deps='''
1086 samba-util
1087 RPC_SOCK_HELPER
1088 ''')
1090 bld.SAMBA3_SUBSYSTEM('tevent-glib-glue',
1091 source='lib/tevent_glib_glue.c',
1092 deps='glib-2.0',
1093 enabled=bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1096 bld.SAMBA3_SUBSYSTEM('ADOUBLE',
1097 source='lib/adouble.c',
1098 deps='STRING_REPLACE')
1100 bld.SAMBA3_SUBSYSTEM('STRING_REPLACE',
1101 source='lib/string_replace.c')
1103 ########################## BINARIES #################################
1105 bld.SAMBA3_BINARY('smbd/smbd',
1106 source='smbd/server.c smbd/smbd_cleanupd.c',
1107 deps='''
1108 popt_samba3
1109 smbd_base
1110 EPMD
1111 LSASD
1112 FSSD
1113 MDSSD
1114 SPOOLSSD
1115 ''',
1116 install_path='${SBINDIR}')
1119 bld.SAMBA3_SUBSYSTEM('TDB_VALIDATE',
1120 source='lib/tdb_validate.c',
1121 deps='samba-util')
1124 bld.SAMBA3_BINARY('client/smbclient',
1125 source='''
1126 client/client.c
1127 client/clitar.c
1128 client/dnsbrowse.c
1129 ''',
1130 deps='''
1131 talloc
1132 popt_samba3_cmdline
1133 smbconf
1134 ndr-standard
1135 SMBREADLINE
1136 libsmb
1137 msrpc3
1138 RPC_NDR_SRVSVC
1139 cli_smb_common
1140 archive
1141 ''')
1143 bld.SAMBA3_BINARY('smbspool',
1144 source='client/smbspool.c',
1145 deps='''
1146 talloc
1147 popt_samba3
1148 smbconf
1149 libsmb
1150 samba3core
1151 ''')
1153 bld.SAMBA3_BINARY('smbspool_krb5_wrapper',
1154 source='client/smbspool_krb5_wrapper.c',
1155 deps='''
1156 DYNCONFIG
1157 cups
1158 krb5samba
1159 ''',
1160 install_path='${LIBEXECDIR}/samba',
1161 enabled=bld.CONFIG_SET('HAVE_CUPS'))
1163 bld.SAMBA3_BINARY('smbspool_argv_wrapper',
1164 source='script/tests/smbspool_argv_wrapper.c',
1165 for_selftest=True)
1167 bld.SAMBA3_BINARY('locktest2',
1168 source='torture/locktest2.c',
1169 deps='''
1170 talloc
1171 smbconf
1172 libsmb
1173 LOCKING
1174 ''',
1175 for_selftest=True)
1177 bld.SAMBA3_BINARY('smbtorture' + bld.env.suffix3,
1178 source='''
1179 torture/torture.c
1180 torture/nbio.c
1181 torture/scanner.c
1182 torture/utable.c
1183 torture/denytest.c
1184 torture/mangle_test.c
1185 torture/nbench.c
1186 torture/test_async_echo.c
1187 torture/test_addrchange.c
1188 torture/test_posix_append.c
1189 torture/test_nttrans_create.c
1190 torture/test_nttrans_fsctl.c
1191 torture/test_case_insensitive.c
1192 torture/test_notify_online.c
1193 torture/test_chain3.c
1194 torture/test_smb2.c
1195 torture/test_authinfo_structs.c
1196 torture/test_smbsock_any_connect.c
1197 torture/test_cleanup.c
1198 torture/test_notify.c
1199 lib/tevent_barrier.c
1200 torture/test_dbwrap_watch.c
1201 torture/test_dbwrap_do_locked.c
1202 torture/test_idmap_tdb_common.c
1203 torture/test_dbwrap_ctdb.c
1204 torture/test_buffersize.c
1205 torture/test_messaging_read.c
1206 torture/test_messaging_fd_passing.c
1207 torture/test_messaging_send_all.c
1208 torture/test_oplock_cancel.c
1209 torture/test_pthreadpool_tevent.c
1210 torture/bench_pthreadpool.c
1211 torture/wbc_async.c
1212 torture/test_g_lock.c
1213 torture/test_namemap_cache.c
1214 torture/test_idmap_cache.c
1215 torture/test_hidenewfiles.c
1216 ''',
1217 deps='''
1218 talloc
1219 smbconf
1220 libsmb
1221 msrpc3
1222 TLDAP
1223 RPC_NDR_ECHO
1224 WB_REQTRANS
1225 LOCKING
1226 NDR_OPEN_FILES
1227 idmap
1228 IDMAP_TDB_COMMON
1229 samba-cluster-support
1230 ''',
1231 cflags='-DWINBINDD_SOCKET_DIR=\"%s\"' % bld.env.WINBINDD_SOCKET_DIR,
1232 for_selftest=True)
1234 bld.SAMBA3_BINARY('smbconftort',
1235 source='lib/smbconf/testsuite.c',
1236 deps='''
1237 talloc
1238 smbconf
1239 popt_samba3
1240 ''',
1241 for_selftest=True)
1243 bld.SAMBA3_BINARY('msgtest',
1244 source='torture/msgtest.c',
1245 deps='''
1246 talloc
1247 smbconf
1248 ''',
1249 install=False)
1251 bld.SAMBA3_BINARY('msg_sink',
1252 source='torture/msg_sink.c',
1253 deps='''
1254 talloc
1255 smbconf
1256 ''',
1257 install=False)
1259 bld.SAMBA3_BINARY('msg_source',
1260 source='torture/msg_source.c',
1261 deps='''
1262 talloc
1263 smbconf
1264 ''',
1265 install=False)
1267 bld.SAMBA3_BINARY('test_mdsparser_es',
1268 source='''
1269 rpc_server/mdssvc/test_mdsparser_es.c
1270 rpc_server/mdssvc/es_parser.y
1271 rpc_server/mdssvc/es_lexer.l
1272 rpc_server/mdssvc/es_mapping.c
1273 ''',
1274 deps='''
1275 samba3-util
1276 talloc
1277 smbconf
1278 jansson
1279 cmocka
1280 popt_samba3_cmdline
1281 ''',
1282 enabled=bld.env.spotlight_backend_es,
1283 for_selftest=True)
1285 bld.SAMBA3_BINARY('pdbtest',
1286 source='torture/pdbtest.c',
1287 deps='''
1288 talloc
1290 popt_samba3
1291 AUTH_COMMON
1292 auth
1293 ''',
1294 for_selftest=True)
1296 bld.SAMBA3_BINARY('vfstest',
1297 source='''
1298 torture/cmd_vfs.c
1299 torture/vfstest.c
1300 torture/vfstest_chain.c
1301 ''',
1302 deps='''
1304 popt_samba3
1305 smbconf
1306 SMBREADLINE
1307 ''',
1308 for_selftest=True)
1310 bld.SAMBA3_BINARY('versiontest',
1311 source='lib/version_test.c',
1312 deps='''
1313 SAMBA_VERSION
1314 smbconf
1315 ''',
1316 install=False)
1318 bld.SAMBA3_BINARY('timelimit',
1319 source='script/tests/timelimit.c',
1320 for_selftest=True)
1322 bld.SAMBA3_BINARY('rpc_open_tcp',
1323 source='torture/rpc_open_tcp.c',
1324 deps='''
1325 talloc
1326 msrpc3
1327 ''',
1328 for_selftest=True)
1330 bld.SAMBA3_BINARY('vlp',
1331 source='printing/tests/vlp.c',
1332 deps='''
1333 talloc
1334 smbconf
1335 ''',
1336 for_selftest=True)
1339 pyrpc_util = bld.pyembed_libname('pyrpc_util')
1340 pytalloc_util = bld.pyembed_libname('pytalloc-util')
1341 bld.SAMBA3_PYTHON('pysmbd',
1342 source='smbd/pysmbd.c',
1343 deps=' '.join(['smbd_base', pyrpc_util, pytalloc_util]),
1344 realname='samba/samba3/smbd.so'
1347 pycredentials = 'pycredentials'
1348 bld.SAMBA3_PYTHON('pylibsmb',
1349 source='libsmb/pylibsmb.c',
1350 deps='smbclient samba-credentials %s' % pycredentials,
1351 realname='samba/samba3/libsmb_samba_internal.so'
1354 bld.SAMBA3_PYTHON('pymdscli',
1355 source='rpc_client/py_mdscli.c',
1356 deps=' '.join(['RPCCLI_MDSSVC', pytalloc_util, pyrpc_util]),
1357 realname='samba/samba3/mdscli.so')
1359 bld.SAMBA3_BINARY('spotlight2sparql',
1360 source='''
1361 rpc_server/mdssvc/sparql_parser_test.c
1362 rpc_server/mdssvc/sparql_parser.y
1363 rpc_server/mdssvc/sparql_lexer.l
1364 rpc_server/mdssvc/sparql_mapping.c''',
1365 deps='samba3-util talloc ' + bld.env['libtracker'],
1366 enabled=bld.env.spotlight_backend_tracker,
1367 install=False)
1369 bld.SAMBA3_BINARY('spotlight2es',
1370 source='''
1371 rpc_server/mdssvc/es_parser_test.c
1372 rpc_server/mdssvc/es_parser.y
1373 rpc_server/mdssvc/es_lexer.l
1374 rpc_server/mdssvc/es_mapping.c''',
1375 deps='samba3-util talloc jansson smbconf',
1376 enabled=bld.env.spotlight_backend_es,
1377 install=False)
1379 bld.SAMBA3_BINARY('tevent_glib_glue_test',
1380 source='lib/tevent_glib_glue_tests.c',
1381 deps='''
1382 talloc
1383 libsmb
1384 popt_samba3
1385 tevent-glib-glue''',
1386 enabled=bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1387 for_selftest=True)
1389 bld.SAMBA3_BINARY('tevent_glib_tracker',
1390 source='utils/async-tracker.c',
1391 deps='''
1392 talloc
1393 libsmb
1394 popt_samba3
1395 tevent-glib-glue ''' + bld.env['libtracker'],
1396 enabled=bld.CONFIG_SET('HAVE_TRACKER') and bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1397 install=False)
1399 ########################## INCLUDES #################################
1401 bld.RECURSE('auth')
1402 bld.RECURSE('libgpo/gpext')
1403 bld.RECURSE('librpc')
1404 bld.RECURSE('librpc/idl')
1405 bld.RECURSE('libsmb')
1406 bld.RECURSE('modules')
1407 bld.RECURSE('param')
1408 bld.RECURSE('passdb')
1409 bld.RECURSE('rpc_server')
1410 bld.RECURSE('script')
1411 bld.RECURSE('winbindd')
1412 bld.RECURSE('../examples/auth')
1413 bld.RECURSE('../examples/libsmbclient')
1414 bld.RECURSE('../examples/pdb')
1415 bld.RECURSE('../examples/VFS')
1416 bld.RECURSE('../examples/fuse')
1417 bld.RECURSE('../examples/winexe')
1418 bld.RECURSE('lib/netapi/tests')
1419 bld.RECURSE('lib/netapi/examples')
1420 bld.RECURSE('smbd/notifyd')
1421 bld.RECURSE('rpcclient')
1422 bld.RECURSE('utils')
1423 bld.RECURSE('nmbd')
1424 bld.RECURSE('lib/util')
1426 bld.ENFORCE_GROUP_ORDERING()
1427 bld.CHECK_PROJECT_RULES()