ctdb-common: Map ENOENT for a missing event script to ENOEXEC
[samba.git] / source3 / wscript_build
blob0c9f6ad3143a739e87650740ae6497f694363ba5
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 rpc_client/local_np.c
59 librpc/rpc/dcerpc_helpers.c
60 ''',
61 deps='''
62 ndr
63 ndr-standard
64 RPC_NDR_EPMAPPER
65 NTLMSSP_COMMON
66 COMMON_SCHANNEL
67 LIBCLI_AUTH
68 LIBTSOCKET
69 npa_tstream
70 gse
71 dcerpc-binding
72 libsmb
73 ndr-table
74 NETLOGON_CREDS_CLI
75 ''',
76 private_library=True)
78 bld.SAMBA3_SUBSYSTEM('AVAHI',
79 source='''
80 lib/avahi.c
81 smbd/avahi_register.c
82 ''',
83 deps='''
84 avahi-common
85 avahi-client
86 ''',
87 enabled=bld.env.with_avahi)
89 bld.SAMBA3_SUBSYSTEM('GROUPDB',
90 source='''
91 groupdb/mapping.c
92 groupdb/mapping_tdb.c
93 ''',
94 deps='tdb')
96 bld.SAMBA3_SUBSYSTEM('TLDAP',
97 source='''
98 lib/tldap.c
99 lib/tldap_util.c
100 lib/tldap_gensec_bind.c
101 lib/tldap_tls_connect.c
102 ''',
103 deps='''
104 asn1util
105 LIBTSOCKET
106 util_tsock
107 LIBTLS
108 gensec
109 ''')
111 bld.SAMBA3_BINARY('test_tldap',
112 source='lib/test_tldap.c',
113 deps='''
114 asn1util
115 LIBTSOCKET
116 samba3util
117 LIBTLS
118 smbconf
119 cmocka
120 ''',
121 for_selftest=True)
123 # libpdb.so should not expose internal symbols that are only usable
124 # to the statically linked modules that are merged into libpdb.
125 # Note that we always filter these symbols out in libpdb, even
126 # when modules are not linked statically. In the latter case
127 # symbols will not be present in the libpdb anyway so no hurt is
128 # done to the version script.
129 private_pdb_match = []
130 private_pdb_match.append('!idmap_init')
131 private_pdb_match.append('!idmap_sids_to_xids')
132 private_pdb_match.append('!idmap_xids_to_sids')
134 ldapsam_pdb_match = ['!priv2ld', '!smbldap_search_domain_info',
135 '!ldapsam_*', '!groupmap_attr_list*', '!get_userattr_list',
136 '!dominfo_attr_list', '!get_attr_key2string',
137 '!sidmap_attr_list', '!attrib_map_*', '!idpool_attr_list',
138 '!get_attr_list']
139 private_pdb_match.append('!pdb_nds_*')
140 private_pdb_match.append('!pdb_ldapsam_init*')
141 private_pdb_match.append('!pdb_*_init')
142 private_pdb_match = private_pdb_match + ldapsam_pdb_match
144 bld.SAMBA3_LIBRARY('samba-passdb',
145 source='',
146 deps='pdb',
147 private_library=False,
148 grouping_library=True,
149 pc_files=[],
150 public_headers_install=True,
151 public_headers='''
152 include/passdb.h
153 passdb/machine_sid.h
154 passdb/lookup_sid.h
155 ''',
156 abi_match=private_pdb_match,
157 abi_directory='passdb/ABI',
158 vnum='0.29.0')
160 bld.SAMBA3_SUBSYSTEM('pdb',
161 source='''
162 passdb/pdb_get_set.c
163 passdb/passdb.c
164 lib/util_wellknown.c
165 lib/util_builtin.c
166 passdb/pdb_compat.c
167 lib/util_sid_passdb.c
168 lib/util_unixsids.c
169 passdb/lookup_sid.c
170 passdb/login_cache.c
171 passdb/account_pol.c
172 lib/privileges.c
173 lib/util_nscd.c
174 lib/winbind_util.c
175 passdb/pdb_util.c
176 passdb/pdb_interface.c
177 passdb/pdb_secrets.c''',
178 deps='''
179 secrets3
180 GROUPDB
181 SERVER_MUTEX
182 wbclient
183 LIBCLI_AUTH
184 flag_mapping
185 samba-credentials
186 samba-modules
187 nscd
188 ''')
190 bld.SAMBA3_LIBRARY('smbldaphelper',
191 source='''
192 passdb/pdb_ldap_schema.c
193 passdb/pdb_ldap_util.c
194 ''',
195 deps='smbldap secrets3',
196 allow_undefined_symbols=True,
197 enabled=bld.CONFIG_SET('HAVE_LDAP'),
198 private_library=True)
200 bld.SAMBA3_SUBSYSTEM('SERVER_MUTEX',
201 source='lib/server_mutex.c',
202 deps='talloc')
204 # this includes only the low level parse code, not stuff
205 # that requires knowledge of security contexts
206 bld.SAMBA3_SUBSYSTEM('REG_PARSE_PRS',
207 source='registry/reg_parse_prs.c')
209 bld.SAMBA3_SUBSYSTEM('REGFIO',
210 source='registry/regfio.c',
211 deps='samba-util REG_PARSE_PRS')
213 bld.SAMBA_BINARY('test_registry_regfio',
214 source='registry/tests/test_regfio.c',
215 deps='cmocka samba3-util smbconf REGFIO',
216 local_include=False,
217 for_selftest=True)
219 # Do not link against this use 'smbconf'
220 bld.SAMBA3_SUBSYSTEM('SMBREGISTRY',
221 source='''
222 registry/reg_api.c
223 registry/reg_dispatcher.c
224 registry/reg_cachehook.c
225 registry/reg_objects.c
226 registry/reg_util_internal.c
227 lib/util_nttoken.c
228 registry/reg_backend_db.c
229 registry/reg_parse_internal.c
230 registry/reg_parse.c
231 lib/srprs.c
232 registry/reg_init_basic.c
233 ''',
234 deps='''
235 smbd_shim
236 tdb-wrap3
237 NDR_SECURITY
238 util_tdb
239 talloc
240 replace
241 util_reg
242 samba-util
243 samba-security
244 errors3
245 dbwrap
246 samba3-util
247 ''')
249 # Do not link against this use 'smbconf'
250 bld.SAMBA3_SUBSYSTEM('REG_SMBCONF',
251 source='''
252 registry/reg_backend_smbconf.c
253 registry/reg_init_smbconf.c
254 registry/reg_util_token.c
255 registry/reg_api_util.c
256 ''',
257 deps='SMBREGISTRY')
259 bld.SAMBA3_LIBRARY('REG_FULL',private_library=True,
260 source='''
261 registry/reg_backend_printing.c
262 registry/reg_backend_shares.c
263 registry/reg_backend_netlogon_params.c
264 registry/reg_backend_prod_options.c
265 registry/reg_backend_tcpip_params.c
266 registry/reg_backend_hkpt_params.c
267 registry/reg_backend_current_version.c
268 registry/reg_backend_perflib.c
269 registry/reg_init_full.c
270 registry/reg_perfcount.c''',
271 deps='''
272 smbconf
273 tdb-wrap3
274 REG_PARSE_PRS
276 ''')
278 bld.SAMBA3_LIBRARY('cmdline_contexts',
279 source='lib/cmdline_contexts.c',
280 deps='samba3core',
281 private_library=True)
283 bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
284 source='libads/kerberos.c libads/ads_status.c',
285 public_deps='krb5samba asn1util k5crypto gssapi LIBTSOCKET CLDAP LIBNMB')
287 bld.SAMBA3_SUBSYSTEM('util_tsock',
288 source='lib/util_tsock.c',
289 deps='tevent-util LIBTSOCKET')
291 bld.SAMBA3_SUBSYSTEM('samba3util',
292 source='''
293 lib/system.c
294 lib/sendfile.c
295 lib/recvfile.c
296 lib/time.c
297 lib/util_sid.c
298 lib/util_specialsids.c
299 lib/util_file.c
300 lib/util.c
301 lib/util_path.c
302 lib/util_matching.c
303 lib/util_procid.c
304 lib/util_sock.c
305 lib/util_transfer_file.c
306 lib/util_macstreams.c
307 ''',
308 deps='''
309 CHARSET3
311 LIBTSOCKET
312 util_tsock
313 samba-security
314 NDR_SECURITY
315 samba-util
316 util_tdb
317 sys_rw
318 iov_buf
319 ''')
321 bld.SAMBA3_SUBSYSTEM('samba3-namearray',
322 source='''
323 lib/util_namearray.c
324 ''',
325 deps='''
326 samba-passdb
327 ''')
329 if bld.env.with_ctdb:
330 SAMBA_CLUSTER_SUPPORT_SOURCES='''
331 lib/cluster_support.c
332 lib/dbwrap/dbwrap_ctdb.c
333 lib/messages_ctdb.c
334 lib/messages_ctdb_ref.c
335 lib/ctdbd_conn.c
337 SAMBA_CLUSTER_SUPPORT_DEPS='''
338 talloc
339 tevent
342 else:
343 SAMBA_CLUSTER_SUPPORT_SOURCES='''
344 lib/cluster_support.c
345 lib/ctdb_dummy.c
347 SAMBA_CLUSTER_SUPPORT_DEPS='''
348 talloc
349 tevent
352 bld.SAMBA3_LIBRARY('samba-cluster-support',
353 source=SAMBA_CLUSTER_SUPPORT_SOURCES,
354 deps=SAMBA_CLUSTER_SUPPORT_DEPS,
355 allow_undefined_symbols=True,
356 private_library=True)
358 bld.SAMBA3_SUBSYSTEM('TDB_LIB',
359 source='''
360 lib/dbwrap/dbwrap_open.c
361 lib/dbwrap/dbwrap_watch.c
362 lib/g_lock.c
363 ''',
364 deps='''
365 dbwrap
366 samba-cluster-support
367 ''')
369 bld.SAMBA3_LIBRARY('messages_util',
370 source='''lib/messages_util.c''',
371 deps='samba-util',
372 private_library=True)
374 bld.SAMBA3_SUBSYSTEM('samba3core',
375 source='''
376 lib/messages.c
377 lib/util_cluster.c
378 lib/id_cache.c
379 lib/serverid.c
380 lib/server_id_watch.c
381 lib/server_id_db_util.c
382 lib/addrchange.c
383 ../lib/util/debug_s3.c
384 lib/dumpcore.c
385 lib/interface.c
386 lib/username.c
387 lib/smbrun.c
388 lib/wins_srv.c
389 lib/substitute.c
390 lib/substitute_generic.c
391 lib/ms_fnmatch.c
392 lib/tallocmsg.c
393 lib/dmallocmsg.c
394 lib/gencache.c
395 lib/util_event.c
396 lib/global_contexts.c
397 lib/ldap_escape.c
398 lib/system_smbd.c
399 lib/audit.c
400 lib/idmap_cache.c
401 lib/namemap_cache.c
402 lib/util_ea.c
403 lib/background.c
404 ''',
405 deps='''
406 samba3util
407 LIBTSOCKET
408 NDR_MESSAGING
409 LIBASYNC_REQ
410 UTIL_PW
411 SAMBA_VERSION
412 PTHREADPOOL
413 interfaces
414 smbconf
415 dbwrap
416 samba3-util
417 errors3
418 server_id_db
419 messages_util
420 messages_dgm
421 talloc_report_printf
422 access
423 TDB_LIB
425 ''')
427 bld.SAMBA3_LIBRARY('smbd_shim',
428 source='''lib/smbd_shim.c''',
429 deps='talloc',
430 private_library=True)
432 bld.SAMBA3_SUBSYSTEM('auth_generic',
433 source='libsmb/auth_generic.c',
434 deps='gse gensec')
436 bld.SAMBA3_LIBRARY('libsmb',
437 source='''
438 libsmb/clientgen.c
439 libsmb/cliconnect.c
440 libsmb/clifile.c
441 libsmb/clirap.c
442 libsmb/clierror.c
443 libsmb/climessage.c
444 libsmb/clireadwrite.c
445 libsmb/clilist.c
446 libsmb/cliprint.c
447 libsmb/clitrans.c
448 libsmb/clisecdesc.c
449 libsmb/cliquota.c
450 libsmb/clifsinfo.c
451 libsmb/clidfs.c
452 libsmb/clioplock.c
453 libsmb/async_smb.c
454 libsmb/clisymlink.c
455 libsmb/smbsock_connect.c
456 libsmb/cli_smb2_fnum.c
457 ''',
458 deps='''
459 auth_generic
460 CLDAP
461 LIBNMB
462 SPNEGO_PARSE
463 LIBTSOCKET
464 KRBCLIENT
465 NDR_IOCTL
466 NDR_QUOTA
467 cli_smb_common
468 tevent
469 ''',
470 private_library=True)
472 bld.SAMBA3_SUBSYSTEM('NETLOGON_PING',
473 source='libads/netlogon_ping.c',
474 deps='TLDAP cli_cldap')
476 bld.SAMBA3_SUBSYSTEM('CLDAP',
477 source='libads/cldap.c',
478 deps='cli-ldap-common cli_cldap LIBTSOCKET NETLOGON_PING')
480 # NOTE: The secrets3 library is a low level library used by several subsystems.
481 # PLEASE DO NOT make it depend on high level libraries like PDB, if you are
482 # doing that your design is wrong and needs changing. -SSS
483 bld.SAMBA3_LIBRARY('secrets3',
484 source='''
485 passdb/secrets.c
486 passdb/machine_account_secrets.c
487 passdb/machine_sid.c
488 passdb/secrets_lsa.c
489 ''',
490 deps='''
491 ndr-samba4
492 smbconf
493 samba3util
494 dbwrap
495 krb5samba
496 LIBCLI_AUTH
497 samba-credentials
498 ''',
499 private_library=True)
501 bld.SAMBA3_LIBRARY('smbldap',
502 source='lib/smbldap.c',
503 deps='ldap lber samba-util smbconf',
504 enabled=bld.CONFIG_SET("HAVE_LDAP"),
505 private_library=False,
506 abi_directory='lib/ABI',
507 abi_match='smbldap_*',
508 pc_files=[],
509 vnum='2.1.0',
510 public_headers='include/smbldap.h include/smb_ldap.h')
512 bld.SAMBA3_LIBRARY('ads',
513 source='''
514 libads/ldap.c
515 libads/sasl.c
516 libads/sasl_wrapping.c
517 libads/tls_wrapping.c
518 libads/krb5_setpw.c
519 libads/ldap_user.c
520 libads/ads_struct.c
521 libads/kerberos_keytab.c
522 libads/disp_sec.c
523 libads/ldap_utils.c
524 libads/ldap_schema.c
525 libads/util.c
526 libads/net_ads_setspn.c
527 libads/trusts_util.c
528 ''',
529 deps='''
530 cli-ldap-common
531 krb5samba
532 krb5
533 ldap
534 lber
535 KRBCLIENT
536 smbconf
537 LIBNMB
538 libsmb
539 DCUTIL
540 smbldap
541 libcli_netlogon3
542 msrpc3
543 samba-passdb
544 NDR_ADS
545 ''',
546 private_library=True)
548 bld.SAMBA3_SUBSYSTEM('LIBADS_SERVER',
549 source='libads/authdata.c',
550 deps='SERVER_MUTEX ndr-krb5pac krb5samba gssapi')
552 bld.SAMBA3_SUBSYSTEM('LIBADS_PRINTER',
553 source='libads/ldap_printer.c',
554 deps='samba-util krb5samba')
556 # Only smbconf should link against this subsystem, else we will create
557 # a circular dependency.
558 bld.SAMBA3_SUBSYSTEM('SMBCONF_PARAM',
559 source='''
560 param/loadparm.c
561 lib/sharesec.c
562 lib/ldap_debug_handler.c
563 lib/util_names.c
564 ''',
565 deps='''
566 samba-util
567 PARAM_UTIL
568 ldap
569 lber
570 LOADPARM_CTX
571 samba3core
572 param_local.h
573 param_global.h
574 cups
575 ''')
577 bld.SAMBA3_LIBRARY('smbconf',
578 source='''
579 lib/smbconf/smbconf_init.c
580 lib/smbconf/smbconf_reg.c
581 ''',
582 deps='''
583 LIBSMBCONF
584 REG_SMBCONF
585 SAMBA_VERSION
587 charset
588 samba-hostconfig
589 SMBCONF_PARAM
590 samba-util
591 talloc
592 util_reg
593 ''',
594 public_headers='../lib/smbconf/smbconf.h',
595 pc_files=[],
596 vnum='0.0.1')
598 bld.SAMBA3_SUBSYSTEM('sysquotas',
599 source='''
600 lib/sysquotas.c
601 lib/sysquotas_linux.c
602 lib/sysquotas_xfs.c
603 lib/sysquotas_4A.c
604 lib/sysquotas_4B.c
605 lib/sysquotas_jfs2.c
606 lib/sysquotas_nfs.c
607 ''',
608 allow_warnings=True,
609 deps='samba3-util samba-util tirpc')
611 NOTIFY_SOURCES=''
612 NOTIFY_DEPS=''
614 if bld.CONFIG_SET("HAVE_INOTIFY"):
615 NOTIFY_SOURCES += ' smbd/notify_inotify.c'
617 if bld.CONFIG_SET('SAMBA_FAM_LIBS'):
618 NOTIFY_SOURCES += ' smbd/notify_fam.c'
619 NOTIFY_DEPS += ' ' + bld.CONFIG_GET('SAMBA_FAM_LIBS')
621 if bld.CONFIG_SET('WITH_SMB1SERVER'):
622 SMB1_SOURCES = '''
623 smbd/smb1_message.c
624 smbd/smb1_sesssetup.c
625 smbd/smb1_lanman.c
626 smbd/smb1_utils.c
627 smbd/smb1_aio.c
628 smbd/smb1_ipc.c
629 smbd/smb1_negprot.c
630 smbd/smb1_nttrans.c
631 smbd/smb1_oplock.c
632 smbd/smb1_pipes.c
633 smbd/smb1_reply.c
634 smbd/smb1_service.c
635 smbd/smb1_signing.c
636 smbd/smb1_process.c
637 smbd/smb1_trans2.c
639 else:
640 SMB1_SOURCES = ''
642 bld.SAMBA3_LIBRARY('smbd_base',
643 source='''
644 smbd/server_reload.c
645 smbd/files.c
646 smbd/connection.c
647 smbd/utmp.c
648 smbd/session.c
649 smbd/dfree.c
650 smbd/dir.c
651 smbd/password.c
652 smbd/conn_msg.c
653 smbd/conn_idle.c
654 smbd/share_access.c
655 smbd/fileio.c
656 smbd/smb2_ipc.c
657 smbd/smb2_nttrans.c
658 smbd/smb2_pipes.c
659 smbd/smb2_reply.c
660 smbd/smb2_trans2.c
661 smbd/uid.c
662 smbd/dosmode.c
663 smbd/filename.c
664 smbd/open.c
665 smbd/close.c
666 smbd/blocking.c
667 smbd/sec_ctx.c
668 smbd/srvstr.c
669 smbd/vfs.c
670 smbd/seal.c
671 smbd/posix_acls.c
672 lib/sysacls.c
673 smbd/smb2_process.c
674 smbd/smb2_service.c
675 smbd/error.c
676 printing/printspoolss.c
677 printing/rap_jobid.c
678 printing/load.c
679 printing/printer_list.c
680 lib/sessionid_tdb.c
681 lib/cleanupdb.c
682 smbd/fake_file.c
683 smbd/quotas.c
684 smbd/ntquotas.c
685 smbd/msdfs.c
686 smbd/smb2_aio.c smbd/statvfs.c
687 smbd/dmapi.c
688 smbd/smb2_signing.c
689 smbd/file_access.c
690 smbd/dnsregister.c smbd/globals.c
691 smbd/smb2_server.c
692 smbd/smb2_glue.c
693 smbd/smb2_negprot.c
694 smbd/smb2_sesssetup.c
695 smbd/smb2_tcon.c
696 smbd/smb2_create.c
697 smbd/smb2_close.c
698 smbd/smb2_flush.c
699 smbd/smb2_read.c
700 smbd/smb2_write.c
701 smbd/smb2_lock.c
702 smbd/smb2_ioctl.c
703 smbd/smb2_ioctl_dfs.c
704 smbd/smb2_ioctl_filesys.c
705 smbd/smb2_ioctl_named_pipe.c
706 smbd/smb2_ioctl_network_fs.c
707 smbd/smb2_ioctl_smbtorture.c
708 smbd/smb2_keepalive.c
709 smbd/smb2_query_directory.c
710 smbd/smb2_notify.c
711 smbd/smb2_getinfo.c
712 smbd/smb2_setinfo.c
713 smbd/smb2_break.c
714 smbd/smb2_posix.c
715 smbd/smbXsrv_version.c
716 smbd/smbXsrv_client.c
717 smbd/smbXsrv_session.c
718 smbd/smbXsrv_tcon.c
719 smbd/smbXsrv_open.c
720 smbd/server_exit.c
721 smbd/durable.c
722 smbd/scavenger.c
723 smbd/mangle.c
724 smbd/mangle_hash.c
725 smbd/mangle_hash2.c
726 smbd/smb2_oplock.c
727 smbd/oplock_linux.c
728 smbd/notify.c
729 smbd/notify_msg.c
730 smbd/build_options.c
731 smbd/conn.c
732 rpc_server/srv_pipe_hnd.c
733 rpc_server/rpc_ncacn_np.c
734 ''' + NOTIFY_SOURCES + SMB1_SOURCES,
735 deps='''
736 talloc
737 tevent
739 libsmb
740 msrpc3
742 vfs_default
743 vfs_posixacl
744 inotify
745 samba3core
746 param_service
747 AVAHI
748 PROFILE
749 LOCKING
750 LIBADS_SERVER
751 LIBAFS
752 NDR_SMBXSRV
753 LEASES_DB
754 LEASES_UTIL
755 sysquotas
756 NDR_SMB_ACL
757 netapi
758 NDR_IOCTL
759 notifyd
760 vfs_acl_common
761 NDR_QUOTA
762 GNUTLS_HELPERS
763 fd_handle
764 cli_spoolss
765 samba3-namearray
766 ''' +
767 bld.env['dmapi_lib'] +
768 bld.env['legacy_quota_libs'] +
769 NOTIFY_DEPS,
770 private_library=True)
772 bld.SAMBA3_SUBSYSTEM('LOCKING',
773 source='''
774 locking/locking.c
775 locking/brlock.c
776 locking/posix.c
777 locking/share_mode_lock.c
778 ''',
779 deps='''
781 talloc
783 LEASES_DB
784 LEASES_UTIL
785 NDR_OPEN_FILES
786 FNAME_UTIL
787 fd_handle
788 ''')
790 bld.SAMBA3_SUBSYSTEM('LEASES_DB',
791 source='locking/leases_db.c',
792 deps='NDR_LEASES_DB')
794 bld.SAMBA3_SUBSYSTEM('LEASES_UTIL',
795 source='locking/leases_util.c',
796 deps='NDR_OPEN_FILES')
798 if bld.CONFIG_GET("WITH_PROFILE"):
799 bld.SAMBA_SUBSYSTEM('PROFILE_READ',
800 source='profile/profile_read.c',
801 deps='gnutls talloc tdb')
802 bld.SAMBA3_SUBSYSTEM('PROFILE',
803 source='profile/profile.c',
804 deps='''
805 samba-util
806 PROFILE_READ
807 ''')
808 else:
809 bld.SAMBA3_SUBSYSTEM('PROFILE',
810 source='profile/profile_dummy.c',
811 deps='')
813 bld.SAMBA3_SUBSYSTEM('PRINTBASE',
814 source='''
815 printing/notify.c
816 printing/printing_db.c
817 ''',
818 deps='''
819 samba-util
821 ''')
823 bld.SAMBA3_SUBSYSTEM('PRINTBACKEND',
824 source='''
825 printing/printing.c
826 printing/nt_printing.c
827 printing/nt_printing_tdb.c
828 printing/nt_printing_migrate_internal.c
829 printing/nt_printing_ads.c
830 printing/queue_process.c
831 ''',
832 deps='''
833 PRINTBASE
834 LIBADS_PRINTER
836 printing_migrate
837 ''')
839 bld.SAMBA3_LIBRARY('printing_migrate',
840 source='''
841 printing/nt_printing_migrate.c
842 rpc_client/cli_winreg_spoolss.c
843 printing/nt_printing_os2.c
844 ''',
845 deps='''
846 NDR_NTPRINTING
847 cli_spoolss
848 RPC_NDR_WINREG
849 LIBCLI_WINREG
850 smbconf
851 ''',
852 private_library=True)
854 bld.SAMBA3_SUBSYSTEM('PRINTING',
855 source='''
856 printing/pcap.c
857 printing/print_svid.c
858 printing/print_aix.c
859 printing/print_cups.c
860 printing/print_generic.c
861 printing/lpq_parse.c
862 printing/print_standard.c
863 printing/print_iprint.c
864 ''',
865 deps='''
866 NDR_PRINTCAP
867 dbwrap
868 tdb-wrap3
869 SMBCONF_PARAM
870 PRINTBASE
871 smbd_base
872 cups
873 ''')
875 bld.SAMBA_BINARY('samba-bgqd',
876 source='printing/samba-bgqd.c',
877 deps='''
878 samba3core
879 CMDLINE_S3
880 AUTH_COMMON
881 RPC_SPOOLSS
882 ''',
883 install_path='${LIBEXECDIR}/samba')
885 bld.SAMBA3_SUBSYSTEM('FNAME_UTIL',
886 source='lib/filename_util.c',
887 deps='samba-util')
889 bld.SAMBA3_SUBSYSTEM('LIBNET',
890 source='libnet/libnet_join.c libnet/libnet_join_offline.c',
891 deps='NDR_LIBNET_JOIN INIT_SAMR net_keytab pdb')
893 bld.SAMBA3_LIBRARY('net_keytab',
894 source='libnet/libnet_keytab.c',
895 deps='krb5samba ads',
896 private_library=True)
899 bld.SAMBA3_SUBSYSTEM('LIBNET_DSSYNC',
900 source='''
901 libnet/libnet_dssync.c
902 libnet/libnet_dssync_passdb.c
903 libnet/libnet_dssync_keytab.c
904 ''',
905 deps='''
906 LIBNET
907 RPC_NDR_DRSUAPI
908 ''')
910 bld.SAMBA3_SUBSYSTEM('LIBEVENTLOG',
911 source='lib/eventlog/eventlog.c',
912 deps='NDR_EVENTLOG tdb')
914 bld.SAMBA3_SUBSYSTEM('LIBNMB',
915 source='''
916 libsmb/unexpected.c
917 libsmb/namecache.c
918 libsmb/nmblib.c
919 libsmb/clidgram.c
920 libsmb/namequery.c
921 libsmb/conncache.c
922 libads/sitename_cache.c
923 ''',
924 deps='''
925 LIBTSOCKET
926 LIBCLI_NETLOGON
927 samba3util
928 smbconf
929 addns
930 lmhosts
931 resolv
932 ''')
934 bld.SAMBA3_SUBSYSTEM('SERVICES',
935 source='''
936 services/svc_spoolss.c
937 services/svc_rcinit.c
938 services/svc_winreg_glue.c
939 services/svc_netlogon.c
940 services/svc_winreg.c
941 services/svc_wins.c
942 ''',
943 deps='samba-util')
945 bld.SAMBA3_SUBSYSTEM('PLAINTEXT_AUTH',
946 source='''
947 auth/pampass.c
948 auth/pass_check.c
949 ''',
950 deps='''
951 crypt
953 PAM_ERRORS
954 ''')
956 bld.SAMBA3_SUBSYSTEM('PASSCHANGE',
957 source='libsmb/passchange.c',
958 deps='''
959 LIBCLI_SAMR
960 msrpc3
961 krb5samba
962 ''')
964 bld.SAMBA3_SUBSYSTEM('SAMBA_VERSION',
965 source='lib/version.c')
967 bld.SAMBA3_SUBSYSTEM('SLCACHE',
968 source='libsmb/samlogon_cache.c',
969 deps='''
970 samba-util
972 ''')
974 bld.SAMBA3_SUBSYSTEM('dsgetdcname',
975 source='''
976 libsmb/dsgetdcname.c
977 ''',
978 deps='''
979 CLDAP
980 LIBNMB
981 ''')
983 bld.SAMBA3_SUBSYSTEM('DCUTIL',
984 source='''
985 libsmb/namequery_dc.c
986 ''',
987 deps='''
989 dsgetdcname
990 msrpc3
991 libcli_lsa3
992 ''')
994 bld.SAMBA3_SUBSYSTEM('tdb-wrap3',
995 source='lib/util_tdb.c',
996 deps='talloc samba3-util')
998 bld.SAMBA3_LIBRARY('samba3-util',
999 source='''
1000 lib/util_sec.c
1001 lib/util_str.c
1002 lib/adt_tree.c
1003 lib/util_malloc.c
1004 lib/file_id.c
1005 lib/cbuf.c
1006 lib/per_thread_cwd.c
1007 ''',
1008 deps='''
1009 samba-util
1010 charset
1011 ''',
1012 private_library=True)
1014 bld.SAMBA_LIBRARY('xattr_tdb',
1015 source='lib/xattr_tdb.c',
1016 deps='NDR_XATTR dbwrap samba3-util',
1017 private_library=True)
1019 bld.SAMBA3_LIBRARY('CHARSET3',
1020 source='''
1021 lib/charcnv.c
1022 lib/fstring.c
1023 ''',
1024 public_deps='''
1025 ICONV_WRAPPER
1026 charset
1027 ''',
1028 deps='''
1029 samba-util
1030 samba3-util
1031 ''',
1032 private_library=True)
1034 bld.SAMBA3_SUBSYSTEM('errors3',
1035 source='''
1036 libsmb/errormap.c
1037 libsmb/smberr.c
1038 lib/errmap_unix.c
1039 ''',
1040 deps='samba-errors')
1042 bld.SAMBA3_SUBSYSTEM('LIBCLI_SAMR',
1043 source='rpc_client/cli_samr.c',
1044 deps='RPC_NDR_SAMR INIT_LSA INIT_SAMR')
1046 bld.SAMBA3_LIBRARY('libcli_lsa3',
1047 source='rpc_client/cli_lsarpc.c',
1048 deps='RPC_NDR_LSA INIT_LSA',
1049 private_library=True)
1051 bld.SAMBA3_LIBRARY('libcli_netlogon3',
1052 source='''
1053 rpc_client/cli_netlogon.c
1054 rpc_client/util_netlogon.c
1055 ''',
1056 deps='''
1057 msrpc3
1058 RPC_NDR_NETLOGON
1059 cliauth
1060 smbconf
1061 NETLOGON_CREDS_CLI''',
1062 private_library=True)
1064 bld.SAMBA3_LIBRARY('cli_spoolss',
1065 source='''
1066 rpc_client/cli_spoolss.c
1067 rpc_client/init_spoolss.c
1068 ''',
1069 deps='''
1070 RPC_NDR_SPOOLSS
1071 smbconf
1072 secrets3
1073 gensec
1074 ''',
1075 private_library=True)
1077 bld.SAMBA3_SUBSYSTEM('LIBCLI_WINREG',
1078 source='rpc_client/cli_winreg.c',
1079 deps='RPC_NDR_WINREG')
1081 bld.SAMBA3_SUBSYSTEM('LIBCLI_WINREG_INTERNAL',
1082 source='rpc_client/cli_winreg_int.c',
1083 deps='LIBCLI_WINREG RPC_SERVER')
1085 bld.SAMBA3_SUBSYSTEM('RPC_CLIENT_SCHANNEL',
1086 source='rpc_client/cli_pipe_schannel.c',
1087 deps='samba-util krb5samba')
1089 bld.SAMBA3_SUBSYSTEM('RPCCLI_MDSSVC',
1090 source='''
1091 rpc_client/cli_mdssvc.c
1092 rpc_client/cli_mdssvc_util.c
1093 ''',
1094 deps='mdssvc RPC_NDR_MDSSVC')
1096 bld.SAMBA3_SUBSYSTEM('RPCCLI_WSP',
1097 source='''
1098 rpc_client/wsp_cli.c
1099 ''',
1100 deps='tevent-util tstream_binding_handle')
1102 bld.SAMBA3_SUBSYSTEM('INIT_LSA',
1103 source='rpc_client/init_lsa.c',
1104 deps='samba-util GNUTLS_HELPERS')
1106 bld.SAMBA3_SUBSYSTEM('INIT_SAMR',
1107 source='rpc_client/init_samr.c',
1108 deps='samba-util GNUTLS_HELPERS')
1110 bld.SAMBA3_SUBSYSTEM('LIBLSA',
1111 source='lib/lsa.c')
1113 bld.SAMBA3_SUBSYSTEM('tevent-glib-glue',
1114 source='lib/tevent_glib_glue.c',
1115 deps='glib-2.0',
1116 enabled=bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1119 bld.SAMBA3_SUBSYSTEM('ADOUBLE',
1120 source='lib/adouble.c',
1121 deps='STRING_REPLACE')
1123 bld.SAMBA3_BINARY('test_adouble',
1124 source='lib/test_adouble.c',
1125 deps='smbd_base STRING_REPLACE cmocka',
1126 for_selftest=True)
1128 bld.SAMBA3_SUBSYSTEM('STRING_REPLACE',
1129 source='lib/string_replace.c')
1131 bld.SAMBA3_SUBSYSTEM('fd_handle',
1132 source='smbd/fd_handle.c')
1134 ########################## BINARIES #################################
1136 bld.SAMBA3_BINARY('smbd/smbd',
1137 source='smbd/server.c smbd/smbd_cleanupd.c',
1138 deps='''
1139 CMDLINE_S3
1140 smbd_base
1141 REG_FULL
1142 ''',
1143 install_path='${SBINDIR}')
1146 bld.SAMBA3_SUBSYSTEM('TDB_VALIDATE',
1147 source='lib/tdb_validate.c',
1148 deps='samba-util')
1150 bld.SAMBA3_SUBSYSTEM('util_sd',
1151 deps='smbclient',
1152 source='lib/util_sd.c')
1154 bld.SAMBA3_BINARY('client/smbclient',
1155 source='''
1156 client/client.c
1157 client/clitar.c
1158 client/dnsbrowse.c
1159 ''',
1160 deps='''
1161 talloc
1162 CMDLINE_S3
1163 smbconf
1164 ndr-standard
1165 SMBREADLINE
1166 libsmb
1167 msrpc3
1168 RPC_NDR_SRVSVC
1169 cli_smb_common
1170 archive
1171 ''')
1173 bld.SAMBA3_BINARY('smbspool',
1174 source='client/smbspool.c',
1175 deps='''
1176 talloc
1177 smbconf
1178 libsmb
1179 samba3core
1180 ''')
1182 bld.SAMBA3_BINARY('smbspool_krb5_wrapper',
1183 source='client/smbspool_krb5_wrapper.c',
1184 deps='''
1185 DYNCONFIG
1186 cups
1187 krb5samba
1188 ''',
1189 install_path='${LIBEXECDIR}/samba',
1190 enabled=bld.CONFIG_SET('HAVE_CUPS'))
1192 bld.SAMBA3_BINARY('smbspool_argv_wrapper',
1193 source='script/tests/smbspool_argv_wrapper.c',
1194 for_selftest=True)
1196 bld.SAMBA3_BINARY('smbconftort',
1197 source='lib/smbconf/testsuite.c',
1198 deps='''
1199 talloc
1200 smbconf
1201 CMDLINE_S3
1202 ''',
1203 for_selftest=True)
1205 bld.SAMBA3_BINARY('test_mdsparser_es',
1206 source='''
1207 rpc_server/mdssvc/test_mdsparser_es.c
1208 rpc_server/mdssvc/es_parser.y
1209 rpc_server/mdssvc/es_lexer.l
1210 rpc_server/mdssvc/es_mapping.c
1211 ''',
1212 deps='''
1213 samba3-util
1214 talloc
1215 smbconf
1216 jansson
1217 cmocka
1218 CMDLINE_S3
1219 ''',
1220 enabled=bld.env.spotlight_backend_es,
1221 for_selftest=True)
1223 bld.SAMBA3_BINARY('versiontest',
1224 source='lib/version_test.c',
1225 deps='''
1226 SAMBA_VERSION
1227 smbconf
1228 ''',
1229 install=False)
1231 bld.SAMBA3_BINARY('timelimit',
1232 source='script/tests/timelimit.c',
1233 for_selftest=True)
1235 bld.SAMBA3_BINARY('vlp',
1236 source='printing/tests/vlp.c',
1237 deps='''
1238 talloc
1239 smbconf
1240 ''',
1241 for_selftest=True)
1244 pyrpc_util = bld.pyembed_libname('pyrpc_util')
1245 pytalloc_util = bld.pyembed_libname('pytalloc-util')
1246 bld.SAMBA3_PYTHON('pysmbd',
1247 source='smbd/pysmbd.c',
1248 deps=' '.join(['smbd_base', pyrpc_util, pytalloc_util]),
1249 realname='samba/samba3/smbd.so'
1252 pycredentials = 'pycredentials'
1253 bld.SAMBA3_PYTHON('pylibsmb',
1254 source='libsmb/pylibsmb.c',
1255 deps='smbclient samba-credentials %s' % pycredentials,
1256 realname='samba/samba3/libsmb_samba_cwrapper.so'
1259 bld.SAMBA3_PYTHON('pymdscli',
1260 source='rpc_client/py_mdscli.c',
1261 deps=' '.join(['RPCCLI_MDSSVC', pytalloc_util, pyrpc_util]),
1262 realname='samba/samba3/mdscli.so')
1264 bld.SAMBA3_PYTHON('pys3smbconf',
1265 source='lib/smbconf/pys3smbconf.c',
1266 deps='smbconf',
1267 realname='samba/samba3/smbconf.so')
1269 bld.SAMBA3_BINARY('spotlight2sparql',
1270 source='''
1271 rpc_server/mdssvc/sparql_parser_test.c
1272 rpc_server/mdssvc/sparql_parser.y
1273 rpc_server/mdssvc/sparql_lexer.l
1274 rpc_server/mdssvc/sparql_mapping.c''',
1275 deps='samba3-util talloc ' + bld.env['libtracker'],
1276 enabled=bld.env.spotlight_backend_tracker,
1277 install=False)
1279 bld.SAMBA3_BINARY('spotlight2es',
1280 source='''
1281 rpc_server/mdssvc/es_parser_test.c
1282 rpc_server/mdssvc/es_parser.y
1283 rpc_server/mdssvc/es_lexer.l
1284 rpc_server/mdssvc/es_mapping.c''',
1285 deps='samba3-util talloc jansson smbconf',
1286 enabled=bld.env.spotlight_backend_es,
1287 install=False)
1289 bld.SAMBA3_BINARY('tevent_glib_glue_test',
1290 source='lib/tevent_glib_glue_tests.c',
1291 deps='''
1292 talloc
1293 libsmb
1294 tevent-glib-glue''',
1295 enabled=bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1296 for_selftest=True)
1298 bld.SAMBA3_BINARY('tevent_glib_tracker',
1299 source='utils/async-tracker.c',
1300 deps='''
1301 talloc
1302 libsmb
1303 CMDLINE_S3
1304 tevent-glib-glue ''' + bld.env['libtracker'],
1305 enabled=bld.CONFIG_SET('HAVE_TRACKER') and bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1306 install=False)
1308 ########################## INCLUDES #################################
1310 bld.RECURSE('auth')
1311 bld.RECURSE('libgpo/gpext')
1312 bld.RECURSE('librpc')
1313 bld.RECURSE('librpc/idl')
1314 bld.RECURSE('libsmb')
1315 bld.RECURSE('modules')
1316 bld.RECURSE('param')
1317 bld.RECURSE('passdb')
1318 bld.RECURSE('rpc_server')
1319 bld.RECURSE('script')
1320 bld.RECURSE('winbindd')
1321 bld.RECURSE('../examples/libsmbclient')
1322 bld.RECURSE('../examples/pdb')
1323 bld.RECURSE('../examples/VFS')
1324 bld.RECURSE('../examples/fuse')
1325 bld.RECURSE('../examples/winexe')
1326 bld.RECURSE('lib/netapi/tests')
1327 bld.RECURSE('lib/netapi/examples')
1328 bld.RECURSE('smbd/notifyd')
1329 bld.RECURSE('rpcclient')
1330 bld.RECURSE('utils')
1331 bld.RECURSE('nmbd')
1332 bld.RECURSE('lib/util')
1333 bld.RECURSE('torture')
1335 bld.ENFORCE_GROUP_ORDERING()
1336 bld.CHECK_PROJECT_RULES()