vfs_default: remove assert from vfswrap_mkdirat()
[Samba.git] / source3 / wscript_build
blob476aa9072bbcf76e48ae684d715627f793dbcbc1
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 cli_smb_common',
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_util',
364 source='''lib/messages_util.c''',
365 deps='samba-util',
366 private_library=True)
368 bld.SAMBA3_SUBSYSTEM('samba3core',
369 source='''
370 lib/messages.c
371 lib/util_cluster.c
372 lib/id_cache.c
373 lib/serverid.c
374 lib/server_id_watch.c
375 lib/server_id_db_util.c
376 lib/addrchange.c
377 ../lib/util/debug_s3.c
378 lib/dumpcore.c
379 lib/interface.c
380 lib/username.c
381 lib/smbrun.c
382 lib/wins_srv.c
383 lib/substitute.c
384 lib/substitute_generic.c
385 lib/ms_fnmatch.c
386 lib/tallocmsg.c
387 lib/dmallocmsg.c
388 lib/gencache.c
389 lib/util_event.c
390 lib/global_contexts.c
391 lib/server_prefork.c
392 lib/server_prefork_util.c
393 lib/ldap_escape.c
394 lib/system_smbd.c
395 lib/audit.c
396 lib/idmap_cache.c
397 lib/namemap_cache.c
398 lib/util_ea.c
399 lib/background.c
400 ''',
401 deps='''
402 samba3util
403 LIBTSOCKET
404 NDR_MESSAGING
405 LIBASYNC_REQ
406 UTIL_PW
407 SAMBA_VERSION
408 PTHREADPOOL
409 interfaces
410 smbconf
411 dbwrap
412 samba3-util
413 errors3
414 server_id_db
415 messages_util
416 messages_dgm
417 talloc_report_printf
418 access
419 TDB_LIB
421 ''')
423 bld.SAMBA3_LIBRARY('smbd_shim',
424 source='''lib/smbd_shim.c''',
425 deps='talloc',
426 private_library=True)
428 bld.SAMBA3_SUBSYSTEM('auth_generic',
429 source='libsmb/auth_generic.c',
430 deps='gse gensec')
432 bld.SAMBA3_LIBRARY('libsmb',
433 source='''
434 libsmb/clientgen.c
435 libsmb/cliconnect.c
436 libsmb/clifile.c
437 libsmb/clispnego.c
438 libsmb/clirap.c
439 libsmb/clierror.c
440 libsmb/climessage.c
441 libsmb/clireadwrite.c
442 libsmb/clilist.c
443 libsmb/cliprint.c
444 libsmb/clitrans.c
445 libsmb/clisecdesc.c
446 libsmb/clistr.c
447 libsmb/cliquota.c
448 libsmb/clifsinfo.c
449 libsmb/clidfs.c
450 libsmb/clioplock.c
451 libsmb/async_smb.c
452 libsmb/reparse_symlink.c
453 libsmb/clisymlink.c
454 libsmb/smbsock_connect.c
455 libsmb/cli_smb2_fnum.c
456 ''',
457 deps='''
458 auth_generic
459 CLDAP
460 LIBNMB
461 SPNEGO_PARSE
462 LIBTSOCKET
463 KRBCLIENT
464 NDR_IOCTL
465 NDR_QUOTA
466 cli_smb_common
467 util_cmdline
468 tevent
469 ''',
470 private_library=True)
472 bld.SAMBA3_SUBSYSTEM('CLDAP',
473 source='libads/cldap.c',
474 deps='cli-ldap-common cli_cldap LIBTSOCKET')
476 # NOTE: The secrets3 library is a low level library used by several subsystems.
477 # PLEASE DO NOT make it depend on high level libraries like PDB, if you are
478 # doing that your design is wrong and needs changing. -SSS
479 bld.SAMBA3_LIBRARY('secrets3',
480 source='''
481 passdb/secrets.c
482 passdb/machine_account_secrets.c
483 passdb/machine_sid.c
484 passdb/secrets_lsa.c
485 ''',
486 deps='''
487 NDR_SECRETS
488 smbconf
489 samba3util
490 dbwrap
491 krb5samba
492 LIBCLI_AUTH
493 ''',
494 private_library=True)
496 bld.SAMBA3_LIBRARY('smbldap',
497 source='lib/smbldap.c',
498 deps='ldap lber samba-util smbconf',
499 enabled=bld.CONFIG_SET("HAVE_LDAP"),
500 private_library=False,
501 abi_directory='lib/ABI',
502 abi_match='smbldap_*',
503 pc_files=[],
504 vnum='2.1.0',
505 public_headers='include/smbldap.h include/smb_ldap.h')
507 bld.SAMBA3_LIBRARY('ads',
508 source='''
509 libads/ldap.c
510 libads/sasl.c
511 libads/sasl_wrapping.c
512 libads/krb5_setpw.c
513 libads/kerberos_util.c
514 libads/ldap_user.c
515 libads/ads_struct.c
516 libads/kerberos_keytab.c
517 libads/disp_sec.c
518 libads/ldap_utils.c
519 libads/ldap_schema.c
520 libads/util.c
521 libads/ndr.c
522 libads/net_ads_setspn.c
523 ''',
524 deps='''
525 cli-ldap-common
526 krb5samba
527 ldap
528 lber
529 KRBCLIENT
530 smbconf
531 LIBNMB
532 libsmb
533 DCUTIL
534 smbldap
535 trusts_util
536 ''',
537 private_library=True)
539 bld.SAMBA3_SUBSYSTEM('LIBADS_SERVER',
540 source='libads/authdata.c',
541 deps='SERVER_MUTEX ndr-krb5pac krb5samba gssapi')
543 bld.SAMBA3_SUBSYSTEM('LIBADS_PRINTER',
544 source='libads/ldap_printer.c',
545 deps='samba-util krb5samba')
547 # Only smbconf should link against this subsystem, else we will create
548 # a circular dependency.
549 bld.SAMBA3_SUBSYSTEM('SMBCONF_PARAM',
550 source='''
551 param/loadparm.c
552 lib/sharesec.c
553 lib/ldap_debug_handler.c
554 lib/util_names.c
555 ''',
556 deps='''
557 samba-util
558 PARAM_UTIL
559 ldap
560 lber
561 LOADPARM_CTX
562 samba3core
563 param_local.h
564 param_global.h
565 cups
566 ''')
568 bld.SAMBA3_LIBRARY('smbconf',
569 source='''
570 lib/smbconf/smbconf_init.c
571 lib/smbconf/smbconf_reg.c
572 ''',
573 deps='''
574 LIBSMBCONF
575 REG_SMBCONF
576 SAMBA_VERSION
578 charset
579 samba-hostconfig
580 errors3
581 SMBCONF_PARAM
582 samba-util
583 talloc
584 util_reg
585 ''',
586 public_headers='../lib/smbconf/smbconf.h',
587 pc_files=[],
588 vnum='0')
590 bld.SAMBA3_SUBSYSTEM('sysquotas',
591 source='''
592 lib/sysquotas.c
593 lib/sysquotas_linux.c
594 lib/sysquotas_xfs.c
595 lib/sysquotas_4A.c
596 lib/sysquotas_4B.c
597 lib/sysquotas_jfs2.c
598 lib/sysquotas_nfs.c
599 ''',
600 allow_warnings=True,
601 deps='samba3-util samba-util tirpc')
603 NOTIFY_SOURCES=''
604 NOTIFY_DEPS=''
606 if bld.CONFIG_SET("HAVE_INOTIFY"):
607 NOTIFY_SOURCES += ' smbd/notify_inotify.c'
609 if bld.CONFIG_SET('SAMBA_FAM_LIBS'):
610 NOTIFY_SOURCES += ' smbd/notify_fam.c'
611 NOTIFY_DEPS += ' ' + bld.CONFIG_GET('SAMBA_FAM_LIBS')
613 bld.SAMBA3_LIBRARY('smbd_base',
614 source='''
615 smbd/server_reload.c
616 smbd/files.c
617 smbd/connection.c
618 smbd/utmp.c
619 smbd/session.c
620 smbd/dfree.c
621 smbd/dir.c
622 smbd/password.c
623 smbd/conn_msg.c
624 smbd/conn_idle.c
625 smbd/share_access.c
626 smbd/fileio.c
627 smbd/ipc.c
628 smbd/lanman.c
629 smbd/negprot.c
630 smbd/message.c
631 smbd/nttrans.c
632 smbd/pipes.c
633 smbd/reply.c
634 smbd/sesssetup.c
635 smbd/trans2.c
636 smbd/uid.c
637 smbd/dosmode.c
638 smbd/filename.c
639 smbd/open.c
640 smbd/close.c
641 smbd/blocking.c
642 smbd/sec_ctx.c
643 smbd/srvstr.c
644 smbd/vfs.c
645 smbd/perfcount.c
646 smbd/statcache.c
647 smbd/seal.c
648 smbd/posix_acls.c
649 lib/sysacls.c
650 smbd/process.c
651 smbd/service.c
652 smbd/error.c
653 printing/printspoolss.c
654 lib/sessionid_tdb.c
655 lib/cleanupdb.c
656 smbd/fake_file.c
657 smbd/quotas.c
658 smbd/ntquotas.c
659 smbd/msdfs.c
660 smbd/aio.c smbd/statvfs.c
661 smbd/dmapi.c
662 smbd/signing.c
663 smbd/file_access.c
664 smbd/dnsregister.c smbd/globals.c
665 smbd/smb2_server.c
666 smbd/smb2_glue.c
667 smbd/smb2_negprot.c
668 smbd/smb2_sesssetup.c
669 smbd/smb2_tcon.c
670 smbd/smb2_create.c
671 smbd/smb2_close.c
672 smbd/smb2_flush.c
673 smbd/smb2_read.c
674 smbd/smb2_write.c
675 smbd/smb2_lock.c
676 smbd/smb2_ioctl.c
677 smbd/smb2_ioctl_dfs.c
678 smbd/smb2_ioctl_filesys.c
679 smbd/smb2_ioctl_named_pipe.c
680 smbd/smb2_ioctl_network_fs.c
681 smbd/smb2_keepalive.c
682 smbd/smb2_query_directory.c
683 smbd/smb2_notify.c
684 smbd/smb2_getinfo.c
685 smbd/smb2_setinfo.c
686 smbd/smb2_break.c
687 smbd/smbXsrv_version.c
688 smbd/smbXsrv_client.c
689 smbd/smbXsrv_session.c
690 smbd/smbXsrv_tcon.c
691 smbd/smbXsrv_open.c
692 smbd/server_exit.c
693 smbd/durable.c
694 smbd/scavenger.c
695 smbd/mangle.c
696 smbd/mangle_hash.c
697 smbd/mangle_hash2.c
698 smbd/oplock.c
699 smbd/oplock_linux.c
700 smbd/notify.c
701 smbd/notify_msg.c
702 smbd/build_options.c
703 smbd/smb1_utils.c
704 smbd/conn.c
705 ''' + NOTIFY_SOURCES,
706 deps='''
707 talloc
708 tevent
710 libsmb
711 msrpc3
713 vfs_default
714 vfs_posixacl
715 inotify
716 samba3core
717 param_service
718 AVAHI
719 PRINTBASE
720 PROFILE
721 LOCKING
722 LIBADS_SERVER
723 LIBAFS
724 RPC_SERVICE
725 NDR_SMBXSRV
726 LEASES_DB
727 LEASES_UTIL
728 sysquotas
729 NDR_SMB_ACL
730 netapi
731 NDR_IOCTL
732 notifyd
733 vfs_acl_common
734 NDR_QUOTA
735 GNUTLS_HELPERS
736 fd_handle
737 ''' +
738 bld.env['dmapi_lib'] +
739 bld.env['legacy_quota_libs'] +
740 NOTIFY_DEPS,
741 private_library=True)
743 bld.SAMBA3_SUBSYSTEM('LOCKING',
744 source='''
745 locking/locking.c
746 locking/brlock.c
747 locking/posix.c
748 locking/share_mode_lock.c
749 ''',
750 deps='''
752 talloc
753 LEASES_DB
754 LEASES_UTIL
755 NDR_OPEN_FILES
756 FNAME_UTIL
757 fd_handle
758 ''')
760 bld.SAMBA3_SUBSYSTEM('LEASES_DB',
761 source='locking/leases_db.c',
762 deps='NDR_LEASES_DB')
764 bld.SAMBA3_SUBSYSTEM('LEASES_UTIL',
765 source='locking/leases_util.c',
766 deps='NDR_OPEN_FILES')
768 if bld.CONFIG_GET("WITH_PROFILE"):
769 bld.SAMBA3_SUBSYSTEM('PROFILE',
770 source='profile/profile.c',
771 deps='''
772 samba-util
773 gnutls
774 ''')
775 else:
776 bld.SAMBA3_SUBSYSTEM('PROFILE',
777 source='profile/profile_dummy.c',
778 deps='')
780 bld.SAMBA3_SUBSYSTEM('PRINTBASE',
781 source='''
782 printing/notify.c
783 printing/printing_db.c
784 ''',
785 deps='''
786 samba-util
788 ''')
790 bld.SAMBA3_SUBSYSTEM('PRINTBACKEND',
791 source='''
792 printing/printing.c
793 printing/nt_printing.c
794 printing/nt_printing_tdb.c
795 printing/nt_printing_migrate_internal.c
796 printing/nt_printing_ads.c
797 printing/queue_process.c
798 ''',
799 deps='''
800 PRINTBASE
801 LIBADS_PRINTER
803 printing_migrate
804 SPOOLSSD
805 ''')
807 bld.SAMBA3_LIBRARY('printing_migrate',
808 source='''
809 printing/nt_printing_migrate.c
810 rpc_client/cli_winreg_spoolss.c
811 printing/nt_printing_os2.c
812 ''',
813 deps='''
814 NDR_NTPRINTING
815 cli_spoolss
816 RPC_NDR_WINREG
817 LIBCLI_WINREG
818 smbconf
819 ''',
820 private_library=True)
822 bld.SAMBA3_SUBSYSTEM('PRINTING',
823 source='''
824 printing/pcap.c
825 printing/print_svid.c
826 printing/print_aix.c
827 printing/print_cups.c
828 printing/print_generic.c
829 printing/lpq_parse.c
830 printing/load.c
831 printing/print_standard.c
832 printing/print_iprint.c
833 printing/printer_list.c
834 ''',
835 deps='''
836 NDR_PRINTCAP
838 cups
839 ''')
841 bld.SAMBA3_SUBSYSTEM('FNAME_UTIL',
842 source='lib/filename_util.c',
843 deps='samba-util')
845 bld.SAMBA3_SUBSYSTEM('LIBNET',
846 source='libnet/libnet_join.c',
847 deps='NDR_LIBNET_JOIN INIT_SAMR net_keytab pdb')
849 bld.SAMBA3_LIBRARY('net_keytab',
850 source='libnet/libnet_keytab.c',
851 deps='krb5samba ads',
852 private_library=True)
855 bld.SAMBA3_SUBSYSTEM('LIBNET_DSSYNC',
856 source='''
857 libnet/libnet_dssync.c
858 libnet/libnet_dssync_passdb.c
859 libnet/libnet_dssync_keytab.c
860 ''',
861 deps='''
862 LIBNET
863 RPC_NDR_DRSUAPI
864 ''')
866 bld.SAMBA3_SUBSYSTEM('LIBEVENTLOG',
867 source='lib/eventlog/eventlog.c',
868 deps='NDR_EVENTLOG tdb')
870 bld.SAMBA3_SUBSYSTEM('LIBNMB',
871 source='''
872 libsmb/unexpected.c
873 libsmb/namecache.c
874 libsmb/nmblib.c
875 libsmb/clidgram.c
876 libsmb/namequery.c
877 libsmb/conncache.c
878 libads/sitename_cache.c
879 ''',
880 deps='''
881 LIBTSOCKET
882 LIBCLI_NETLOGON
883 samba3util
884 addns
885 lmhosts
886 resolv
887 ''')
889 bld.SAMBA3_SUBSYSTEM('SERVICES',
890 source='''
891 services/svc_spoolss.c
892 services/svc_rcinit.c
893 services/svc_winreg_glue.c
894 services/svc_netlogon.c
895 services/svc_winreg.c
896 services/svc_wins.c
897 ''',
898 deps='samba-util')
900 bld.SAMBA3_SUBSYSTEM('PLAINTEXT_AUTH',
901 source='''
902 auth/pampass.c
903 auth/pass_check.c
904 ''',
905 deps='''
906 crypt
908 PAM_ERRORS
909 ''')
911 bld.SAMBA3_SUBSYSTEM('PASSCHANGE',
912 source='libsmb/passchange.c',
913 deps='''
914 LIBCLI_SAMR
915 INIT_LSA
916 msrpc3
917 krb5samba
918 ''')
920 bld.SAMBA3_SUBSYSTEM('SAMBA_VERSION',
921 source='lib/version.c',
922 deps='samba-util')
924 bld.SAMBA3_SUBSYSTEM('SLCACHE',
925 source='libsmb/samlogon_cache.c',
926 deps='''
927 samba-util
929 ''')
931 bld.SAMBA3_SUBSYSTEM('dsgetdcname',
932 source='''
933 libsmb/dsgetdcname.c
934 ''',
935 deps='''
936 CLDAP
937 LIBNMB
938 ''')
940 bld.SAMBA3_SUBSYSTEM('DCUTIL',
941 source='''
942 libsmb/namequery_dc.c
943 ''',
944 deps='''
946 dsgetdcname
947 msrpc3
948 libcli_lsa3
949 ''')
951 bld.SAMBA3_LIBRARY('trusts_util',
952 source='libsmb/trusts_util.c',
953 deps='''
954 libcli_netlogon3
955 msrpc3
956 samba-passdb
957 ''',
958 private_library=True)
960 bld.SAMBA3_SUBSYSTEM('tdb-wrap3',
961 source='lib/util_tdb.c',
962 deps='talloc samba3-util')
964 bld.SAMBA3_LIBRARY('samba3-util',
965 source='''
966 lib/util_sec.c
967 lib/util_str.c
968 lib/adt_tree.c
969 lib/util_malloc.c
970 lib/namearray.c
971 lib/file_id.c
972 lib/cbuf.c
973 lib/per_thread_cwd.c
974 ''',
975 deps='''
976 samba-util
977 charset
978 ''',
979 private_library=True)
981 bld.SAMBA_LIBRARY('xattr_tdb',
982 source='lib/xattr_tdb.c',
983 deps='NDR_XATTR dbwrap samba3-util',
984 private_library=True)
986 bld.SAMBA3_LIBRARY('CHARSET3',
987 source='''
988 lib/charcnv.c
989 lib/fstring.c
990 ''',
991 public_deps='''
992 ICONV_WRAPPER
993 charset
994 ''',
995 deps='''
996 samba-util
997 samba3-util
998 ''',
999 private_library=True)
1001 bld.SAMBA3_SUBSYSTEM('errors3',
1002 source='''
1003 libsmb/errormap.c
1004 libsmb/smberr.c
1005 lib/errmap_unix.c
1006 ''',
1007 deps='samba-errors')
1009 bld.SAMBA3_SUBSYSTEM('LIBCLI_SAMR',
1010 source='rpc_client/cli_samr.c',
1011 deps='RPC_NDR_SAMR INIT_SAMR')
1013 bld.SAMBA3_LIBRARY('libcli_lsa3',
1014 source='rpc_client/cli_lsarpc.c',
1015 deps='RPC_NDR_LSA INIT_LSA',
1016 private_library=True)
1018 bld.SAMBA3_LIBRARY('libcli_netlogon3',
1019 source='''
1020 rpc_client/cli_netlogon.c
1021 rpc_client/util_netlogon.c
1022 ''',
1023 deps='''
1024 msrpc3
1025 RPC_NDR_NETLOGON
1026 cliauth
1027 smbconf
1028 NETLOGON_CREDS_CLI''',
1029 private_library=True)
1031 bld.SAMBA3_LIBRARY('cli_spoolss',
1032 source='''
1033 rpc_client/cli_spoolss.c
1034 rpc_client/init_spoolss.c
1035 ''',
1036 deps='''
1037 RPC_NDR_SPOOLSS
1038 smbconf
1039 secrets3''',
1040 private_library=True)
1042 bld.SAMBA3_SUBSYSTEM('LIBCLI_WINREG',
1043 source='rpc_client/cli_winreg.c',
1044 deps='RPC_NDR_WINREG')
1046 bld.SAMBA3_SUBSYSTEM('LIBCLI_WINREG_INTERNAL',
1047 source='rpc_client/cli_winreg_int.c',
1048 deps='LIBCLI_WINREG RPC_SERVER')
1050 bld.SAMBA3_SUBSYSTEM('RPC_CLIENT_SCHANNEL',
1051 source='rpc_client/cli_pipe_schannel.c',
1052 deps='samba-util krb5samba')
1054 bld.SAMBA3_SUBSYSTEM('RPCCLI_MDSSVC',
1055 source='''
1056 rpc_client/cli_mdssvc.c
1057 rpc_client/cli_mdssvc_util.c
1058 ''',
1059 deps='mdssvc RPC_NDR_MDSSVC')
1061 bld.SAMBA3_SUBSYSTEM('INIT_LSA',
1062 source='rpc_client/init_lsa.c',
1063 deps='samba-util')
1065 bld.SAMBA3_SUBSYSTEM('INIT_SAMR',
1066 source='rpc_client/init_samr.c',
1067 deps='samba-util GNUTLS_HELPERS')
1069 bld.SAMBA3_SUBSYSTEM('LIBLSA',
1070 source='lib/lsa.c')
1072 bld.SAMBA3_SUBSYSTEM('SPOOLSSD',
1073 source='printing/spoolssd.c',
1074 deps='''
1075 samba-util
1076 RPC_SOCK_HELPER
1077 ''')
1079 bld.SAMBA3_SUBSYSTEM('tevent-glib-glue',
1080 source='lib/tevent_glib_glue.c',
1081 deps='glib-2.0',
1082 enabled=bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1085 bld.SAMBA3_SUBSYSTEM('ADOUBLE',
1086 source='lib/adouble.c',
1087 deps='STRING_REPLACE')
1089 bld.SAMBA3_SUBSYSTEM('STRING_REPLACE',
1090 source='lib/string_replace.c')
1092 bld.SAMBA3_SUBSYSTEM('fd_handle',
1093 source='smbd/fd_handle.c')
1095 ########################## BINARIES #################################
1097 bld.SAMBA3_BINARY('smbd/smbd',
1098 source='smbd/server.c smbd/smbd_cleanupd.c',
1099 deps='''
1100 popt_samba3
1101 smbd_base
1102 EPMD
1103 LSASD
1104 FSSD
1105 MDSSD
1106 SPOOLSSD
1107 ''',
1108 install_path='${SBINDIR}')
1111 bld.SAMBA3_SUBSYSTEM('TDB_VALIDATE',
1112 source='lib/tdb_validate.c',
1113 deps='samba-util')
1116 bld.SAMBA3_BINARY('client/smbclient',
1117 source='''
1118 client/client.c
1119 client/clitar.c
1120 client/dnsbrowse.c
1121 ''',
1122 deps='''
1123 talloc
1124 popt_samba3_cmdline
1125 smbconf
1126 ndr-standard
1127 SMBREADLINE
1128 libsmb
1129 msrpc3
1130 RPC_NDR_SRVSVC
1131 cli_smb_common
1132 archive
1133 ''')
1135 bld.SAMBA3_BINARY('smbspool',
1136 source='client/smbspool.c',
1137 deps='''
1138 talloc
1139 popt_samba3
1140 smbconf
1141 libsmb
1142 samba3core
1143 ''')
1145 bld.SAMBA3_BINARY('smbspool_krb5_wrapper',
1146 source='client/smbspool_krb5_wrapper.c',
1147 deps='''
1148 DYNCONFIG
1149 cups
1150 krb5samba
1151 ''',
1152 install_path='${LIBEXECDIR}/samba',
1153 enabled=bld.CONFIG_SET('HAVE_CUPS'))
1155 bld.SAMBA3_BINARY('smbspool_argv_wrapper',
1156 source='script/tests/smbspool_argv_wrapper.c',
1157 for_selftest=True)
1159 bld.SAMBA3_BINARY('locktest2',
1160 source='torture/locktest2.c',
1161 deps='''
1162 talloc
1163 smbconf
1164 libsmb
1165 LOCKING
1166 ''',
1167 for_selftest=True)
1169 TORTURE3_ADDITIONAL_SOURCE=""
1171 if bld.env.with_ctdb:
1172 TORTURE3_ADDITIONAL_SOURCE += ' torture/test_ctdbd_conn.c'
1174 bld.SAMBA3_BINARY('smbtorture' + bld.env.suffix3,
1175 source='''
1176 torture/torture.c
1177 torture/nbio.c
1178 torture/scanner.c
1179 torture/utable.c
1180 torture/denytest.c
1181 torture/mangle_test.c
1182 torture/nbench.c
1183 torture/test_async_echo.c
1184 torture/test_addrchange.c
1185 torture/test_posix_append.c
1186 torture/test_posix.c
1187 torture/test_nttrans_create.c
1188 torture/test_nttrans_fsctl.c
1189 torture/test_case_insensitive.c
1190 torture/test_notify_online.c
1191 torture/test_chain3.c
1192 torture/test_smb2.c
1193 torture/test_authinfo_structs.c
1194 torture/test_smbsock_any_connect.c
1195 torture/test_cleanup.c
1196 torture/test_notify.c
1197 lib/tevent_barrier.c
1198 torture/test_dbwrap_watch.c
1199 torture/test_dbwrap_do_locked.c
1200 torture/test_idmap_tdb_common.c
1201 torture/test_dbwrap_ctdb.c
1202 torture/test_buffersize.c
1203 torture/test_messaging_read.c
1204 torture/test_messaging_fd_passing.c
1205 torture/test_messaging_send_all.c
1206 torture/test_oplock_cancel.c
1207 torture/test_pthreadpool_tevent.c
1208 torture/bench_pthreadpool.c
1209 torture/wbc_async.c
1210 torture/test_g_lock.c
1211 torture/test_namemap_cache.c
1212 torture/test_idmap_cache.c
1213 torture/test_hidenewfiles.c
1214 torture/test_readdir_timestamp.c
1215 ''' + TORTURE3_ADDITIONAL_SOURCE,
1216 deps='''
1217 talloc
1218 smbconf
1219 libsmb
1220 msrpc3
1221 TLDAP
1222 RPC_NDR_ECHO
1223 WB_REQTRANS
1224 LOCKING
1225 NDR_OPEN_FILES
1226 idmap
1227 IDMAP_TDB_COMMON
1228 samba-cluster-support
1229 ''',
1230 cflags='-DWINBINDD_SOCKET_DIR=\"%s\"' % bld.env.WINBINDD_SOCKET_DIR,
1231 for_selftest=True)
1233 bld.SAMBA3_BINARY('smbconftort',
1234 source='lib/smbconf/testsuite.c',
1235 deps='''
1236 talloc
1237 smbconf
1238 popt_samba3
1239 ''',
1240 for_selftest=True)
1242 bld.SAMBA3_BINARY('msgtest',
1243 source='torture/msgtest.c',
1244 deps='''
1245 talloc
1246 smbconf
1247 ''',
1248 install=False)
1250 bld.SAMBA3_BINARY('msg_sink',
1251 source='torture/msg_sink.c',
1252 deps='''
1253 talloc
1254 smbconf
1255 ''',
1256 install=False)
1258 bld.SAMBA3_BINARY('msg_source',
1259 source='torture/msg_source.c',
1260 deps='''
1261 talloc
1262 smbconf
1263 ''',
1264 install=False)
1266 bld.SAMBA3_BINARY('test_mdsparser_es',
1267 source='''
1268 rpc_server/mdssvc/test_mdsparser_es.c
1269 rpc_server/mdssvc/es_parser.y
1270 rpc_server/mdssvc/es_lexer.l
1271 rpc_server/mdssvc/es_mapping.c
1272 ''',
1273 deps='''
1274 samba3-util
1275 talloc
1276 smbconf
1277 jansson
1278 cmocka
1279 popt_samba3_cmdline
1280 ''',
1281 enabled=bld.env.spotlight_backend_es,
1282 for_selftest=True)
1284 bld.SAMBA3_BINARY('pdbtest',
1285 source='torture/pdbtest.c',
1286 deps='''
1287 talloc
1289 popt_samba3
1290 AUTH_COMMON
1291 auth
1292 ''',
1293 for_selftest=True)
1295 bld.SAMBA3_BINARY('vfstest',
1296 source='''
1297 torture/cmd_vfs.c
1298 torture/vfstest.c
1299 torture/vfstest_chain.c
1300 ''',
1301 deps='''
1303 popt_samba3
1304 smbconf
1305 SMBREADLINE
1306 ''',
1307 for_selftest=True)
1309 bld.SAMBA3_BINARY('versiontest',
1310 source='lib/version_test.c',
1311 deps='''
1312 SAMBA_VERSION
1313 smbconf
1314 ''',
1315 install=False)
1317 bld.SAMBA3_BINARY('timelimit',
1318 source='script/tests/timelimit.c',
1319 for_selftest=True)
1321 bld.SAMBA3_BINARY('rpc_open_tcp',
1322 source='torture/rpc_open_tcp.c',
1323 deps='''
1324 talloc
1325 msrpc3
1326 ''',
1327 for_selftest=True)
1329 bld.SAMBA3_BINARY('vlp',
1330 source='printing/tests/vlp.c',
1331 deps='''
1332 talloc
1333 smbconf
1334 ''',
1335 for_selftest=True)
1338 pyrpc_util = bld.pyembed_libname('pyrpc_util')
1339 pytalloc_util = bld.pyembed_libname('pytalloc-util')
1340 bld.SAMBA3_PYTHON('pysmbd',
1341 source='smbd/pysmbd.c',
1342 deps=' '.join(['smbd_base', pyrpc_util, pytalloc_util]),
1343 realname='samba/samba3/smbd.so'
1346 pycredentials = 'pycredentials'
1347 bld.SAMBA3_PYTHON('pylibsmb',
1348 source='libsmb/pylibsmb.c',
1349 deps='smbclient samba-credentials %s' % pycredentials,
1350 realname='samba/samba3/libsmb_samba_cwrapper.so'
1353 bld.SAMBA3_PYTHON('pymdscli',
1354 source='rpc_client/py_mdscli.c',
1355 deps=' '.join(['RPCCLI_MDSSVC', pytalloc_util, pyrpc_util]),
1356 realname='samba/samba3/mdscli.so')
1358 bld.SAMBA3_BINARY('spotlight2sparql',
1359 source='''
1360 rpc_server/mdssvc/sparql_parser_test.c
1361 rpc_server/mdssvc/sparql_parser.y
1362 rpc_server/mdssvc/sparql_lexer.l
1363 rpc_server/mdssvc/sparql_mapping.c''',
1364 deps='samba3-util talloc ' + bld.env['libtracker'],
1365 enabled=bld.env.spotlight_backend_tracker,
1366 install=False)
1368 bld.SAMBA3_BINARY('spotlight2es',
1369 source='''
1370 rpc_server/mdssvc/es_parser_test.c
1371 rpc_server/mdssvc/es_parser.y
1372 rpc_server/mdssvc/es_lexer.l
1373 rpc_server/mdssvc/es_mapping.c''',
1374 deps='samba3-util talloc jansson smbconf',
1375 enabled=bld.env.spotlight_backend_es,
1376 install=False)
1378 bld.SAMBA3_BINARY('tevent_glib_glue_test',
1379 source='lib/tevent_glib_glue_tests.c',
1380 deps='''
1381 talloc
1382 libsmb
1383 popt_samba3
1384 tevent-glib-glue''',
1385 enabled=bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1386 for_selftest=True)
1388 bld.SAMBA3_BINARY('tevent_glib_tracker',
1389 source='utils/async-tracker.c',
1390 deps='''
1391 talloc
1392 libsmb
1393 popt_samba3
1394 tevent-glib-glue ''' + bld.env['libtracker'],
1395 enabled=bld.CONFIG_SET('HAVE_TRACKER') and bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1396 install=False)
1398 ########################## INCLUDES #################################
1400 bld.RECURSE('auth')
1401 bld.RECURSE('libgpo/gpext')
1402 bld.RECURSE('librpc')
1403 bld.RECURSE('librpc/idl')
1404 bld.RECURSE('libsmb')
1405 bld.RECURSE('modules')
1406 bld.RECURSE('param')
1407 bld.RECURSE('passdb')
1408 bld.RECURSE('rpc_server')
1409 bld.RECURSE('script')
1410 bld.RECURSE('winbindd')
1411 bld.RECURSE('../examples/auth')
1412 bld.RECURSE('../examples/libsmbclient')
1413 bld.RECURSE('../examples/pdb')
1414 bld.RECURSE('../examples/VFS')
1415 bld.RECURSE('../examples/fuse')
1416 bld.RECURSE('../examples/winexe')
1417 bld.RECURSE('lib/netapi/tests')
1418 bld.RECURSE('lib/netapi/examples')
1419 bld.RECURSE('smbd/notifyd')
1420 bld.RECURSE('rpcclient')
1421 bld.RECURSE('utils')
1422 bld.RECURSE('nmbd')
1423 bld.RECURSE('lib/util')
1425 bld.ENFORCE_GROUP_ORDERING()
1426 bld.CHECK_PROJECT_RULES()