s3:libnetapi: Add NetComposeOfflineDomainJoin() to API.
[Samba.git] / source3 / wscript_build
blob5410da1b50f03ec89ce9a5dfcdc2c32df5d6694e
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 ''',
102 deps='''
103 asn1util
104 LIBTSOCKET
105 samba3util
106 ''')
108 bld.SAMBA3_BINARY('test_tldap',
109 source='lib/test_tldap.c',
110 deps='''
111 asn1util
112 LIBTSOCKET
113 samba3util
114 smbconf
115 cmocka
116 ''',
117 for_selftest=True)
119 # libpdb.so should not expose internal symbols that are only usable
120 # to the statically linked modules that are merged into libpdb.
121 # Note that we always filter these symbols out in libpdb, even
122 # when modules are not linked statically. In the latter case
123 # symbols will not be present in the libpdb anyway so no hurt is
124 # done to the version script.
125 private_pdb_match = []
126 private_pdb_match.append('!idmap_init')
127 private_pdb_match.append('!idmap_sids_to_xids')
128 private_pdb_match.append('!idmap_xids_to_sids')
130 ldapsam_pdb_match = ['!priv2ld', '!smbldap_search_domain_info',
131 '!ldapsam_*', '!groupmap_attr_list*', '!get_userattr_list',
132 '!dominfo_attr_list', '!get_attr_key2string',
133 '!sidmap_attr_list', '!attrib_map_*', '!idpool_attr_list',
134 '!get_attr_list']
135 private_pdb_match.append('!pdb_nds_*')
136 private_pdb_match.append('!pdb_ldapsam_init*')
137 private_pdb_match.append('!pdb_*_init')
138 private_pdb_match = private_pdb_match + ldapsam_pdb_match
140 bld.SAMBA3_LIBRARY('samba-passdb',
141 source='',
142 deps='pdb',
143 private_library=False,
144 grouping_library=True,
145 pc_files=[],
146 public_headers_install=True,
147 public_headers='''
148 include/passdb.h
149 passdb/machine_sid.h
150 passdb/lookup_sid.h
151 ''',
152 abi_match=private_pdb_match,
153 abi_directory='passdb/ABI',
154 vnum='0.28.0')
156 bld.SAMBA3_SUBSYSTEM('pdb',
157 source='''
158 passdb/pdb_get_set.c
159 passdb/passdb.c
160 lib/util_wellknown.c
161 lib/util_builtin.c
162 passdb/pdb_compat.c
163 lib/util_sid_passdb.c
164 lib/util_unixsids.c
165 passdb/lookup_sid.c
166 passdb/login_cache.c
167 passdb/account_pol.c
168 lib/privileges.c
169 lib/util_nscd.c
170 lib/winbind_util.c
171 passdb/pdb_util.c
172 passdb/pdb_interface.c
173 passdb/pdb_secrets.c''',
174 deps='''
175 secrets3
176 GROUPDB
177 SERVER_MUTEX
178 wbclient
179 LIBCLI_AUTH
180 flag_mapping
181 samba-credentials
182 samba-modules
183 nscd
184 ''')
186 bld.SAMBA3_LIBRARY('smbldaphelper',
187 source='''
188 passdb/pdb_ldap_schema.c
189 passdb/pdb_ldap_util.c
190 ''',
191 deps='smbldap secrets3',
192 allow_undefined_symbols=True,
193 enabled=bld.CONFIG_SET('HAVE_LDAP'),
194 private_library=True)
196 bld.SAMBA3_SUBSYSTEM('SERVER_MUTEX',
197 source='lib/server_mutex.c',
198 deps='talloc')
200 # this includes only the low level parse code, not stuff
201 # that requires knowledge of security contexts
202 bld.SAMBA3_SUBSYSTEM('REG_PARSE_PRS',
203 source='registry/reg_parse_prs.c')
205 bld.SAMBA3_SUBSYSTEM('REGFIO',
206 source='registry/regfio.c',
207 deps='samba-util REG_PARSE_PRS')
209 bld.SAMBA_BINARY('test_registry_regfio',
210 source='registry/tests/test_regfio.c',
211 deps='cmocka samba3-util smbconf REGFIO',
212 local_include=False,
213 for_selftest=True)
215 # Do not link against this use 'smbconf'
216 bld.SAMBA3_SUBSYSTEM('SMBREGISTRY',
217 source='''
218 registry/reg_api.c
219 registry/reg_dispatcher.c
220 registry/reg_cachehook.c
221 registry/reg_objects.c
222 registry/reg_util_internal.c
223 lib/util_nttoken.c
224 registry/reg_backend_db.c
225 registry/reg_parse_internal.c
226 registry/reg_parse.c
227 lib/srprs.c
228 registry/reg_init_basic.c
229 ''',
230 deps='''
231 smbd_shim
232 tdb-wrap3
233 NDR_SECURITY
234 util_tdb
235 talloc
236 replace
237 util_reg
238 samba-util
239 samba-security
240 errors3
241 dbwrap
242 samba3-util
243 ''')
245 # Do not link against this use 'smbconf'
246 bld.SAMBA3_SUBSYSTEM('REG_SMBCONF',
247 source='''
248 registry/reg_backend_smbconf.c
249 registry/reg_init_smbconf.c
250 registry/reg_util_token.c
251 registry/reg_api_util.c
252 ''',
253 deps='SMBREGISTRY')
255 bld.SAMBA3_LIBRARY('REG_FULL',private_library=True,
256 source='''
257 registry/reg_backend_printing.c
258 registry/reg_backend_shares.c
259 registry/reg_backend_netlogon_params.c
260 registry/reg_backend_prod_options.c
261 registry/reg_backend_tcpip_params.c
262 registry/reg_backend_hkpt_params.c
263 registry/reg_backend_current_version.c
264 registry/reg_backend_perflib.c
265 registry/reg_init_full.c
266 registry/reg_perfcount.c''',
267 deps='''
268 smbconf
269 tdb-wrap3
270 REG_PARSE_PRS
272 ''')
274 bld.SAMBA3_LIBRARY('cmdline_contexts',
275 source='lib/cmdline_contexts.c',
276 deps='samba3core',
277 private_library=True)
279 bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
280 source='libads/kerberos.c libads/ads_status.c',
281 public_deps='krb5samba asn1util k5crypto gssapi LIBTSOCKET CLDAP LIBNMB')
283 bld.SAMBA3_SUBSYSTEM('samba3util',
284 source='''
285 lib/system.c
286 lib/sendfile.c
287 lib/recvfile.c
288 lib/time.c
289 lib/util_sid.c
290 lib/util_specialsids.c
291 lib/util_file.c
292 lib/util.c
293 lib/util_path.c
294 lib/util_matching.c
295 lib/util_procid.c
296 lib/util_sock.c
297 lib/util_tsock.c
298 lib/util_transfer_file.c
299 lib/util_macstreams.c
300 ''',
301 deps='''
302 CHARSET3
304 LIBTSOCKET
305 samba-security
306 NDR_SECURITY
307 samba-util
308 util_tdb
309 sys_rw
310 iov_buf
311 ''')
313 if bld.env.with_ctdb:
314 SAMBA_CLUSTER_SUPPORT_SOURCES='''
315 lib/cluster_support.c
316 lib/dbwrap/dbwrap_ctdb.c
317 lib/messages_ctdb.c
318 lib/messages_ctdb_ref.c
319 lib/ctdbd_conn.c
321 SAMBA_CLUSTER_SUPPORT_DEPS='''
322 talloc
323 tevent
326 else:
327 SAMBA_CLUSTER_SUPPORT_SOURCES='''
328 lib/cluster_support.c
329 lib/ctdb_dummy.c
331 SAMBA_CLUSTER_SUPPORT_DEPS='''
332 talloc
333 tevent
336 bld.SAMBA3_LIBRARY('samba-cluster-support',
337 source=SAMBA_CLUSTER_SUPPORT_SOURCES,
338 deps=SAMBA_CLUSTER_SUPPORT_DEPS,
339 allow_undefined_symbols=True,
340 private_library=True)
342 bld.SAMBA3_SUBSYSTEM('TDB_LIB',
343 source='''
344 lib/dbwrap/dbwrap_open.c
345 lib/dbwrap/dbwrap_watch.c
346 lib/g_lock.c
347 ''',
348 deps='''
349 dbwrap
350 samba-cluster-support
351 ''')
353 bld.SAMBA3_LIBRARY('messages_util',
354 source='''lib/messages_util.c''',
355 deps='samba-util',
356 private_library=True)
358 bld.SAMBA3_SUBSYSTEM('samba3core',
359 source='''
360 lib/messages.c
361 lib/util_cluster.c
362 lib/id_cache.c
363 lib/serverid.c
364 lib/server_id_watch.c
365 lib/server_id_db_util.c
366 lib/addrchange.c
367 ../lib/util/debug_s3.c
368 lib/dumpcore.c
369 lib/interface.c
370 lib/username.c
371 lib/smbrun.c
372 lib/wins_srv.c
373 lib/substitute.c
374 lib/substitute_generic.c
375 lib/ms_fnmatch.c
376 lib/tallocmsg.c
377 lib/dmallocmsg.c
378 lib/gencache.c
379 lib/util_event.c
380 lib/global_contexts.c
381 lib/ldap_escape.c
382 lib/system_smbd.c
383 lib/audit.c
384 lib/idmap_cache.c
385 lib/namemap_cache.c
386 lib/util_ea.c
387 lib/background.c
388 ''',
389 deps='''
390 samba3util
391 LIBTSOCKET
392 NDR_MESSAGING
393 LIBASYNC_REQ
394 UTIL_PW
395 SAMBA_VERSION
396 PTHREADPOOL
397 interfaces
398 smbconf
399 dbwrap
400 samba3-util
401 errors3
402 server_id_db
403 messages_util
404 messages_dgm
405 talloc_report_printf
406 access
407 TDB_LIB
409 ''')
411 bld.SAMBA3_LIBRARY('smbd_shim',
412 source='''lib/smbd_shim.c''',
413 deps='talloc',
414 private_library=True)
416 bld.SAMBA3_SUBSYSTEM('auth_generic',
417 source='libsmb/auth_generic.c',
418 deps='gse gensec')
420 bld.SAMBA3_LIBRARY('libsmb',
421 source='''
422 libsmb/clientgen.c
423 libsmb/cliconnect.c
424 libsmb/clifile.c
425 libsmb/clispnego.c
426 libsmb/clirap.c
427 libsmb/clierror.c
428 libsmb/climessage.c
429 libsmb/clireadwrite.c
430 libsmb/clilist.c
431 libsmb/cliprint.c
432 libsmb/clitrans.c
433 libsmb/clisecdesc.c
434 libsmb/cliquota.c
435 libsmb/clifsinfo.c
436 libsmb/clidfs.c
437 libsmb/clioplock.c
438 libsmb/async_smb.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-samba4
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/net_ads_setspn.c
508 ''',
509 deps='''
510 cli-ldap-common
511 krb5samba
512 krb5
513 ldap
514 lber
515 KRBCLIENT
516 smbconf
517 LIBNMB
518 libsmb
519 DCUTIL
520 smbldap
521 trusts_util
522 NDR_ADS
523 ''',
524 private_library=True)
526 bld.SAMBA3_SUBSYSTEM('LIBADS_SERVER',
527 source='libads/authdata.c',
528 deps='SERVER_MUTEX ndr-krb5pac krb5samba gssapi')
530 bld.SAMBA3_SUBSYSTEM('LIBADS_PRINTER',
531 source='libads/ldap_printer.c',
532 deps='samba-util krb5samba')
534 # Only smbconf should link against this subsystem, else we will create
535 # a circular dependency.
536 bld.SAMBA3_SUBSYSTEM('SMBCONF_PARAM',
537 source='''
538 param/loadparm.c
539 lib/sharesec.c
540 lib/ldap_debug_handler.c
541 lib/util_names.c
542 ''',
543 deps='''
544 samba-util
545 PARAM_UTIL
546 ldap
547 lber
548 LOADPARM_CTX
549 samba3core
550 param_local.h
551 param_global.h
552 cups
553 ''')
555 bld.SAMBA3_LIBRARY('smbconf',
556 source='''
557 lib/smbconf/smbconf_init.c
558 lib/smbconf/smbconf_reg.c
559 ''',
560 deps='''
561 LIBSMBCONF
562 REG_SMBCONF
563 SAMBA_VERSION
565 charset
566 samba-hostconfig
567 SMBCONF_PARAM
568 samba-util
569 talloc
570 util_reg
571 ''',
572 public_headers='../lib/smbconf/smbconf.h',
573 pc_files=[],
574 vnum='0.0.1')
576 bld.SAMBA3_SUBSYSTEM('sysquotas',
577 source='''
578 lib/sysquotas.c
579 lib/sysquotas_linux.c
580 lib/sysquotas_xfs.c
581 lib/sysquotas_4A.c
582 lib/sysquotas_4B.c
583 lib/sysquotas_jfs2.c
584 lib/sysquotas_nfs.c
585 ''',
586 allow_warnings=True,
587 deps='samba3-util samba-util tirpc')
589 NOTIFY_SOURCES=''
590 NOTIFY_DEPS=''
592 if bld.CONFIG_SET("HAVE_INOTIFY"):
593 NOTIFY_SOURCES += ' smbd/notify_inotify.c'
595 if bld.CONFIG_SET('SAMBA_FAM_LIBS'):
596 NOTIFY_SOURCES += ' smbd/notify_fam.c'
597 NOTIFY_DEPS += ' ' + bld.CONFIG_GET('SAMBA_FAM_LIBS')
599 if bld.CONFIG_SET('WITH_SMB1SERVER'):
600 SMB1_SOURCES = '''
601 smbd/smb1_message.c
602 smbd/smb1_sesssetup.c
603 smbd/smb1_lanman.c
604 smbd/smb1_utils.c
605 smbd/smb1_aio.c
606 smbd/smb1_ipc.c
607 smbd/smb1_negprot.c
608 smbd/smb1_nttrans.c
609 smbd/smb1_oplock.c
610 smbd/smb1_pipes.c
611 smbd/smb1_reply.c
612 smbd/smb1_service.c
613 smbd/smb1_signing.c
614 smbd/smb1_process.c
615 smbd/smb1_trans2.c
617 else:
618 SMB1_SOURCES = ''
620 bld.SAMBA3_LIBRARY('smbd_base',
621 source='''
622 smbd/server_reload.c
623 smbd/files.c
624 smbd/connection.c
625 smbd/utmp.c
626 smbd/session.c
627 smbd/dfree.c
628 smbd/dir.c
629 smbd/password.c
630 smbd/conn_msg.c
631 smbd/conn_idle.c
632 smbd/share_access.c
633 smbd/fileio.c
634 smbd/smb2_ipc.c
635 smbd/smb2_nttrans.c
636 smbd/smb2_pipes.c
637 smbd/smb2_reply.c
638 smbd/smb2_trans2.c
639 smbd/uid.c
640 smbd/dosmode.c
641 smbd/filename.c
642 smbd/open.c
643 smbd/close.c
644 smbd/blocking.c
645 smbd/sec_ctx.c
646 smbd/srvstr.c
647 smbd/vfs.c
648 smbd/seal.c
649 smbd/posix_acls.c
650 lib/sysacls.c
651 smbd/smb2_process.c
652 smbd/smb2_service.c
653 smbd/error.c
654 printing/printspoolss.c
655 printing/rap_jobid.c
656 printing/load.c
657 printing/printer_list.c
658 lib/sessionid_tdb.c
659 lib/cleanupdb.c
660 smbd/fake_file.c
661 smbd/quotas.c
662 smbd/ntquotas.c
663 smbd/msdfs.c
664 smbd/smb2_aio.c smbd/statvfs.c
665 smbd/dmapi.c
666 smbd/smb2_signing.c
667 smbd/file_access.c
668 smbd/dnsregister.c smbd/globals.c
669 smbd/smb2_server.c
670 smbd/smb2_glue.c
671 smbd/smb2_negprot.c
672 smbd/smb2_sesssetup.c
673 smbd/smb2_tcon.c
674 smbd/smb2_create.c
675 smbd/smb2_close.c
676 smbd/smb2_flush.c
677 smbd/smb2_read.c
678 smbd/smb2_write.c
679 smbd/smb2_lock.c
680 smbd/smb2_ioctl.c
681 smbd/smb2_ioctl_dfs.c
682 smbd/smb2_ioctl_filesys.c
683 smbd/smb2_ioctl_named_pipe.c
684 smbd/smb2_ioctl_network_fs.c
685 smbd/smb2_ioctl_smbtorture.c
686 smbd/smb2_keepalive.c
687 smbd/smb2_query_directory.c
688 smbd/smb2_notify.c
689 smbd/smb2_getinfo.c
690 smbd/smb2_setinfo.c
691 smbd/smb2_break.c
692 smbd/smb2_posix.c
693 smbd/smbXsrv_version.c
694 smbd/smbXsrv_client.c
695 smbd/smbXsrv_session.c
696 smbd/smbXsrv_tcon.c
697 smbd/smbXsrv_open.c
698 smbd/server_exit.c
699 smbd/durable.c
700 smbd/scavenger.c
701 smbd/mangle.c
702 smbd/mangle_hash.c
703 smbd/mangle_hash2.c
704 smbd/smb2_oplock.c
705 smbd/oplock_linux.c
706 smbd/notify.c
707 smbd/notify_msg.c
708 smbd/build_options.c
709 smbd/conn.c
710 rpc_server/srv_pipe_hnd.c
711 rpc_server/rpc_ncacn_np.c
712 ''' + NOTIFY_SOURCES + SMB1_SOURCES,
713 deps='''
714 talloc
715 tevent
717 libsmb
718 msrpc3
720 vfs_default
721 vfs_posixacl
722 inotify
723 samba3core
724 param_service
725 AVAHI
726 PROFILE
727 LOCKING
728 LIBADS_SERVER
729 LIBAFS
730 NDR_SMBXSRV
731 LEASES_DB
732 LEASES_UTIL
733 sysquotas
734 NDR_SMB_ACL
735 netapi
736 NDR_IOCTL
737 notifyd
738 vfs_acl_common
739 NDR_QUOTA
740 GNUTLS_HELPERS
741 fd_handle
742 cli_spoolss
743 ''' +
744 bld.env['dmapi_lib'] +
745 bld.env['legacy_quota_libs'] +
746 NOTIFY_DEPS,
747 private_library=True)
749 bld.SAMBA3_SUBSYSTEM('LOCKING',
750 source='''
751 locking/locking.c
752 locking/brlock.c
753 locking/posix.c
754 locking/share_mode_lock.c
755 ''',
756 deps='''
758 talloc
760 LEASES_DB
761 LEASES_UTIL
762 NDR_OPEN_FILES
763 FNAME_UTIL
764 fd_handle
765 ''')
767 bld.SAMBA3_SUBSYSTEM('LEASES_DB',
768 source='locking/leases_db.c',
769 deps='NDR_LEASES_DB')
771 bld.SAMBA3_SUBSYSTEM('LEASES_UTIL',
772 source='locking/leases_util.c',
773 deps='NDR_OPEN_FILES')
775 if bld.CONFIG_GET("WITH_PROFILE"):
776 bld.SAMBA_SUBSYSTEM('PROFILE_READ',
777 source='profile/profile_read.c',
778 deps='gnutls talloc tdb')
779 bld.SAMBA3_SUBSYSTEM('PROFILE',
780 source='profile/profile.c',
781 deps='''
782 samba-util
783 PROFILE_READ
784 ''')
785 else:
786 bld.SAMBA3_SUBSYSTEM('PROFILE',
787 source='profile/profile_dummy.c',
788 deps='')
790 bld.SAMBA3_SUBSYSTEM('PRINTBASE',
791 source='''
792 printing/notify.c
793 printing/printing_db.c
794 ''',
795 deps='''
796 samba-util
798 ''')
800 bld.SAMBA3_SUBSYSTEM('PRINTBACKEND',
801 source='''
802 printing/printing.c
803 printing/nt_printing.c
804 printing/nt_printing_tdb.c
805 printing/nt_printing_migrate_internal.c
806 printing/nt_printing_ads.c
807 printing/queue_process.c
808 ''',
809 deps='''
810 PRINTBASE
811 LIBADS_PRINTER
813 printing_migrate
814 ''')
816 bld.SAMBA3_LIBRARY('printing_migrate',
817 source='''
818 printing/nt_printing_migrate.c
819 rpc_client/cli_winreg_spoolss.c
820 printing/nt_printing_os2.c
821 ''',
822 deps='''
823 NDR_NTPRINTING
824 cli_spoolss
825 RPC_NDR_WINREG
826 LIBCLI_WINREG
827 smbconf
828 ''',
829 private_library=True)
831 bld.SAMBA3_SUBSYSTEM('PRINTING',
832 source='''
833 printing/pcap.c
834 printing/print_svid.c
835 printing/print_aix.c
836 printing/print_cups.c
837 printing/print_generic.c
838 printing/lpq_parse.c
839 printing/print_standard.c
840 printing/print_iprint.c
841 ''',
842 deps='''
843 NDR_PRINTCAP
844 dbwrap
845 tdb-wrap3
846 SMBCONF_PARAM
847 PRINTBASE
848 smbd_base
849 cups
850 ''')
852 bld.SAMBA_BINARY('samba-bgqd',
853 source='printing/samba-bgqd.c',
854 deps='''
855 samba3core
856 CMDLINE_S3
857 AUTH_COMMON
858 RPC_SPOOLSS
859 ''',
860 install_path='${LIBEXECDIR}/samba')
862 bld.SAMBA3_SUBSYSTEM('FNAME_UTIL',
863 source='lib/filename_util.c',
864 deps='samba-util')
866 bld.SAMBA3_SUBSYSTEM('LIBNET',
867 source='libnet/libnet_join.c libnet/libnet_join_offline.c',
868 deps='NDR_LIBNET_JOIN INIT_SAMR net_keytab pdb')
870 bld.SAMBA3_LIBRARY('net_keytab',
871 source='libnet/libnet_keytab.c',
872 deps='krb5samba ads',
873 private_library=True)
876 bld.SAMBA3_SUBSYSTEM('LIBNET_DSSYNC',
877 source='''
878 libnet/libnet_dssync.c
879 libnet/libnet_dssync_passdb.c
880 libnet/libnet_dssync_keytab.c
881 ''',
882 deps='''
883 LIBNET
884 RPC_NDR_DRSUAPI
885 ''')
887 bld.SAMBA3_SUBSYSTEM('LIBEVENTLOG',
888 source='lib/eventlog/eventlog.c',
889 deps='NDR_EVENTLOG tdb')
891 bld.SAMBA3_SUBSYSTEM('LIBNMB',
892 source='''
893 libsmb/unexpected.c
894 libsmb/namecache.c
895 libsmb/nmblib.c
896 libsmb/clidgram.c
897 libsmb/namequery.c
898 libsmb/conncache.c
899 libads/sitename_cache.c
900 ''',
901 deps='''
902 LIBTSOCKET
903 LIBCLI_NETLOGON
904 samba3util
905 addns
906 lmhosts
907 resolv
908 ''')
910 bld.SAMBA3_SUBSYSTEM('SERVICES',
911 source='''
912 services/svc_spoolss.c
913 services/svc_rcinit.c
914 services/svc_winreg_glue.c
915 services/svc_netlogon.c
916 services/svc_winreg.c
917 services/svc_wins.c
918 ''',
919 deps='samba-util')
921 bld.SAMBA3_SUBSYSTEM('PLAINTEXT_AUTH',
922 source='''
923 auth/pampass.c
924 auth/pass_check.c
925 ''',
926 deps='''
927 crypt
929 PAM_ERRORS
930 ''')
932 bld.SAMBA3_SUBSYSTEM('PASSCHANGE',
933 source='libsmb/passchange.c',
934 deps='''
935 LIBCLI_SAMR
936 INIT_LSA
937 msrpc3
938 krb5samba
939 ''')
941 bld.SAMBA3_SUBSYSTEM('SAMBA_VERSION',
942 source='lib/version.c',
943 deps='samba-util')
945 bld.SAMBA3_SUBSYSTEM('SLCACHE',
946 source='libsmb/samlogon_cache.c',
947 deps='''
948 samba-util
950 ''')
952 bld.SAMBA3_SUBSYSTEM('dsgetdcname',
953 source='''
954 libsmb/dsgetdcname.c
955 ''',
956 deps='''
957 CLDAP
958 LIBNMB
959 ''')
961 bld.SAMBA3_SUBSYSTEM('DCUTIL',
962 source='''
963 libsmb/namequery_dc.c
964 ''',
965 deps='''
967 dsgetdcname
968 msrpc3
969 libcli_lsa3
970 ''')
972 bld.SAMBA3_LIBRARY('trusts_util',
973 source='libsmb/trusts_util.c',
974 deps='''
975 libcli_netlogon3
976 msrpc3
977 samba-passdb
978 ''',
979 private_library=True)
981 bld.SAMBA3_SUBSYSTEM('tdb-wrap3',
982 source='lib/util_tdb.c',
983 deps='talloc samba3-util')
985 bld.SAMBA3_LIBRARY('samba3-util',
986 source='''
987 lib/util_sec.c
988 lib/util_str.c
989 lib/adt_tree.c
990 lib/util_malloc.c
991 lib/namearray.c
992 lib/file_id.c
993 lib/cbuf.c
994 lib/per_thread_cwd.c
995 ''',
996 deps='''
997 samba-util
998 charset
999 ''',
1000 private_library=True)
1002 bld.SAMBA_LIBRARY('xattr_tdb',
1003 source='lib/xattr_tdb.c',
1004 deps='NDR_XATTR dbwrap samba3-util',
1005 private_library=True)
1007 bld.SAMBA3_LIBRARY('CHARSET3',
1008 source='''
1009 lib/charcnv.c
1010 lib/fstring.c
1011 ''',
1012 public_deps='''
1013 ICONV_WRAPPER
1014 charset
1015 ''',
1016 deps='''
1017 samba-util
1018 samba3-util
1019 ''',
1020 private_library=True)
1022 bld.SAMBA3_SUBSYSTEM('errors3',
1023 source='''
1024 libsmb/errormap.c
1025 libsmb/smberr.c
1026 lib/errmap_unix.c
1027 ''',
1028 deps='samba-errors')
1030 bld.SAMBA3_SUBSYSTEM('LIBCLI_SAMR',
1031 source='rpc_client/cli_samr.c',
1032 deps='RPC_NDR_SAMR INIT_SAMR')
1034 bld.SAMBA3_LIBRARY('libcli_lsa3',
1035 source='rpc_client/cli_lsarpc.c',
1036 deps='RPC_NDR_LSA INIT_LSA',
1037 private_library=True)
1039 bld.SAMBA3_LIBRARY('libcli_netlogon3',
1040 source='''
1041 rpc_client/cli_netlogon.c
1042 rpc_client/util_netlogon.c
1043 ''',
1044 deps='''
1045 msrpc3
1046 RPC_NDR_NETLOGON
1047 cliauth
1048 smbconf
1049 NETLOGON_CREDS_CLI''',
1050 private_library=True)
1052 bld.SAMBA3_LIBRARY('cli_spoolss',
1053 source='''
1054 rpc_client/cli_spoolss.c
1055 rpc_client/init_spoolss.c
1056 ''',
1057 deps='''
1058 RPC_NDR_SPOOLSS
1059 smbconf
1060 secrets3
1061 gensec
1062 ''',
1063 private_library=True)
1065 bld.SAMBA3_SUBSYSTEM('LIBCLI_WINREG',
1066 source='rpc_client/cli_winreg.c',
1067 deps='RPC_NDR_WINREG')
1069 bld.SAMBA3_SUBSYSTEM('LIBCLI_WINREG_INTERNAL',
1070 source='rpc_client/cli_winreg_int.c',
1071 deps='LIBCLI_WINREG RPC_SERVER')
1073 bld.SAMBA3_SUBSYSTEM('RPC_CLIENT_SCHANNEL',
1074 source='rpc_client/cli_pipe_schannel.c',
1075 deps='samba-util krb5samba')
1077 bld.SAMBA3_SUBSYSTEM('RPCCLI_MDSSVC',
1078 source='''
1079 rpc_client/cli_mdssvc.c
1080 rpc_client/cli_mdssvc_util.c
1081 ''',
1082 deps='mdssvc RPC_NDR_MDSSVC')
1084 bld.SAMBA3_SUBSYSTEM('INIT_LSA',
1085 source='rpc_client/init_lsa.c',
1086 deps='samba-util')
1088 bld.SAMBA3_SUBSYSTEM('INIT_SAMR',
1089 source='rpc_client/init_samr.c',
1090 deps='samba-util GNUTLS_HELPERS')
1092 bld.SAMBA3_SUBSYSTEM('LIBLSA',
1093 source='lib/lsa.c')
1095 bld.SAMBA3_SUBSYSTEM('tevent-glib-glue',
1096 source='lib/tevent_glib_glue.c',
1097 deps='glib-2.0',
1098 enabled=bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1101 bld.SAMBA3_SUBSYSTEM('ADOUBLE',
1102 source='lib/adouble.c',
1103 deps='STRING_REPLACE')
1105 bld.SAMBA3_BINARY('test_adouble',
1106 source='lib/test_adouble.c',
1107 deps='smbd_base STRING_REPLACE cmocka',
1108 for_selftest=True)
1110 bld.SAMBA3_SUBSYSTEM('STRING_REPLACE',
1111 source='lib/string_replace.c')
1113 bld.SAMBA3_SUBSYSTEM('fd_handle',
1114 source='smbd/fd_handle.c')
1116 ########################## BINARIES #################################
1118 bld.SAMBA3_BINARY('smbd/smbd',
1119 source='smbd/server.c smbd/smbd_cleanupd.c',
1120 deps='''
1121 CMDLINE_S3
1122 smbd_base
1123 REG_FULL
1124 ''',
1125 install_path='${SBINDIR}')
1128 bld.SAMBA3_SUBSYSTEM('TDB_VALIDATE',
1129 source='lib/tdb_validate.c',
1130 deps='samba-util')
1132 bld.SAMBA3_SUBSYSTEM('util_sd',
1133 deps='smbclient',
1134 source='lib/util_sd.c')
1136 bld.SAMBA3_BINARY('client/smbclient',
1137 source='''
1138 client/client.c
1139 client/clitar.c
1140 client/dnsbrowse.c
1141 ''',
1142 deps='''
1143 talloc
1144 CMDLINE_S3
1145 smbconf
1146 ndr-standard
1147 SMBREADLINE
1148 libsmb
1149 msrpc3
1150 RPC_NDR_SRVSVC
1151 cli_smb_common
1152 archive
1153 ''')
1155 bld.SAMBA3_BINARY('smbspool',
1156 source='client/smbspool.c',
1157 deps='''
1158 talloc
1159 smbconf
1160 libsmb
1161 samba3core
1162 ''')
1164 bld.SAMBA3_BINARY('smbspool_krb5_wrapper',
1165 source='client/smbspool_krb5_wrapper.c',
1166 deps='''
1167 DYNCONFIG
1168 cups
1169 krb5samba
1170 ''',
1171 install_path='${LIBEXECDIR}/samba',
1172 enabled=bld.CONFIG_SET('HAVE_CUPS'))
1174 bld.SAMBA3_BINARY('smbspool_argv_wrapper',
1175 source='script/tests/smbspool_argv_wrapper.c',
1176 for_selftest=True)
1178 bld.SAMBA3_BINARY('smbconftort',
1179 source='lib/smbconf/testsuite.c',
1180 deps='''
1181 talloc
1182 smbconf
1183 CMDLINE_S3
1184 ''',
1185 for_selftest=True)
1187 bld.SAMBA3_BINARY('test_mdsparser_es',
1188 source='''
1189 rpc_server/mdssvc/test_mdsparser_es.c
1190 rpc_server/mdssvc/es_parser.y
1191 rpc_server/mdssvc/es_lexer.l
1192 rpc_server/mdssvc/es_mapping.c
1193 ''',
1194 deps='''
1195 samba3-util
1196 talloc
1197 smbconf
1198 jansson
1199 cmocka
1200 CMDLINE_S3
1201 ''',
1202 enabled=bld.env.spotlight_backend_es,
1203 for_selftest=True)
1205 bld.SAMBA3_BINARY('versiontest',
1206 source='lib/version_test.c',
1207 deps='''
1208 SAMBA_VERSION
1209 smbconf
1210 ''',
1211 install=False)
1213 bld.SAMBA3_BINARY('timelimit',
1214 source='script/tests/timelimit.c',
1215 for_selftest=True)
1217 bld.SAMBA3_BINARY('vlp',
1218 source='printing/tests/vlp.c',
1219 deps='''
1220 talloc
1221 smbconf
1222 ''',
1223 for_selftest=True)
1226 pyrpc_util = bld.pyembed_libname('pyrpc_util')
1227 pytalloc_util = bld.pyembed_libname('pytalloc-util')
1228 bld.SAMBA3_PYTHON('pysmbd',
1229 source='smbd/pysmbd.c',
1230 deps=' '.join(['smbd_base', pyrpc_util, pytalloc_util]),
1231 realname='samba/samba3/smbd.so'
1234 pycredentials = 'pycredentials'
1235 bld.SAMBA3_PYTHON('pylibsmb',
1236 source='libsmb/pylibsmb.c',
1237 deps='smbclient samba-credentials %s' % pycredentials,
1238 realname='samba/samba3/libsmb_samba_cwrapper.so'
1241 bld.SAMBA3_PYTHON('pymdscli',
1242 source='rpc_client/py_mdscli.c',
1243 deps=' '.join(['RPCCLI_MDSSVC', pytalloc_util, pyrpc_util]),
1244 realname='samba/samba3/mdscli.so')
1246 bld.SAMBA3_PYTHON('pys3smbconf',
1247 source='lib/smbconf/pys3smbconf.c',
1248 deps='smbconf',
1249 realname='samba/samba3/smbconf.so')
1251 bld.SAMBA3_BINARY('spotlight2sparql',
1252 source='''
1253 rpc_server/mdssvc/sparql_parser_test.c
1254 rpc_server/mdssvc/sparql_parser.y
1255 rpc_server/mdssvc/sparql_lexer.l
1256 rpc_server/mdssvc/sparql_mapping.c''',
1257 deps='samba3-util talloc ' + bld.env['libtracker'],
1258 enabled=bld.env.spotlight_backend_tracker,
1259 install=False)
1261 bld.SAMBA3_BINARY('spotlight2es',
1262 source='''
1263 rpc_server/mdssvc/es_parser_test.c
1264 rpc_server/mdssvc/es_parser.y
1265 rpc_server/mdssvc/es_lexer.l
1266 rpc_server/mdssvc/es_mapping.c''',
1267 deps='samba3-util talloc jansson smbconf',
1268 enabled=bld.env.spotlight_backend_es,
1269 install=False)
1271 bld.SAMBA3_BINARY('tevent_glib_glue_test',
1272 source='lib/tevent_glib_glue_tests.c',
1273 deps='''
1274 talloc
1275 libsmb
1276 tevent-glib-glue''',
1277 enabled=bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1278 for_selftest=True)
1280 bld.SAMBA3_BINARY('tevent_glib_tracker',
1281 source='utils/async-tracker.c',
1282 deps='''
1283 talloc
1284 libsmb
1285 CMDLINE_S3
1286 tevent-glib-glue ''' + bld.env['libtracker'],
1287 enabled=bld.CONFIG_SET('HAVE_TRACKER') and bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1288 install=False)
1290 ########################## INCLUDES #################################
1292 bld.RECURSE('auth')
1293 bld.RECURSE('libgpo/gpext')
1294 bld.RECURSE('librpc')
1295 bld.RECURSE('librpc/idl')
1296 bld.RECURSE('libsmb')
1297 bld.RECURSE('modules')
1298 bld.RECURSE('param')
1299 bld.RECURSE('passdb')
1300 bld.RECURSE('rpc_server')
1301 bld.RECURSE('script')
1302 bld.RECURSE('winbindd')
1303 bld.RECURSE('../examples/libsmbclient')
1304 bld.RECURSE('../examples/pdb')
1305 bld.RECURSE('../examples/VFS')
1306 bld.RECURSE('../examples/fuse')
1307 bld.RECURSE('../examples/winexe')
1308 bld.RECURSE('lib/netapi/tests')
1309 bld.RECURSE('lib/netapi/examples')
1310 bld.RECURSE('smbd/notifyd')
1311 bld.RECURSE('rpcclient')
1312 bld.RECURSE('utils')
1313 bld.RECURSE('nmbd')
1314 bld.RECURSE('lib/util')
1315 bld.RECURSE('torture')
1317 bld.ENFORCE_GROUP_ORDERING()
1318 bld.CHECK_PROJECT_RULES()