s4:kdc: remove unused sdb_entry_ex_to_hdb_entry_ex()
[Samba.git] / source3 / wscript_build
blobce6892eb08d2b426db238c3b387fad2b292c7e32
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/clistr.c
435 libsmb/cliquota.c
436 libsmb/clifsinfo.c
437 libsmb/clidfs.c
438 libsmb/clioplock.c
439 libsmb/async_smb.c
440 libsmb/clisymlink.c
441 libsmb/smbsock_connect.c
442 libsmb/cli_smb2_fnum.c
443 ''',
444 deps='''
445 auth_generic
446 CLDAP
447 LIBNMB
448 SPNEGO_PARSE
449 LIBTSOCKET
450 KRBCLIENT
451 NDR_IOCTL
452 NDR_QUOTA
453 cli_smb_common
454 tevent
455 ''',
456 private_library=True)
458 bld.SAMBA3_SUBSYSTEM('CLDAP',
459 source='libads/cldap.c',
460 deps='cli-ldap-common cli_cldap LIBTSOCKET')
462 # NOTE: The secrets3 library is a low level library used by several subsystems.
463 # PLEASE DO NOT make it depend on high level libraries like PDB, if you are
464 # doing that your design is wrong and needs changing. -SSS
465 bld.SAMBA3_LIBRARY('secrets3',
466 source='''
467 passdb/secrets.c
468 passdb/machine_account_secrets.c
469 passdb/machine_sid.c
470 passdb/secrets_lsa.c
471 ''',
472 deps='''
473 NDR_SECRETS
474 smbconf
475 samba3util
476 dbwrap
477 krb5samba
478 LIBCLI_AUTH
479 samba-credentials
480 ''',
481 private_library=True)
483 bld.SAMBA3_LIBRARY('smbldap',
484 source='lib/smbldap.c',
485 deps='ldap lber samba-util smbconf',
486 enabled=bld.CONFIG_SET("HAVE_LDAP"),
487 private_library=False,
488 abi_directory='lib/ABI',
489 abi_match='smbldap_*',
490 pc_files=[],
491 vnum='2.1.0',
492 public_headers='include/smbldap.h include/smb_ldap.h')
494 bld.SAMBA3_LIBRARY('ads',
495 source='''
496 libads/ldap.c
497 libads/sasl.c
498 libads/sasl_wrapping.c
499 libads/krb5_setpw.c
500 libads/kerberos_util.c
501 libads/ldap_user.c
502 libads/ads_struct.c
503 libads/kerberos_keytab.c
504 libads/disp_sec.c
505 libads/ldap_utils.c
506 libads/ldap_schema.c
507 libads/util.c
508 libads/ndr.c
509 libads/net_ads_setspn.c
510 ''',
511 deps='''
512 cli-ldap-common
513 krb5samba
514 krb5
515 ldap
516 lber
517 KRBCLIENT
518 smbconf
519 LIBNMB
520 libsmb
521 DCUTIL
522 smbldap
523 trusts_util
524 ''',
525 private_library=True)
527 bld.SAMBA3_SUBSYSTEM('LIBADS_SERVER',
528 source='libads/authdata.c',
529 deps='SERVER_MUTEX ndr-krb5pac krb5samba gssapi')
531 bld.SAMBA3_SUBSYSTEM('LIBADS_PRINTER',
532 source='libads/ldap_printer.c',
533 deps='samba-util krb5samba')
535 # Only smbconf should link against this subsystem, else we will create
536 # a circular dependency.
537 bld.SAMBA3_SUBSYSTEM('SMBCONF_PARAM',
538 source='''
539 param/loadparm.c
540 lib/sharesec.c
541 lib/ldap_debug_handler.c
542 lib/util_names.c
543 ''',
544 deps='''
545 samba-util
546 PARAM_UTIL
547 ldap
548 lber
549 LOADPARM_CTX
550 samba3core
551 param_local.h
552 param_global.h
553 cups
554 ''')
556 bld.SAMBA3_LIBRARY('smbconf',
557 source='''
558 lib/smbconf/smbconf_init.c
559 lib/smbconf/smbconf_reg.c
560 ''',
561 deps='''
562 LIBSMBCONF
563 REG_SMBCONF
564 SAMBA_VERSION
566 charset
567 samba-hostconfig
568 SMBCONF_PARAM
569 samba-util
570 talloc
571 util_reg
572 ''',
573 public_headers='../lib/smbconf/smbconf.h',
574 pc_files=[],
575 vnum='0')
577 bld.SAMBA3_SUBSYSTEM('sysquotas',
578 source='''
579 lib/sysquotas.c
580 lib/sysquotas_linux.c
581 lib/sysquotas_xfs.c
582 lib/sysquotas_4A.c
583 lib/sysquotas_4B.c
584 lib/sysquotas_jfs2.c
585 lib/sysquotas_nfs.c
586 ''',
587 allow_warnings=True,
588 deps='samba3-util samba-util tirpc')
590 NOTIFY_SOURCES=''
591 NOTIFY_DEPS=''
593 if bld.CONFIG_SET("HAVE_INOTIFY"):
594 NOTIFY_SOURCES += ' smbd/notify_inotify.c'
596 if bld.CONFIG_SET('SAMBA_FAM_LIBS'):
597 NOTIFY_SOURCES += ' smbd/notify_fam.c'
598 NOTIFY_DEPS += ' ' + bld.CONFIG_GET('SAMBA_FAM_LIBS')
600 bld.SAMBA3_LIBRARY('smbd_base',
601 source='''
602 smbd/server_reload.c
603 smbd/files.c
604 smbd/connection.c
605 smbd/utmp.c
606 smbd/session.c
607 smbd/dfree.c
608 smbd/dir.c
609 smbd/password.c
610 smbd/conn_msg.c
611 smbd/conn_idle.c
612 smbd/share_access.c
613 smbd/fileio.c
614 smbd/ipc.c
615 smbd/lanman.c
616 smbd/negprot.c
617 smbd/message.c
618 smbd/nttrans.c
619 smbd/pipes.c
620 smbd/reply.c
621 smbd/sesssetup.c
622 smbd/trans2.c
623 smbd/uid.c
624 smbd/dosmode.c
625 smbd/filename.c
626 smbd/open.c
627 smbd/close.c
628 smbd/blocking.c
629 smbd/sec_ctx.c
630 smbd/srvstr.c
631 smbd/vfs.c
632 smbd/perfcount.c
633 smbd/statcache.c
634 smbd/seal.c
635 smbd/posix_acls.c
636 lib/sysacls.c
637 smbd/process.c
638 smbd/service.c
639 smbd/error.c
640 printing/printspoolss.c
641 printing/rap_jobid.c
642 printing/load.c
643 printing/printer_list.c
644 lib/sessionid_tdb.c
645 lib/cleanupdb.c
646 smbd/fake_file.c
647 smbd/quotas.c
648 smbd/ntquotas.c
649 smbd/msdfs.c
650 smbd/aio.c smbd/statvfs.c
651 smbd/dmapi.c
652 smbd/signing.c
653 smbd/file_access.c
654 smbd/dnsregister.c smbd/globals.c
655 smbd/smb2_server.c
656 smbd/smb2_glue.c
657 smbd/smb2_negprot.c
658 smbd/smb2_sesssetup.c
659 smbd/smb2_tcon.c
660 smbd/smb2_create.c
661 smbd/smb2_close.c
662 smbd/smb2_flush.c
663 smbd/smb2_read.c
664 smbd/smb2_write.c
665 smbd/smb2_lock.c
666 smbd/smb2_ioctl.c
667 smbd/smb2_ioctl_dfs.c
668 smbd/smb2_ioctl_filesys.c
669 smbd/smb2_ioctl_named_pipe.c
670 smbd/smb2_ioctl_network_fs.c
671 smbd/smb2_ioctl_smbtorture.c
672 smbd/smb2_keepalive.c
673 smbd/smb2_query_directory.c
674 smbd/smb2_notify.c
675 smbd/smb2_getinfo.c
676 smbd/smb2_setinfo.c
677 smbd/smb2_break.c
678 smbd/smb2_posix.c
679 smbd/smbXsrv_version.c
680 smbd/smbXsrv_client.c
681 smbd/smbXsrv_session.c
682 smbd/smbXsrv_tcon.c
683 smbd/smbXsrv_open.c
684 smbd/server_exit.c
685 smbd/durable.c
686 smbd/scavenger.c
687 smbd/mangle.c
688 smbd/mangle_hash.c
689 smbd/mangle_hash2.c
690 smbd/oplock.c
691 smbd/oplock_linux.c
692 smbd/notify.c
693 smbd/notify_msg.c
694 smbd/build_options.c
695 smbd/smb1_utils.c
696 smbd/conn.c
697 rpc_server/srv_pipe_hnd.c
698 rpc_server/rpc_ncacn_np.c
699 ''' + NOTIFY_SOURCES,
700 deps='''
701 talloc
702 tevent
704 libsmb
705 msrpc3
707 vfs_default
708 vfs_posixacl
709 inotify
710 samba3core
711 param_service
712 AVAHI
713 PROFILE
714 LOCKING
715 LIBADS_SERVER
716 LIBAFS
717 NDR_SMBXSRV
718 LEASES_DB
719 LEASES_UTIL
720 sysquotas
721 NDR_SMB_ACL
722 netapi
723 NDR_IOCTL
724 notifyd
725 vfs_acl_common
726 NDR_QUOTA
727 GNUTLS_HELPERS
728 fd_handle
729 cli_spoolss
730 ''' +
731 bld.env['dmapi_lib'] +
732 bld.env['legacy_quota_libs'] +
733 NOTIFY_DEPS,
734 private_library=True)
736 bld.SAMBA3_SUBSYSTEM('LOCKING',
737 source='''
738 locking/locking.c
739 locking/brlock.c
740 locking/posix.c
741 locking/share_mode_lock.c
742 ''',
743 deps='''
745 talloc
746 LEASES_DB
747 LEASES_UTIL
748 NDR_OPEN_FILES
749 FNAME_UTIL
750 fd_handle
751 ''')
753 bld.SAMBA3_SUBSYSTEM('LEASES_DB',
754 source='locking/leases_db.c',
755 deps='NDR_LEASES_DB')
757 bld.SAMBA3_SUBSYSTEM('LEASES_UTIL',
758 source='locking/leases_util.c',
759 deps='NDR_OPEN_FILES')
761 if bld.CONFIG_GET("WITH_PROFILE"):
762 bld.SAMBA3_SUBSYSTEM('PROFILE',
763 source='profile/profile.c',
764 deps='''
765 samba-util
766 gnutls
767 ''')
768 else:
769 bld.SAMBA3_SUBSYSTEM('PROFILE',
770 source='profile/profile_dummy.c',
771 deps='')
773 bld.SAMBA3_SUBSYSTEM('PRINTBASE',
774 source='''
775 printing/notify.c
776 printing/printing_db.c
777 ''',
778 deps='''
779 samba-util
781 ''')
783 bld.SAMBA3_SUBSYSTEM('PRINTBACKEND',
784 source='''
785 printing/printing.c
786 printing/nt_printing.c
787 printing/nt_printing_tdb.c
788 printing/nt_printing_migrate_internal.c
789 printing/nt_printing_ads.c
790 printing/queue_process.c
791 ''',
792 deps='''
793 PRINTBASE
794 LIBADS_PRINTER
796 printing_migrate
797 ''')
799 bld.SAMBA3_LIBRARY('printing_migrate',
800 source='''
801 printing/nt_printing_migrate.c
802 rpc_client/cli_winreg_spoolss.c
803 printing/nt_printing_os2.c
804 ''',
805 deps='''
806 NDR_NTPRINTING
807 cli_spoolss
808 RPC_NDR_WINREG
809 LIBCLI_WINREG
810 smbconf
811 ''',
812 private_library=True)
814 bld.SAMBA3_SUBSYSTEM('PRINTING',
815 source='''
816 printing/pcap.c
817 printing/print_svid.c
818 printing/print_aix.c
819 printing/print_cups.c
820 printing/print_generic.c
821 printing/lpq_parse.c
822 printing/print_standard.c
823 printing/print_iprint.c
824 ''',
825 deps='''
826 NDR_PRINTCAP
827 dbwrap
828 tdb-wrap3
829 SMBCONF_PARAM
830 PRINTBASE
831 smbd_base
832 cups
833 ''')
835 bld.SAMBA_BINARY('samba-bgqd',
836 source='printing/samba-bgqd.c',
837 deps='''
838 samba3core
839 CMDLINE_S3
840 AUTH_COMMON
841 RPC_SPOOLSS
842 ''',
843 install_path='${LIBEXECDIR}/samba')
845 bld.SAMBA3_SUBSYSTEM('FNAME_UTIL',
846 source='lib/filename_util.c',
847 deps='samba-util')
849 bld.SAMBA3_SUBSYSTEM('LIBNET',
850 source='libnet/libnet_join.c libnet/libnet_join_offline.c',
851 deps='NDR_LIBNET_JOIN INIT_SAMR net_keytab pdb')
853 bld.SAMBA3_LIBRARY('net_keytab',
854 source='libnet/libnet_keytab.c',
855 deps='krb5samba ads',
856 private_library=True)
859 bld.SAMBA3_SUBSYSTEM('LIBNET_DSSYNC',
860 source='''
861 libnet/libnet_dssync.c
862 libnet/libnet_dssync_passdb.c
863 libnet/libnet_dssync_keytab.c
864 ''',
865 deps='''
866 LIBNET
867 RPC_NDR_DRSUAPI
868 ''')
870 bld.SAMBA3_SUBSYSTEM('LIBEVENTLOG',
871 source='lib/eventlog/eventlog.c',
872 deps='NDR_EVENTLOG tdb')
874 bld.SAMBA3_SUBSYSTEM('LIBNMB',
875 source='''
876 libsmb/unexpected.c
877 libsmb/namecache.c
878 libsmb/nmblib.c
879 libsmb/clidgram.c
880 libsmb/namequery.c
881 libsmb/conncache.c
882 libads/sitename_cache.c
883 ''',
884 deps='''
885 LIBTSOCKET
886 LIBCLI_NETLOGON
887 samba3util
888 addns
889 lmhosts
890 resolv
891 ''')
893 bld.SAMBA3_SUBSYSTEM('SERVICES',
894 source='''
895 services/svc_spoolss.c
896 services/svc_rcinit.c
897 services/svc_winreg_glue.c
898 services/svc_netlogon.c
899 services/svc_winreg.c
900 services/svc_wins.c
901 ''',
902 deps='samba-util')
904 bld.SAMBA3_SUBSYSTEM('PLAINTEXT_AUTH',
905 source='''
906 auth/pampass.c
907 auth/pass_check.c
908 ''',
909 deps='''
910 crypt
912 PAM_ERRORS
913 ''')
915 bld.SAMBA3_SUBSYSTEM('PASSCHANGE',
916 source='libsmb/passchange.c',
917 deps='''
918 LIBCLI_SAMR
919 INIT_LSA
920 msrpc3
921 krb5samba
922 ''')
924 bld.SAMBA3_SUBSYSTEM('SAMBA_VERSION',
925 source='lib/version.c',
926 deps='samba-util')
928 bld.SAMBA3_SUBSYSTEM('SLCACHE',
929 source='libsmb/samlogon_cache.c',
930 deps='''
931 samba-util
933 ''')
935 bld.SAMBA3_SUBSYSTEM('dsgetdcname',
936 source='''
937 libsmb/dsgetdcname.c
938 ''',
939 deps='''
940 CLDAP
941 LIBNMB
942 ''')
944 bld.SAMBA3_SUBSYSTEM('DCUTIL',
945 source='''
946 libsmb/namequery_dc.c
947 ''',
948 deps='''
950 dsgetdcname
951 msrpc3
952 libcli_lsa3
953 ''')
955 bld.SAMBA3_LIBRARY('trusts_util',
956 source='libsmb/trusts_util.c',
957 deps='''
958 libcli_netlogon3
959 msrpc3
960 samba-passdb
961 ''',
962 private_library=True)
964 bld.SAMBA3_SUBSYSTEM('tdb-wrap3',
965 source='lib/util_tdb.c',
966 deps='talloc samba3-util')
968 bld.SAMBA3_LIBRARY('samba3-util',
969 source='''
970 lib/util_sec.c
971 lib/util_str.c
972 lib/adt_tree.c
973 lib/util_malloc.c
974 lib/namearray.c
975 lib/file_id.c
976 lib/cbuf.c
977 lib/per_thread_cwd.c
978 ''',
979 deps='''
980 samba-util
981 charset
982 ''',
983 private_library=True)
985 bld.SAMBA_LIBRARY('xattr_tdb',
986 source='lib/xattr_tdb.c',
987 deps='NDR_XATTR dbwrap samba3-util',
988 private_library=True)
990 bld.SAMBA3_LIBRARY('CHARSET3',
991 source='''
992 lib/charcnv.c
993 lib/fstring.c
994 ''',
995 public_deps='''
996 ICONV_WRAPPER
997 charset
998 ''',
999 deps='''
1000 samba-util
1001 samba3-util
1002 ''',
1003 private_library=True)
1005 bld.SAMBA3_SUBSYSTEM('errors3',
1006 source='''
1007 libsmb/errormap.c
1008 libsmb/smberr.c
1009 lib/errmap_unix.c
1010 ''',
1011 deps='samba-errors')
1013 bld.SAMBA3_SUBSYSTEM('LIBCLI_SAMR',
1014 source='rpc_client/cli_samr.c',
1015 deps='RPC_NDR_SAMR INIT_SAMR')
1017 bld.SAMBA3_LIBRARY('libcli_lsa3',
1018 source='rpc_client/cli_lsarpc.c',
1019 deps='RPC_NDR_LSA INIT_LSA',
1020 private_library=True)
1022 bld.SAMBA3_LIBRARY('libcli_netlogon3',
1023 source='''
1024 rpc_client/cli_netlogon.c
1025 rpc_client/util_netlogon.c
1026 ''',
1027 deps='''
1028 msrpc3
1029 RPC_NDR_NETLOGON
1030 cliauth
1031 smbconf
1032 NETLOGON_CREDS_CLI''',
1033 private_library=True)
1035 bld.SAMBA3_LIBRARY('cli_spoolss',
1036 source='''
1037 rpc_client/cli_spoolss.c
1038 rpc_client/init_spoolss.c
1039 ''',
1040 deps='''
1041 RPC_NDR_SPOOLSS
1042 smbconf
1043 secrets3
1044 gensec
1045 ''',
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('tevent-glib-glue',
1079 source='lib/tevent_glib_glue.c',
1080 deps='glib-2.0',
1081 enabled=bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1084 bld.SAMBA3_SUBSYSTEM('ADOUBLE',
1085 source='lib/adouble.c',
1086 deps='STRING_REPLACE')
1088 bld.SAMBA3_BINARY('test_adouble',
1089 source='lib/test_adouble.c',
1090 deps='smbd_base STRING_REPLACE cmocka',
1091 for_selftest=True)
1093 bld.SAMBA3_SUBSYSTEM('STRING_REPLACE',
1094 source='lib/string_replace.c')
1096 bld.SAMBA3_SUBSYSTEM('fd_handle',
1097 source='smbd/fd_handle.c')
1099 ########################## BINARIES #################################
1101 bld.SAMBA3_BINARY('smbd/smbd',
1102 source='smbd/server.c smbd/smbd_cleanupd.c',
1103 deps='''
1104 CMDLINE_S3
1105 smbd_base
1106 REG_FULL
1107 ''',
1108 install_path='${SBINDIR}')
1111 bld.SAMBA3_SUBSYSTEM('TDB_VALIDATE',
1112 source='lib/tdb_validate.c',
1113 deps='samba-util')
1116 bld.SAMBA3_BINARY('client/smbclient',
1117 source='''
1118 client/client.c
1119 client/clitar.c
1120 client/dnsbrowse.c
1121 ''',
1122 deps='''
1123 talloc
1124 CMDLINE_S3
1125 smbconf
1126 ndr-standard
1127 SMBREADLINE
1128 libsmb
1129 msrpc3
1130 RPC_NDR_SRVSVC
1131 cli_smb_common
1132 archive
1133 ''')
1135 bld.SAMBA3_BINARY('smbspool',
1136 source='client/smbspool.c',
1137 deps='''
1138 talloc
1139 smbconf
1140 libsmb
1141 samba3core
1142 ''')
1144 bld.SAMBA3_BINARY('smbspool_krb5_wrapper',
1145 source='client/smbspool_krb5_wrapper.c',
1146 deps='''
1147 DYNCONFIG
1148 cups
1149 krb5samba
1150 ''',
1151 install_path='${LIBEXECDIR}/samba',
1152 enabled=bld.CONFIG_SET('HAVE_CUPS'))
1154 bld.SAMBA3_BINARY('smbspool_argv_wrapper',
1155 source='script/tests/smbspool_argv_wrapper.c',
1156 for_selftest=True)
1158 bld.SAMBA3_BINARY('smbconftort',
1159 source='lib/smbconf/testsuite.c',
1160 deps='''
1161 talloc
1162 smbconf
1163 CMDLINE_S3
1164 ''',
1165 for_selftest=True)
1167 bld.SAMBA3_BINARY('test_mdsparser_es',
1168 source='''
1169 rpc_server/mdssvc/test_mdsparser_es.c
1170 rpc_server/mdssvc/es_parser.y
1171 rpc_server/mdssvc/es_lexer.l
1172 rpc_server/mdssvc/es_mapping.c
1173 ''',
1174 deps='''
1175 samba3-util
1176 talloc
1177 smbconf
1178 jansson
1179 cmocka
1180 CMDLINE_S3
1181 ''',
1182 enabled=bld.env.spotlight_backend_es,
1183 for_selftest=True)
1185 bld.SAMBA3_BINARY('versiontest',
1186 source='lib/version_test.c',
1187 deps='''
1188 SAMBA_VERSION
1189 smbconf
1190 ''',
1191 install=False)
1193 bld.SAMBA3_BINARY('timelimit',
1194 source='script/tests/timelimit.c',
1195 for_selftest=True)
1197 bld.SAMBA3_BINARY('vlp',
1198 source='printing/tests/vlp.c',
1199 deps='''
1200 talloc
1201 smbconf
1202 ''',
1203 for_selftest=True)
1206 pyrpc_util = bld.pyembed_libname('pyrpc_util')
1207 pytalloc_util = bld.pyembed_libname('pytalloc-util')
1208 bld.SAMBA3_PYTHON('pysmbd',
1209 source='smbd/pysmbd.c',
1210 deps=' '.join(['smbd_base', pyrpc_util, pytalloc_util]),
1211 realname='samba/samba3/smbd.so'
1214 pycredentials = 'pycredentials'
1215 bld.SAMBA3_PYTHON('pylibsmb',
1216 source='libsmb/pylibsmb.c',
1217 deps='smbclient samba-credentials %s' % pycredentials,
1218 realname='samba/samba3/libsmb_samba_cwrapper.so'
1221 bld.SAMBA3_PYTHON('pymdscli',
1222 source='rpc_client/py_mdscli.c',
1223 deps=' '.join(['RPCCLI_MDSSVC', pytalloc_util, pyrpc_util]),
1224 realname='samba/samba3/mdscli.so')
1226 bld.SAMBA3_BINARY('spotlight2sparql',
1227 source='''
1228 rpc_server/mdssvc/sparql_parser_test.c
1229 rpc_server/mdssvc/sparql_parser.y
1230 rpc_server/mdssvc/sparql_lexer.l
1231 rpc_server/mdssvc/sparql_mapping.c''',
1232 deps='samba3-util talloc ' + bld.env['libtracker'],
1233 enabled=bld.env.spotlight_backend_tracker,
1234 install=False)
1236 bld.SAMBA3_BINARY('spotlight2es',
1237 source='''
1238 rpc_server/mdssvc/es_parser_test.c
1239 rpc_server/mdssvc/es_parser.y
1240 rpc_server/mdssvc/es_lexer.l
1241 rpc_server/mdssvc/es_mapping.c''',
1242 deps='samba3-util talloc jansson smbconf',
1243 enabled=bld.env.spotlight_backend_es,
1244 install=False)
1246 bld.SAMBA3_BINARY('tevent_glib_glue_test',
1247 source='lib/tevent_glib_glue_tests.c',
1248 deps='''
1249 talloc
1250 libsmb
1251 tevent-glib-glue''',
1252 enabled=bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1253 for_selftest=True)
1255 bld.SAMBA3_BINARY('tevent_glib_tracker',
1256 source='utils/async-tracker.c',
1257 deps='''
1258 talloc
1259 libsmb
1260 CMDLINE_S3
1261 tevent-glib-glue ''' + bld.env['libtracker'],
1262 enabled=bld.CONFIG_SET('HAVE_TRACKER') and bld.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1263 install=False)
1265 ########################## INCLUDES #################################
1267 bld.RECURSE('auth')
1268 bld.RECURSE('libgpo/gpext')
1269 bld.RECURSE('librpc')
1270 bld.RECURSE('librpc/idl')
1271 bld.RECURSE('libsmb')
1272 bld.RECURSE('modules')
1273 bld.RECURSE('param')
1274 bld.RECURSE('passdb')
1275 bld.RECURSE('rpc_server')
1276 bld.RECURSE('script')
1277 bld.RECURSE('winbindd')
1278 bld.RECURSE('../examples/libsmbclient')
1279 bld.RECURSE('../examples/pdb')
1280 bld.RECURSE('../examples/VFS')
1281 bld.RECURSE('../examples/fuse')
1282 bld.RECURSE('../examples/winexe')
1283 bld.RECURSE('lib/netapi/tests')
1284 bld.RECURSE('lib/netapi/examples')
1285 bld.RECURSE('smbd/notifyd')
1286 bld.RECURSE('rpcclient')
1287 bld.RECURSE('utils')
1288 bld.RECURSE('nmbd')
1289 bld.RECURSE('lib/util')
1290 bld.RECURSE('torture')
1292 bld.ENFORCE_GROUP_ORDERING()
1293 bld.CHECK_PROJECT_RULES()