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
16 lib/netapi/libnetapi.c
17 lib/netapi/joindomain.c
18 lib/netapi/serverinfo.c
19 lib/netapi/wkstainfo.c
23 lib/netapi/localgroup.c
29 lib/netapi/netlogon.c''',
30 deps
='CREDENTIALS_CMDLINE',
43 public_headers
='../source3/lib/netapi/netapi.h',
44 pc_files
='libnet/netapi.pc',
47 bld
.SAMBA3_LIBRARY('gse',
48 source
='librpc/crypto/gse_krb5.c librpc/crypto/gse.c',
49 deps
='krb5samba gensec smbconf KRBCLIENT secrets3',
52 bld
.SAMBA3_LIBRARY('msrpc3',
55 rpc_client/rpc_transport_np.c
56 rpc_client/rpc_transport_sock.c
57 rpc_client/rpc_transport_tstream.c
59 librpc/rpc/dcerpc_helpers.c
78 bld
.SAMBA3_SUBSYSTEM('AVAHI',
87 enabled
=bld
.env
.with_avahi
)
89 bld
.SAMBA3_SUBSYSTEM('GROUPDB',
96 bld
.SAMBA3_SUBSYSTEM('TLDAP',
100 lib/tldap_gensec_bind.c
108 bld
.SAMBA3_BINARY('test_tldap',
109 source
='lib/test_tldap.c',
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',
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',
143 private_library
=False,
144 grouping_library
=True,
146 public_headers_install
=True,
152 abi_match
=private_pdb_match
,
153 abi_directory
='passdb/ABI',
156 bld
.SAMBA3_SUBSYSTEM('pdb',
163 lib/util_sid_passdb.c
172 passdb/pdb_interface.c
173 passdb/pdb_secrets.c''',
186 bld
.SAMBA3_LIBRARY('smbldaphelper',
188 passdb/pdb_ldap_schema.c
189 passdb/pdb_ldap_util.c
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',
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',
215 # Do not link against this use 'smbconf'
216 bld
.SAMBA3_SUBSYSTEM('SMBREGISTRY',
219 registry/reg_dispatcher.c
220 registry/reg_cachehook.c
221 registry/reg_objects.c
222 registry/reg_util_internal.c
224 registry/reg_backend_db.c
225 registry/reg_parse_internal.c
228 registry/reg_init_basic.c
245 # Do not link against this use 'smbconf'
246 bld
.SAMBA3_SUBSYSTEM('REG_SMBCONF',
248 registry/reg_backend_smbconf.c
249 registry/reg_init_smbconf.c
250 registry/reg_util_token.c
251 registry/reg_api_util.c
255 bld
.SAMBA3_LIBRARY('REG_FULL',private_library
=True,
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''',
274 bld
.SAMBA3_LIBRARY('cmdline_contexts',
275 source
='lib/cmdline_contexts.c',
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',
290 lib/util_specialsids.c
298 lib/util_transfer_file.c
299 lib/util_macstreams.c
313 if bld
.env
.with_ctdb
:
314 SAMBA_CLUSTER_SUPPORT_SOURCES
='''
315 lib/cluster_support.c
316 lib/dbwrap/dbwrap_ctdb.c
318 lib/messages_ctdb_ref.c
321 SAMBA_CLUSTER_SUPPORT_DEPS
='''
327 SAMBA_CLUSTER_SUPPORT_SOURCES
='''
328 lib/cluster_support.c
331 SAMBA_CLUSTER_SUPPORT_DEPS
='''
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',
344 lib/dbwrap/dbwrap_open.c
345 lib/dbwrap/dbwrap_watch.c
350 samba-cluster-support
353 bld
.SAMBA3_LIBRARY('messages_util',
354 source
='''lib/messages_util.c''',
356 private_library
=True)
358 bld
.SAMBA3_SUBSYSTEM('samba3core',
364 lib/server_id_watch.c
365 lib/server_id_db_util.c
367 ../lib/util/debug_s3.c
374 lib/substitute_generic.c
380 lib/global_contexts.c
411 bld
.SAMBA3_LIBRARY('smbd_shim',
412 source
='''lib/smbd_shim.c''',
414 private_library
=True)
416 bld
.SAMBA3_SUBSYSTEM('auth_generic',
417 source
='libsmb/auth_generic.c',
420 bld
.SAMBA3_LIBRARY('libsmb',
429 libsmb/clireadwrite.c
441 libsmb/smbsock_connect.c
442 libsmb/cli_smb2_fnum.c
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',
468 passdb/machine_account_secrets.c
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_*',
492 public_headers
='include/smbldap.h include/smb_ldap.h')
494 bld
.SAMBA3_LIBRARY('ads',
498 libads/sasl_wrapping.c
500 libads/kerberos_util.c
503 libads/kerberos_keytab.c
509 libads/net_ads_setspn.c
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',
541 lib/ldap_debug_handler.c
556 bld
.SAMBA3_LIBRARY('smbconf',
558 lib/smbconf/smbconf_init.c
559 lib/smbconf/smbconf_reg.c
573 public_headers
='../lib/smbconf/smbconf.h',
577 bld
.SAMBA3_SUBSYSTEM('sysquotas',
580 lib/sysquotas_linux.c
588 deps
='samba3-util samba-util tirpc')
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',
640 printing/printspoolss.c
643 printing/printer_list.c
650 smbd/aio.c smbd/statvfs.c
654 smbd/dnsregister.c smbd/globals.c
658 smbd/smb2_sesssetup.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
679 smbd/smbXsrv_version.c
680 smbd/smbXsrv_client.c
681 smbd/smbXsrv_session.c
697 rpc_server/srv_pipe_hnd.c
698 rpc_server/rpc_ncacn_np.c
699 ''' + NOTIFY_SOURCES
,
731 bld
.env
['dmapi_lib'] +
732 bld
.env
['legacy_quota_libs'] +
734 private_library
=True)
736 bld
.SAMBA3_SUBSYSTEM('LOCKING',
741 locking/share_mode_lock.c
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',
769 bld
.SAMBA3_SUBSYSTEM('PROFILE',
770 source
='profile/profile_dummy.c',
773 bld
.SAMBA3_SUBSYSTEM('PRINTBASE',
776 printing/printing_db.c
783 bld
.SAMBA3_SUBSYSTEM('PRINTBACKEND',
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
799 bld
.SAMBA3_LIBRARY('printing_migrate',
801 printing/nt_printing_migrate.c
802 rpc_client/cli_winreg_spoolss.c
803 printing/nt_printing_os2.c
812 private_library
=True)
814 bld
.SAMBA3_SUBSYSTEM('PRINTING',
817 printing/print_svid.c
819 printing/print_cups.c
820 printing/print_generic.c
822 printing/print_standard.c
823 printing/print_iprint.c
835 bld
.SAMBA_BINARY('samba-bgqd',
836 source
='printing/samba-bgqd.c',
843 install_path
='${LIBEXECDIR}/samba')
845 bld
.SAMBA3_SUBSYSTEM('FNAME_UTIL',
846 source
='lib/filename_util.c',
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',
861 libnet/libnet_dssync.c
862 libnet/libnet_dssync_passdb.c
863 libnet/libnet_dssync_keytab.c
870 bld
.SAMBA3_SUBSYSTEM('LIBEVENTLOG',
871 source
='lib/eventlog/eventlog.c',
872 deps
='NDR_EVENTLOG tdb')
874 bld
.SAMBA3_SUBSYSTEM('LIBNMB',
882 libads/sitename_cache.c
893 bld
.SAMBA3_SUBSYSTEM('SERVICES',
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
904 bld
.SAMBA3_SUBSYSTEM('PLAINTEXT_AUTH',
915 bld
.SAMBA3_SUBSYSTEM('PASSCHANGE',
916 source
='libsmb/passchange.c',
924 bld
.SAMBA3_SUBSYSTEM('SAMBA_VERSION',
925 source
='lib/version.c',
928 bld
.SAMBA3_SUBSYSTEM('SLCACHE',
929 source
='libsmb/samlogon_cache.c',
935 bld
.SAMBA3_SUBSYSTEM('dsgetdcname',
944 bld
.SAMBA3_SUBSYSTEM('DCUTIL',
946 libsmb/namequery_dc.c
955 bld
.SAMBA3_LIBRARY('trusts_util',
956 source
='libsmb/trusts_util.c',
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',
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',
1003 private_library
=True)
1005 bld
.SAMBA3_SUBSYSTEM('errors3',
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',
1024 rpc_client/cli_netlogon.c
1025 rpc_client/util_netlogon.c
1032 NETLOGON_CREDS_CLI''',
1033 private_library
=True)
1035 bld
.SAMBA3_LIBRARY('cli_spoolss',
1037 rpc_client/cli_spoolss.c
1038 rpc_client/init_spoolss.c
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',
1062 rpc_client/cli_mdssvc.c
1063 rpc_client/cli_mdssvc_util.c
1065 deps
='mdssvc RPC_NDR_MDSSVC')
1067 bld
.SAMBA3_SUBSYSTEM('INIT_LSA',
1068 source
='rpc_client/init_lsa.c',
1071 bld
.SAMBA3_SUBSYSTEM('INIT_SAMR',
1072 source
='rpc_client/init_samr.c',
1073 deps
='samba-util GNUTLS_HELPERS')
1075 bld
.SAMBA3_SUBSYSTEM('LIBLSA',
1078 bld
.SAMBA3_SUBSYSTEM('tevent-glib-glue',
1079 source
='lib/tevent_glib_glue.c',
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',
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',
1108 install_path
='${SBINDIR}')
1111 bld
.SAMBA3_SUBSYSTEM('TDB_VALIDATE',
1112 source
='lib/tdb_validate.c',
1116 bld
.SAMBA3_BINARY('client/smbclient',
1135 bld
.SAMBA3_BINARY('smbspool',
1136 source
='client/smbspool.c',
1144 bld
.SAMBA3_BINARY('smbspool_krb5_wrapper',
1145 source
='client/smbspool_krb5_wrapper.c',
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',
1158 bld
.SAMBA3_BINARY('smbconftort',
1159 source
='lib/smbconf/testsuite.c',
1167 bld
.SAMBA3_BINARY('test_mdsparser_es',
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
1182 enabled
=bld
.env
.spotlight_backend_es
,
1185 bld
.SAMBA3_BINARY('versiontest',
1186 source
='lib/version_test.c',
1193 bld
.SAMBA3_BINARY('timelimit',
1194 source
='script/tests/timelimit.c',
1197 bld
.SAMBA3_BINARY('vlp',
1198 source
='printing/tests/vlp.c',
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',
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
,
1236 bld
.SAMBA3_BINARY('spotlight2es',
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
,
1246 bld
.SAMBA3_BINARY('tevent_glib_glue_test',
1247 source
='lib/tevent_glib_glue_tests.c',
1251 tevent-glib-glue''',
1252 enabled
=bld
.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1255 bld
.SAMBA3_BINARY('tevent_glib_tracker',
1256 source
='utils/async-tracker.c',
1261 tevent-glib-glue ''' + bld
.env
['libtracker'],
1262 enabled
=bld
.CONFIG_SET('HAVE_TRACKER') and bld
.CONFIG_SET('WITH_TEVENT_GLIB_GLUE'),
1265 ########################## INCLUDES #################################
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')
1289 bld
.RECURSE('lib/util')
1290 bld
.RECURSE('torture')
1292 bld
.ENFORCE_GROUP_ORDERING()
1293 bld
.CHECK_PROJECT_RULES()