VERSION: Bump version up to 4.15.0rc2...
[Samba.git] / source3 / wscript_build
blob55851c7b3a6c283bde77e0a49db146af2447c380
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 deps='CREDENTIALS_CMDLINE',
31 public_deps='''
32 talloc
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='1.0.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('cmdline_contexts',
271 source='lib/cmdline_contexts.c',
272 deps='samba3core',
273 private_library=True)
275 bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
276 source='libads/kerberos.c libads/ads_status.c',
277 public_deps='krb5samba asn1util k5crypto gssapi LIBTSOCKET CLDAP LIBNMB')
279 bld.SAMBA3_SUBSYSTEM('samba3util',
280 source='''
281 lib/system.c
282 lib/sendfile.c
283 lib/recvfile.c
284 lib/time.c
285 lib/util_sid.c
286 lib/util_specialsids.c
287 lib/util_file.c
288 lib/util.c
289 lib/util_path.c
290 lib/util_matching.c
291 lib/util_procid.c
292 lib/util_sock.c
293 lib/util_tsock.c
294 lib/util_transfer_file.c
295 lib/util_macstreams.c
296 ''',
297 deps='''
298 CHARSET3
300 LIBTSOCKET
301 samba-security
302 NDR_SECURITY
303 samba-util
304 util_tdb
305 sys_rw
306 iov_buf
307 ''')
309 if bld.env.with_ctdb:
310 SAMBA_CLUSTER_SUPPORT_SOURCES='''
311 lib/cluster_support.c
312 lib/dbwrap/dbwrap_ctdb.c
313 lib/messages_ctdb.c
314 lib/messages_ctdb_ref.c
315 lib/ctdbd_conn.c
317 SAMBA_CLUSTER_SUPPORT_DEPS='''
318 talloc
319 tevent
322 else:
323 SAMBA_CLUSTER_SUPPORT_SOURCES='''
324 lib/cluster_support.c
325 lib/ctdb_dummy.c
327 SAMBA_CLUSTER_SUPPORT_DEPS='''
328 talloc
329 tevent
332 bld.SAMBA3_LIBRARY('samba-cluster-support',
333 source=SAMBA_CLUSTER_SUPPORT_SOURCES,
334 deps=SAMBA_CLUSTER_SUPPORT_DEPS,
335 allow_undefined_symbols=True,
336 private_library=True)
338 bld.SAMBA3_SUBSYSTEM('TDB_LIB',
339 source='''
340 lib/dbwrap/dbwrap_open.c
341 lib/dbwrap/dbwrap_watch.c
342 lib/g_lock.c
343 ''',
344 deps='''
345 dbwrap
346 samba-cluster-support
347 ''')
349 bld.SAMBA3_LIBRARY('messages_util',
350 source='''lib/messages_util.c''',
351 deps='samba-util',
352 private_library=True)
354 bld.SAMBA3_SUBSYSTEM('samba3core',
355 source='''
356 lib/messages.c
357 lib/util_cluster.c
358 lib/id_cache.c
359 lib/serverid.c
360 lib/server_id_watch.c
361 lib/server_id_db_util.c
362 lib/addrchange.c
363 ../lib/util/debug_s3.c
364 lib/dumpcore.c
365 lib/interface.c
366 lib/username.c
367 lib/smbrun.c
368 lib/wins_srv.c
369 lib/substitute.c
370 lib/substitute_generic.c
371 lib/ms_fnmatch.c
372 lib/tallocmsg.c
373 lib/dmallocmsg.c
374 lib/gencache.c
375 lib/util_event.c
376 lib/global_contexts.c
377 lib/server_prefork.c
378 lib/server_prefork_util.c
379 lib/ldap_escape.c
380 lib/system_smbd.c
381 lib/audit.c
382 lib/idmap_cache.c
383 lib/namemap_cache.c
384 lib/util_ea.c
385 lib/background.c
386 ''',
387 deps='''
388 samba3util
389 LIBTSOCKET
390 NDR_MESSAGING
391 LIBASYNC_REQ
392 UTIL_PW
393 SAMBA_VERSION
394 PTHREADPOOL
395 interfaces
396 smbconf
397 dbwrap
398 samba3-util
399 errors3
400 server_id_db
401 messages_util
402 messages_dgm
403 talloc_report_printf
404 access
405 TDB_LIB
407 ''')
409 bld.SAMBA3_LIBRARY('smbd_shim',
410 source='''lib/smbd_shim.c''',
411 deps='talloc',
412 private_library=True)
414 bld.SAMBA3_SUBSYSTEM('auth_generic',
415 source='libsmb/auth_generic.c',
416 deps='gse gensec')
418 bld.SAMBA3_LIBRARY('libsmb',
419 source='''
420 libsmb/clientgen.c
421 libsmb/cliconnect.c
422 libsmb/clifile.c
423 libsmb/clispnego.c
424 libsmb/clirap.c
425 libsmb/clierror.c
426 libsmb/climessage.c
427 libsmb/clireadwrite.c
428 libsmb/clilist.c
429 libsmb/cliprint.c
430 libsmb/clitrans.c
431 libsmb/clisecdesc.c
432 libsmb/clistr.c
433 libsmb/cliquota.c
434 libsmb/clifsinfo.c
435 libsmb/clidfs.c
436 libsmb/clioplock.c
437 libsmb/async_smb.c
438 libsmb/reparse_symlink.c
439 libsmb/clisymlink.c
440 libsmb/smbsock_connect.c
441 libsmb/cli_smb2_fnum.c
442 ''',
443 deps='''
444 auth_generic
445 CLDAP
446 LIBNMB
447 SPNEGO_PARSE
448 LIBTSOCKET
449 KRBCLIENT
450 NDR_IOCTL
451 NDR_QUOTA
452 cli_smb_common
453 tevent
454 ''',
455 private_library=True)
457 bld.SAMBA3_SUBSYSTEM('CLDAP',
458 source='libads/cldap.c',
459 deps='cli-ldap-common cli_cldap LIBTSOCKET')
461 # NOTE: The secrets3 library is a low level library used by several subsystems.
462 # PLEASE DO NOT make it depend on high level libraries like PDB, if you are
463 # doing that your design is wrong and needs changing. -SSS
464 bld.SAMBA3_LIBRARY('secrets3',
465 source='''
466 passdb/secrets.c
467 passdb/machine_account_secrets.c
468 passdb/machine_sid.c
469 passdb/secrets_lsa.c
470 ''',
471 deps='''
472 NDR_SECRETS
473 smbconf
474 samba3util
475 dbwrap
476 krb5samba
477 LIBCLI_AUTH
478 samba-credentials
479 ''',
480 private_library=True)
482 bld.SAMBA3_LIBRARY('smbldap',
483 source='lib/smbldap.c',
484 deps='ldap lber samba-util smbconf',
485 enabled=bld.CONFIG_SET("HAVE_LDAP"),
486 private_library=False,
487 abi_directory='lib/ABI',
488 abi_match='smbldap_*',
489 pc_files=[],
490 vnum='2.1.0',
491 public_headers='include/smbldap.h include/smb_ldap.h')
493 bld.SAMBA3_LIBRARY('ads',
494 source='''
495 libads/ldap.c
496 libads/sasl.c
497 libads/sasl_wrapping.c
498 libads/krb5_setpw.c
499 libads/kerberos_util.c
500 libads/ldap_user.c
501 libads/ads_struct.c
502 libads/kerberos_keytab.c
503 libads/disp_sec.c
504 libads/ldap_utils.c
505 libads/ldap_schema.c
506 libads/util.c
507 libads/ndr.c
508 libads/net_ads_setspn.c
509 ''',
510 deps='''
511 cli-ldap-common
512 krb5samba
513 ldap
514 lber
515 KRBCLIENT
516 smbconf
517 LIBNMB
518 libsmb
519 DCUTIL
520 smbldap
521 trusts_util
522 ''',
523 private_library=True)
525 bld.SAMBA3_SUBSYSTEM('LIBADS_SERVER',
526 source='libads/authdata.c',
527 deps='SERVER_MUTEX ndr-krb5pac krb5samba gssapi')
529 bld.SAMBA3_SUBSYSTEM('LIBADS_PRINTER',
530 source='libads/ldap_printer.c',
531 deps='samba-util krb5samba')
533 # Only smbconf should link against this subsystem, else we will create
534 # a circular dependency.
535 bld.SAMBA3_SUBSYSTEM('SMBCONF_PARAM',
536 source='''
537 param/loadparm.c
538 lib/sharesec.c
539 lib/ldap_debug_handler.c
540 lib/util_names.c
541 ''',
542 deps='''
543 samba-util
544 PARAM_UTIL
545 ldap
546 lber
547 LOADPARM_CTX
548 samba3core
549 param_local.h
550 param_global.h
551 cups
552 ''')
554 bld.SAMBA3_LIBRARY('smbconf',
555 source='''
556 lib/smbconf/smbconf_init.c
557 lib/smbconf/smbconf_reg.c
558 ''',
559 deps='''
560 LIBSMBCONF
561 REG_SMBCONF
562 SAMBA_VERSION
564 charset
565 samba-hostconfig
566 SMBCONF_PARAM
567 samba-util
568 talloc
569 util_reg
570 ''',
571 public_headers='../lib/smbconf/smbconf.h',
572 pc_files=[],
573 vnum='0')
575 bld.SAMBA3_SUBSYSTEM('sysquotas',
576 source='''
577 lib/sysquotas.c
578 lib/sysquotas_linux.c
579 lib/sysquotas_xfs.c
580 lib/sysquotas_4A.c
581 lib/sysquotas_4B.c
582 lib/sysquotas_jfs2.c
583 lib/sysquotas_nfs.c
584 ''',
585 allow_warnings=True,
586 deps='samba3-util samba-util tirpc')
588 NOTIFY_SOURCES=''
589 NOTIFY_DEPS=''
591 if bld.CONFIG_SET("HAVE_INOTIFY"):
592 NOTIFY_SOURCES += ' smbd/notify_inotify.c'
594 if bld.CONFIG_SET('SAMBA_FAM_LIBS'):
595 NOTIFY_SOURCES += ' smbd/notify_fam.c'
596 NOTIFY_DEPS += ' ' + bld.CONFIG_GET('SAMBA_FAM_LIBS')
598 bld.SAMBA3_LIBRARY('smbd_base',
599 source='''
600 smbd/server_reload.c
601 smbd/files.c
602 smbd/connection.c
603 smbd/utmp.c
604 smbd/session.c
605 smbd/dfree.c
606 smbd/dir.c
607 smbd/password.c
608 smbd/conn_msg.c
609 smbd/conn_idle.c
610 smbd/share_access.c
611 smbd/fileio.c
612 smbd/ipc.c
613 smbd/lanman.c
614 smbd/negprot.c
615 smbd/message.c
616 smbd/nttrans.c
617 smbd/pipes.c
618 smbd/reply.c
619 smbd/sesssetup.c
620 smbd/trans2.c
621 smbd/uid.c
622 smbd/dosmode.c
623 smbd/filename.c
624 smbd/open.c
625 smbd/close.c
626 smbd/blocking.c
627 smbd/sec_ctx.c
628 smbd/srvstr.c
629 smbd/vfs.c
630 smbd/perfcount.c
631 smbd/statcache.c
632 smbd/seal.c
633 smbd/posix_acls.c
634 lib/sysacls.c
635 smbd/process.c
636 smbd/service.c
637 smbd/error.c
638 printing/printspoolss.c
639 lib/sessionid_tdb.c
640 lib/cleanupdb.c
641 smbd/fake_file.c
642 smbd/quotas.c
643 smbd/ntquotas.c
644 smbd/msdfs.c
645 smbd/aio.c smbd/statvfs.c
646 smbd/dmapi.c
647 smbd/signing.c
648 smbd/file_access.c
649 smbd/dnsregister.c smbd/globals.c
650 smbd/smb2_server.c
651 smbd/smb2_glue.c
652 smbd/smb2_negprot.c
653 smbd/smb2_sesssetup.c
654 smbd/smb2_tcon.c
655 smbd/smb2_create.c
656 smbd/smb2_close.c
657 smbd/smb2_flush.c
658 smbd/smb2_read.c
659 smbd/smb2_write.c
660 smbd/smb2_lock.c
661 smbd/smb2_ioctl.c
662 smbd/smb2_ioctl_dfs.c
663 smbd/smb2_ioctl_filesys.c
664 smbd/smb2_ioctl_named_pipe.c
665 smbd/smb2_ioctl_network_fs.c
666 smbd/smb2_keepalive.c
667 smbd/smb2_query_directory.c
668 smbd/smb2_notify.c
669 smbd/smb2_getinfo.c
670 smbd/smb2_setinfo.c
671 smbd/smb2_break.c
672 smbd/smbXsrv_version.c
673 smbd/smbXsrv_client.c
674 smbd/smbXsrv_session.c
675 smbd/smbXsrv_tcon.c
676 smbd/smbXsrv_open.c
677 smbd/server_exit.c
678 smbd/durable.c
679 smbd/scavenger.c
680 smbd/mangle.c
681 smbd/mangle_hash.c
682 smbd/mangle_hash2.c
683 smbd/oplock.c
684 smbd/oplock_linux.c
685 smbd/notify.c
686 smbd/notify_msg.c
687 smbd/build_options.c
688 smbd/smb1_utils.c
689 smbd/conn.c
690 ''' + NOTIFY_SOURCES,
691 deps='''
692 talloc
693 tevent
695 libsmb
696 msrpc3
698 vfs_default
699 vfs_posixacl
700 inotify
701 samba3core
702 param_service
703 AVAHI
704 PRINTBASE
705 PROFILE
706 LOCKING
707 LIBADS_SERVER
708 LIBAFS
709 RPC_SERVICE
710 NDR_SMBXSRV
711 LEASES_DB
712 LEASES_UTIL
713 sysquotas
714 NDR_SMB_ACL
715 netapi
716 NDR_IOCTL
717 notifyd
718 vfs_acl_common
719 NDR_QUOTA
720 GNUTLS_HELPERS
721 fd_handle
722 ''' +
723 bld.env['dmapi_lib'] +
724 bld.env['legacy_quota_libs'] +
725 NOTIFY_DEPS,
726 private_library=True)
728 bld.SAMBA3_SUBSYSTEM('LOCKING',
729 source='''
730 locking/locking.c
731 locking/brlock.c
732 locking/posix.c
733 locking/share_mode_lock.c
734 ''',
735 deps='''
737 talloc
738 LEASES_DB
739 LEASES_UTIL
740 NDR_OPEN_FILES
741 FNAME_UTIL
742 fd_handle
743 ''')
745 bld.SAMBA3_SUBSYSTEM('LEASES_DB',
746 source='locking/leases_db.c',
747 deps='NDR_LEASES_DB')
749 bld.SAMBA3_SUBSYSTEM('LEASES_UTIL',
750 source='locking/leases_util.c',
751 deps='NDR_OPEN_FILES')
753 if bld.CONFIG_GET("WITH_PROFILE"):
754 bld.SAMBA3_SUBSYSTEM('PROFILE',
755 source='profile/profile.c',
756 deps='''
757 samba-util
758 gnutls
759 ''')
760 else:
761 bld.SAMBA3_SUBSYSTEM('PROFILE',
762 source='profile/profile_dummy.c',
763 deps='')
765 bld.SAMBA3_SUBSYSTEM('PRINTBASE',
766 source='''
767 printing/notify.c
768 printing/printing_db.c
769 ''',
770 deps='''
771 samba-util
773 ''')
775 bld.SAMBA3_SUBSYSTEM('PRINTBACKEND',
776 source='''
777 printing/printing.c
778 printing/rap_jobid.c
779 printing/nt_printing.c
780 printing/nt_printing_tdb.c
781 printing/nt_printing_migrate_internal.c
782 printing/nt_printing_ads.c
783 printing/queue_process.c
784 ''',
785 deps='''
786 PRINTBASE
787 LIBADS_PRINTER
789 printing_migrate
790 SPOOLSSD
791 ''')
793 bld.SAMBA3_LIBRARY('printing_migrate',
794 source='''
795 printing/nt_printing_migrate.c
796 rpc_client/cli_winreg_spoolss.c
797 printing/nt_printing_os2.c
798 ''',
799 deps='''
800 NDR_NTPRINTING
801 cli_spoolss
802 RPC_NDR_WINREG
803 LIBCLI_WINREG
804 smbconf
805 ''',
806 private_library=True)
808 bld.SAMBA3_SUBSYSTEM('PRINTING',
809 source='''
810 printing/pcap.c
811 printing/print_svid.c
812 printing/print_aix.c
813 printing/print_cups.c
814 printing/print_generic.c
815 printing/lpq_parse.c
816 printing/load.c
817 printing/print_standard.c
818 printing/print_iprint.c
819 printing/printer_list.c
820 ''',
821 deps='''
822 NDR_PRINTCAP
824 cups
825 ''')
827 bld.SAMBA_BINARY('samba-bgqd',
828 source='printing/samba-bgqd.c',
829 deps='''
830 samba3core
831 CMDLINE_S3
832 AUTH_COMMON
833 smbd_base
834 ''',
835 install_path='${LIBEXECDIR}/samba')
837 bld.SAMBA3_SUBSYSTEM('FNAME_UTIL',
838 source='lib/filename_util.c',
839 deps='samba-util')
841 bld.SAMBA3_SUBSYSTEM('LIBNET',
842 source='libnet/libnet_join.c libnet/libnet_join_offline.c',
843 deps='NDR_LIBNET_JOIN INIT_SAMR net_keytab pdb')
845 bld.SAMBA3_LIBRARY('net_keytab',
846 source='libnet/libnet_keytab.c',
847 deps='krb5samba ads',
848 private_library=True)
851 bld.SAMBA3_SUBSYSTEM('LIBNET_DSSYNC',
852 source='''
853 libnet/libnet_dssync.c
854 libnet/libnet_dssync_passdb.c
855 libnet/libnet_dssync_keytab.c
856 ''',
857 deps='''
858 LIBNET
859 RPC_NDR_DRSUAPI
860 ''')
862 bld.SAMBA3_SUBSYSTEM('LIBEVENTLOG',
863 source='lib/eventlog/eventlog.c',
864 deps='NDR_EVENTLOG tdb')
866 bld.SAMBA3_SUBSYSTEM('LIBNMB',
867 source='''
868 libsmb/unexpected.c
869 libsmb/namecache.c
870 libsmb/nmblib.c
871 libsmb/clidgram.c
872 libsmb/namequery.c
873 libsmb/conncache.c
874 libads/sitename_cache.c
875 ''',
876 deps='''
877 LIBTSOCKET
878 LIBCLI_NETLOGON
879 samba3util
880 addns
881 lmhosts
882 resolv
883 ''')
885 bld.SAMBA3_SUBSYSTEM('SERVICES',
886 source='''
887 services/svc_spoolss.c
888 services/svc_rcinit.c
889 services/svc_winreg_glue.c
890 services/svc_netlogon.c
891 services/svc_winreg.c
892 services/svc_wins.c
893 ''',
894 deps='samba-util')
896 bld.SAMBA3_SUBSYSTEM('PLAINTEXT_AUTH',
897 source='''
898 auth/pampass.c
899 auth/pass_check.c
900 ''',
901 deps='''
902 crypt
904 PAM_ERRORS
905 ''')
907 bld.SAMBA3_SUBSYSTEM('PASSCHANGE',
908 source='libsmb/passchange.c',
909 deps='''
910 LIBCLI_SAMR
911 INIT_LSA
912 msrpc3
913 krb5samba
914 ''')
916 bld.SAMBA3_SUBSYSTEM('SAMBA_VERSION',
917 source='lib/version.c',
918 deps='samba-util')
920 bld.SAMBA3_SUBSYSTEM('SLCACHE',
921 source='libsmb/samlogon_cache.c',
922 deps='''
923 samba-util
925 ''')
927 bld.SAMBA3_SUBSYSTEM('dsgetdcname',
928 source='''
929 libsmb/dsgetdcname.c
930 ''',
931 deps='''
932 CLDAP
933 LIBNMB
934 ''')
936 bld.SAMBA3_SUBSYSTEM('DCUTIL',
937 source='''
938 libsmb/namequery_dc.c
939 ''',
940 deps='''
942 dsgetdcname
943 msrpc3
944 libcli_lsa3
945 ''')
947 bld.SAMBA3_LIBRARY('trusts_util',
948 source='libsmb/trusts_util.c',
949 deps='''
950 libcli_netlogon3
951 msrpc3
952 samba-passdb
953 ''',
954 private_library=True)
956 bld.SAMBA3_SUBSYSTEM('tdb-wrap3',
957 source='lib/util_tdb.c',
958 deps='talloc samba3-util')
960 bld.SAMBA3_LIBRARY('samba3-util',
961 source='''
962 lib/util_sec.c
963 lib/util_str.c
964 lib/adt_tree.c
965 lib/util_malloc.c
966 lib/namearray.c
967 lib/file_id.c
968 lib/cbuf.c
969 lib/per_thread_cwd.c
970 ''',
971 deps='''
972 samba-util
973 charset
974 ''',
975 private_library=True)
977 bld.SAMBA_LIBRARY('xattr_tdb',
978 source='lib/xattr_tdb.c',
979 deps='NDR_XATTR dbwrap samba3-util',
980 private_library=True)
982 bld.SAMBA3_LIBRARY('CHARSET3',
983 source='''
984 lib/charcnv.c
985 lib/fstring.c
986 ''',
987 public_deps='''
988 ICONV_WRAPPER
989 charset
990 ''',
991 deps='''
992 samba-util
993 samba3-util
994 ''',
995 private_library=True)
997 bld.SAMBA3_SUBSYSTEM('errors3',
998 source='''
999 libsmb/errormap.c
1000 libsmb/smberr.c
1001 lib/errmap_unix.c
1002 ''',
1003 deps='samba-errors')
1005 bld.SAMBA3_SUBSYSTEM('LIBCLI_SAMR',
1006 source='rpc_client/cli_samr.c',
1007 deps='RPC_NDR_SAMR INIT_SAMR')
1009 bld.SAMBA3_LIBRARY('libcli_lsa3',
1010 source='rpc_client/cli_lsarpc.c',
1011 deps='RPC_NDR_LSA INIT_LSA',
1012 private_library=True)
1014 bld.SAMBA3_LIBRARY('libcli_netlogon3',
1015 source='''
1016 rpc_client/cli_netlogon.c
1017 rpc_client/util_netlogon.c
1018 ''',
1019 deps='''
1020 msrpc3
1021 RPC_NDR_NETLOGON
1022 cliauth
1023 smbconf
1024 NETLOGON_CREDS_CLI''',
1025 private_library=True)
1027 bld.SAMBA3_LIBRARY('cli_spoolss',
1028 source='''
1029 rpc_client/cli_spoolss.c
1030 rpc_client/init_spoolss.c
1031 ''',
1032 deps='''
1033 RPC_NDR_SPOOLSS
1034 smbconf
1035 secrets3
1036 gensec
1037 ''',
1038 private_library=True)
1040 bld.SAMBA3_SUBSYSTEM('LIBCLI_WINREG',
1041 source='rpc_client/cli_winreg.c',
1042 deps='RPC_NDR_WINREG')
1044 bld.SAMBA3_SUBSYSTEM('LIBCLI_WINREG_INTERNAL',
1045 source='rpc_client/cli_winreg_int.c',
1046 deps='LIBCLI_WINREG RPC_SERVER')
1048 bld.SAMBA3_SUBSYSTEM('RPC_CLIENT_SCHANNEL',
1049 source='rpc_client/cli_pipe_schannel.c',
1050 deps='samba-util krb5samba')
1052 bld.SAMBA3_SUBSYSTEM('RPCCLI_MDSSVC',
1053 source='''
1054 rpc_client/cli_mdssvc.c
1055 rpc_client/cli_mdssvc_util.c
1056 ''',
1057 deps='mdssvc RPC_NDR_MDSSVC')
1059 bld.SAMBA3_SUBSYSTEM('INIT_LSA',
1060 source='rpc_client/init_lsa.c',
1061 deps='samba-util')
1063 bld.SAMBA3_SUBSYSTEM('INIT_SAMR',
1064 source='rpc_client/init_samr.c',
1065 deps='samba-util GNUTLS_HELPERS')
1067 bld.SAMBA3_SUBSYSTEM('LIBLSA',
1068 source='lib/lsa.c')
1070 bld.SAMBA3_SUBSYSTEM('SPOOLSSD',
1071 source='printing/spoolssd.c',
1072 deps='''
1073 samba-util
1074 RPC_SOCK_HELPER
1075 ''')
1077 bld.SAMBA3_SUBSYSTEM('tevent-glib-glue',
1078 source='lib/tevent_glib_glue.c',
1079 deps='glib-2.0',
1080 enabled=bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1083 bld.SAMBA3_SUBSYSTEM('ADOUBLE',
1084 source='lib/adouble.c',
1085 deps='STRING_REPLACE')
1087 bld.SAMBA3_SUBSYSTEM('STRING_REPLACE',
1088 source='lib/string_replace.c')
1090 bld.SAMBA3_SUBSYSTEM('fd_handle',
1091 source='smbd/fd_handle.c')
1093 ########################## BINARIES #################################
1095 bld.SAMBA3_BINARY('smbd/smbd',
1096 source='smbd/server.c smbd/smbd_cleanupd.c',
1097 deps='''
1098 CMDLINE_S3
1099 smbd_base
1100 EPMD
1101 LSASD
1102 FSSD
1103 MDSSD
1104 SPOOLSSD
1105 ''',
1106 install_path='${SBINDIR}')
1109 bld.SAMBA3_SUBSYSTEM('TDB_VALIDATE',
1110 source='lib/tdb_validate.c',
1111 deps='samba-util')
1114 bld.SAMBA3_BINARY('client/smbclient',
1115 source='''
1116 client/client.c
1117 client/clitar.c
1118 client/dnsbrowse.c
1119 ''',
1120 deps='''
1121 talloc
1122 CMDLINE_S3
1123 smbconf
1124 ndr-standard
1125 SMBREADLINE
1126 libsmb
1127 msrpc3
1128 RPC_NDR_SRVSVC
1129 cli_smb_common
1130 archive
1131 ''')
1133 bld.SAMBA3_BINARY('smbspool',
1134 source='client/smbspool.c',
1135 deps='''
1136 talloc
1137 smbconf
1138 libsmb
1139 samba3core
1140 ''')
1142 bld.SAMBA3_BINARY('smbspool_krb5_wrapper',
1143 source='client/smbspool_krb5_wrapper.c',
1144 deps='''
1145 DYNCONFIG
1146 cups
1147 krb5samba
1148 ''',
1149 install_path='${LIBEXECDIR}/samba',
1150 enabled=bld.CONFIG_SET('HAVE_CUPS'))
1152 bld.SAMBA3_BINARY('smbspool_argv_wrapper',
1153 source='script/tests/smbspool_argv_wrapper.c',
1154 for_selftest=True)
1156 bld.SAMBA3_BINARY('locktest2',
1157 source='torture/locktest2.c',
1158 deps='''
1159 talloc
1160 smbconf
1161 libsmb
1162 LOCKING
1163 ''',
1164 for_selftest=True)
1166 TORTURE3_ADDITIONAL_SOURCE=""
1168 if bld.env.with_ctdb:
1169 TORTURE3_ADDITIONAL_SOURCE += ' torture/test_ctdbd_conn.c'
1171 bld.SAMBA3_BINARY('smbtorture' + bld.env.suffix3,
1172 source='''
1173 torture/torture.c
1174 torture/nbio.c
1175 torture/scanner.c
1176 torture/utable.c
1177 torture/denytest.c
1178 torture/mangle_test.c
1179 torture/nbench.c
1180 torture/test_async_echo.c
1181 torture/test_addrchange.c
1182 torture/test_matching.c
1183 torture/test_posix_append.c
1184 torture/test_posix.c
1185 torture/test_nttrans_create.c
1186 torture/test_nttrans_fsctl.c
1187 torture/test_case_insensitive.c
1188 torture/test_notify_online.c
1189 torture/test_chain3.c
1190 torture/test_smb2.c
1191 torture/test_authinfo_structs.c
1192 torture/test_smbsock_any_connect.c
1193 torture/test_cleanup.c
1194 torture/test_notify.c
1195 lib/tevent_barrier.c
1196 torture/test_dbwrap_watch.c
1197 torture/test_dbwrap_do_locked.c
1198 torture/test_idmap_tdb_common.c
1199 torture/test_dbwrap_ctdb.c
1200 torture/test_buffersize.c
1201 torture/test_messaging_read.c
1202 torture/test_messaging_fd_passing.c
1203 torture/test_messaging_send_all.c
1204 torture/test_oplock_cancel.c
1205 torture/test_pthreadpool_tevent.c
1206 torture/bench_pthreadpool.c
1207 torture/wbc_async.c
1208 torture/test_g_lock.c
1209 torture/test_namemap_cache.c
1210 torture/test_idmap_cache.c
1211 torture/test_hidenewfiles.c
1212 torture/test_readdir_timestamp.c
1213 lib/util_sd.c
1214 ''' + TORTURE3_ADDITIONAL_SOURCE,
1215 deps='''
1216 talloc
1217 smbconf
1218 libsmb
1219 msrpc3
1220 TLDAP
1221 RPC_NDR_ECHO
1222 WB_REQTRANS
1223 LOCKING
1224 NDR_OPEN_FILES
1225 idmap
1226 IDMAP_TDB_COMMON
1227 libcli_lsa3
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 CMDLINE_S3
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 CMDLINE_S3
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 CMDLINE_S3
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 CMDLINE_S3
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 tevent-glib-glue''',
1384 enabled=bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1385 for_selftest=True)
1387 bld.SAMBA3_BINARY('tevent_glib_tracker',
1388 source='utils/async-tracker.c',
1389 deps='''
1390 talloc
1391 libsmb
1392 CMDLINE_S3
1393 tevent-glib-glue ''' + bld.env['libtracker'],
1394 enabled=bld.CONFIG_SET('HAVE_TRACKER') and bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1395 install=False)
1397 ########################## INCLUDES #################################
1399 bld.RECURSE('auth')
1400 bld.RECURSE('libgpo/gpext')
1401 bld.RECURSE('librpc')
1402 bld.RECURSE('librpc/idl')
1403 bld.RECURSE('libsmb')
1404 bld.RECURSE('modules')
1405 bld.RECURSE('param')
1406 bld.RECURSE('passdb')
1407 bld.RECURSE('rpc_server')
1408 bld.RECURSE('script')
1409 bld.RECURSE('winbindd')
1410 bld.RECURSE('../examples/libsmbclient')
1411 bld.RECURSE('../examples/pdb')
1412 bld.RECURSE('../examples/VFS')
1413 bld.RECURSE('../examples/fuse')
1414 bld.RECURSE('../examples/winexe')
1415 bld.RECURSE('lib/netapi/tests')
1416 bld.RECURSE('lib/netapi/examples')
1417 bld.RECURSE('smbd/notifyd')
1418 bld.RECURSE('rpcclient')
1419 bld.RECURSE('utils')
1420 bld.RECURSE('nmbd')
1421 bld.RECURSE('lib/util')
1423 bld.ENFORCE_GROUP_ORDERING()
1424 bld.CHECK_PROJECT_RULES()