smbd: Return "blocker_pid" from do_lock()
[Samba.git] / source3 / wscript_build
blobedd973d699468f3fee309d6da5e7aea35c3576e5
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 install=False)
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 nscd
181 ''')
183 bld.SAMBA3_LIBRARY('smbldaphelper',
184 source='''
185 passdb/pdb_ldap_schema.c
186 passdb/pdb_ldap_util.c
187 ''',
188 deps='smbldap secrets3',
189 allow_undefined_symbols=True,
190 enabled=bld.CONFIG_SET('HAVE_LDAP'),
191 private_library=True)
193 bld.SAMBA3_SUBSYSTEM('SERVER_MUTEX',
194 source='lib/server_mutex.c',
195 deps='talloc')
197 # this includes only the low level parse code, not stuff
198 # that requires knowledge of security contexts
199 bld.SAMBA3_SUBSYSTEM('REG_PARSE_PRS',
200 source='registry/reg_parse_prs.c')
202 bld.SAMBA3_SUBSYSTEM('REGFIO',
203 source='registry/regfio.c',
204 deps='samba-util REG_PARSE_PRS')
206 bld.SAMBA_BINARY('test_registry_regfio',
207 source='registry/tests/test_regfio.c',
208 deps='cmocka samba3-util smbconf REGFIO',
209 local_include=False,
210 install=False)
212 # Do not link against this use 'smbconf'
213 bld.SAMBA3_SUBSYSTEM('SMBREGISTRY',
214 source='''
215 registry/reg_api.c
216 registry/reg_dispatcher.c
217 registry/reg_cachehook.c
218 registry/reg_objects.c
219 registry/reg_util_internal.c
220 lib/util_nttoken.c
221 registry/reg_backend_db.c
222 registry/reg_parse_internal.c
223 lib/srprs.c
224 registry/reg_init_basic.c
225 ''',
226 deps='''
227 smbd_shim
228 tdb-wrap3
229 NDR_SECURITY
230 util_tdb
231 talloc
232 replace
233 util_reg
234 samba-util
235 samba-security
236 errors3
237 dbwrap
238 samba3-util
239 ''')
241 # Do not link against this use 'smbconf'
242 bld.SAMBA3_SUBSYSTEM('REG_SMBCONF',
243 source='''
244 registry/reg_backend_smbconf.c
245 registry/reg_init_smbconf.c
246 registry/reg_util_token.c
247 registry/reg_api_util.c
248 ''',
249 deps='SMBREGISTRY')
251 bld.SAMBA3_SUBSYSTEM('REG_FULL',
252 source='''
253 registry/reg_backend_printing.c
254 registry/reg_backend_shares.c
255 registry/reg_backend_netlogon_params.c
256 registry/reg_backend_prod_options.c
257 registry/reg_backend_tcpip_params.c
258 registry/reg_backend_hkpt_params.c
259 registry/reg_backend_current_version.c
260 registry/reg_backend_perflib.c
261 registry/reg_init_full.c
262 registry/reg_perfcount.c''',
263 deps='''
264 smbconf
265 tdb-wrap3
266 ''')
268 bld.SAMBA3_LIBRARY('popt_samba3',
269 source='lib/popt_common.c',
270 deps='popt samba-util smbconf',
271 private_library=True)
273 bld.SAMBA3_LIBRARY('popt_samba3_cmdline',
274 source='lib/popt_common_cmdline.c',
275 deps='popt_samba3 util_cmdline cmdline_contexts',
276 private_library=True)
278 bld.SAMBA3_LIBRARY('util_cmdline',
279 source='lib/util_cmdline.c',
280 deps='secrets3',
281 private_library=True)
283 bld.SAMBA3_LIBRARY('cmdline_contexts',
284 source='lib/cmdline_contexts.c',
285 deps='samba3core',
286 private_library=True)
288 bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
289 source='libads/kerberos.c libads/ads_status.c',
290 public_deps='krb5samba asn1util k5crypto gssapi LIBTSOCKET CLDAP LIBNMB')
292 bld.SAMBA3_SUBSYSTEM('samba3util',
293 source='''
294 lib/system.c
295 lib/sendfile.c
296 lib/recvfile.c
297 lib/time.c
298 lib/util_sid.c
299 lib/util_specialsids.c
300 lib/util_file.c
301 lib/util.c
302 lib/util_path.c
303 lib/util_procid.c
304 lib/util_sock.c
305 lib/util_tsock.c
306 lib/util_transfer_file.c
307 ''',
308 deps='''
309 CHARSET3
311 LIBTSOCKET
312 samba-security
313 NDR_SECURITY
314 samba-util
315 util_tdb
316 sys_rw
317 iov_buf
318 ''')
320 if bld.env.with_ctdb:
321 SAMBA_CLUSTER_SUPPORT_SOURCES='''
322 lib/cluster_support.c
323 lib/dbwrap/dbwrap_ctdb.c
324 lib/messages_ctdb.c
325 lib/messages_ctdb_ref.c
326 lib/ctdbd_conn.c
328 SAMBA_CLUSTER_SUPPORT_DEPS='''
329 talloc
330 tevent
333 else:
334 SAMBA_CLUSTER_SUPPORT_SOURCES='''
335 lib/cluster_support.c
336 lib/ctdb_dummy.c
338 SAMBA_CLUSTER_SUPPORT_DEPS='''
339 talloc
340 tevent
343 bld.SAMBA3_LIBRARY('samba-cluster-support',
344 source=SAMBA_CLUSTER_SUPPORT_SOURCES,
345 deps=SAMBA_CLUSTER_SUPPORT_DEPS,
346 allow_undefined_symbols=True,
347 private_library=True)
349 bld.SAMBA3_SUBSYSTEM('TDB_LIB',
350 source='''
351 lib/dbwrap/dbwrap_open.c
352 lib/dbwrap/dbwrap_watch.c
353 lib/g_lock.c
354 ''',
355 deps='''
356 dbwrap
357 samba-cluster-support
358 ''')
360 bld.SAMBA3_LIBRARY('messages_dgm',
361 source='''
362 lib/messages_dgm.c
363 lib/messages_dgm_ref.c
364 ''',
365 deps='''
366 talloc
367 samba-debug
368 PTHREADPOOL
369 msghdr
370 genrand
371 samba-util
372 ''',
373 private_library=True)
375 bld.SAMBA3_LIBRARY('messages_util',
376 source='''lib/messages_util.c''',
377 deps='samba-util',
378 private_library=True)
380 bld.SAMBA3_SUBSYSTEM('samba3core',
381 source='''
382 lib/messages.c
383 lib/util_cluster.c
384 lib/id_cache.c
385 lib/serverid.c
386 lib/server_id_watch.c
387 lib/server_id_db_util.c
388 lib/addrchange.c
389 ../lib/util/debug_s3.c
390 lib/dumpcore.c
391 lib/interface.c
392 lib/username.c
393 lib/smbrun.c
394 lib/wins_srv.c
395 lib/substitute.c
396 lib/substitute_generic.c
397 lib/ms_fnmatch.c
398 lib/tallocmsg.c
399 lib/dmallocmsg.c
400 lib/gencache.c
401 lib/util_event.c
402 lib/global_contexts.c
403 lib/server_prefork.c
404 lib/server_prefork_util.c
405 lib/ldap_escape.c
406 libads/krb5_errs.c
407 lib/system_smbd.c
408 lib/audit.c
409 lib/tevent_wait.c
410 lib/idmap_cache.c
411 lib/namemap_cache.c
412 lib/util_ea.c
413 lib/background.c
414 ''',
415 deps='''
416 samba3util
417 LIBTSOCKET
418 NDR_MESSAGING
419 LIBASYNC_REQ
420 UTIL_PW
421 SAMBA_VERSION
422 PTHREADPOOL
423 interfaces
424 smbconf
425 dbwrap
426 samba3-util
427 errors3
428 server_id_db
429 messages_util
430 messages_dgm
431 talloc_report
432 access
433 TDB_LIB
434 ''')
436 bld.SAMBA3_LIBRARY('smbd_shim',
437 source='''lib/smbd_shim.c''',
438 deps='talloc',
439 private_library=True)
441 bld.SAMBA3_SUBSYSTEM('auth_generic',
442 source='libsmb/auth_generic.c',
443 deps='gse gensec')
445 bld.SAMBA3_LIBRARY('libsmb',
446 source='''
447 libsmb/clientgen.c
448 libsmb/cliconnect.c
449 libsmb/clifile.c
450 libsmb/clispnego.c
451 libsmb/clirap.c
452 libsmb/clierror.c
453 libsmb/climessage.c
454 libsmb/clireadwrite.c
455 libsmb/clilist.c
456 libsmb/cliprint.c
457 libsmb/clitrans.c
458 libsmb/clisecdesc.c
459 libsmb/clidgram.c
460 libsmb/clistr.c
461 libsmb/cliquota.c
462 libsmb/clifsinfo.c
463 libsmb/clidfs.c
464 libsmb/clioplock.c
465 libsmb/clirap2.c
466 libsmb/async_smb.c
467 libsmb/reparse_symlink.c
468 libsmb/clisymlink.c
469 libsmb/smbsock_connect.c
470 libsmb/cli_smb2_fnum.c
471 ''',
472 deps='''
473 auth_generic
474 CLDAP
475 LIBNMB
476 SPNEGO_PARSE
477 LIBTSOCKET
478 KRBCLIENT
479 NDR_IOCTL
480 NDR_QUOTA
481 cli_smb_common
482 util_cmdline
483 tevent
484 ''',
485 private_library=True)
487 bld.SAMBA3_SUBSYSTEM('CLDAP',
488 source='libads/cldap.c',
489 deps='cli-ldap-common cli_cldap LIBTSOCKET')
491 # NOTE: The secrets3 library is a low level library used by several subsystems.
492 # PLEASE DO NOT make it depend on high level libraries like PDB, if you are
493 # doing that your design is wrong and needs changing. -SSS
494 bld.SAMBA3_LIBRARY('secrets3',
495 source='''
496 passdb/secrets.c
497 passdb/machine_account_secrets.c
498 passdb/machine_sid.c
499 passdb/secrets_lsa.c
500 ''',
501 deps='''
502 NDR_SECRETS
503 smbconf
504 samba3util
505 dbwrap
506 ''',
507 private_library=True)
509 bld.SAMBA3_LIBRARY('smbldap',
510 source='lib/smbldap.c',
511 deps='ldap lber samba-util smbconf',
512 enabled=bld.CONFIG_SET("HAVE_LDAP"),
513 private_library=False,
514 abi_directory='lib/ABI',
515 abi_match='smbldap_*',
516 pc_files=[],
517 vnum='2',
518 public_headers='include/smbldap.h include/smb_ldap.h')
520 bld.SAMBA3_LIBRARY('ads',
521 source='''
522 libads/ldap.c
523 libads/sasl.c
524 libads/sasl_wrapping.c
525 libads/krb5_setpw.c
526 libads/kerberos_util.c
527 libads/ldap_user.c
528 libads/ads_struct.c
529 libads/kerberos_keytab.c
530 libads/disp_sec.c
531 libads/ldap_utils.c
532 libads/ldap_schema.c
533 libads/util.c
534 libads/ndr.c
535 libads/net_ads_setspn.c
536 ''',
537 deps='''
538 cli-ldap-common
539 krb5samba
540 ldap
541 lber
542 KRBCLIENT
543 smbconf
544 LIBNMB
545 libsmb
546 DCUTIL
547 smbldap
548 trusts_util
549 ''',
550 private_library=True)
552 bld.SAMBA3_SUBSYSTEM('LIBADS_SERVER',
553 source='libads/authdata.c',
554 deps='SERVER_MUTEX ndr-krb5pac krb5samba gssapi')
556 bld.SAMBA3_SUBSYSTEM('LIBADS_PRINTER',
557 source='libads/ldap_printer.c',
558 deps='samba-util krb5samba')
560 # Only smbconf should link against this subsystem, else we will create
561 # a circular dependency.
562 bld.SAMBA3_SUBSYSTEM('SMBCONF_PARAM',
563 source='''
564 param/loadparm.c
565 lib/sharesec.c
566 lib/ldap_debug_handler.c
567 lib/util_names.c
568 ''',
569 deps='''
570 samba-util
571 PARAM_UTIL
572 ldap
573 lber
574 LOADPARM_CTX
575 samba3core
576 param_local.h
577 param_global.h
578 cups
579 ''')
581 bld.SAMBA3_LIBRARY('smbconf',
582 source='''
583 lib/smbconf/smbconf_init.c
584 lib/smbconf/smbconf_reg.c
585 ''',
586 deps='''
587 LIBSMBCONF
588 REG_SMBCONF
589 SAMBA_VERSION
591 charset
592 cli_smb_common
593 errors3
594 SMBCONF_PARAM
595 samba-util
596 talloc
597 util_reg
598 ''',
599 public_headers='../lib/smbconf/smbconf.h',
600 pc_files=[],
601 vnum='0')
603 bld.SAMBA3_LIBRARY('smbd_conn',
604 source='smbd/conn.c',
605 deps='samba3-util samba-util',
606 private_library=True)
608 bld.SAMBA3_SUBSYSTEM('sysquotas',
609 source='''
610 lib/sysquotas.c
611 lib/sysquotas_linux.c
612 lib/sysquotas_xfs.c
613 lib/sysquotas_4A.c
614 lib/sysquotas_4B.c
615 lib/sysquotas_jfs2.c
616 lib/sysquotas_nfs.c
617 ''',
618 allow_warnings=True,
619 deps='samba3-util samba-util tirpc')
621 NOTIFY_SOURCES=''
622 NOTIFY_DEPS=''
624 if bld.CONFIG_SET("HAVE_INOTIFY"):
625 NOTIFY_SOURCES += ' smbd/notify_inotify.c'
627 if bld.CONFIG_SET('SAMBA_FAM_LIBS'):
628 NOTIFY_SOURCES += ' smbd/notify_fam.c'
629 NOTIFY_DEPS += ' ' + bld.CONFIG_GET('SAMBA_FAM_LIBS')
631 bld.SAMBA3_LIBRARY('smbd_base',
632 source='''
633 smbd/server_reload.c
634 smbd/files.c
635 smbd/connection.c
636 smbd/utmp.c
637 smbd/session.c
638 smbd/dfree.c
639 smbd/dir.c
640 smbd/password.c
641 smbd/conn_msg.c
642 smbd/conn_idle.c
643 smbd/share_access.c
644 smbd/fileio.c
645 smbd/ipc.c
646 smbd/lanman.c
647 smbd/negprot.c
648 smbd/message.c
649 smbd/nttrans.c
650 smbd/pipes.c
651 smbd/reply.c
652 smbd/sesssetup.c
653 smbd/trans2.c
654 smbd/uid.c
655 smbd/dosmode.c
656 smbd/filename.c
657 smbd/open.c
658 smbd/close.c
659 smbd/blocking.c
660 smbd/sec_ctx.c
661 smbd/srvstr.c
662 smbd/vfs.c
663 smbd/perfcount.c
664 smbd/statcache.c
665 smbd/seal.c
666 smbd/posix_acls.c
667 lib/sysacls.c
668 smbd/process.c
669 smbd/service.c
670 smbd/error.c
671 printing/printspoolss.c
672 lib/sessionid_tdb.c
673 lib/cleanupdb.c
674 smbd/fake_file.c
675 smbd/quotas.c
676 smbd/ntquotas.c
677 smbd/msdfs.c
678 smbd/aio.c smbd/statvfs.c
679 smbd/dmapi.c
680 smbd/signing.c
681 smbd/file_access.c
682 smbd/dnsregister.c smbd/globals.c
683 smbd/smb2_server.c
684 smbd/smb2_glue.c
685 smbd/smb2_negprot.c
686 smbd/smb2_sesssetup.c
687 smbd/smb2_tcon.c
688 smbd/smb2_create.c
689 smbd/smb2_close.c
690 smbd/smb2_flush.c
691 smbd/smb2_read.c
692 smbd/smb2_write.c
693 smbd/smb2_lock.c
694 smbd/smb2_ioctl.c
695 smbd/smb2_ioctl_dfs.c
696 smbd/smb2_ioctl_filesys.c
697 smbd/smb2_ioctl_named_pipe.c
698 smbd/smb2_ioctl_network_fs.c
699 smbd/smb2_keepalive.c
700 smbd/smb2_query_directory.c
701 smbd/smb2_notify.c
702 smbd/smb2_getinfo.c
703 smbd/smb2_setinfo.c
704 smbd/smb2_break.c
705 smbd/smbXsrv_version.c
706 smbd/smbXsrv_client.c
707 smbd/smbXsrv_session.c
708 smbd/smbXsrv_tcon.c
709 smbd/smbXsrv_open.c
710 smbd/server_exit.c
711 smbd/durable.c
712 smbd/scavenger.c
713 smbd/mangle.c
714 smbd/mangle_hash.c
715 smbd/mangle_hash2.c
716 smbd/oplock.c
717 smbd/oplock_linux.c
718 smbd/notify.c
719 smbd/notify_msg.c
720 smbd/build_options.c
721 ''' + NOTIFY_SOURCES,
722 deps='''
723 talloc
724 tevent
726 libsmb
727 msrpc3
729 vfs_default
730 vfs_posixacl
731 inotify
732 samba3core
733 smbd_conn
734 param_service
735 AVAHI
736 PRINTBASE
737 PROFILE
738 LOCKING
739 LIBADS_SERVER
740 LIBAFS
741 RPC_SERVICE
742 NDR_SMBXSRV
743 LEASES_DB
744 LEASES_UTIL
745 sysquotas
746 NDR_SMB_ACL
747 netapi
748 NDR_IOCTL
749 notifyd
750 vfs_acl_common
751 NDR_QUOTA
752 ''' +
753 bld.env['dmapi_lib'] +
754 bld.env['legacy_quota_libs'] +
755 NOTIFY_DEPS,
756 private_library=True)
758 bld.SAMBA3_SUBSYSTEM('LOCKING',
759 source='''
760 locking/locking.c
761 locking/brlock.c
762 locking/posix.c
763 locking/share_mode_lock.c
764 ''',
765 deps='''
767 talloc
768 LEASES_DB
769 LEASES_UTIL
770 NDR_OPEN_FILES
771 FNAME_UTIL
772 ''')
774 bld.SAMBA3_SUBSYSTEM('LEASES_DB',
775 source='locking/leases_db.c',
776 deps='NDR_LEASES_DB')
778 bld.SAMBA3_SUBSYSTEM('LEASES_UTIL',
779 source='locking/leases_util.c',
780 deps='NDR_OPEN_FILES')
782 if bld.CONFIG_GET("WITH_PROFILE"):
783 bld.SAMBA3_SUBSYSTEM('PROFILE',
784 source='profile/profile.c',
785 deps='samba-util')
786 else:
787 bld.SAMBA3_SUBSYSTEM('PROFILE',
788 source='profile/profile_dummy.c',
789 deps='')
791 bld.SAMBA3_SUBSYSTEM('PRINTBASE',
792 source='''
793 printing/notify.c
794 printing/printing_db.c
795 ''',
796 deps='''
797 samba-util
799 ''')
801 bld.SAMBA3_SUBSYSTEM('PRINTBACKEND',
802 source='''
803 printing/printing.c
804 printing/nt_printing.c
805 printing/nt_printing_tdb.c
806 printing/nt_printing_migrate_internal.c
807 printing/nt_printing_ads.c
808 printing/queue_process.c
809 ''',
810 deps='''
811 PRINTBASE
812 LIBADS_PRINTER
814 printing_migrate
815 SPOOLSSD
816 ''')
818 bld.SAMBA3_LIBRARY('printing_migrate',
819 source='''
820 printing/nt_printing_migrate.c
821 rpc_client/cli_winreg_spoolss.c
822 printing/nt_printing_os2.c
823 ''',
824 deps='''
825 NDR_NTPRINTING
826 cli_spoolss
827 RPC_NDR_WINREG
828 LIBCLI_WINREG
829 smbconf
830 ''',
831 private_library=True)
833 bld.SAMBA3_SUBSYSTEM('PRINTING',
834 source='''
835 printing/pcap.c
836 printing/print_svid.c
837 printing/print_aix.c
838 printing/print_cups.c
839 printing/print_generic.c
840 printing/lpq_parse.c
841 printing/load.c
842 printing/print_standard.c
843 printing/print_iprint.c
844 printing/printer_list.c
845 ''',
846 deps='''
847 NDR_PRINTCAP
849 cups
850 ''')
852 bld.SAMBA3_SUBSYSTEM('FNAME_UTIL',
853 source='lib/filename_util.c',
854 deps='samba-util')
856 bld.SAMBA3_SUBSYSTEM('LIBNET',
857 source='libnet/libnet_join.c',
858 deps='NDR_LIBNET_JOIN INIT_SAMR net_keytab pdb')
860 bld.SAMBA3_LIBRARY('net_keytab',
861 source='libnet/libnet_keytab.c',
862 deps='krb5samba ads',
863 private_library=True)
866 bld.SAMBA3_SUBSYSTEM('LIBNET_DSSYNC',
867 source='''
868 libnet/libnet_dssync.c
869 libnet/libnet_dssync_passdb.c
870 libnet/libnet_dssync_keytab.c
871 ''',
872 deps='''
873 LIBNET
874 RPC_NDR_DRSUAPI
875 ''')
877 bld.SAMBA3_SUBSYSTEM('LIBEVENTLOG',
878 source='lib/eventlog/eventlog.c',
879 deps='NDR_EVENTLOG tdb')
881 bld.SAMBA3_SUBSYSTEM('LIBNMB',
882 source='''
883 libsmb/unexpected.c
884 libsmb/namecache.c
885 libsmb/nmblib.c
886 libsmb/namequery.c
887 libsmb/conncache.c
888 libads/sitename_cache.c
889 ''',
890 deps='''
891 LIBTSOCKET
892 samba3util
893 addns
894 lmhosts
895 resolv
896 ''')
898 bld.SAMBA3_SUBSYSTEM('SERVICES',
899 source='''
900 services/svc_spoolss.c
901 services/svc_rcinit.c
902 services/svc_winreg_glue.c
903 services/svc_netlogon.c
904 services/svc_winreg.c
905 services/svc_wins.c
906 ''',
907 deps='samba-util')
909 bld.SAMBA3_SUBSYSTEM('PLAINTEXT_AUTH',
910 source='''
911 auth/pampass.c
912 auth/pass_check.c
913 ''',
914 deps='''
916 PAM_ERRORS
917 ''')
919 bld.SAMBA3_SUBSYSTEM('PASSCHANGE',
920 source='libsmb/passchange.c',
921 deps='''
922 LIBCLI_SAMR
923 INIT_LSA
924 msrpc3
925 krb5samba
926 ''')
928 bld.SAMBA3_SUBSYSTEM('SAMBA_VERSION',
929 source='lib/version.c',
930 deps='samba-util')
932 bld.SAMBA3_SUBSYSTEM('SLCACHE',
933 source='libsmb/samlogon_cache.c',
934 deps='''
935 samba-util
937 ''')
939 bld.SAMBA3_SUBSYSTEM('DCUTIL',
940 source='''
941 libsmb/namequery_dc.c
942 libsmb/dsgetdcname.c
943 ''',
944 deps='''
946 msrpc3
947 libcli_lsa3
948 ''')
950 bld.SAMBA3_LIBRARY('trusts_util',
951 source='libsmb/trusts_util.c',
952 deps='''
953 libcli_netlogon3
954 msrpc3
955 samba-passdb
956 ''',
957 private_library=True)
959 bld.SAMBA3_SUBSYSTEM('tdb-wrap3',
960 source='lib/util_tdb.c',
961 deps='talloc samba3-util')
963 bld.SAMBA3_LIBRARY('samba3-util',
964 source='''
965 lib/util_sec.c
966 lib/util_str.c
967 lib/adt_tree.c
968 lib/util_malloc.c
969 lib/namearray.c
970 lib/file_id.c
971 lib/cbuf.c
972 lib/per_thread_cwd.c
973 ''',
974 deps='''
975 samba-util
976 charset
977 ''',
978 private_library=True)
980 bld.SAMBA_LIBRARY('xattr_tdb',
981 source='lib/xattr_tdb.c',
982 deps='NDR_XATTR dbwrap samba3-util',
983 private_library=True)
985 bld.SAMBA3_LIBRARY('CHARSET3',
986 source='''
987 lib/charcnv.c
988 lib/fstring.c
989 ''',
990 public_deps='''
991 ICONV_WRAPPER
992 charset
993 ''',
994 deps='''
995 samba-util
996 samba3-util
997 ''',
998 private_library=True)
1000 bld.SAMBA3_SUBSYSTEM('errors3',
1001 source='''
1002 libsmb/errormap.c
1003 libsmb/smberr.c
1004 lib/errmap_unix.c
1005 ''',
1006 deps='samba-errors')
1008 bld.SAMBA3_SUBSYSTEM('LIBCLI_SAMR',
1009 source='rpc_client/cli_samr.c',
1010 deps='RPC_NDR_SAMR')
1012 bld.SAMBA3_LIBRARY('libcli_lsa3',
1013 source='rpc_client/cli_lsarpc.c',
1014 deps='RPC_NDR_LSA INIT_LSA',
1015 private_library=True)
1017 bld.SAMBA3_LIBRARY('libcli_netlogon3',
1018 source='''
1019 rpc_client/cli_netlogon.c
1020 rpc_client/util_netlogon.c
1021 ''',
1022 deps='''
1023 msrpc3
1024 RPC_NDR_NETLOGON
1025 INIT_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('INIT_LSA',
1055 source='rpc_client/init_lsa.c',
1056 deps='samba-util')
1058 bld.SAMBA3_SUBSYSTEM('INIT_NETLOGON',
1059 source='rpc_client/init_netlogon.c',
1060 deps='samba-util')
1062 bld.SAMBA3_SUBSYSTEM('INIT_SAMR',
1063 source='rpc_client/init_samr.c',
1064 deps='samba-util')
1066 bld.SAMBA3_SUBSYSTEM('LIBLSA',
1067 source='lib/lsa.c')
1069 bld.SAMBA3_SUBSYSTEM('SPOOLSSD',
1070 source='printing/spoolssd.c',
1071 deps='''
1072 samba-util
1073 RPC_SOCK_HELPER
1074 ''')
1076 bld.SAMBA3_SUBSYSTEM('tevent-glib-glue',
1077 source='lib/tevent_glib_glue.c',
1078 deps='glib-2.0',
1079 enabled=bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1082 ########################## BINARIES #################################
1084 bld.SAMBA3_BINARY('smbd/smbd',
1085 source='smbd/server.c smbd/smbd_cleanupd.c',
1086 deps='''
1087 popt_samba3
1088 smbd_base
1089 EPMD
1090 LSASD
1091 FSSD
1092 MDSSD
1093 SPOOLSSD
1094 ''',
1095 install_path='${SBINDIR}')
1098 bld.SAMBA3_SUBSYSTEM('TDB_VALIDATE',
1099 source='lib/tdb_validate.c',
1100 deps='samba-util')
1103 bld.SAMBA3_BINARY('client/smbclient',
1104 source='''
1105 client/client.c
1106 client/clitar.c
1107 client/dnsbrowse.c
1108 ''',
1109 deps='''
1110 talloc
1111 popt_samba3_cmdline
1112 smbconf
1113 ndr-standard
1114 SMBREADLINE
1115 libsmb
1116 msrpc3
1117 RPC_NDR_SRVSVC
1118 cli_smb_common
1119 archive
1120 ''')
1122 bld.SAMBA3_BINARY('smbspool',
1123 source='client/smbspool.c',
1124 deps='''
1125 talloc
1126 popt_samba3
1127 smbconf
1128 libsmb
1129 samba3core
1130 ''')
1132 bld.SAMBA3_BINARY('smbspool_krb5_wrapper',
1133 source='client/smbspool_krb5_wrapper.c',
1134 deps='''
1135 DYNCONFIG
1136 cups
1137 krb5samba
1138 ''',
1139 install_path='${LIBEXECDIR}/samba',
1140 enabled=bld.CONFIG_SET('HAVE_CUPS'))
1142 bld.SAMBA3_BINARY('locktest2',
1143 source='torture/locktest2.c',
1144 deps='''
1145 talloc
1146 smbconf
1147 libsmb
1148 LOCKING
1149 ''',
1150 install=False)
1152 bld.SAMBA3_BINARY('smbtorture' + bld.env.suffix3,
1153 source='''
1154 torture/torture.c
1155 torture/nbio.c
1156 torture/scanner.c
1157 torture/utable.c
1158 torture/denytest.c
1159 torture/mangle_test.c
1160 torture/nbench.c
1161 torture/test_async_echo.c
1162 torture/test_addrchange.c
1163 torture/test_posix_append.c
1164 torture/test_nttrans_create.c
1165 torture/test_nttrans_fsctl.c
1166 torture/test_case_insensitive.c
1167 torture/test_notify_online.c
1168 torture/test_chain3.c
1169 torture/test_smb2.c
1170 torture/test_authinfo_structs.c
1171 torture/test_smbsock_any_connect.c
1172 torture/test_cleanup.c
1173 torture/test_notify.c
1174 lib/tevent_barrier.c
1175 torture/test_dbwrap_watch.c
1176 torture/test_dbwrap_do_locked.c
1177 torture/test_idmap_tdb_common.c
1178 torture/test_dbwrap_ctdb.c
1179 torture/test_buffersize.c
1180 torture/test_messaging_read.c
1181 torture/test_messaging_fd_passing.c
1182 torture/test_messaging_send_all.c
1183 torture/test_oplock_cancel.c
1184 torture/test_pthreadpool_tevent.c
1185 torture/bench_pthreadpool.c
1186 torture/wbc_async.c
1187 torture/test_g_lock.c
1188 torture/test_namemap_cache.c
1189 torture/test_idmap_cache.c
1190 torture/test_hidenewfiles.c
1191 ''',
1192 deps='''
1193 talloc
1194 smbconf
1195 libsmb
1196 msrpc3
1197 TLDAP
1198 RPC_NDR_ECHO
1199 WB_REQTRANS
1200 LOCKING
1201 NDR_OPEN_FILES
1202 idmap
1203 IDMAP_TDB_COMMON
1204 samba-cluster-support
1205 ''',
1206 cflags='-DWINBINDD_SOCKET_DIR=\"%s\"' % bld.env.WINBINDD_SOCKET_DIR,
1207 install=False)
1209 bld.SAMBA3_BINARY('smbconftort',
1210 source='lib/smbconf/testsuite.c',
1211 deps='''
1212 talloc
1213 smbconf
1214 popt_samba3
1215 ''',
1216 install=False)
1218 bld.SAMBA3_BINARY('msgtest',
1219 source='torture/msgtest.c',
1220 deps='''
1221 talloc
1222 smbconf
1223 ''',
1224 install=False)
1226 bld.SAMBA3_BINARY('msg_sink',
1227 source='torture/msg_sink.c',
1228 deps='''
1229 talloc
1230 smbconf
1231 ''',
1232 install=False)
1234 bld.SAMBA3_BINARY('msg_source',
1235 source='torture/msg_source.c',
1236 deps='''
1237 talloc
1238 smbconf
1239 ''',
1240 install=False)
1242 bld.SAMBA3_BINARY('pdbtest',
1243 source='torture/pdbtest.c',
1244 deps='''
1245 talloc
1247 popt_samba3
1248 AUTH_COMMON
1249 auth
1250 ''',
1251 install=False)
1253 bld.SAMBA3_BINARY('vfstest',
1254 source='''
1255 torture/cmd_vfs.c
1256 torture/vfstest.c
1257 torture/vfstest_chain.c
1258 ''',
1259 deps='''
1261 popt_samba3
1262 smbconf
1263 SMBREADLINE
1264 ''',
1265 install=False)
1267 bld.SAMBA3_BINARY('versiontest',
1268 source='lib/version_test.c',
1269 deps='''
1270 SAMBA_VERSION
1271 smbconf
1272 ''',
1273 install=False)
1275 bld.SAMBA3_BINARY('timelimit',
1276 source='script/tests/timelimit.c',
1277 install=False)
1279 bld.SAMBA3_BINARY('rpc_open_tcp',
1280 source='torture/rpc_open_tcp.c',
1281 deps='''
1282 talloc
1283 msrpc3
1284 ''',
1285 install=False)
1287 bld.SAMBA3_BINARY('vlp',
1288 source='printing/tests/vlp.c',
1289 deps='''
1290 talloc
1291 smbconf
1292 ''',
1293 install=False)
1296 pyrpc_util = bld.pyembed_libname('pyrpc_util')
1297 pytalloc_util = bld.pyembed_libname('pytalloc-util')
1298 bld.SAMBA3_PYTHON('pysmbd',
1299 source='smbd/pysmbd.c',
1300 deps=' '.join(['smbd_base', pyrpc_util, pytalloc_util]),
1301 realname='samba/samba3/smbd.so'
1304 pycredentials = 'pycredentials'
1305 bld.SAMBA3_PYTHON('pylibsmb',
1306 source='libsmb/pylibsmb.c',
1307 deps='smbclient samba-credentials %s' % pycredentials,
1308 realname='samba/samba3/libsmb_samba_internal.so'
1311 bld.SAMBA3_BINARY('spotlight2sparql',
1312 source='''
1313 rpc_server/mdssvc/sparql_parser_test.c
1314 rpc_server/mdssvc/sparql_parser.y
1315 rpc_server/mdssvc/sparql_lexer.l
1316 rpc_server/mdssvc/sparql_mapping.c''',
1317 deps='samba3-util talloc ' + bld.env['libtracker'],
1318 enabled=bld.env.with_spotlight,
1319 install=False)
1321 bld.SAMBA3_BINARY('tevent_glib_glue_test',
1322 source='lib/tevent_glib_glue_tests.c',
1323 deps='''
1324 talloc
1325 libsmb
1326 popt_samba3
1327 tevent-glib-glue''',
1328 enabled=bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1329 install=False)
1331 bld.SAMBA3_BINARY('tevent_glib_tracker',
1332 source='utils/async-tracker.c',
1333 deps='''
1334 talloc
1335 libsmb
1336 popt_samba3
1337 tevent-glib-glue ''' + bld.env['libtracker'],
1338 enabled=bld.CONFIG_SET('HAVE_TRACKER') and bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1339 install=False)
1341 ########################## INCLUDES #################################
1343 bld.RECURSE('auth')
1344 bld.RECURSE('libgpo/gpext')
1345 bld.RECURSE('librpc')
1346 bld.RECURSE('librpc/idl')
1347 bld.RECURSE('libsmb')
1348 bld.RECURSE('modules')
1349 bld.RECURSE('param')
1350 bld.RECURSE('passdb')
1351 bld.RECURSE('rpc_server')
1352 bld.RECURSE('script')
1353 bld.RECURSE('winbindd')
1354 bld.RECURSE('../examples/auth')
1355 bld.RECURSE('../examples/libsmbclient')
1356 bld.RECURSE('../examples/pdb')
1357 bld.RECURSE('../examples/VFS')
1358 bld.RECURSE('../examples/fuse')
1359 bld.RECURSE('../examples/winexe')
1360 bld.RECURSE('lib/netapi/tests')
1361 bld.RECURSE('lib/netapi/examples')
1362 bld.RECURSE('smbd/notifyd')
1363 bld.RECURSE('rpcclient')
1364 bld.RECURSE('utils')
1365 bld.RECURSE('nmbd')
1366 bld.RECURSE('lib/util')
1368 bld.ENFORCE_GROUP_ORDERING()
1369 bld.CHECK_PROJECT_RULES()