980acc32eaa2bd4d487619f1597c8647cd574c44
[samba.git] / source3 / wscript_build
1 #!/usr/bin/env python
2
3 from samba_utils import *
4
5 TDB_LIB_SRC = '''lib/util_tdb.c ../lib/util/util_tdb.c
6           lib/dbwrap.c lib/dbwrap_tdb.c
7           lib/dbwrap_ctdb.c
8           lib/g_lock.c
9           lib/dbwrap_rbt.c'''
10
11 TDB_VALIDATE_SRC = '''lib/tdb_validate.c'''
12
13 SMBLDAP = bld.env.SMBLDAP or ""
14 SMBLDAPUTIL = bld.env.SMBLDAPUTIL or ""
15
16 SMBLDAP_SRC = '''${SMBLDAP} ${SMBLDAPUTIL}'''
17
18 VERSION_SRC = '''lib/version.c'''
19
20 WBCOMMON_SRC = '../nsswitch/wb_common.c'
21
22 AFS_SRC = 'lib/afs.c'
23
24 AFS_SETTOKEN_SRC = 'lib/afs_settoken.c'
25
26 AVAHI_SRC = 'lib/avahi.c smbd/avahi_register.c'
27
28 SERVER_MUTEX_SRC = 'lib/server_mutex.c'
29
30 PASSCHANGE_SRC = '''libsmb/passchange.c'''
31
32 LIBNDR_DRSUAPI_SRC = '''../librpc/ndr/ndr_drsuapi.c
33                      ../librpc/ndr/ndr_compression.c
34                      ../librpc/gen_ndr/ndr_drsuapi.c
35                      ../librpc/ndr/ndr_drsblobs.c
36                      ../librpc/gen_ndr/ndr_drsblobs.c'''
37
38 COMPRESSION_SRC = '../lib/compression/mszip.c ../lib/compression/lzxpress.c'
39
40 DRSUAPI_SRC = '''${LIBNDR_DRSUAPI_SRC}
41               ${COMPRESSION_SRC}'''
42
43 LIBNDR_NTLMSSP_SRC = '''../librpc/gen_ndr/ndr_ntlmssp.c
44                      ../librpc/ndr/ndr_ntlmssp.c'''
45
46 LIBNDR_SRC = '''../librpc/ndr/ndr_basic.c
47              ../librpc/ndr/ndr.c
48              ../librpc/ndr/ndr_misc.c
49              ../librpc/gen_ndr/ndr_misc.c
50              ../librpc/gen_ndr/ndr_security.c
51              ../librpc/ndr/ndr_sec_helper.c
52              ../librpc/ndr/ndr_string.c
53              ../librpc/ndr/uuid.c
54              librpc/ndr/util.c
55              ../librpc/gen_ndr/ndr_dcerpc.c'''
56
57 RPCCLIENT_NDR_SRC = '''rpc_client/ndr.c'''
58
59 LIBNDR_GEN_SRC0 = '''../librpc/gen_ndr/ndr_samr.c
60                   ../librpc/gen_ndr/ndr_lsa.c'''
61
62 LIBNDR_NETLOGON_SRC = '''../librpc/gen_ndr/ndr_netlogon.c
63                   ../librpc/ndr/ndr_netlogon.c'''
64
65 LIBNDR_SPOOLSS_SRC = '''../librpc/gen_ndr/ndr_spoolss.c
66                   ../librpc/ndr/ndr_spoolss_buf.c'''
67
68 LIBNDR_GEN_SRC = '''../librpc/gen_ndr/ndr_wkssvc.c
69                  ${LIBNDR_GEN_SRC0}
70                  ../librpc/gen_ndr/ndr_dfs.c
71                  ../librpc/gen_ndr/ndr_echo.c
72                  ../librpc/gen_ndr/ndr_winreg.c
73                  ../librpc/gen_ndr/ndr_initshutdown.c
74                  ../librpc/gen_ndr/ndr_srvsvc.c
75                  ../librpc/gen_ndr/ndr_eventlog.c
76                  ${LIBNDR_NETLOGON_SRC}
77                  ../librpc/gen_ndr/ndr_dssetup.c
78                  librpc/gen_ndr/ndr_notify.c
79                  ../librpc/gen_ndr/ndr_xattr.c
80                  ../librpc/ndr/ndr_xattr.c
81                  ../librpc/gen_ndr/ndr_epmapper.c
82                  ../librpc/gen_ndr/ndr_named_pipe_auth.c
83                  ../librpc/gen_ndr/ndr_ntsvcs.c
84                  ${LIBNDR_SPOOLSS_SRC}'''
85
86 # this includes only the low level parse code, not stuff
87 # that requires knowledge of security contexts
88 RPC_PARSE_SRC1 = '''rpc_parse/parse_prs.c rpc_parse/parse_misc.c'''
89
90 RPC_PARSE_SRC2 = '''rpc_parse/parse_rpc.c
91                  rpc_client/init_netlogon.c
92                  rpc_client/init_lsa.c'''
93
94 LIBREPLACE_SRC = '''${LIBREPLACE_SRCS}'''
95
96 SOCKET_WRAPPER_SRC = '''${SOCKET_WRAPPER_SRCS}'''
97 NSS_WRAPPER_SRC = '''${NSS_WRAPPER_SRCS}'''
98
99 LIBSAMBAUTIL_SRC = '''
100                 ${LIBREPLACE_SRC}
101                 ${SOCKET_WRAPPER_SRC}
102                 ${NSS_WRAPPER_SRC}'''
103
104 UTIL_SRC = '''../lib/util/rbtree.c ../lib/util/signal.c ../lib/util/time.c
105                    ../lib/util/xfile.c ../lib/util/util_strlist.c
106                    ../lib/util/util_file.c ../lib/util/data_blob.c
107                    ../lib/util/util.c ../lib/util/fsusage.c
108                    ../lib/util/params.c ../lib/util/talloc_stack.c
109                    ../lib/util/genrand.c ../lib/util/util_net.c
110                    ../lib/util/become_daemon.c ../lib/util/system.c
111                    ../lib/util/tevent_unix.c ../lib/util/tevent_ntstatus.c
112                    ../lib/util/smb_threads.c ../lib/util/util_id.c
113                    ../lib/util/blocking.c ../lib/util/rfc1738.c '''
114
115 CRYPTO_SRC = '''../lib/crypto/crc32.c ../lib/crypto/md5.c
116                          ../lib/crypto/hmacmd5.c ../lib/crypto/arcfour.c
117                          ../lib/crypto/md4.c
118                          ../lib/crypto/sha256.c ../lib/crypto/hmacsha256.c
119                          ../lib/crypto/aes.c ../lib/crypto/rijndael-alg-fst.c'''
120
121 LIBTEVENT_SRC0 = ''
122
123 PTHREADPOOL_SRC = ''
124
125 LIBREPLACE_SRCS = ''
126
127 SOCKET_WRAPPER_SRCS = ''
128
129 NSS_WRAPPER_SRCS = ''
130
131 ZLIB_SRCS = ''
132
133 LIB_SRC = '''${LIBSAMBAUTIL_SRC} ${UTIL_SRC} ${CRYPTO_SRC}
134           lib/messages.c librpc/gen_ndr/ndr_messaging.c lib/messages_local.c
135           lib/messages_ctdbd.c lib/packet.c lib/ctdbd_conn.c
136           lib/interfaces.c lib/memcache.c
137           lib/talloc_dict.c
138           lib/serverid.c
139           lib/util_transfer_file.c ../lib/async_req/async_sock.c
140           ${TDB_LIB_SRC}
141           ${VERSION_SRC} lib/charcnv.c lib/debug.c lib/fault.c
142           lib/interface.c lib/pidfile.c
143           lib/system.c lib/sendfile.c lib/recvfile.c lib/time.c
144           lib/username.c
145           ../libds/common/flag_mapping.c
146           lib/util_pw.c lib/access.c lib/smbrun.c
147           lib/bitmap.c lib/dprintf.c ${UTIL_REG_SRC}
148           lib/wins_srv.c
149           lib/util_str.c lib/clobber.c lib/util_sid.c lib/util_uuid.c
150           lib/util_unistr.c lib/util_file.c lib/util_names.c
151           lib/util.c lib/util_sock.c lib/sock_exec.c lib/util_sec.c
152           lib/substitute.c lib/dbwrap_util.c
153           lib/ms_fnmatch.c lib/select.c lib/errmap_unix.c
154           lib/tallocmsg.c lib/dmallocmsg.c
155           libsmb/clisigning.c libsmb/smb_signing.c
156           lib/iconv.c lib/pam_errors.c intl/lang_tdb.c
157           lib/conn_tdb.c lib/adt_tree.c lib/gencache.c
158           lib/sessionid_tdb.c
159           lib/module.c lib/events.c ${LIBTEVENT_SRC0}
160           lib/server_contexts.c
161           lib/ldap_escape.c ${CHARSET_STATIC}
162           lib/secdesc.c lib/util_seaccess.c ../libcli/security/secace.c
163           ../libcli/security/sddl.c
164           ../libcli/security/secacl.c ${PTHREADPOOL_SRC}
165           lib/fncall.c
166           libads/krb5_errs.c lib/system_smbd.c lib/audit.c ${LIBNDR_SRC}
167           lib/file_id.c lib/idmap_cache.c
168           ../libcli/security/dom_sid.c ../libcli/security/security_descriptor.c'''
169
170 LIB_DUMMY_SRC = '''lib/dummysmbd.c lib/dummyroot.c'''
171 LIB_NONSMBD_SRC = '''${LIB_DUMMY_SRC}'''
172
173 READLINE_SRC = '''lib/readline.c'''
174
175 POPT_LIB_SRC = '''lib/popt_common.c'''
176
177 PARAM_WITHOUT_REG_SRC = '''param/loadparm.c param/util.c param/loadparm_server_role.c
178                            lib/sharesec.c lib/ldap_debug_handler.c'''
179 PARAM_REG_ADD_SRC = '''${REG_SMBCONF_SRC} ${LIBSMBCONF_SRC} ${PRIVILEGES_BASIC_SRC}'''
180 PARAM_SRC = '''${PARAM_REG_ADD_SRC}'''
181
182 KRBCLIENT_SRC = '''libads/kerberos.c libads/ads_status.c'''
183
184 LIBADDNS_SRC0 = '''libaddns/dnsrecord.c libaddns/dnsutils.c  libaddns/dnssock.c
185                libaddns/dnsgss.c libaddns/dnsmarshall.c'''
186 LIBADDNS_SRC = '''${LIBADDNS_SRC0} ${SOCKET_WRAPPER_SRC}'''
187
188 GPEXT_STATIC = ''
189 GPEXT_REGISTRY_SRC = 'libgpo/gpext/registry.c'
190 GPEXT_SCRIPTS_SRC = 'libgpo/gpext/scripts.c'
191 GPEXT_SECURITY_SRC = 'libgpo/gpext/security.c'
192
193 GPEXT_SRC = '''../libgpo/gpext/gpext.c ${GPEXT_STATIC}'''
194
195 LIBGPO_SRC0 = '''../libgpo/gpo_ldap.c ../libgpo/gpo_ini.c ../libgpo/gpo_util.c
196               ../libgpo/gpo_fetch.c libgpo/gpo_filesync.c ../libgpo/gpo_sec.c
197               libgpo/gpo_reg.c
198               ${GPEXT_SRC}'''
199 LIBGPO_SRC = '''${LIBGPO_SRC0}'''
200
201 LIBADS_SRC = '''libads/ldap.c libads/ldap_printer.c
202              libads/sasl.c libads/sasl_wrapping.c
203              libads/krb5_setpw.c libads/ldap_user.c
204              libads/ads_struct.c libads/kerberos_keytab.c
205              libads/disp_sec.c libads/ads_utils.c libads/ldap_utils.c
206              libads/ldap_schema.c libads/util.c libads/ndr.c'''
207
208 LIBADS_SERVER_SRC = '''libads/kerberos_verify.c libads/authdata.c
209                     ../librpc/ndr/ndr_krb5pac.c
210                     ../librpc/gen_ndr/ndr_krb5pac.c'''
211
212 LIBNBT_SRC = '''../libcli/nbt/nbtname.c
213              ../libcli/netlogon.c
214              ../libcli/ndr_netlogon.c
215              ../librpc/gen_ndr/ndr_nbt.c
216              ../librpc/gen_ndr/ndr_svcctl.c
217              ../librpc/ndr/ndr_svcctl.c'''
218
219 LIBNMB_SRC = '''libsmb/unexpected.c libsmb/namecache.c libsmb/nmblib.c
220              libsmb/namequery.c ../libcli/nbt/lmhosts.c libsmb/conncache.c
221              libads/dns.c libads/sitename_cache.c'''
222
223 NTERR_SRC = '''libsmb/nterr.c libsmb/smberr.c'''
224 DOSERR_SRC = '../libcli/util/doserr.c'
225 ERRORMAP_SRC = 'libsmb/errormap.c'
226 DCE_RPC_ERR_SRC = '../librpc/rpc/dcerpc_error.c'
227
228 LIBSMB_ERR_SRC0 = '''${NTERR_SRC} ${DOSERR_SRC} ${ERRORMAP_SRC} ${DCE_RPC_ERR_SRC}'''
229
230 LIBSMB_ERR_SRC1 = '''../libcli/auth/smbdes.c ../libcli/auth/smbencrypt.c ../libcli/auth/msrpc_parse.c ../libcli/auth/session.c'''
231
232 LIBSMB_ERR_SRC = '${LIBSMB_ERR_SRC0} ${LIBSMB_ERR_SRC1} ${RPC_PARSE_SRC1}'
233
234 LIBSMB_SRC0 = '''
235                ../libcli/auth/ntlm_check.c
236                libsmb/ntlmssp.c
237                ../libcli/auth/ntlmssp.c
238                ../libcli/auth/ntlmssp_sign.c
239                ${LIBNDR_NTLMSSP_SRC}
240                ../libcli/auth/ntlmssp_ndr.c'''
241
242 LIBSAMBA_SRC = '${LIBSMB_SRC0}'
243
244 LIBCLI_LDAP_MESSAGE_SRC = '''../libcli/ldap/ldap_message.c'''
245 LIBCLI_LDAP_NDR_SRC = '''../libcli/ldap/ldap_ndr.c'''
246
247 CLDAP_SRC = '''libads/cldap.c
248         ../libcli/cldap/cldap.c lib/ldb_compat.c
249         ../lib/util/idtree.c
250         ${LIBCLI_LDAP_MESSAGE_SRC} ${LIBCLI_LDAP_NDR_SRC}'''
251
252 TLDAP_SRC = '''lib/tldap.c lib/tldap_util.c lib/util_tsock.c'''
253
254 SCHANNEL_SRC = '''../libcli/auth/credentials.c
255                ../libcli/auth/schannel_sign.c
256                ../libcli/auth/schannel_state_tdb.c
257                ../librpc/gen_ndr/ndr_schannel.c
258                ../librpc/ndr/ndr_schannel.c'''
259
260 LIBSMB_SRC = '''libsmb/clientgen.c libsmb/cliconnect.c libsmb/clifile.c
261              libsmb/clikrb5.c libsmb/clispnego.c
262              ../libcli/auth/spnego_parse.c
263              libsmb/clirap.c libsmb/clierror.c libsmb/climessage.c
264              libsmb/clireadwrite.c libsmb/clilist.c libsmb/cliprint.c
265              libsmb/clitrans.c libsmb/clisecdesc.c libsmb/clidgram.c
266              libsmb/clistr.c libsmb/cliquota.c libsmb/clifsinfo.c libsmb/clidfs.c
267              libsmb/clioplock.c libsmb/clirap2.c
268              libsmb/smb_seal.c libsmb/async_smb.c
269              ${LIBNMB_SRC}
270              ${LIBNBT_SRC}
271              ${CLDAP_SRC}
272              ${DRSUAPI_SRC}'''
273
274 RPC_CLIENT_SRC1 = '''rpc_client/cli_netlogon.c
275                   ${SCHANNEL_SRC}'''
276
277 LIBMSRPC_SRC = '''rpc_client/cli_lsarpc.c rpc_client/cli_samr.c
278                ${RPC_CLIENT_SRC1}
279                ${RPC_CLIENT_SRC}
280                rpc_client/cli_spoolss.c
281                rpc_client/init_spoolss.c
282                rpc_client/init_samr.c
283                    ../librpc/rpc/binding.c'''
284
285 LIBMSRPC_GEN_SRC = '''../librpc/gen_ndr/cli_lsa.c
286                    ../librpc/gen_ndr/cli_dfs.c
287                    ../librpc/gen_ndr/cli_echo.c
288                    ../librpc/gen_ndr/cli_srvsvc.c
289                    ../librpc/gen_ndr/cli_svcctl.c
290                    ../librpc/gen_ndr/cli_winreg.c
291                    ../librpc/gen_ndr/cli_initshutdown.c
292                    ../librpc/gen_ndr/cli_eventlog.c
293                    ../librpc/gen_ndr/cli_wkssvc.c
294                    ../librpc/gen_ndr/cli_netlogon.c
295                    ../librpc/gen_ndr/cli_samr.c
296                    ../librpc/gen_ndr/cli_dssetup.c
297                    ../librpc/gen_ndr/cli_ntsvcs.c
298                    ../librpc/gen_ndr/cli_epmapper.c
299                    ../librpc/gen_ndr/cli_drsuapi.c
300                    ../librpc/gen_ndr/cli_spoolss.c
301                    ${LIBNDR_GEN_SRC}
302                    ${RPCCLIENT_NDR_SRC}'''
303
304 #
305 # registry-related objects
306 #
307 UTIL_REG_SRC = '''../libcli/registry/util_reg.c'''
308
309 REG_INIT_BASIC_SRC = '''registry/reg_init_basic.c'''
310 REG_INIT_SMBCONF_SRC = '''registry/reg_init_smbconf.c'''
311 REG_INIT_FULL_SRC = '''registry/reg_init_full.c'''
312
313 REGFIO_SRC = '''registry/regfio.c'''
314
315 REGSRCS_SRC = '''registry/reg_objects.c'''
316
317 REG_BACKENDS_BASE_SRC = '''registry/reg_backend_db.c'''
318
319 REG_BACKENDS_SMBCONF_SRC = '''registry/reg_backend_smbconf.c'''
320
321 REG_BACKENDS_EXTRA_SRC = '''registry/reg_backend_printing.c
322                          registry/reg_backend_shares.c
323                          registry/reg_backend_netlogon_params.c
324                          registry/reg_backend_prod_options.c
325                          registry/reg_backend_tcpip_params.c
326                          registry/reg_backend_hkpt_params.c
327                          registry/reg_backend_current_version.c
328                          registry/reg_backend_perflib.c'''
329
330 REG_BASE_SRC = '''registry/reg_api.c
331                registry/reg_dispatcher.c
332                registry/reg_cachehook.c
333                ${REGFIO_SRC}
334                ${REGSRCS_SRC}
335                registry/reg_util_internal.c
336                lib/util_nttoken.c
337                ${REG_BACKENDS_BASE_SRC}
338                ${REG_INIT_BASIC_SRC}'''
339
340 REG_SMBCONF_SRC = '''${REG_BASE_SRC}
341                   ${REG_BACKENDS_SMBCONF_SRC}
342                   ${REG_INIT_SMBCONF_SRC}
343                   registry/reg_util_token.c'''
344
345 REG_FULL_SRC = '''${REG_SMBCONF_SRC}
346                ${REG_BACKENDS_EXTRA_SRC}
347                ${REG_INIT_FULL_SRC}
348                registry/reg_eventlog.c
349                registry/reg_perfcount.c
350                librpc/gen_ndr/ndr_perfcount.c
351                registry/reg_util_legacy.c'''
352
353 LIB_EVENTLOG_SRC = '''lib/eventlog/eventlog.c'''
354
355 RPC_STATIC = ''
356
357 RPC_LSA_SRC = '''rpc_server/srv_lsa_nt.c ../librpc/gen_ndr/srv_lsa.c'''
358
359 RPC_NETLOG_SRC = '''rpc_server/srv_netlog_nt.c
360                  ../librpc/gen_ndr/srv_netlogon.c'''
361
362 RPC_SAMR_SRC = '''rpc_server/srv_samr_nt.c
363                rpc_server/srv_samr_util.c
364                rpc_server/srv_samr_chgpasswd.c
365                ../librpc/gen_ndr/srv_samr.c'''
366
367 RPC_INITSHUTDOWN_SRC = ''' ../librpc/gen_ndr/srv_initshutdown.c rpc_server/srv_initshutdown_nt.c'''
368
369 RPC_REG_SRC = ''' rpc_server/srv_winreg_nt.c
370                ../librpc/gen_ndr/srv_winreg.c'''
371
372 RPC_DSSETUP_SRC = ''' rpc_server/srv_dssetup_nt.c ../librpc/gen_ndr/srv_dssetup.c'''
373
374 RPC_SVC_SRC = '''rpc_server/srv_srvsvc_nt.c
375               ../librpc/gen_ndr/srv_srvsvc.c'''
376
377 RPC_WKS_SRC = ''' ../librpc/gen_ndr/srv_wkssvc.c rpc_server/srv_wkssvc_nt.c'''
378
379 RPC_SVCCTL_SRC = ''' rpc_server/srv_svcctl_nt.c
380                   ../librpc/gen_ndr/srv_svcctl.c
381                   services/svc_spoolss.c services/svc_rcinit.c services/services_db.c
382                   services/svc_netlogon.c services/svc_winreg.c
383                   services/svc_wins.c'''
384
385 RPC_NTSVCS_SRC = '''rpc_server/srv_ntsvcs_nt.c
386                  ../librpc/gen_ndr/srv_ntsvcs.c'''
387
388 RPC_DFS_SRC = ''' ../librpc/gen_ndr/srv_dfs.c rpc_server/srv_dfs_nt.c'''
389
390 RPC_SPOOLSS_SRC = '''rpc_server/srv_spoolss_nt.c
391                      rpc_server/srv_spoolss_util.c
392                   ../librpc/gen_ndr/srv_spoolss.c'''
393
394 RPC_EVENTLOG_SRC = '''rpc_server/srv_eventlog_nt.c
395                    ${LIB_EVENTLOG_SRC} ../librpc/gen_ndr/srv_eventlog.c'''
396
397 NPA_TSTREAM_SRC = '''../libcli/named_pipe_auth/npa_tstream.c'''
398
399 RPC_NCACN_NP_INTERNAL = '''rpc_server/srv_pipe_register.c rpc_server/rpc_ncacn_np_internal.c
400                         rpc_server/rpc_handles.c'''
401
402 RPC_PIPE_SRC = '''rpc_server/srv_pipe_hnd.c rpc_server/srv_pipe.c
403                ${RPC_NCACN_NP_INTERNAL}'''
404
405 RPC_ECHO_SRC = '''rpc_server/srv_echo_nt.c ../librpc/gen_ndr/srv_echo.c'''
406
407 #TODO: RPC_SERVER_SRC used to include RPC_STATIC modules
408 RPC_SERVER_SRC = '''${RPC_PIPE_SRC} ${NPA_TSTREAM_SRC}'''
409
410 RPC_PARSE_SRC = '''${RPC_PARSE_SRC2}'''
411
412 RPC_CLIENT_SRC = '''rpc_client/cli_pipe.c rpc_client/rpc_transport_np.c
413         rpc_client/rpc_transport_sock.c rpc_client/rpc_transport_smbd.c'''
414
415 LOCKING_SRC = '''locking/locking.c locking/brlock.c locking/posix.c'''
416
417 PRIVILEGES_BASIC_SRC = '''lib/privileges_basic.c'''
418
419 PRIVILEGES_SRC = '''lib/privileges.c'''
420
421 PASSDB_GET_SET_SRC = '''passdb/pdb_get_set.c'''
422
423 PDB_STATIC =        ''
424 PDB_TDBSAM_SRC =    'passdb/pdb_tdb.c'
425 PDB_LDAP_SRC =      'passdb/pdb_ldap.c'
426 PDB_ADS_SRC =       'passdb/pdb_ads.c'
427 PDB_SMBPASSWD_SRC = 'passdb/pdb_smbpasswd.c'
428 PDB_WBC_SAM_SRC =   'passdb/pdb_wbc_sam.c'
429
430 SECRETS_SRC = '''passdb/secrets.c passdb/machine_account_secrets.c
431                  passdb/machine_sid.c librpc/gen_ndr/ndr_secrets.c'''
432
433 PASSDB_SRC = '''${PASSDB_GET_SET_SRC} passdb/passdb.c passdb/pdb_interface.c
434                 passdb/util_wellknown.c passdb/util_builtin.c passdb/pdb_compat.c
435                 passdb/util_unixsids.c passdb/lookup_sid.c
436                 passdb/login_cache.c ${PDB_STATIC}
437                 passdb/account_pol.c ${PRIVILEGES_SRC}
438                 lib/util_nscd.c lib/winbind_util.c ${SERVER_MUTEX_SRC}'''
439 #FIXME: lib/winbind_util.c probably is not part of PASSDB_SRC
440
441 CHARSET_STATIC = ''
442 CHARSET_WEIRD_SRC = 'modules/weird.c'
443 CHARSET_CP850_SRC = 'modules/CP850.c'
444 CHARSET_CP437_SRC = 'modules/CP437.c'
445 CHARSET_MACOSXFS_SRC = 'modules/charset_macosxfs.c'
446
447 GROUPDB_SRC = '''groupdb/mapping.c groupdb/mapping_tdb.c'''
448
449 PROFILE_SRC = '''profile/profile.c'''
450 PROFILES_SRC = '''utils/profiles.c
451                ${LIBSMB_ERR_SRC}
452                ${PARAM_SRC}
453                ${LIB_SRC} ${LIB_DUMMY_SRC}'''
454
455 OPLOCK_SRC = '''smbd/oplock.c smbd/oplock_irix.c smbd/oplock_linux.c
456              smbd/oplock_onefs.c'''
457
458 NOTIFY_SRC = '''smbd/notify.c smbd/notify_inotify.c smbd/notify_internal.c'''
459
460 FNAME_UTIL_SRC = '''smbd/filename_util.c'''
461
462 VFS_STATIC = ''
463 VFS_DEFAULT_SRC = '''modules/vfs_default.c'''
464 VFS_AUDIT_SRC = '''modules/vfs_audit.c'''
465 VFS_EXTD_AUDIT_SRC = '''modules/vfs_extd_audit.c'''
466 VFS_FULL_AUDIT_SRC = '''modules/vfs_full_audit.c'''
467 VFS_FAKE_PERMS_SRC = '''modules/vfs_fake_perms.c'''
468 VFS_RECYCLE_SRC = '''modules/vfs_recycle.c'''
469 VFS_NETATALK_SRC = '''modules/vfs_netatalk.c'''
470 VFS_DEFAULT_QUOTA_SRC = '''modules/vfs_default_quota.c'''
471 VFS_READONLY_SRC = '''modules/vfs_readonly.c modules/getdate.c'''
472 VFS_CAP_SRC = '''modules/vfs_cap.c'''
473 VFS_EXPAND_MSDFS_SRC = '''modules/vfs_expand_msdfs.c'''
474 VFS_SHADOW_COPY_SRC = '''modules/vfs_shadow_copy.c'''
475 VFS_SHADOW_COPY2_SRC = '''modules/vfs_shadow_copy2.c'''
476 VFS_AFSACL_SRC = '''modules/vfs_afsacl.c'''
477 VFS_XATTR_TDB_SRC = '''modules/vfs_xattr_tdb.c'''
478 VFS_POSIXACL_SRC = '''modules/vfs_posixacl.c'''
479 VFS_AIXACL_SRC = '''modules/vfs_aixacl.c modules/vfs_aixacl_util.c'''
480 VFS_AIXACL2_SRC = '''modules/vfs_aixacl2.c modules/vfs_aixacl_util.c modules/nfs4_acls.c'''
481 VFS_SOLARISACL_SRC = '''modules/vfs_solarisacl.c'''
482 VFS_ZFSACL_SRC = '''modules/vfs_zfsacl.c modules/nfs4_acls.c'''
483 VFS_HPUXACL_SRC = '''modules/vfs_hpuxacl.c'''
484 VFS_IRIXACL_SRC = '''modules/vfs_irixacl.c'''
485 VFS_TRU64ACL_SRC = '''modules/vfs_tru64acl.c'''
486 VFS_CATIA_SRC = 'modules/vfs_catia.c'
487 VFS_STREAMS_XATTR_SRC = 'modules/vfs_streams_xattr.c'
488 VFS_STREAMS_DEPOT_SRC = 'modules/vfs_streams_depot.c'
489 VFS_CACHEPRIME_SRC = 'modules/vfs_cacheprime.c'
490 VFS_PREALLOC_SRC = 'modules/vfs_prealloc.c'
491 VFS_COMMIT_SRC = 'modules/vfs_commit.c'
492 VFS_GPFS_SRC = 'modules/vfs_gpfs.c modules/gpfs.c modules/nfs4_acls.c'
493 VFS_NOTIFY_FAM_SRC = 'modules/vfs_notify_fam.c'
494 VFS_READAHEAD_SRC = 'modules/vfs_readahead.c'
495 VFS_TSMSM_SRC = 'modules/vfs_tsmsm.c'
496 VFS_FILEID_SRC = 'modules/vfs_fileid.c'
497 VFS_AIO_FORK_SRC = 'modules/vfs_aio_fork.c'
498 VFS_PREOPEN_SRC = 'modules/vfs_preopen.c'
499 VFS_SYNCOPS_SRC = 'modules/vfs_syncops.c'
500 VFS_ACL_XATTR_SRC = 'modules/vfs_acl_xattr.c'
501 VFS_ACL_TDB_SRC = 'modules/vfs_acl_tdb.c'
502 VFS_SMB_TRAFFIC_ANALYZER_SRC = 'modules/vfs_smb_traffic_analyzer.c'
503 VFS_ONEFS_SRC = '''modules/vfs_onefs.c modules/onefs_acl.c modules/onefs_system.c
504                 modules/onefs_open.c modules/onefs_streams.c modules/onefs_dir.c
505                 modules/onefs_cbrl.c modules/onefs_notify.c modules/onefs_config.c'''
506 VFS_ONEFS_SHADOW_COPY_SRC = 'modules/vfs_onefs_shadow_copy.c modules/onefs_shadow_copy.c'
507 VFS_DIRSORT_SRC = 'modules/vfs_dirsort.c'
508 VFS_SCANNEDONLY_SRC = 'modules/vfs_scannedonly.c'
509 VFS_CROSSRENAME_SRC = 'modules/vfs_crossrename.c'
510
511 PLAINTEXT_AUTH_SRC = '''auth/pampass.c auth/pass_check.c'''
512
513 SLCACHE_SRC = '''libsmb/samlogon_cache.c'''
514
515 DCUTIL_SRC  = '''libsmb/namequery_dc.c libsmb/trustdom_cache.c libsmb/trusts_util.c libsmb/dsgetdcname.c'''
516
517 AUTH_BUILTIN_SRC = 'auth/auth_builtin.c'
518 AUTH_DOMAIN_SRC = 'auth/auth_domain.c'
519 AUTH_SAM_SRC = 'auth/auth_sam.c'
520 AUTH_SERVER_SRC = 'auth/auth_server.c'
521 AUTH_UNIX_SRC = 'auth/auth_unix.c'
522 AUTH_WINBIND_SRC = 'auth/auth_winbind.c'
523 AUTH_WBC_SRC = 'auth/auth_wbc.c'
524 AUTH_SCRIPT_SRC = 'auth/auth_script.c'
525 AUTH_NETLOGOND_SRC = 'auth/auth_netlogond.c'
526
527 AUTH_STATIC = ''
528 AUTH_SRC = '''${AUTH_STATIC} auth/auth.c auth/auth_util.c auth/token_util.c
529            auth/auth_compat.c auth/auth_ntlmssp.c auth/user_info.c auth/check_samsec.c
530            auth/user_util.c auth/server_info.c auth/server_info_sam.c
531            ${PLAINTEXT_AUTH_SRC} ${SLCACHE_SRC} ${DCUTIL_SRC}'''
532
533 #FIXME: set IDMAP_STATIC during configuration
534 IDMAP_STATIC=''
535 IDMAP_SRC = 'winbindd/idmap.c winbindd/idmap_util.c ${IDMAP_STATIC}'
536
537 #FIXME: set NSS_INFO_STATIC during configuration
538 NSS_INFO_STATIC = ''
539 NSS_INFO_TEMPLATE_SRC = 'winbindd/nss_info_template.c'
540 NSS_INFO_SRC = 'winbindd/nss_info.c ${NSS_INFO_STATIC}'
541
542 IDMAP_HASH_SRC = '''winbindd/idmap_hash/idmap_hash.c
543                     winbindd/idmap_hash/mapfile.c'''
544
545 IDMAP_ADEX_SRC = '''winbindd/idmap_adex/idmap_adex.c
546                     winbindd/idmap_adex/cell_util.c
547                     winbindd/idmap_adex/likewise_cell.c
548                     winbindd/idmap_adex/provider_unified.c
549                     winbindd/idmap_adex/gc_util.c
550                     winbindd/idmap_adex/domain_util.c'''
551
552 PERFCOUNT_STATIC = ''
553 PERFCOUNT_ONEFS_SRC = 'modules/perfcount_onefs.c'
554 PERFCOUNT_TEST_SRC = 'modules/perfcount_test.c'
555
556 WINBINDD_SRC1 = '''winbindd/winbindd.c
557                    winbindd/winbindd_group.c
558                    winbindd/winbindd_util.c
559                    winbindd/winbindd_cache.c
560                    winbindd/winbindd_pam.c
561                    winbindd/winbindd_misc.c
562                    winbindd/winbindd_cm.c
563                    winbindd/winbindd_wins.c
564                    winbindd/winbindd_msrpc.c
565                    winbindd/winbindd_reconnect.c
566                    winbindd/winbindd_ads.c
567                    winbindd/winbindd_samr.c
568                    winbindd/winbindd_dual.c
569                    winbindd/winbindd_dual_ndr.c
570                    winbindd/winbindd_dual_srv.c
571                    librpc/gen_ndr/cli_wbint.c
572                    librpc/gen_ndr/srv_wbint.c
573                    librpc/gen_ndr/ndr_wbint.c
574                    winbindd/winbindd_async.c
575                    winbindd/winbindd_creds.c
576                    winbindd/winbindd_cred_cache.c
577                    winbindd/winbindd_ccache_access.c
578                    winbindd/winbindd_domain.c
579                    winbindd/winbindd_idmap.c
580                    winbindd/winbindd_locator.c
581                    winbindd/winbindd_ndr.c
582                    winbindd/wb_ping.c
583                    winbindd/wb_lookupsid.c
584                    winbindd/wb_lookupname.c
585                    winbindd/wb_sid2uid.c
586                    winbindd/wb_sid2gid.c
587                    winbindd/wb_uid2sid.c
588                    winbindd/wb_gid2sid.c
589                    winbindd/wb_queryuser.c
590                    winbindd/wb_lookupuseraliases.c
591                    winbindd/wb_lookupusergroups.c
592                    winbindd/wb_getpwsid.c
593                    winbindd/wb_gettoken.c
594                    winbindd/wb_seqnum.c
595                    winbindd/wb_seqnums.c
596                    winbindd/wb_group_members.c
597                    winbindd/wb_getgrsid.c
598                    winbindd/wb_query_user_list.c
599                    winbindd/wb_fill_pwent.c
600                    winbindd/wb_next_pwent.c
601                    winbindd/wb_next_grent.c
602                    winbindd/wb_dsgetdcname.c
603                    winbindd/winbindd_lookupsid.c
604                    winbindd/winbindd_lookupname.c
605                    winbindd/winbindd_sid_to_uid.c
606                    winbindd/winbindd_sid_to_gid.c
607                    winbindd/winbindd_uid_to_sid.c
608                    winbindd/winbindd_gid_to_sid.c
609                    winbindd/winbindd_allocate_uid.c
610                    winbindd/winbindd_allocate_gid.c
611                    winbindd/winbindd_getpwsid.c
612                    winbindd/winbindd_getpwnam.c
613                    winbindd/winbindd_getpwuid.c
614                    winbindd/winbindd_getsidaliases.c
615                    winbindd/winbindd_getuserdomgroups.c
616                    winbindd/winbindd_getgroups.c
617                    winbindd/winbindd_show_sequence.c
618                    winbindd/winbindd_getgrgid.c
619                    winbindd/winbindd_getgrnam.c
620                    winbindd/winbindd_getusersids.c
621                    winbindd/winbindd_lookuprids.c
622                    winbindd/winbindd_setpwent.c
623                    winbindd/winbindd_getpwent.c
624                    winbindd/winbindd_endpwent.c
625                    winbindd/winbindd_setgrent.c
626                    winbindd/winbindd_getgrent.c
627                    winbindd/winbindd_endgrent.c
628                    winbindd/winbindd_dsgetdcname.c
629                    winbindd/winbindd_getdcname.c
630                    winbindd/winbindd_list_users.c
631                    winbindd/winbindd_list_groups.c
632                    winbindd/winbindd_check_machine_acct.c
633                    winbindd/winbindd_change_machine_acct.c
634                    winbindd/winbindd_ping_dc.c
635                    winbindd/winbindd_set_mapping.c
636                    winbindd/winbindd_remove_mapping.c
637                    winbindd/winbindd_set_hwm.c
638                    winbindd/winbindd_pam_auth.c
639                    winbindd/winbindd_pam_logoff.c
640                    winbindd/winbindd_pam_chauthtok.c
641                    winbindd/winbindd_pam_auth_crap.c
642                    winbindd/winbindd_pam_chng_pswd_auth_crap.c
643                    auth/auth_util.c
644                    auth/token_util.c
645                    auth/user_util.c
646                    auth/check_samsec.c
647                    auth/server_info.c
648                    auth/server_info_sam.c
649                    auth/user_info.c
650                    auth/user_util.c
651                    rpc_server/srv_samr_chgpasswd.c
652                    ../nsswitch/libwbclient/wb_reqtrans.c'''
653
654 WINBINDD_SRC = '''${WINBINDD_SRC1}
655                   ${LIBMSRPC_SRC} ${LIBMSRPC_GEN_SRC} ${RPC_PARSE_SRC}
656                   ${PROFILE_SRC} ${SLCACHE_SRC}
657                   ${LIBADS_SRC}
658                   ${DCUTIL_SRC} ${IDMAP_SRC} ${NSS_INFO_SRC}
659                   ${AFS_SRC} ${AFS_SETTOKEN_SRC}
660                   ${LIBADS_SERVER_SRC}
661                   ${RPC_NCACN_NP_INTERNAL} ${RPC_SAMR_SRC} ${RPC_LSA_OBJ}
662                   ${TDB_VALIDATE_SRC}'''
663
664 LIBNET_SRC = 'libnet/libnet_join.c libnet/libnet_keytab.c librpc/gen_ndr/ndr_libnet_join.c'
665
666 LIBSMBCONF_SRC = '''../lib/smbconf/smbconf.c ../lib/smbconf/smbconf_util.c
667                     ../lib/smbconf/smbconf_txt.c lib/smbconf/smbconf_reg.c
668                     lib/smbconf/smbconf_init.c'''
669
670 MANGLE_SRC = '''smbd/mangle.c smbd/mangle_hash.c smbd/mangle_hash2.c'''
671
672 SMBD_SRC_MAIN = '''smbd/server.c smbd/server_exit.c'''
673
674 BUILDOPT_SRC = '''smbd/build_options.c'''
675
676 SMBD_SRC_SRV = '''smbd/server_reload.c smbd/files.c smbd/connection.c
677                smbd/utmp.c smbd/session.c
678                smbd/dfree.c smbd/dir.c smbd/password.c smbd/conn.c
679                smbd/share_access.c smbd/fileio.c
680                smbd/ipc.c smbd/lanman.c smbd/negprot.c
681                smbd/message.c smbd/nttrans.c smbd/pipes.c
682                smbd/reply.c smbd/sesssetup.c smbd/trans2.c smbd/uid.c
683                smbd/dosmode.c smbd/filename.c smbd/open.c smbd/close.c
684                smbd/blocking.c smbd/sec_ctx.c smbd/srvstr.c
685                smbd/vfs.c smbd/perfcount.c smbd/statcache.c smbd/seal.c
686                smbd/posix_acls.c lib/sysacls.c
687                smbd/process.c smbd/service.c smbd/error.c
688                printing/printfsp.c lib/sysquotas.c lib/sysquotas_linux.c
689                lib/sysquotas_xfs.c lib/sysquotas_4A.c
690                smbd/fake_file.c
691                smbd/quotas.c smbd/ntquotas.c ${AFS_SRC} smbd/msdfs.c
692                ${AFS_SETTOKEN_SRC} smbd/aio.c smbd/statvfs.c
693                smbd/dmapi.c smbd/signing.c
694                smbd/file_access.c
695                smbd/dnsregister.c smbd/globals.c
696                smbd/smb2_server.c
697                smbd/smb2_signing.c
698                smbd/smb2_glue.c
699                smbd/smb2_negprot.c
700                smbd/smb2_sesssetup.c
701                smbd/smb2_tcon.c
702                smbd/smb2_create.c
703                smbd/smb2_close.c
704                smbd/smb2_flush.c
705                smbd/smb2_read.c
706                smbd/smb2_write.c
707                smbd/smb2_lock.c
708                smbd/smb2_ioctl.c
709                smbd/smb2_keepalive.c
710                smbd/smb2_find.c
711                smbd/smb2_notify.c
712                smbd/smb2_getinfo.c
713                smbd/smb2_setinfo.c
714                smbd/smb2_break.c
715                ../libcli/smb/smb2_create_blob.c
716                ${MANGLE_SRC} ${VFS_STATIC}'''
717
718 SMBD_SRC_BASE = '''${SMBD_SRC_SRV}
719                 ${RPC_SERVER_SRC} ${RPC_PARSE_SRC}
720                 ${LOCKING_SRC} ${PRINTING_SRC}
721                 ${PROFILE_SRC} ${PRINTBACKEND_SRC}
722                 ${OPLOCK_SRC} ${NOTIFY_SRC} ${FNAME_UTIL_SRC}
723                 ${LIBMSRPC_SRC}
724                 ${LIBMSRPC_GEN_SRC} ${LIBADS_SRC}
725                 ${LIBADS_SERVER_SRC} ${REG_FULL_SRC}
726                 ${BUILDOPT_SRC}
727                 ${LIBNET_SRC} ${LIBSMBCONF_SRC}
728                 ${RPC_LSA_SRC}
729                 ${RPC_NETLOG_SRC} ${RPC_SAMR_SRC}
730                 ${RPC_INITSHUTDOWN_SRC} ${RPC_REG_SRC}
731                 ${RPC_DSSETUP_SRC} ${RPC_SVC_SRC} ${RPC_WKS_SRC}
732                 ${RPC_SVCCTL_SRC} ${RPC_NTSVCS_SRC} ${RPC_DFS_SRC}
733                 ${RPC_SPOOLSS_SRC} ${RPC_EVENTLOG_SRC}
734                 ${RPC_ECHO_SRC}
735                 ${AUTH_SRC}
736                 ${PRIVILEGES_BASIC_SRC}'''
737
738 PRINTING_SRC = '''printing/pcap.c printing/print_svid.c printing/print_aix.c
739                printing/print_cups.c printing/print_generic.c
740                printing/lpq_parse.c printing/load.c printing/print_standard.c
741                printing/print_iprint.c'''
742
743 PRINTBASE_SRC = '''printing/notify.c printing/printing_db.c'''
744 PRINTBACKEND_SRC = 'printing/printing.c printing/nt_printing.c ${PRINTBASE_SRC}'
745
746 SMBD_SRC = '''${SMBD_SRC_BASE} ${SMBD_SRC_MAIN}'''
747
748 NMBD_SRC1 = '''nmbd/asyncdns.c nmbd/nmbd.c nmbd/nmbd_become_dmb.c
749             nmbd/nmbd_become_lmb.c nmbd/nmbd_browserdb.c
750             nmbd/nmbd_browsesync.c nmbd/nmbd_elections.c
751             nmbd/nmbd_incomingdgrams.c nmbd/nmbd_incomingrequests.c
752             nmbd/nmbd_lmhosts.c nmbd/nmbd_logonnames.c nmbd/nmbd_mynames.c
753             nmbd/nmbd_namelistdb.c nmbd/nmbd_namequery.c
754             nmbd/nmbd_nameregister.c nmbd/nmbd_namerelease.c
755             nmbd/nmbd_nodestatus.c nmbd/nmbd_packets.c
756             nmbd/nmbd_processlogon.c nmbd/nmbd_responserecordsdb.c
757             nmbd/nmbd_sendannounce.c nmbd/nmbd_serverlistdb.c
758             nmbd/nmbd_subnetdb.c nmbd/nmbd_winsproxy.c nmbd/nmbd_winsserver.c
759             nmbd/nmbd_workgroupdb.c nmbd/nmbd_synclists.c'''
760
761 NMBD_SRC = '${NMBD_SRC1} ${PROFILE_SRC} ${LIBNDR_GEN_SRC0}'
762
763 SWAT_SRC1 = '''web/cgi.c web/diagnose.c web/startstop.c web/statuspage.c
764                web/swat.c web/neg_lang.c'''
765
766 SWAT_SRC = '''${SWAT_SRC1} ${PRINTING_SRC} ${PRINTBASE_SRC}
767            ${LOCKING_SRC}
768            ${PLAINTEXT_AUTH_SRC}
769            ${RPC_PARSE_SRC} ${LIBMSRPC_GEN_SRC} ${LIBMSRPC_SRC}
770            ${PASSCHANGE_SRC} ${FNAME_UTIL_SRC}'''
771
772 WBINFO_SRC = '../nsswitch/wbinfo.c ${AFS_SETTOKEN_SRC}'
773
774 TESTPARM_SRC = 'utils/testparm.c'
775
776 EVTLOGADM_SRC0 = 'utils/eventlogadm.c'
777
778 EVTLOGADM_SRC = '''${EVTLOGADM_SRC0}
779                 registry/reg_eventlog.c ${LIB_EVENTLOG_SRC}
780                 ../librpc/gen_ndr/ndr_eventlog.c
781                 ../librpc/gen_ndr/ndr_lsa.c'''
782
783 DISPLAY_SEC_SRC= '../libcli/security/display_sec.c'
784
785 CLIENT_SRC1 = '''client/client.c client/clitar.c ${RPC_CLIENT_SRC}
786                  ../librpc/rpc/binding.c client/dnsbrowse.c
787                  ${RPC_CLIENT_SRC1} ${RPC_PARSE_SRC2}'''
788
789 CLIENT_SRC = '''${CLIENT_SRC1} ${LIBMSRPC_GEN_SRC}
790                 ${READLINE_SRC} ${DISPLAY_SEC_SRC}'''
791
792
793 LIBS='ICONV'
794
795 bld.SAMBA_GENERATOR('build_options',
796                     source='include/config.h script/mkbuildoptions.awk',
797                     target='smbd/build_options.c',
798                     rule='${AWK} -f ${SRC[1].abspath(env)} > ${TGT} < ${SRC[0].abspath(env)}')
799
800 t = bld.SAMBA_GENERATOR('build_env.h',
801                         source='script/build_env.sh',
802                         target='include/build_env.h',
803                         rule='${SRC} ${SRCDIR} ${BUILDDIR} ${CC} > ${TGT}')
804 # todo: work out what is really wanted here
805 t.env.SRCDIR = bld.path.abspath()
806 t.env.BUILDDIR = bld.path.abspath()
807
808
809 bld.SETUP_BUILD_GROUPS()
810
811 bld.RECURSE('../lib/replace')
812 print "SBINDIR=%s" % bld.env.SBINDIR
813 bld.RECURSE('build')
814
815 bld.RECURSE('../librpc/idl')
816 bld.RECURSE('librpc/idl')
817
818 bld.SAMBA_MKVERSION('include/version.h')
819
820 for prefix in bld.env.MODULE_PREFIXES:
821     static_key = "%s_STATIC" % prefix.upper()
822     shared_key = "%s_SHARED" % prefix.upper()
823
824     # Set up the static modules
825     static_src = locals()[static_key]
826     for module in bld.env[static_key]:
827         static_src += "${%s_SRC} " % module
828     # for some reason static_src doesn't seem to be a reference, so save it
829     # back to the locals
830     locals()[static_key] = static_src
831
832     # Set up subsystems for the shared modules
833     for module in bld.env[shared_key]:
834         bld.SAMBA_SUBSYSTEM(module,
835                             source="${%s_SRC}" % module,
836                             vars=locals())
837
838 ######################## SUBSYSTEMS #################################
839
840 bld.SAMBA_SUBSYSTEM('WBCOMMON',
841                     source=WBCOMMON_SRC)
842
843 bld.SAMBA_SUBSYSTEM('LIBWBCLIENT',
844                     source='''../nsswitch/libwbclient/wbc_guid.c
845                               ../nsswitch/libwbclient/wbc_idmap.c
846                               ../nsswitch/libwbclient/wbclient.c
847                               ../nsswitch/libwbclient/wbc_pam.c
848                               ../nsswitch/libwbclient/wbc_pwd.c
849                               ../nsswitch/libwbclient/wbc_sid.c
850                               ../nsswitch/libwbclient/wbc_util.c''',
851                     public_deps='talloc WBCOMMON')
852
853
854 bld.SAMBA_SUBSYSTEM('ASN1_UTIL',
855                     source='../lib/util/asn1.c',
856                     deps='talloc',
857                     local_include=False)
858
859 bld.SAMBA_SUBSYSTEM('AVAHI',
860                     source=AVAHI_SRC,
861                     deps='avahi-common avahi-client',
862                     enabled=bld.env.with_avahi)
863
864 bld.SAMBA_SUBSYSTEM('GROUPDB',
865                     source=GROUPDB_SRC)
866
867 bld.SAMBA_SUBSYSTEM('TLDAP',
868                     source=TLDAP_SRC,
869                     deps='ASN1_UTIL LIBTSOCKET')
870
871 bld.SAMBA_SUBSYSTEM('PASSDB',
872                     source=PASSDB_SRC,
873                     deps='GROUPDB TLDAP SECRETS',
874                     vars=locals())
875
876 bld.SAMBA_SUBSYSTEM('PARAM_WITHOUT_REG',
877                     source=PARAM_WITHOUT_REG_SRC)
878
879 bld.SAMBA_SUBSYSTEM('PARAM',
880                     source=PARAM_SRC,
881                     deps='PARAM_WITHOUT_REG',
882                     vars=locals())
883
884 bld.SAMBA_SUBSYSTEM('POPT_SAMBA',
885                     source=POPT_LIB_SRC,
886                     vars=locals())
887
888 bld.SAMBA_SUBSYSTEM('KRBCLIENT',
889                     source=KRBCLIENT_SRC,
890                     deps='krb5 gssapi gssapi_krb5',
891                     vars=locals())
892
893 bld.SAMBA_SUBSYSTEM('LIBS',
894                     source=LIB_SRC,
895                     deps='NSS_WRAPPER iconv',
896                     vars=locals())
897
898 bld.SAMBA_SUBSYSTEM('LIB_NONSMBD',
899                     source=LIB_NONSMBD_SRC,
900                     deps='LIBS',
901                     vars=locals())
902
903 bld.SAMBA_SUBSYSTEM('LIBSMB_ERR',
904                     source=LIBSMB_ERR_SRC,
905                     deps='SECRETS SMBLDAP',
906                     vars=locals())
907
908 bld.SAMBA_SUBSYSTEM('LIBSAMBA',
909                     source=LIBSAMBA_SRC,
910                     deps='LIBSMB_ERR',
911                     vars=locals())
912
913 bld.SAMBA_SUBSYSTEM('LIBSMB',
914                     source=LIBSMB_SRC,
915                     deps='LIBSAMBA ZLIB',
916                     vars=locals())
917
918 bld.SAMBA_SUBSYSTEM('SECRETS',
919                     source=SECRETS_SRC,
920                     vars=locals())
921
922 bld.SAMBA_SUBSYSTEM('SMBLDAP',
923                     source=SMBLDAP_SRC,
924                     deps='ldap lber',
925                     vars=locals())
926
927 ########################## BINARIES #################################
928
929 bld.SAMBA_BINARY('smbd/smbd',
930                  source=SMBD_SRC,
931                  deps='''tdb DYNCONFIG tevent dl krb5 ldap gssapi gssapi_krb5
932                  NSS_WRAPPER LIBWBCLIENT crypt nsl cups cap resolv ZLIB PASSDB
933                  PARAM_WITHOUT_REG LIBS LIBSMB POPT_SAMBA KRBCLIENT AVAHI''',
934                  install_path='${SBINDIR}',
935                  vars=locals())
936
937 bld.SAMBA_BINARY('nmbd/nmbd',
938                  source=NMBD_SRC,
939                  deps='''talloc tdb tevent ZLIB cap resolv LIBWBCLIENT dl
940                  NSS_WRAPPER DYNCONFIG PASSDB PARAM ldap LIB_NONSMBD LIBSMB
941                  POPT_SAMBA KRBCLIENT''',
942                  install_path='${SBINDIR}',
943                  vars=locals())
944
945 bld.SAMBA_BINARY('winbindd/winbindd',
946                  source=WINBINDD_SRC,
947                  deps='''talloc tdb tevent cap dl DYNCONFIG ZLIB NSS_WRAPPER
948                  LIBWBCLIENT PASSDB ldap resolv PARAM LIB_NONSMBD LIBSMB
949                  POPT_SAMBA KRBCLIENT''',
950                  enabled=bld.env.build_winbind,
951                  install_path='${SBINDIR}',
952                  vars=locals())
953
954 bld.SAMBA_BINARY('web/swat',
955                  source=SWAT_SRC,
956                  deps='''talloc tevent cap DYNCONFIG LIBS LIBSMB LIBWBCLIENT PARAM
957                  LIB_NONSMBD resolv PASSDB POPT_SAMBA KRBCLIENT cups''',
958                  enabled=bld.env.build_swat,
959                  install_path='${SBINDIR}',
960                  vars=locals())
961
962 bld.SAMBA_BINARY('smbclient',
963                  source=CLIENT_SRC,
964                  deps='''talloc tdb cap resolv POPT_SAMBA PASSDB LIBSMB LIB_NONSMBD
965                  PARAM_WITHOUT_REG LIBWBCLIENT DYNCONFIG PARAM KRBCLIENT''',
966                  vars=locals())
967
968 bld.SAMBA_BINARY('wbinfo',
969                  source=WBINFO_SRC,
970                  deps='''talloc LIBWBCLIENT DYNCONFIG tevent cap
971                  NSS_WRAPPER ASN1_UTIL LIBTSOCKET PASSDB ldap PARAM LIB_NONSMBD
972                  LIBSAMBA POPT_SAMBA''',
973                  vars=locals())
974
975 bld.SAMBA_BINARY('testparm',
976                  source=TESTPARM_SRC,
977                  deps='''talloc tevent DYNCONFIG ldap cap NSS_WRAPPER
978                  LIBWBCLIENT ASN1_UTIL LIBTSOCKET PASSDB PARAM LIB_NONSMBD
979                  LIBSMB_ERR POPT_SAMBA''',
980                  vars=locals())
981
982 bld.SAMBA_BINARY('eventlogadm',
983                  source=EVTLOGADM_SRC,
984                  deps='''talloc tevent cap POPT_SAMBA DYNCONFIG LIBS PARAM
985                  LIB_NONSMBD LIBSMB_ERR PASSDB LIBWBCLIENT''',
986                  vars=locals())
987
988 swat_files=recursive_dirlist('../swat', '../swat', '*')
989 bld.INSTALL_FILES('${SWATDIR}', swat_files, base_name='../swat')
990
991 ########################## INCLUDES #################################
992
993 bld.RECURSE('../lib/socket_wrapper')
994 bld.RECURSE('../lib/talloc')
995 bld.RECURSE('../lib/tdb')
996 bld.RECURSE('../lib/nss_wrapper')
997 bld.RECURSE('../lib/tevent')
998 bld.RECURSE('../lib/popt')
999 bld.RECURSE('../lib/zlib')
1000 bld.RECURSE('../lib/tsocket')
1001
1002 bld.ENFORCE_GROUP_ORDERING()
1003 bld.CHECK_PROJECT_RULES()