s3:modules:vfs_virusfilter: Recent talloc changes cause infinite start-up failure
[Samba.git] / source3 / wscript_build
blobd2793cacb9255f528893ef2ea44b57324d863539
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_SUBSYSTEM('sysquotas',
610 source='''
611 lib/sysquotas.c
612 lib/sysquotas_linux.c
613 lib/sysquotas_xfs.c
614 lib/sysquotas_4A.c
615 lib/sysquotas_4B.c
616 lib/sysquotas_jfs2.c
617 lib/sysquotas_nfs.c
618 ''',
619 allow_warnings=True,
620 deps='samba3-util samba-util tirpc')
622 NOTIFY_SOURCES=''
623 NOTIFY_DEPS=''
625 if bld.CONFIG_SET("HAVE_INOTIFY"):
626 NOTIFY_SOURCES += ' smbd/notify_inotify.c'
628 if bld.CONFIG_SET('SAMBA_FAM_LIBS'):
629 NOTIFY_SOURCES += ' smbd/notify_fam.c'
630 NOTIFY_DEPS += ' ' + bld.CONFIG_GET('SAMBA_FAM_LIBS')
632 bld.SAMBA3_LIBRARY('smbd_base',
633 source='''
634 smbd/server_reload.c
635 smbd/files.c
636 smbd/connection.c
637 smbd/utmp.c
638 smbd/session.c
639 smbd/dfree.c
640 smbd/dir.c
641 smbd/password.c
642 smbd/conn_msg.c
643 smbd/conn_idle.c
644 smbd/share_access.c
645 smbd/fileio.c
646 smbd/ipc.c
647 smbd/lanman.c
648 smbd/negprot.c
649 smbd/message.c
650 smbd/nttrans.c
651 smbd/pipes.c
652 smbd/reply.c
653 smbd/sesssetup.c
654 smbd/trans2.c
655 smbd/uid.c
656 smbd/dosmode.c
657 smbd/filename.c
658 smbd/open.c
659 smbd/close.c
660 smbd/blocking.c
661 smbd/sec_ctx.c
662 smbd/srvstr.c
663 smbd/vfs.c
664 smbd/perfcount.c
665 smbd/statcache.c
666 smbd/seal.c
667 smbd/posix_acls.c
668 lib/sysacls.c
669 smbd/process.c
670 smbd/service.c
671 smbd/error.c
672 printing/printspoolss.c
673 lib/sessionid_tdb.c
674 lib/cleanupdb.c
675 smbd/fake_file.c
676 smbd/quotas.c
677 smbd/ntquotas.c
678 smbd/msdfs.c
679 smbd/aio.c smbd/statvfs.c
680 smbd/dmapi.c
681 smbd/signing.c
682 smbd/file_access.c
683 smbd/dnsregister.c smbd/globals.c
684 smbd/smb2_server.c
685 smbd/smb2_glue.c
686 smbd/smb2_negprot.c
687 smbd/smb2_sesssetup.c
688 smbd/smb2_tcon.c
689 smbd/smb2_create.c
690 smbd/smb2_close.c
691 smbd/smb2_flush.c
692 smbd/smb2_read.c
693 smbd/smb2_write.c
694 smbd/smb2_lock.c
695 smbd/smb2_ioctl.c
696 smbd/smb2_ioctl_dfs.c
697 smbd/smb2_ioctl_filesys.c
698 smbd/smb2_ioctl_named_pipe.c
699 smbd/smb2_ioctl_network_fs.c
700 smbd/smb2_keepalive.c
701 smbd/smb2_query_directory.c
702 smbd/smb2_notify.c
703 smbd/smb2_getinfo.c
704 smbd/smb2_setinfo.c
705 smbd/smb2_break.c
706 smbd/smbXsrv_version.c
707 smbd/smbXsrv_client.c
708 smbd/smbXsrv_session.c
709 smbd/smbXsrv_tcon.c
710 smbd/smbXsrv_open.c
711 smbd/server_exit.c
712 smbd/durable.c
713 smbd/scavenger.c
714 smbd/mangle.c
715 smbd/mangle_hash.c
716 smbd/mangle_hash2.c
717 smbd/oplock.c
718 smbd/oplock_linux.c
719 smbd/notify.c
720 smbd/notify_msg.c
721 smbd/build_options.c
722 smbd/smb1_utils.c
723 smbd/conn.c
724 ''' + NOTIFY_SOURCES,
725 deps='''
726 talloc
727 tevent
729 libsmb
730 msrpc3
732 vfs_default
733 vfs_posixacl
734 inotify
735 samba3core
736 param_service
737 AVAHI
738 PRINTBASE
739 PROFILE
740 LOCKING
741 LIBADS_SERVER
742 LIBAFS
743 RPC_SERVICE
744 NDR_SMBXSRV
745 LEASES_DB
746 LEASES_UTIL
747 sysquotas
748 NDR_SMB_ACL
749 netapi
750 NDR_IOCTL
751 notifyd
752 vfs_acl_common
753 NDR_QUOTA
754 GNUTLS_HELPERS
755 ''' +
756 bld.env['dmapi_lib'] +
757 bld.env['legacy_quota_libs'] +
758 NOTIFY_DEPS,
759 private_library=True)
761 bld.SAMBA3_SUBSYSTEM('LOCKING',
762 source='''
763 locking/locking.c
764 locking/brlock.c
765 locking/posix.c
766 locking/share_mode_lock.c
767 ''',
768 deps='''
770 talloc
771 LEASES_DB
772 LEASES_UTIL
773 NDR_OPEN_FILES
774 FNAME_UTIL
775 ''')
777 bld.SAMBA3_SUBSYSTEM('LEASES_DB',
778 source='locking/leases_db.c',
779 deps='NDR_LEASES_DB')
781 bld.SAMBA3_SUBSYSTEM('LEASES_UTIL',
782 source='locking/leases_util.c',
783 deps='NDR_OPEN_FILES')
785 if bld.CONFIG_GET("WITH_PROFILE"):
786 bld.SAMBA3_SUBSYSTEM('PROFILE',
787 source='profile/profile.c',
788 deps='''
789 samba-util
790 gnutls
791 ''')
792 else:
793 bld.SAMBA3_SUBSYSTEM('PROFILE',
794 source='profile/profile_dummy.c',
795 deps='')
797 bld.SAMBA3_SUBSYSTEM('PRINTBASE',
798 source='''
799 printing/notify.c
800 printing/printing_db.c
801 ''',
802 deps='''
803 samba-util
805 ''')
807 bld.SAMBA3_SUBSYSTEM('PRINTBACKEND',
808 source='''
809 printing/printing.c
810 printing/nt_printing.c
811 printing/nt_printing_tdb.c
812 printing/nt_printing_migrate_internal.c
813 printing/nt_printing_ads.c
814 printing/queue_process.c
815 ''',
816 deps='''
817 PRINTBASE
818 LIBADS_PRINTER
820 printing_migrate
821 SPOOLSSD
822 ''')
824 bld.SAMBA3_LIBRARY('printing_migrate',
825 source='''
826 printing/nt_printing_migrate.c
827 rpc_client/cli_winreg_spoolss.c
828 printing/nt_printing_os2.c
829 ''',
830 deps='''
831 NDR_NTPRINTING
832 cli_spoolss
833 RPC_NDR_WINREG
834 LIBCLI_WINREG
835 smbconf
836 ''',
837 private_library=True)
839 bld.SAMBA3_SUBSYSTEM('PRINTING',
840 source='''
841 printing/pcap.c
842 printing/print_svid.c
843 printing/print_aix.c
844 printing/print_cups.c
845 printing/print_generic.c
846 printing/lpq_parse.c
847 printing/load.c
848 printing/print_standard.c
849 printing/print_iprint.c
850 printing/printer_list.c
851 ''',
852 deps='''
853 NDR_PRINTCAP
855 cups
856 ''')
858 bld.SAMBA3_SUBSYSTEM('FNAME_UTIL',
859 source='lib/filename_util.c',
860 deps='samba-util')
862 bld.SAMBA3_SUBSYSTEM('LIBNET',
863 source='libnet/libnet_join.c',
864 deps='NDR_LIBNET_JOIN INIT_SAMR net_keytab pdb')
866 bld.SAMBA3_LIBRARY('net_keytab',
867 source='libnet/libnet_keytab.c',
868 deps='krb5samba ads',
869 private_library=True)
872 bld.SAMBA3_SUBSYSTEM('LIBNET_DSSYNC',
873 source='''
874 libnet/libnet_dssync.c
875 libnet/libnet_dssync_passdb.c
876 libnet/libnet_dssync_keytab.c
877 ''',
878 deps='''
879 LIBNET
880 RPC_NDR_DRSUAPI
881 ''')
883 bld.SAMBA3_SUBSYSTEM('LIBEVENTLOG',
884 source='lib/eventlog/eventlog.c',
885 deps='NDR_EVENTLOG tdb')
887 bld.SAMBA3_SUBSYSTEM('LIBNMB',
888 source='''
889 libsmb/unexpected.c
890 libsmb/namecache.c
891 libsmb/nmblib.c
892 libsmb/namequery.c
893 libsmb/conncache.c
894 libads/sitename_cache.c
895 ''',
896 deps='''
897 LIBTSOCKET
898 samba3util
899 addns
900 lmhosts
901 resolv
902 ''')
904 bld.SAMBA3_SUBSYSTEM('SERVICES',
905 source='''
906 services/svc_spoolss.c
907 services/svc_rcinit.c
908 services/svc_winreg_glue.c
909 services/svc_netlogon.c
910 services/svc_winreg.c
911 services/svc_wins.c
912 ''',
913 deps='samba-util')
915 bld.SAMBA3_SUBSYSTEM('PLAINTEXT_AUTH',
916 source='''
917 auth/pampass.c
918 auth/pass_check.c
919 ''',
920 deps='''
921 crypt
923 PAM_ERRORS
924 ''')
926 bld.SAMBA3_SUBSYSTEM('PASSCHANGE',
927 source='libsmb/passchange.c',
928 deps='''
929 LIBCLI_SAMR
930 INIT_LSA
931 msrpc3
932 krb5samba
933 ''')
935 bld.SAMBA3_SUBSYSTEM('SAMBA_VERSION',
936 source='lib/version.c',
937 deps='samba-util')
939 bld.SAMBA3_SUBSYSTEM('SLCACHE',
940 source='libsmb/samlogon_cache.c',
941 deps='''
942 samba-util
944 ''')
946 bld.SAMBA3_SUBSYSTEM('DCUTIL',
947 source='''
948 libsmb/namequery_dc.c
949 libsmb/dsgetdcname.c
950 ''',
951 deps='''
953 msrpc3
954 libcli_lsa3
955 ''')
957 bld.SAMBA3_LIBRARY('trusts_util',
958 source='libsmb/trusts_util.c',
959 deps='''
960 libcli_netlogon3
961 msrpc3
962 samba-passdb
963 ''',
964 private_library=True)
966 bld.SAMBA3_SUBSYSTEM('tdb-wrap3',
967 source='lib/util_tdb.c',
968 deps='talloc samba3-util')
970 bld.SAMBA3_LIBRARY('samba3-util',
971 source='''
972 lib/util_sec.c
973 lib/util_str.c
974 lib/adt_tree.c
975 lib/util_malloc.c
976 lib/namearray.c
977 lib/file_id.c
978 lib/cbuf.c
979 lib/per_thread_cwd.c
980 ''',
981 deps='''
982 samba-util
983 charset
984 ''',
985 private_library=True)
987 bld.SAMBA_LIBRARY('xattr_tdb',
988 source='lib/xattr_tdb.c',
989 deps='NDR_XATTR dbwrap samba3-util',
990 private_library=True)
992 bld.SAMBA3_LIBRARY('CHARSET3',
993 source='''
994 lib/charcnv.c
995 lib/fstring.c
996 ''',
997 public_deps='''
998 ICONV_WRAPPER
999 charset
1000 ''',
1001 deps='''
1002 samba-util
1003 samba3-util
1004 ''',
1005 private_library=True)
1007 bld.SAMBA3_SUBSYSTEM('errors3',
1008 source='''
1009 libsmb/errormap.c
1010 libsmb/smberr.c
1011 lib/errmap_unix.c
1012 ''',
1013 deps='samba-errors')
1015 bld.SAMBA3_SUBSYSTEM('LIBCLI_SAMR',
1016 source='rpc_client/cli_samr.c',
1017 deps='RPC_NDR_SAMR INIT_SAMR')
1019 bld.SAMBA3_LIBRARY('libcli_lsa3',
1020 source='rpc_client/cli_lsarpc.c',
1021 deps='RPC_NDR_LSA INIT_LSA',
1022 private_library=True)
1024 bld.SAMBA3_LIBRARY('libcli_netlogon3',
1025 source='''
1026 rpc_client/cli_netlogon.c
1027 rpc_client/util_netlogon.c
1028 ''',
1029 deps='''
1030 msrpc3
1031 RPC_NDR_NETLOGON
1032 cliauth
1033 smbconf
1034 NETLOGON_CREDS_CLI''',
1035 private_library=True)
1037 bld.SAMBA3_LIBRARY('cli_spoolss',
1038 source='''
1039 rpc_client/cli_spoolss.c
1040 rpc_client/init_spoolss.c
1041 ''',
1042 deps='''
1043 RPC_NDR_SPOOLSS
1044 smbconf
1045 secrets3''',
1046 private_library=True)
1048 bld.SAMBA3_SUBSYSTEM('LIBCLI_WINREG',
1049 source='rpc_client/cli_winreg.c',
1050 deps='RPC_NDR_WINREG')
1052 bld.SAMBA3_SUBSYSTEM('LIBCLI_WINREG_INTERNAL',
1053 source='rpc_client/cli_winreg_int.c',
1054 deps='LIBCLI_WINREG RPC_SERVER')
1056 bld.SAMBA3_SUBSYSTEM('RPC_CLIENT_SCHANNEL',
1057 source='rpc_client/cli_pipe_schannel.c',
1058 deps='samba-util krb5samba')
1060 bld.SAMBA3_SUBSYSTEM('RPCCLI_MDSSVC',
1061 source='''
1062 rpc_client/cli_mdssvc.c
1063 rpc_client/cli_mdssvc_util.c
1064 ''',
1065 deps='mdssvc RPC_NDR_MDSSVC')
1067 bld.SAMBA3_SUBSYSTEM('INIT_LSA',
1068 source='rpc_client/init_lsa.c',
1069 deps='samba-util')
1071 bld.SAMBA3_SUBSYSTEM('INIT_SAMR',
1072 source='rpc_client/init_samr.c',
1073 deps='samba-util GNUTLS_HELPERS')
1075 bld.SAMBA3_SUBSYSTEM('LIBLSA',
1076 source='lib/lsa.c')
1078 bld.SAMBA3_SUBSYSTEM('SPOOLSSD',
1079 source='printing/spoolssd.c',
1080 deps='''
1081 samba-util
1082 RPC_SOCK_HELPER
1083 ''')
1085 bld.SAMBA3_SUBSYSTEM('tevent-glib-glue',
1086 source='lib/tevent_glib_glue.c',
1087 deps='glib-2.0',
1088 enabled=bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1091 bld.SAMBA3_SUBSYSTEM('ADOUBLE',
1092 source='lib/adouble.c',
1093 deps='STRING_REPLACE')
1095 bld.SAMBA3_SUBSYSTEM('STRING_REPLACE',
1096 source='lib/string_replace.c')
1098 ########################## BINARIES #################################
1100 bld.SAMBA3_BINARY('smbd/smbd',
1101 source='smbd/server.c smbd/smbd_cleanupd.c',
1102 deps='''
1103 popt_samba3
1104 smbd_base
1105 EPMD
1106 LSASD
1107 FSSD
1108 MDSSD
1109 SPOOLSSD
1110 ''',
1111 install_path='${SBINDIR}')
1114 bld.SAMBA3_SUBSYSTEM('TDB_VALIDATE',
1115 source='lib/tdb_validate.c',
1116 deps='samba-util')
1119 bld.SAMBA3_BINARY('client/smbclient',
1120 source='''
1121 client/client.c
1122 client/clitar.c
1123 client/dnsbrowse.c
1124 ''',
1125 deps='''
1126 talloc
1127 popt_samba3_cmdline
1128 smbconf
1129 ndr-standard
1130 SMBREADLINE
1131 libsmb
1132 msrpc3
1133 RPC_NDR_SRVSVC
1134 cli_smb_common
1135 archive
1136 ''')
1138 bld.SAMBA3_BINARY('smbspool',
1139 source='client/smbspool.c',
1140 deps='''
1141 talloc
1142 popt_samba3
1143 smbconf
1144 libsmb
1145 samba3core
1146 ''')
1148 bld.SAMBA3_BINARY('smbspool_krb5_wrapper',
1149 source='client/smbspool_krb5_wrapper.c',
1150 deps='''
1151 DYNCONFIG
1152 cups
1153 krb5samba
1154 ''',
1155 install_path='${LIBEXECDIR}/samba',
1156 enabled=bld.CONFIG_SET('HAVE_CUPS'))
1158 bld.SAMBA3_BINARY('smbspool_argv_wrapper',
1159 source='script/tests/smbspool_argv_wrapper.c',
1160 for_selftest=True)
1162 bld.SAMBA3_BINARY('locktest2',
1163 source='torture/locktest2.c',
1164 deps='''
1165 talloc
1166 smbconf
1167 libsmb
1168 LOCKING
1169 ''',
1170 for_selftest=True)
1172 bld.SAMBA3_BINARY('smbtorture' + bld.env.suffix3,
1173 source='''
1174 torture/torture.c
1175 torture/nbio.c
1176 torture/scanner.c
1177 torture/utable.c
1178 torture/denytest.c
1179 torture/mangle_test.c
1180 torture/nbench.c
1181 torture/test_async_echo.c
1182 torture/test_addrchange.c
1183 torture/test_posix_append.c
1184 torture/test_nttrans_create.c
1185 torture/test_nttrans_fsctl.c
1186 torture/test_case_insensitive.c
1187 torture/test_notify_online.c
1188 torture/test_chain3.c
1189 torture/test_smb2.c
1190 torture/test_authinfo_structs.c
1191 torture/test_smbsock_any_connect.c
1192 torture/test_cleanup.c
1193 torture/test_notify.c
1194 lib/tevent_barrier.c
1195 torture/test_dbwrap_watch.c
1196 torture/test_dbwrap_do_locked.c
1197 torture/test_idmap_tdb_common.c
1198 torture/test_dbwrap_ctdb.c
1199 torture/test_buffersize.c
1200 torture/test_messaging_read.c
1201 torture/test_messaging_fd_passing.c
1202 torture/test_messaging_send_all.c
1203 torture/test_oplock_cancel.c
1204 torture/test_pthreadpool_tevent.c
1205 torture/bench_pthreadpool.c
1206 torture/wbc_async.c
1207 torture/test_g_lock.c
1208 torture/test_namemap_cache.c
1209 torture/test_idmap_cache.c
1210 torture/test_hidenewfiles.c
1211 ''',
1212 deps='''
1213 talloc
1214 smbconf
1215 libsmb
1216 msrpc3
1217 TLDAP
1218 RPC_NDR_ECHO
1219 WB_REQTRANS
1220 LOCKING
1221 NDR_OPEN_FILES
1222 idmap
1223 IDMAP_TDB_COMMON
1224 samba-cluster-support
1225 ''',
1226 cflags='-DWINBINDD_SOCKET_DIR=\"%s\"' % bld.env.WINBINDD_SOCKET_DIR,
1227 for_selftest=True)
1229 bld.SAMBA3_BINARY('smbconftort',
1230 source='lib/smbconf/testsuite.c',
1231 deps='''
1232 talloc
1233 smbconf
1234 popt_samba3
1235 ''',
1236 for_selftest=True)
1238 bld.SAMBA3_BINARY('msgtest',
1239 source='torture/msgtest.c',
1240 deps='''
1241 talloc
1242 smbconf
1243 ''',
1244 install=False)
1246 bld.SAMBA3_BINARY('msg_sink',
1247 source='torture/msg_sink.c',
1248 deps='''
1249 talloc
1250 smbconf
1251 ''',
1252 install=False)
1254 bld.SAMBA3_BINARY('msg_source',
1255 source='torture/msg_source.c',
1256 deps='''
1257 talloc
1258 smbconf
1259 ''',
1260 install=False)
1262 bld.SAMBA3_BINARY('test_mdsparser_es',
1263 source='''
1264 rpc_server/mdssvc/test_mdsparser_es.c
1265 rpc_server/mdssvc/es_parser.y
1266 rpc_server/mdssvc/es_lexer.l
1267 rpc_server/mdssvc/es_mapping.c
1268 ''',
1269 deps='''
1270 samba3-util
1271 talloc
1272 smbconf
1273 jansson
1274 cmocka
1275 popt_samba3_cmdline
1276 ''',
1277 enabled=bld.env.spotlight_backend_es,
1278 for_selftest=True)
1280 bld.SAMBA3_BINARY('pdbtest',
1281 source='torture/pdbtest.c',
1282 deps='''
1283 talloc
1285 popt_samba3
1286 AUTH_COMMON
1287 auth
1288 ''',
1289 for_selftest=True)
1291 bld.SAMBA3_BINARY('vfstest',
1292 source='''
1293 torture/cmd_vfs.c
1294 torture/vfstest.c
1295 torture/vfstest_chain.c
1296 ''',
1297 deps='''
1299 popt_samba3
1300 smbconf
1301 SMBREADLINE
1302 ''',
1303 for_selftest=True)
1305 bld.SAMBA3_BINARY('versiontest',
1306 source='lib/version_test.c',
1307 deps='''
1308 SAMBA_VERSION
1309 smbconf
1310 ''',
1311 install=False)
1313 bld.SAMBA3_BINARY('timelimit',
1314 source='script/tests/timelimit.c',
1315 for_selftest=True)
1317 bld.SAMBA3_BINARY('rpc_open_tcp',
1318 source='torture/rpc_open_tcp.c',
1319 deps='''
1320 talloc
1321 msrpc3
1322 ''',
1323 for_selftest=True)
1325 bld.SAMBA3_BINARY('vlp',
1326 source='printing/tests/vlp.c',
1327 deps='''
1328 talloc
1329 smbconf
1330 ''',
1331 for_selftest=True)
1334 pyrpc_util = bld.pyembed_libname('pyrpc_util')
1335 pytalloc_util = bld.pyembed_libname('pytalloc-util')
1336 bld.SAMBA3_PYTHON('pysmbd',
1337 source='smbd/pysmbd.c',
1338 deps=' '.join(['smbd_base', pyrpc_util, pytalloc_util]),
1339 realname='samba/samba3/smbd.so'
1342 pycredentials = 'pycredentials'
1343 bld.SAMBA3_PYTHON('pylibsmb',
1344 source='libsmb/pylibsmb.c',
1345 deps='smbclient samba-credentials %s' % pycredentials,
1346 realname='samba/samba3/libsmb_samba_internal.so'
1349 bld.SAMBA3_PYTHON('pymdscli',
1350 source='rpc_client/py_mdscli.c',
1351 deps=' '.join(['RPCCLI_MDSSVC', pytalloc_util, pyrpc_util]),
1352 realname='samba/samba3/mdscli.so')
1354 bld.SAMBA3_BINARY('spotlight2sparql',
1355 source='''
1356 rpc_server/mdssvc/sparql_parser_test.c
1357 rpc_server/mdssvc/sparql_parser.y
1358 rpc_server/mdssvc/sparql_lexer.l
1359 rpc_server/mdssvc/sparql_mapping.c''',
1360 deps='samba3-util talloc ' + bld.env['libtracker'],
1361 enabled=bld.env.spotlight_backend_tracker,
1362 install=False)
1364 bld.SAMBA3_BINARY('spotlight2es',
1365 source='''
1366 rpc_server/mdssvc/es_parser_test.c
1367 rpc_server/mdssvc/es_parser.y
1368 rpc_server/mdssvc/es_lexer.l
1369 rpc_server/mdssvc/es_mapping.c''',
1370 deps='samba3-util talloc jansson smbconf',
1371 enabled=bld.env.spotlight_backend_es,
1372 install=False)
1374 bld.SAMBA3_BINARY('tevent_glib_glue_test',
1375 source='lib/tevent_glib_glue_tests.c',
1376 deps='''
1377 talloc
1378 libsmb
1379 popt_samba3
1380 tevent-glib-glue''',
1381 enabled=bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1382 for_selftest=True)
1384 bld.SAMBA3_BINARY('tevent_glib_tracker',
1385 source='utils/async-tracker.c',
1386 deps='''
1387 talloc
1388 libsmb
1389 popt_samba3
1390 tevent-glib-glue ''' + bld.env['libtracker'],
1391 enabled=bld.CONFIG_SET('HAVE_TRACKER') and bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1392 install=False)
1394 ########################## INCLUDES #################################
1396 bld.RECURSE('auth')
1397 bld.RECURSE('libgpo/gpext')
1398 bld.RECURSE('librpc')
1399 bld.RECURSE('librpc/idl')
1400 bld.RECURSE('libsmb')
1401 bld.RECURSE('modules')
1402 bld.RECURSE('param')
1403 bld.RECURSE('passdb')
1404 bld.RECURSE('rpc_server')
1405 bld.RECURSE('script')
1406 bld.RECURSE('winbindd')
1407 bld.RECURSE('../examples/auth')
1408 bld.RECURSE('../examples/libsmbclient')
1409 bld.RECURSE('../examples/pdb')
1410 bld.RECURSE('../examples/VFS')
1411 bld.RECURSE('../examples/fuse')
1412 bld.RECURSE('../examples/winexe')
1413 bld.RECURSE('lib/netapi/tests')
1414 bld.RECURSE('lib/netapi/examples')
1415 bld.RECURSE('smbd/notifyd')
1416 bld.RECURSE('rpcclient')
1417 bld.RECURSE('utils')
1418 bld.RECURSE('nmbd')
1419 bld.RECURSE('lib/util')
1421 bld.ENFORCE_GROUP_ORDERING()
1422 bld.CHECK_PROJECT_RULES()