s3-waf: move epmapper client to LIBMSRPC.
[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 LIBNDR_GEN_SRC0 = '''../librpc/gen_ndr/ndr_samr.c
58                   ../librpc/gen_ndr/ndr_lsa.c'''
59
60 LIBNDR_NETLOGON_SRC = '''../librpc/gen_ndr/ndr_netlogon.c
61                   ../librpc/ndr/ndr_netlogon.c'''
62
63 LIBNDR_SCHANNEL_SRC = '''../librpc/gen_ndr/ndr_schannel.c
64                   ../librpc/ndr/ndr_schannel.c'''
65
66 LIBNDR_SPOOLSS_SRC = '''../librpc/gen_ndr/ndr_spoolss.c
67                   ../librpc/ndr/ndr_spoolss_buf.c'''
68
69 LIBNDR_NTPRINTING_SRC = '''../librpc/gen_ndr/ndr_ntprinting.c
70                            ../librpc/ndr/ndr_ntprinting.c'''
71
72 LIBNDR_PREG_SRC = '''librpc/gen_ndr/ndr_preg.c
73                      librpc/ndr/ndr_preg.c'''
74
75 LIBNDR_XATTR_SRC = '''../librpc/gen_ndr/ndr_xattr.c
76                   ../librpc/ndr/ndr_xattr.c'''
77
78 LIBCLI_SPOOLSS_SRC = '''
79                      ../librpc/gen_ndr/cli_spoolss.c
80                      ../librpc/gen_ndr/ndr_spoolss_c.c
81                      rpc_client/cli_spoolss.c
82                      rpc_client/init_spoolss.c'''
83
84 LIBCLI_EVENTLOG_SRC = '''
85                       ../librpc/gen_ndr/cli_eventlog.c
86                       ../librpc/gen_ndr/ndr_eventlog_c.c'''
87
88 LIBCLI_WINREG_SRC = '''
89                     ../librpc/gen_ndr/cli_winreg.c
90                     ../librpc/gen_ndr/ndr_winreg_c.c'''
91
92 LIBCLI_NTSVCS_SRC = '''
93                     ../librpc/gen_ndr/cli_ntsvcs.c
94                     ../librpc/gen_ndr/ndr_ntsvcs_c.c'''
95
96 LIBCLI_DRSUAPI_SRC = '''
97                      ../librpc/gen_ndr/cli_drsuapi.c
98                      ../librpc/gen_ndr/ndr_drsuapi_c.c'''
99
100 LIBCLI_DFS_SRC = '''
101                  ../librpc/gen_ndr/cli_dfs.c
102                  ../librpc/gen_ndr/ndr_dfs_c.c'''
103
104 LIBCLI_ECHO_SRC = '''
105                   ../librpc/gen_ndr/cli_echo.c
106                   ../librpc/gen_ndr/ndr_echo_c.c'''
107
108 LIBCLI_INITSHUTDOWN_SRC = '''
109                           ../librpc/gen_ndr/cli_initshutdown.c
110                           ../librpc/gen_ndr/ndr_initshutdown_c.c'''
111
112 LIBCLI_DSSETUP_SRC = '''
113                      ../librpc/gen_ndr/cli_dssetup.c
114                      ../librpc/gen_ndr/ndr_dssetup_c.c'''
115
116 LIBCLI_SVCCTL_SRC = '''
117                     ../librpc/gen_ndr/cli_svcctl.c
118                     ../librpc/gen_ndr/ndr_svcctl_c.c'''
119
120 LIBCLI_WKSSVC_SRC = '''
121                     ../librpc/gen_ndr/cli_wkssvc.c
122                     ../librpc/gen_ndr/ndr_wkssvc_c.c'''
123
124 LIBCLI_SRVSVC_SRC = '''
125                     ../librpc/gen_ndr/cli_srvsvc.c
126                     ../librpc/gen_ndr/ndr_srvsvc_c.c'''
127
128 LIBCLI_LSA_SRC = '''
129                  ../librpc/gen_ndr/cli_lsa.c
130                  ../librpc/gen_ndr/ndr_lsa_c.c
131                  rpc_client/cli_lsarpc.c
132                  rpc_client/init_lsa.c'''
133
134 LIBCLI_SAMR_SRC = '''
135                   ../librpc/gen_ndr/cli_samr.c
136                   ../librpc/gen_ndr/ndr_samr_c.c
137                   rpc_client/cli_samr.c'''
138
139 LIBCLI_NETLOGON_SRC = '''
140                       ../librpc/gen_ndr/cli_netlogon.c
141                       ../librpc/gen_ndr/ndr_netlogon_c.c
142                       rpc_client/cli_netlogon.c'''
143
144 LIBCLI_EPMAPPER_SRC = '''
145                       ../librpc/gen_ndr/cli_epmapper.c
146                       ../librpc/gen_ndr/ndr_epmapper_c.c'''
147
148 LIBNDR_GEN_SRC = '''../librpc/gen_ndr/ndr_wkssvc.c
149                  ${LIBNDR_GEN_SRC0}
150                  ../librpc/gen_ndr/ndr_dfs.c
151                  ../librpc/gen_ndr/ndr_echo.c
152                  ../librpc/gen_ndr/ndr_winreg.c
153                  ../librpc/gen_ndr/ndr_initshutdown.c
154                  ../librpc/gen_ndr/ndr_srvsvc.c
155                  ../librpc/gen_ndr/ndr_eventlog.c
156                  ${LIBNDR_NETLOGON_SRC}
157                  ../librpc/gen_ndr/ndr_dssetup.c
158                  ../librpc/gen_ndr/ndr_epmapper.c
159                  ../librpc/gen_ndr/ndr_ntsvcs.c
160                  ${LIBNDR_SPOOLSS_SRC}'''
161
162 # this includes only the low level parse code, not stuff
163 # that requires knowledge of security contexts
164 REG_PARSE_PRS_SRC = '''registry/reg_parse_prs.c'''
165
166 LIBREPLACE_SRC = '''${LIBREPLACE_SRCS}'''
167
168 SOCKET_WRAPPER_SRC = '''${SOCKET_WRAPPER_SRCS}'''
169 NSS_WRAPPER_SRC = '''${NSS_WRAPPER_SRCS}'''
170
171 LIBSAMBAUTIL_SRC = '''
172                 ${LIBREPLACE_SRC}
173                 ${SOCKET_WRAPPER_SRC}
174                 ${NSS_WRAPPER_SRC}'''
175
176 UTIL_SRC = '''../lib/util/rbtree.c ../lib/util/signal.c ../lib/util/time.c
177                    ../lib/util/xfile.c ../lib/util/util_strlist.c
178                    ../lib/util/util_file.c ../lib/util/data_blob.c
179                    ../lib/util/util.c ../lib/util/fsusage.c
180                    ../lib/util/params.c ../lib/util/talloc_stack.c
181                    ../lib/util/genrand.c ../lib/util/util_net.c
182                    ../lib/util/become_daemon.c ../lib/util/system.c
183                    ../lib/util/tevent_unix.c ../lib/util/tevent_ntstatus.c
184                    ../lib/util/smb_threads.c ../lib/util/util_id.c
185                    ../lib/util/blocking.c ../lib/util/rfc1738.c '''
186
187 CRYPTO_SRC = '''../lib/crypto/crc32.c ../lib/crypto/md5.c
188                          ../lib/crypto/hmacmd5.c ../lib/crypto/arcfour.c
189                          ../lib/crypto/md4.c
190                          ../lib/crypto/sha256.c ../lib/crypto/hmacsha256.c
191                          ../lib/crypto/aes.c ../lib/crypto/rijndael-alg-fst.c'''
192
193 LIBTEVENT_SRC0 = ''
194
195 PTHREADPOOL_SRC = ''
196
197 LIBREPLACE_SRCS = ''
198
199 SOCKET_WRAPPER_SRCS = ''
200
201 NSS_WRAPPER_SRCS = ''
202
203 ZLIB_SRCS = ''
204
205 LIB_SRC = '''${LIBSAMBAUTIL_SRC} ${UTIL_SRC} ${CRYPTO_SRC}
206           lib/messages.c librpc/gen_ndr/ndr_messaging.c lib/messages_local.c
207           lib/messages_ctdbd.c lib/packet.c lib/ctdbd_conn.c
208           lib/interfaces.c lib/memcache.c
209           lib/talloc_dict.c
210           lib/util_sconn.c
211           lib/serverid.c
212           lib/util_transfer_file.c ../lib/async_req/async_sock.c
213           ${TDB_LIB_SRC}
214           ${VERSION_SRC} lib/charcnv.c lib/debug.c lib/fault.c
215           lib/interface.c lib/pidfile.c
216           lib/system.c lib/sendfile.c lib/recvfile.c lib/time.c
217           lib/username.c
218           ../libds/common/flag_mapping.c
219           lib/util_pw.c lib/access.c lib/smbrun.c
220           lib/bitmap.c lib/dprintf.c ${UTIL_REG_SRC}
221           lib/wins_srv.c
222           lib/util_str.c lib/clobber.c lib/util_sid.c
223           lib/util_unistr.c lib/util_file.c
224           lib/util.c lib/util_names.c
225           lib/util_sock.c lib/sock_exec.c lib/util_sec.c
226           lib/substitute.c lib/dbwrap_util.c
227           lib/ms_fnmatch.c lib/select.c lib/errmap_unix.c
228           lib/tallocmsg.c lib/dmallocmsg.c
229           libsmb/clisigning.c libsmb/smb_signing.c
230           lib/iconv.c lib/pam_errors.c intl/lang_tdb.c
231           lib/conn_tdb.c lib/adt_tree.c lib/gencache.c
232           lib/sessionid_tdb.c
233           lib/module.c lib/events.c ${LIBTEVENT_SRC0}
234           lib/server_contexts.c
235           lib/ldap_escape.c ${CHARSET_STATIC}
236           lib/secdesc.c lib/util_seaccess.c ../libcli/security/secace.c
237           ../libcli/security/sddl.c
238           ../libcli/security/secacl.c ${PTHREADPOOL_SRC}
239           lib/fncall.c
240           libads/krb5_errs.c lib/system_smbd.c lib/audit.c ${LIBNDR_SRC}
241           lib/file_id.c lib/idmap_cache.c
242           ../libcli/security/dom_sid.c ../libcli/security/security_descriptor.c'''
243
244 LIB_DUMMY_SRC = '''lib/dummysmbd.c lib/dummyroot.c'''
245 LIB_NONSMBD_SRC = '''${LIB_DUMMY_SRC}'''
246
247 READLINE_SRC = '''lib/readline.c'''
248
249 POPT_LIB_SRC = '''lib/popt_common.c'''
250
251 PARAM_WITHOUT_REG_SRC = '''param/loadparm.c param/util.c param/loadparm_server_role.c
252                            lib/sharesec.c lib/ldap_debug_handler.c'''
253 PARAM_REG_ADD_SRC = '''${REG_SMBCONF_SRC} ${LIBSMBCONF_SRC} ${PRIVILEGES_BASIC_SRC}'''
254 PARAM_SRC = '''${PARAM_REG_ADD_SRC}'''
255
256 KRBCLIENT_SRC = '''libads/kerberos.c libads/ads_status.c'''
257
258 LIBADDNS_SRC0 = '''libaddns/dnsrecord.c libaddns/dnsutils.c  libaddns/dnssock.c
259                libaddns/dnsgss.c libaddns/dnsmarshall.c'''
260 LIBADDNS_SRC = '''${LIBADDNS_SRC0} ${SOCKET_WRAPPER_SRC}'''
261
262 GPEXT_STATIC = ''
263 GPEXT_REGISTRY_SRC = 'libgpo/gpext/registry.c'
264 GPEXT_SCRIPTS_SRC = 'libgpo/gpext/scripts.c'
265 GPEXT_SECURITY_SRC = 'libgpo/gpext/security.c'
266
267 GPEXT_SRC = '''../libgpo/gpext/gpext.c ${GPEXT_STATIC}'''
268
269 LIBGPO_SRC0 = '''../libgpo/gpo_ldap.c ../libgpo/gpo_ini.c ../libgpo/gpo_util.c
270               ../libgpo/gpo_fetch.c libgpo/gpo_filesync.c ../libgpo/gpo_sec.c
271               libgpo/gpo_reg.c
272               ${GPEXT_SRC}'''
273 LIBGPO_SRC = '''${LIBGPO_SRC0}'''
274
275 LIBADS_SRC = '''libads/ldap.c
276              libads/sasl.c libads/sasl_wrapping.c
277              libads/krb5_setpw.c
278              libads/kerberos_util.c
279              libads/ldap_user.c
280              libads/ads_struct.c libads/kerberos_keytab.c
281              libads/disp_sec.c libads/ldap_utils.c
282              libads/ldap_schema.c libads/util.c libads/ndr.c'''
283
284 LIBADS_SERVER_SRC = '''libads/kerberos_verify.c libads/authdata.c
285                     ../librpc/ndr/ndr_krb5pac.c
286                     ../librpc/gen_ndr/ndr_krb5pac.c'''
287
288 LIBADS_PRINTER_SRC = '''libads/ldap_printer.c'''
289
290 SECRETS_SRC = '''passdb/secrets.c passdb/machine_account_secrets.c
291                  passdb/machine_sid.c librpc/gen_ndr/ndr_secrets.c'''
292
293 LIBNBT_SRC = '''../libcli/nbt/nbtname.c
294              ../libcli/netlogon.c
295              ../libcli/ndr_netlogon.c
296              ../librpc/gen_ndr/ndr_nbt.c
297              ../librpc/gen_ndr/ndr_svcctl.c
298              ../librpc/ndr/ndr_svcctl.c'''
299
300 LIBNMB_SRC = '''libsmb/unexpected.c libsmb/namecache.c libsmb/nmblib.c
301              libsmb/namequery.c ../libcli/nbt/lmhosts.c libsmb/conncache.c
302              libads/dns.c libads/sitename_cache.c'''
303
304 NTERR_SRC = '''libsmb/nterr.c libsmb/smberr.c'''
305 DOSERR_SRC = '../libcli/util/doserr.c'
306 ERRORMAP_SRC = 'libsmb/errormap.c'
307 DCE_RPC_ERR_SRC = '../librpc/rpc/dcerpc_error.c'
308
309 LIBSMB_ERR_SRC0 = '''${NTERR_SRC} ${DOSERR_SRC} ${ERRORMAP_SRC} ${DCE_RPC_ERR_SRC}'''
310
311 LIBSMB_ERR_SRC1 = '''../libcli/auth/smbdes.c ../libcli/auth/smbencrypt.c ../libcli/auth/msrpc_parse.c ../libcli/auth/session.c'''
312
313 LIBSMB_ERR_SRC = '${LIBSMB_ERR_SRC0} ${LIBSMB_ERR_SRC1}'
314
315 LIBSMB_SRC0 = '''
316                ../libcli/auth/ntlm_check.c
317                libsmb/ntlmssp.c
318                libsmb/ntlmssp_wrap.c
319                ../libcli/auth/ntlmssp.c
320                ../libcli/auth/ntlmssp_sign.c
321                ${LIBNDR_NTLMSSP_SRC}
322                ../libcli/auth/ntlmssp_ndr.c
323                ../libcli/auth/ntlmssp_server.c'''
324
325 LIBSAMBA_SRC = '${LIBSMB_SRC0}'
326
327 LIBCLI_LDAP_MESSAGE_SRC = '''../libcli/ldap/ldap_message.c'''
328 LIBCLI_LDAP_NDR_SRC = '''../libcli/ldap/ldap_ndr.c lib/ldb_compat.c'''
329
330 CLDAP_SRC = '''libads/cldap.c
331         ../libcli/cldap/cldap.c
332         ../lib/util/idtree.c
333         ${LIBCLI_LDAP_MESSAGE_SRC} ${LIBCLI_LDAP_NDR_SRC}'''
334
335 TLDAP_SRC = '''lib/tldap.c lib/tldap_util.c lib/util_tsock.c'''
336
337 SCHANNEL_SRC = '''../libcli/auth/credentials.c
338                ../libcli/auth/schannel_sign.c
339                ../libcli/auth/schannel_state_tdb.c
340                ${LIBNDR_SCHANNEL_SRC}'''
341
342 LIBSMB_SRC = '''libsmb/clientgen.c libsmb/cliconnect.c libsmb/clifile.c
343              libsmb/clikrb5.c libsmb/clispnego.c
344              ../libcli/auth/spnego_parse.c
345              libsmb/clirap.c libsmb/clierror.c libsmb/climessage.c
346              libsmb/clireadwrite.c libsmb/clilist.c libsmb/cliprint.c
347              libsmb/clitrans.c libsmb/clisecdesc.c libsmb/clidgram.c
348              libsmb/clistr.c libsmb/cliquota.c libsmb/clifsinfo.c libsmb/clidfs.c
349              libsmb/clioplock.c libsmb/clirap2.c
350              libsmb/smb_seal.c libsmb/async_smb.c
351              ${LIBNMB_SRC}
352              ${LIBNBT_SRC}
353              ${CLDAP_SRC}
354              ${DRSUAPI_SRC}'''
355
356 LIBMSRPC_SRC = '''
357                ${SCHANNEL_SRC}
358                rpc_client/cli_pipe.c
359                librpc/rpc/dcerpc_krb5.c
360                librpc/rpc/dcerpc_gssapi.c
361                librpc/rpc/dcerpc_spnego.c
362                librpc/rpc/rpc_common.c
363                rpc_client/rpc_transport_np.c
364                rpc_client/rpc_transport_sock.c
365                rpc_client/rpc_transport_tstream.c
366                ../librpc/rpc/binding.c
367                ../librpc/rpc/dcerpc_util.c
368                librpc/rpc/dcerpc_helpers.c
369                ../librpc/rpc/binding_handle.c
370                ${LIBCLI_EPMAPPER_SRC}'''
371
372 LIBMSRPC_GEN_SRC = '${LIBNDR_GEN_SRC}'
373
374 #
375 # registry-related objects
376 #
377 UTIL_REG_SRC = '''../libcli/registry/util_reg.c'''
378
379 REG_INIT_BASIC_SRC = '''registry/reg_init_basic.c'''
380 REG_INIT_SMBCONF_SRC = '''registry/reg_init_smbconf.c'''
381 REG_INIT_FULL_SRC = '''registry/reg_init_full.c'''
382
383 REGFIO_SRC = '''registry/regfio.c ${REG_PARSE_PRS_SRC}'''
384
385 REG_API_REGF_SRC = '''registry/reg_api_regf.c'''
386
387 REGSRCS_SRC = '''registry/reg_objects.c'''
388
389 REG_BACKENDS_BASE_SRC = '''registry/reg_backend_db.c'''
390
391 REG_BACKENDS_SMBCONF_SRC = '''registry/reg_backend_smbconf.c'''
392
393 REG_BACKENDS_EXTRA_SRC = '''registry/reg_backend_printing.c
394                          registry/reg_backend_shares.c
395                          registry/reg_backend_netlogon_params.c
396                          registry/reg_backend_prod_options.c
397                          registry/reg_backend_tcpip_params.c
398                          registry/reg_backend_hkpt_params.c
399                          registry/reg_backend_current_version.c
400                          registry/reg_backend_perflib.c'''
401
402 REG_BASE_SRC = '''registry/reg_api.c
403                registry/reg_dispatcher.c
404                registry/reg_cachehook.c
405                ${REGSRCS_SRC}
406                registry/reg_util_internal.c
407                lib/util_nttoken.c
408                ${REG_BACKENDS_BASE_SRC}
409                ${REG_INIT_BASIC_SRC}'''
410
411 REG_SMBCONF_SRC = '''${REG_BASE_SRC}
412                   ${REG_BACKENDS_SMBCONF_SRC}
413                   ${REG_INIT_SMBCONF_SRC}
414                   registry/reg_util_token.c
415                   registry/reg_api_util.c'''
416
417 REG_FULL_SRC = '''${REG_SMBCONF_SRC}
418                ${REG_BACKENDS_EXTRA_SRC}
419                ${REG_INIT_FULL_SRC}
420                registry/reg_eventlog.c
421                registry/reg_perfcount.c
422                librpc/gen_ndr/ndr_perfcount.c'''
423
424 LIB_EVENTLOG_SRC = '''lib/eventlog/eventlog.c'''
425
426 RPC_STATIC = ''
427
428 RPC_LSARPC_SRC = '''rpc_server/srv_lsa_nt.c
429                     ../librpc/gen_ndr/srv_lsa.c'''
430
431 RPC_NETLOGON_SRC = '''rpc_server/srv_netlog_nt.c
432                       ../librpc/gen_ndr/srv_netlogon.c'''
433
434 RPC_SAMR_SRC = '''rpc_server/srv_samr_nt.c
435                rpc_server/srv_samr_util.c
436                rpc_server/srv_samr_chgpasswd.c
437                ../librpc/gen_ndr/srv_samr.c'''
438
439 RPC_INITSHUTDOWN_SRC = ''' ../librpc/gen_ndr/srv_initshutdown.c rpc_server/srv_initshutdown_nt.c'''
440
441 RPC_WINREG_SRC = '''rpc_server/srv_winreg_nt.c
442                     ../librpc/gen_ndr/srv_winreg.c'''
443
444 RPC_DSSETUP_SRC = ''' rpc_server/srv_dssetup_nt.c ../librpc/gen_ndr/srv_dssetup.c'''
445
446 RPC_SRVSVC_SRC = '''rpc_server/srv_srvsvc_nt.c
447                     ../librpc/gen_ndr/srv_srvsvc.c'''
448
449 RPC_WKSSVC_SRC = '''../librpc/gen_ndr/srv_wkssvc.c
450                     rpc_server/srv_wkssvc_nt.c'''
451
452 RPC_SVCCTL_SRC = ''' rpc_server/srv_svcctl_nt.c
453                   ../librpc/gen_ndr/srv_svcctl.c
454                   services/svc_spoolss.c services/svc_rcinit.c services/services_db.c
455                   services/svc_netlogon.c services/svc_winreg.c
456                   services/svc_wins.c'''
457
458 RPC_NTSVCS_SRC = '''rpc_server/srv_ntsvcs_nt.c
459                  ../librpc/gen_ndr/srv_ntsvcs.c'''
460
461 RPC_NETDFS_SRC = '''../librpc/gen_ndr/srv_dfs.c
462                     rpc_server/srv_dfs_nt.c'''
463
464 RPC_SPOOLSS_SRC = '''rpc_server/srv_spoolss_nt.c
465                      rpc_server/srv_spoolss_util.c
466                   ../librpc/gen_ndr/srv_spoolss.c'''
467
468 RPC_EVENTLOG_SRC = '''rpc_server/srv_eventlog_nt.c
469                    ${LIB_EVENTLOG_SRC} ../librpc/gen_ndr/srv_eventlog.c'''
470
471 NPA_TSTREAM_SRC = '''../libcli/named_pipe_auth/npa_tstream.c
472                      ../librpc/gen_ndr/ndr_named_pipe_auth.c'''
473
474 RPC_NCACN_NP = '''rpc_server/srv_pipe_register.c rpc_server/rpc_ncacn_np.c
475                   rpc_server/rpc_handles.c'''
476
477 RPC_SERVICE = '''rpc_server/rpc_server.c'''
478
479 RPC_PIPE_SRC = '''rpc_server/srv_pipe_hnd.c rpc_server/srv_pipe.c
480                ${RPC_NCACN_NP} ${RPC_SERVICE}'''
481
482 RPC_RPCECHO_SRC = '''rpc_server/srv_echo_nt.c ../librpc/gen_ndr/srv_echo.c'''
483
484 RPC_SERVER_SRC = '''${RPC_PIPE_SRC} ${NPA_TSTREAM_SRC} ${RPC_STATIC}'''
485
486 RPC_CLIENT_SCHANNEL_SRC = '''rpc_client/cli_pipe_schannel.c'''
487
488 LOCKING_SRC = '''locking/locking.c locking/brlock.c locking/posix.c'''
489
490 PRIVILEGES_BASIC_SRC = '''../libcli/security/privileges.c'''
491
492 PRIVILEGES_SRC = '''lib/privileges.c'''
493
494 PASSDB_GET_SET_SRC = '''passdb/pdb_get_set.c'''
495
496 PDB_STATIC =        ''
497 PDB_TDBSAM_SRC =    'passdb/pdb_tdb.c'
498 PDB_LDAP_SRC =      'passdb/pdb_ldap.c passdb/pdb_nds.c'
499 PDB_ADS_SRC =       'passdb/pdb_ads.c'
500 PDB_SMBPASSWD_SRC = 'passdb/pdb_smbpasswd.c'
501 PDB_WBC_SAM_SRC =   'passdb/pdb_wbc_sam.c'
502
503 PASSDB_SRC = '''${PASSDB_GET_SET_SRC} passdb/passdb.c passdb/pdb_interface.c
504                 passdb/util_wellknown.c passdb/util_builtin.c passdb/pdb_compat.c
505                 passdb/util_unixsids.c passdb/lookup_sid.c
506                 passdb/login_cache.c ${PDB_STATIC}
507                 passdb/account_pol.c ${PRIVILEGES_SRC}
508                 lib/util_nscd.c lib/winbind_util.c ${SERVER_MUTEX_SRC}'''
509 #FIXME: lib/winbind_util.c probably is not part of PASSDB_SRC
510
511 CHARSET_STATIC = ''
512 CHARSET_WEIRD_SRC = 'modules/weird.c'
513 CHARSET_CP850_SRC = 'modules/CP850.c'
514 CHARSET_CP437_SRC = 'modules/CP437.c'
515 CHARSET_MACOSXFS_SRC = 'modules/charset_macosxfs.c'
516
517 GROUPDB_SRC = '''groupdb/mapping.c groupdb/mapping_tdb.c'''
518
519 PROFILE_SRC = '''profile/profile.c'''
520 PROFILES_SRC = '''utils/profiles.c
521                ${REGFIO_SRC}'''
522
523 OPLOCK_SRC = '''smbd/oplock.c smbd/oplock_irix.c smbd/oplock_linux.c
524              smbd/oplock_onefs.c'''
525
526 NOTIFY_SRC = '''smbd/notify.c smbd/notify_inotify.c smbd/notify_internal.c
527                 librpc/gen_ndr/ndr_notify.c'''
528
529 FNAME_UTIL_SRC = '''smbd/filename_util.c'''
530
531 VFS_STATIC = ''
532 VFS_DEFAULT_SRC = '''modules/vfs_default.c'''
533 VFS_AUDIT_SRC = '''modules/vfs_audit.c'''
534 VFS_EXTD_AUDIT_SRC = '''modules/vfs_extd_audit.c'''
535 VFS_FULL_AUDIT_SRC = '''modules/vfs_full_audit.c'''
536 VFS_FAKE_PERMS_SRC = '''modules/vfs_fake_perms.c'''
537 VFS_RECYCLE_SRC = '''modules/vfs_recycle.c'''
538 VFS_NETATALK_SRC = '''modules/vfs_netatalk.c'''
539 VFS_DEFAULT_QUOTA_SRC = '''modules/vfs_default_quota.c'''
540 VFS_READONLY_SRC = '''modules/vfs_readonly.c modules/getdate.c'''
541 VFS_CAP_SRC = '''modules/vfs_cap.c'''
542 VFS_EXPAND_MSDFS_SRC = '''modules/vfs_expand_msdfs.c'''
543 VFS_SHADOW_COPY_SRC = '''modules/vfs_shadow_copy.c'''
544 VFS_SHADOW_COPY2_SRC = '''modules/vfs_shadow_copy2.c'''
545 VFS_AFSACL_SRC = '''modules/vfs_afsacl.c'''
546 VFS_XATTR_TDB_SRC = '''modules/vfs_xattr_tdb.c'''
547 VFS_POSIXACL_SRC = '''modules/vfs_posixacl.c'''
548 VFS_AIXACL_SRC = '''modules/vfs_aixacl.c modules/vfs_aixacl_util.c'''
549 VFS_AIXACL2_SRC = '''modules/vfs_aixacl2.c modules/vfs_aixacl_util.c modules/nfs4_acls.c'''
550 VFS_SOLARISACL_SRC = '''modules/vfs_solarisacl.c'''
551 VFS_ZFSACL_SRC = '''modules/vfs_zfsacl.c modules/nfs4_acls.c'''
552 VFS_HPUXACL_SRC = '''modules/vfs_hpuxacl.c'''
553 VFS_IRIXACL_SRC = '''modules/vfs_irixacl.c'''
554 VFS_TRU64ACL_SRC = '''modules/vfs_tru64acl.c'''
555 VFS_CATIA_SRC = 'modules/vfs_catia.c'
556 VFS_STREAMS_XATTR_SRC = 'modules/vfs_streams_xattr.c'
557 VFS_STREAMS_DEPOT_SRC = 'modules/vfs_streams_depot.c'
558 VFS_CACHEPRIME_SRC = 'modules/vfs_cacheprime.c'
559 VFS_PREALLOC_SRC = 'modules/vfs_prealloc.c'
560 VFS_COMMIT_SRC = 'modules/vfs_commit.c'
561 VFS_GPFS_SRC = 'modules/vfs_gpfs.c modules/gpfs.c modules/nfs4_acls.c'
562 VFS_NOTIFY_FAM_SRC = 'modules/vfs_notify_fam.c'
563 VFS_READAHEAD_SRC = 'modules/vfs_readahead.c'
564 VFS_TSMSM_SRC = 'modules/vfs_tsmsm.c'
565 VFS_FILEID_SRC = 'modules/vfs_fileid.c'
566 VFS_AIO_FORK_SRC = 'modules/vfs_aio_fork.c'
567 VFS_PREOPEN_SRC = 'modules/vfs_preopen.c'
568 VFS_SYNCOPS_SRC = 'modules/vfs_syncops.c'
569 VFS_ACL_XATTR_SRC = 'modules/vfs_acl_xattr.c'
570 VFS_ACL_TDB_SRC = 'modules/vfs_acl_tdb.c'
571 VFS_SMB_TRAFFIC_ANALYZER_SRC = 'modules/vfs_smb_traffic_analyzer.c'
572 VFS_ONEFS_SRC = '''modules/vfs_onefs.c modules/onefs_acl.c modules/onefs_system.c
573                 modules/onefs_open.c modules/onefs_streams.c modules/onefs_dir.c
574                 modules/onefs_cbrl.c modules/onefs_notify.c modules/onefs_config.c'''
575 VFS_ONEFS_SHADOW_COPY_SRC = 'modules/vfs_onefs_shadow_copy.c modules/onefs_shadow_copy.c'
576 VFS_DIRSORT_SRC = 'modules/vfs_dirsort.c'
577 VFS_SCANNEDONLY_SRC = 'modules/vfs_scannedonly.c'
578 VFS_CROSSRENAME_SRC = 'modules/vfs_crossrename.c'
579 VFS_LINUX_XFS_SGID_SRC = 'modules/vfs_linux_xfs_sgid.c'
580
581 PLAINTEXT_AUTH_SRC = '''auth/pampass.c auth/pass_check.c'''
582
583 SLCACHE_SRC = '''libsmb/samlogon_cache.c'''
584
585 DCUTIL_SRC  = '''libsmb/namequery_dc.c libsmb/trustdom_cache.c libsmb/trusts_util.c libsmb/dsgetdcname.c'''
586
587 AUTH_BUILTIN_SRC = 'auth/auth_builtin.c'
588 AUTH_DOMAIN_SRC = 'auth/auth_domain.c'
589 AUTH_SAM_SRC = 'auth/auth_sam.c auth/check_samsec.c'
590 AUTH_SERVER_SRC = 'auth/auth_server.c'
591 AUTH_UNIX_SRC = 'auth/auth_unix.c'
592 AUTH_WINBIND_SRC = 'auth/auth_winbind.c'
593 AUTH_WBC_SRC = 'auth/auth_wbc.c'
594 AUTH_SCRIPT_SRC = 'auth/auth_script.c'
595 AUTH_NETLOGOND_SRC = 'auth/auth_netlogond.c'
596
597 AUTH_STATIC = ''
598 AUTH_SRC = '''${AUTH_STATIC} auth/auth.c auth/auth_util.c auth/token_util.c
599            auth/server_info.c
600            auth/server_info_sam.c
601            auth/user_info.c
602            auth/user_util.c
603            auth/user_krb5.c
604            auth/auth_compat.c auth/auth_ntlmssp.c
605            ${PLAINTEXT_AUTH_SRC} ${SLCACHE_SRC} ${DCUTIL_SRC}'''
606
607 #FIXME: set IDMAP_STATIC during configuration
608 IDMAP_STATIC=''
609 IDMAP_RW_SRC = 'winbindd/idmap_rw.c'
610 IDMAP_SRC = 'winbindd/idmap.c winbindd/idmap_util.c ${IDMAP_RW_SRC} ${IDMAP_STATIC}'
611
612 #FIXME: set NSS_INFO_STATIC during configuration
613 NSS_INFO_STATIC = ''
614 NSS_INFO_TEMPLATE_SRC = 'winbindd/nss_info_template.c'
615 NSS_INFO_SRC = 'winbindd/nss_info.c ${NSS_INFO_STATIC}'
616
617 IDMAP_HASH_SRC = '''winbindd/idmap_hash/idmap_hash.c
618                     winbindd/idmap_hash/mapfile.c'''
619
620 IDMAP_ADEX_SRC = '''winbindd/idmap_adex/idmap_adex.c
621                     winbindd/idmap_adex/cell_util.c
622                     winbindd/idmap_adex/likewise_cell.c
623                     winbindd/idmap_adex/provider_unified.c
624                     winbindd/idmap_adex/gc_util.c
625                     winbindd/idmap_adex/domain_util.c'''
626
627 PERFCOUNT_STATIC = ''
628 PERFCOUNT_ONEFS_SRC = 'modules/perfcount_onefs.c'
629 PERFCOUNT_TEST_SRC = 'modules/perfcount_test.c'
630
631 WINBINDD_SRC1 = '''winbindd/winbindd.c
632                    winbindd/winbindd_group.c
633                    winbindd/winbindd_util.c
634                    winbindd/winbindd_cache.c
635                    winbindd/winbindd_pam.c
636                    winbindd/winbindd_misc.c
637                    winbindd/winbindd_cm.c
638                    winbindd/winbindd_wins.c
639                    winbindd/winbindd_msrpc.c
640                    winbindd/winbindd_rpc.c
641                    winbindd/winbindd_reconnect.c
642                    winbindd/winbindd_ads.c
643                    winbindd/winbindd_samr.c
644                    winbindd/winbindd_dual.c
645                    winbindd/winbindd_dual_ndr.c
646                    winbindd/winbindd_dual_srv.c
647                    librpc/gen_ndr/cli_wbint.c
648                    librpc/gen_ndr/srv_wbint.c
649                    librpc/gen_ndr/ndr_wbint.c
650                    librpc/gen_ndr/ndr_wbint_c.c
651                    winbindd/winbindd_async.c
652                    winbindd/winbindd_creds.c
653                    winbindd/winbindd_cred_cache.c
654                    winbindd/winbindd_ccache_access.c
655                    winbindd/winbindd_domain.c
656                    winbindd/winbindd_idmap.c
657                    winbindd/winbindd_locator.c
658                    winbindd/winbindd_ndr.c
659                    winbindd/wb_ping.c
660                    winbindd/wb_lookupsid.c
661                    winbindd/wb_lookupname.c
662                    winbindd/wb_sid2uid.c
663                    winbindd/wb_sid2gid.c
664                    winbindd/wb_uid2sid.c
665                    winbindd/wb_gid2sid.c
666                    winbindd/wb_queryuser.c
667                    winbindd/wb_lookupuseraliases.c
668                    winbindd/wb_lookupusergroups.c
669                    winbindd/wb_getpwsid.c
670                    winbindd/wb_gettoken.c
671                    winbindd/wb_seqnum.c
672                    winbindd/wb_seqnums.c
673                    winbindd/wb_group_members.c
674                    winbindd/wb_getgrsid.c
675                    winbindd/wb_query_user_list.c
676                    winbindd/wb_fill_pwent.c
677                    winbindd/wb_next_pwent.c
678                    winbindd/wb_next_grent.c
679                    winbindd/wb_dsgetdcname.c
680                    winbindd/winbindd_lookupsid.c
681                    winbindd/winbindd_lookupname.c
682                    winbindd/winbindd_sid_to_uid.c
683                    winbindd/winbindd_sid_to_gid.c
684                    winbindd/winbindd_uid_to_sid.c
685                    winbindd/winbindd_gid_to_sid.c
686                    winbindd/winbindd_allocate_uid.c
687                    winbindd/winbindd_allocate_gid.c
688                    winbindd/winbindd_getpwsid.c
689                    winbindd/winbindd_getpwnam.c
690                    winbindd/winbindd_getpwuid.c
691                    winbindd/winbindd_getsidaliases.c
692                    winbindd/winbindd_getuserdomgroups.c
693                    winbindd/winbindd_getgroups.c
694                    winbindd/winbindd_show_sequence.c
695                    winbindd/winbindd_getgrgid.c
696                    winbindd/winbindd_getgrnam.c
697                    winbindd/winbindd_getusersids.c
698                    winbindd/winbindd_lookuprids.c
699                    winbindd/winbindd_setpwent.c
700                    winbindd/winbindd_getpwent.c
701                    winbindd/winbindd_endpwent.c
702                    winbindd/winbindd_setgrent.c
703                    winbindd/winbindd_getgrent.c
704                    winbindd/winbindd_endgrent.c
705                    winbindd/winbindd_dsgetdcname.c
706                    winbindd/winbindd_getdcname.c
707                    winbindd/winbindd_list_users.c
708                    winbindd/winbindd_list_groups.c
709                    winbindd/winbindd_check_machine_acct.c
710                    winbindd/winbindd_change_machine_acct.c
711                    winbindd/winbindd_ping_dc.c
712                    winbindd/winbindd_pam_auth.c
713                    winbindd/winbindd_pam_logoff.c
714                    winbindd/winbindd_pam_chauthtok.c
715                    winbindd/winbindd_pam_auth_crap.c
716                    winbindd/winbindd_pam_chng_pswd_auth_crap.c
717                    auth/auth_util.c
718                    auth/token_util.c
719                    auth/user_util.c
720                    auth/check_samsec.c
721                    auth/server_info.c
722                    auth/server_info_sam.c
723                    auth/user_info.c
724                    auth/user_util.c
725                    rpc_server/srv_samr_chgpasswd.c
726                    ../nsswitch/libwbclient/wb_reqtrans.c'''
727
728 WINBINDD_SRC = '''${WINBINDD_SRC1}
729                   ${LIBMSRPC_SRC} ${LIBMSRPC_GEN_SRC}
730                   ${PROFILE_SRC} ${SLCACHE_SRC}
731                   ${LIBADS_SRC}
732                   ${DCUTIL_SRC} ${IDMAP_SRC} ${NSS_INFO_SRC}
733                   ${AFS_SRC} ${AFS_SETTOKEN_SRC}
734                   ${LIBADS_SERVER_SRC}
735                   ${RPC_NCACN_NP} ${NPA_TSTREAM_SRC} ${RPC_SAMR_SRC} ${RPC_LSARPC_SRC}
736                   ${TDB_VALIDATE_SRC}
737                   ${LIBCLI_DSSETUP_SRC}
738                   ${LIBCLI_LSA_SRC}
739                   ${LIBCLI_SAMR_SRC}
740                   ${LIBCLI_NETLOGON_SRC}
741                   rpc_client/init_netlogon.c'''
742
743 MANGLE_SRC = '''smbd/mangle.c smbd/mangle_hash.c smbd/mangle_hash2.c'''
744
745 SMBD_SRC_MAIN = '''smbd/server.c smbd/server_exit.c'''
746
747 BUILDOPT_SRC = '''smbd/build_options.c'''
748
749 SMBD_SRC_SRV = '''smbd/server_reload.c smbd/files.c smbd/connection.c
750                smbd/utmp.c smbd/session.c
751                smbd/dfree.c smbd/dir.c smbd/password.c smbd/conn.c
752                smbd/share_access.c smbd/fileio.c
753                smbd/ipc.c smbd/lanman.c smbd/negprot.c
754                smbd/message.c smbd/nttrans.c smbd/pipes.c
755                smbd/reply.c smbd/sesssetup.c smbd/trans2.c smbd/uid.c
756                smbd/dosmode.c smbd/filename.c smbd/open.c smbd/close.c
757                smbd/blocking.c smbd/sec_ctx.c smbd/srvstr.c
758                smbd/vfs.c smbd/perfcount.c smbd/statcache.c smbd/seal.c
759                smbd/posix_acls.c lib/sysacls.c
760                smbd/process.c smbd/service.c smbd/error.c
761                printing/printspoolss.c
762                lib/sysquotas.c lib/sysquotas_linux.c
763                lib/sysquotas_xfs.c lib/sysquotas_4A.c
764                lib/sysquotas_nfs.c
765                smbd/fake_file.c
766                smbd/quotas.c smbd/ntquotas.c ${AFS_SRC} smbd/msdfs.c
767                ${AFS_SETTOKEN_SRC} smbd/aio.c smbd/statvfs.c
768                smbd/dmapi.c smbd/signing.c
769                smbd/file_access.c
770                smbd/dnsregister.c smbd/globals.c
771                smbd/smb2_server.c
772                smbd/smb2_signing.c
773                smbd/smb2_glue.c
774                smbd/smb2_negprot.c
775                smbd/smb2_sesssetup.c
776                smbd/smb2_tcon.c
777                smbd/smb2_create.c
778                smbd/smb2_close.c
779                smbd/smb2_flush.c
780                smbd/smb2_read.c
781                smbd/smb2_write.c
782                smbd/smb2_lock.c
783                smbd/smb2_ioctl.c
784                smbd/smb2_keepalive.c
785                smbd/smb2_find.c
786                smbd/smb2_notify.c
787                smbd/smb2_getinfo.c
788                smbd/smb2_setinfo.c
789                smbd/smb2_break.c
790                ../libcli/smb/smb2_create_blob.c
791                ${MANGLE_SRC} ${VFS_STATIC}'''
792
793 SMBD_SRC_BASE = '''${SMBD_SRC_SRV}
794                 ${RPC_SERVER_SRC}
795                 ${LOCKING_SRC} ${PRINTING_SRC}
796                 ${PROFILE_SRC} ${PRINTBACKEND_SRC}
797                 ${OPLOCK_SRC} ${NOTIFY_SRC} ${FNAME_UTIL_SRC}
798                 ${LIBMSRPC_SRC}
799                 ${LIBMSRPC_GEN_SRC} ${LIBADS_SRC}
800                 ${LIBADS_SERVER_SRC} ${LIBADS_PRINTER_SRC} ${REG_FULL_SRC}
801                 ${BUILDOPT_SRC}
802                 ${LIBNET_SRC} ${LIBSMBCONF_SRC}
803                 ${LIBCLI_SPOOLSS_SRC}
804                 ${LIBCLI_WINREG_SRC}
805                 ${LIBCLI_SRVSVC_SRC}
806                 ${LIBCLI_LSA_SRC}
807                 ${LIBCLI_SAMR_SRC}
808                 ${LIBCLI_NETLOGON_SRC}
809                 ${RPC_CLIENT_SCHANNEL_SRC}
810                 rpc_client/init_netlogon.c
811                 rpc_client/init_samr.c
812                 ${AUTH_SRC}
813                 ${PRIVILEGES_BASIC_SRC}
814                 ${REGFIO_SRC}
815                 ${REG_API_REGF_SRC}
816                 ${LIBNDR_XATTR_SRC}'''
817
818 PRINTING_SRC = '''printing/pcap.c printing/print_svid.c printing/print_aix.c
819                printing/print_cups.c printing/print_generic.c
820                printing/lpq_parse.c printing/load.c printing/print_standard.c
821                printing/print_iprint.c printing/printer_list.c'''
822
823 PRINTBASE_SRC = '''printing/notify.c printing/printing_db.c'''
824 PRINTBACKEND_SRC = '''printing/printing.c
825                       printing/nt_printing.c
826                       printing/nt_printing_tdb.c
827                       printing/nt_printing_migrate.c
828                       printing/nt_printing_ads.c
829                       ${LIBNDR_NTPRINTING_SRC}
830                       ${PRINTBASE_SRC}'''
831
832 SMBD_SRC = '''${SMBD_SRC_BASE} ${SMBD_SRC_MAIN}'''
833
834 NMBD_SRC1 = '''nmbd/asyncdns.c nmbd/nmbd.c nmbd/nmbd_become_dmb.c
835             nmbd/nmbd_become_lmb.c nmbd/nmbd_browserdb.c
836             nmbd/nmbd_browsesync.c nmbd/nmbd_elections.c
837             nmbd/nmbd_incomingdgrams.c nmbd/nmbd_incomingrequests.c
838             nmbd/nmbd_lmhosts.c nmbd/nmbd_logonnames.c nmbd/nmbd_mynames.c
839             nmbd/nmbd_namelistdb.c nmbd/nmbd_namequery.c
840             nmbd/nmbd_nameregister.c nmbd/nmbd_namerelease.c
841             nmbd/nmbd_nodestatus.c nmbd/nmbd_packets.c
842             nmbd/nmbd_processlogon.c nmbd/nmbd_responserecordsdb.c
843             nmbd/nmbd_sendannounce.c nmbd/nmbd_serverlistdb.c
844             nmbd/nmbd_subnetdb.c nmbd/nmbd_winsproxy.c nmbd/nmbd_winsserver.c
845             nmbd/nmbd_workgroupdb.c nmbd/nmbd_synclists.c'''
846
847 NMBD_SRC = '${NMBD_SRC1} ${PROFILE_SRC} ${LIBNDR_GEN_SRC0}'
848
849 SWAT_SRC1 = '''web/cgi.c web/diagnose.c web/startstop.c web/statuspage.c
850                web/swat.c web/neg_lang.c'''
851
852 SWAT_SRC = '''${SWAT_SRC1} ${PRINTING_SRC} ${PRINTBASE_SRC}
853            ${LOCKING_SRC}
854            ${PLAINTEXT_AUTH_SRC}
855            ${LIBMSRPC_GEN_SRC} ${LIBMSRPC_SRC}
856            ${PASSCHANGE_SRC} ${FNAME_UTIL_SRC}
857            ${LIBCLI_SAMR_SRC}
858            rpc_client/init_lsa.c'''
859
860 STATUS_SRC = '''utils/status.c utils/status_profile.c
861              ${LOCKING_SRC}
862              ${PROFILE_SRC}
863              ${FNAME_UTIL_SRC}'''
864
865 SMBCONTROL_SRC = '''utils/smbcontrol.c ${PRINTBASE_SRC}'''
866
867 SMBTREE_SRC = '''utils/smbtree.c
868              ${PROFILE_SRC}
869              ${LIBMSRPC_GEN_SRC}
870              ${LIBMSRPC_SRC}
871              ${LIBCLI_SRVSVC_SRC}'''
872
873 TESTPARM_SRC = 'utils/testparm.c'
874
875 SMBTA_UTIL_SRC = '''utils/smbta-util.c ${FNAME_UTIL_SRC}'''
876
877 TEST_LP_LOAD_SRC = '''param/test_lp_load.c'''
878
879 PASSWD_UTIL_SRC = 'utils/passwd_util.c'
880
881 SMBPASSWD_SRC = '''utils/smbpasswd.c ${PASSWD_UTIL_SRC} ${PASSCHANGE_SRC}
882                 ${LIBMSRPC_GEN_SRC} ${LIBMSRPC_SRC}
883                 ${LIBCLI_SAMR_SRC}
884                 rpc_client/init_lsa.c'''
885
886 PDBEDIT_SRC = '''utils/pdbedit.c ${PASSWD_UTIL_SRC}
887                 ${LIBCLI_LDAP_NDR_SRC}'''
888
889 SMBGET_SRC = '''utils/smbget.c'''
890
891 DISPLAY_SEC_SRC= '../libcli/security/display_sec.c'
892
893 RPCCLIENT_SRC1 = '''rpcclient/rpcclient.c rpcclient/cmd_lsarpc.c
894                     rpcclient/cmd_samr.c rpcclient/cmd_spoolss.c
895                     rpcclient/cmd_netlogon.c rpcclient/cmd_srvsvc.c
896                     rpcclient/cmd_dfs.c rpcclient/cmd_epmapper.c
897                     rpcclient/cmd_dssetup.c rpcclient/cmd_echo.c
898                     rpcclient/cmd_shutdown.c rpcclient/cmd_test.c
899                     rpcclient/cmd_wkssvc.c rpcclient/cmd_ntsvcs.c
900                     rpcclient/cmd_drsuapi.c rpcclient/cmd_eventlog.c
901                     rpcclient/cmd_winreg.c
902                     ${DISPLAY_SEC_SRC}'''
903
904 RPCCLIENT_SRC = '''${RPCCLIENT_SRC1}
905                    ${LIBMSRPC_GEN_SRC}
906                    ${LIBMSRPC_SRC}
907                    ${READLINE_SRC}
908                    ${LIBADS_SRC}
909                    ${DCUTIL_SRC}
910                    ${LIBCLI_SPOOLSS_SRC}
911                    ${LIBCLI_EVENTLOG_SRC}
912                    ${LIBCLI_NTSVCS_SRC}
913                    ${LIBCLI_DRSUAPI_SRC}
914                    ${LIBCLI_DFS_SRC}
915                    ${LIBCLI_ECHO_SRC}
916                    ${LIBCLI_DSSETUP_SRC}
917                    ${LIBCLI_WKSSVC_SRC}
918                    ${LIBCLI_SRVSVC_SRC}
919                    ${LIBCLI_LSA_SRC}
920                    ${LIBCLI_SAMR_SRC}
921                    ${LIBCLI_WINREG_SRC}
922                    ${LIBCLI_NETLOGON_SRC}
923                    ${RPC_CLIENT_SCHANNEL_SRC}
924                    rpc_client/init_netlogon.c
925                    rpc_client/init_samr.c'''
926
927 PAM_WINBIND_SRC = '''../nsswitch/pam_winbind.c ${WBCOMMON_SRC}
928                   ${LIBREPLACE_SRC} ${INIPARSER_SRC}'''
929
930 LIBSMBCLIENT_THREAD_SRC = '''libsmb/libsmb_thread_impl.c
931                         libsmb/libsmb_thread_posix.c'''
932
933 LIBSMBCLIENT_SRC0 = '''libsmb/libsmb_cache.c
934                     libsmb/libsmb_compat.c
935                     libsmb/libsmb_context.c
936                     libsmb/libsmb_dir.c
937                     libsmb/libsmb_file.c
938                     libsmb/libsmb_misc.c
939                     libsmb/libsmb_path.c
940                     libsmb/libsmb_printjob.c
941                     libsmb/libsmb_server.c
942                     libsmb/libsmb_stat.c
943                     libsmb/libsmb_xattr.c
944                     libsmb/libsmb_setget.c'''
945
946 LIBSMBCLIENT_SRC1 = '''${LIBSMBCLIENT_SRC0}
947                     ${LIBMSRPC_SRC} ${LIBMSRPC_GEN_SRC}
948                     ${LIBCLI_SRVSVC_SRC}
949                     ${LIBCLI_LSA_SRC}'''
950
951 LIBSMBCLIENT_SRC = '${LIBSMBCLIENT_SRC1}'
952
953 LIBSMBSHAREMODES_SRC0 = 'libsmb/smb_share_modes.c'
954
955 LIBSMBSHAREMODES_SRC = '${LIBSMBSHAREMODES_SRC0}'
956
957 LIBNETAPI_SRC0 = '''lib/netapi/netapi.c
958                     lib/netapi/cm.c
959                     librpc/gen_ndr/ndr_libnetapi.c
960                     lib/netapi/libnetapi.c
961                     lib/netapi/joindomain.c
962                     lib/netapi/serverinfo.c
963                     lib/netapi/getdc.c
964                     lib/netapi/user.c
965                     lib/netapi/group.c
966                     lib/netapi/localgroup.c
967                     lib/netapi/samr.c
968                     lib/netapi/sid.c
969                     lib/netapi/share.c
970                     lib/netapi/file.c
971                     lib/netapi/shutdown.c
972                     lib/netapi/netlogon.c'''
973
974 LIBNETAPI_SRC = '''${LIBNETAPI_SRC0} ${LIBNET_SRC}
975                    ${LIBSMBCONF_SRC}
976                    ${REG_SMBCONF_SRC}
977                    ${LIBMSRPC_SRC} ${LIBMSRPC_GEN_SRC}
978                    ${DCUTIL_SRC} ${LIBADS_SRC} ${PRIVILEGES_BASIC_SRC}
979                    auth/token_util.c
980                    ${LIBCLI_INITSHUTDOWN_SRC}
981                    ${LIBCLI_WKSSVC_SRC}
982                    ${LIBCLI_SRVSVC_SRC}
983                    ${LIBCLI_LSA_SRC}
984                    ${LIBCLI_SAMR_SRC}
985                    ${LIBCLI_NETLOGON_SRC}
986                    ${RPC_CLIENT_SCHANNEL_SRC}
987                    rpc_client/init_netlogon.c
988                    rpc_client/init_samr.c'''
989
990 # FIXME:  bigballofmud
991
992 CLIENT_SRC1 = '''client/client.c client/clitar.c
993                  client/dnsbrowse.c
994                  ${LIBMSRPC_SRC}'''
995
996 CLIENT_SRC = '''${CLIENT_SRC1} ${LIBMSRPC_GEN_SRC}
997                 ${READLINE_SRC} ${DISPLAY_SEC_SRC}
998                 ${LIBCLI_SRVSVC_SRC}
999                 rpc_client/init_lsa.c'''
1000
1001 LIBSMBCONF_SRC = '''../lib/smbconf/smbconf.c ../lib/smbconf/smbconf_util.c
1002                     ../lib/smbconf/smbconf_txt.c lib/smbconf/smbconf_reg.c
1003                     lib/smbconf/smbconf_init.c'''
1004
1005 SMBCONFTORT_SRC0 = 'lib/smbconf/testsuite.c'
1006
1007 SMBCONFTORT_SRC = '''${SMBCONFTORT_SRC0}'''
1008
1009 LIBNET_SRC = 'libnet/libnet_join.c libnet/libnet_keytab.c librpc/gen_ndr/ndr_libnet_join.c'
1010
1011
1012 LIBNET_DSSYNC_SRC = '''libnet/libnet_dssync.c
1013                        libnet/libnet_dssync_keytab.c
1014                        ../libcli/drsuapi/repl_decrypt.c'''
1015
1016 LIBNET_SAMSYNC_SRC = '''libnet/libnet_samsync.c
1017                         libnet/libnet_samsync_ldif.c
1018                         libnet/libnet_samsync_passdb.c
1019                         libnet/libnet_samsync_display.c
1020                         libnet/libnet_samsync_keytab.c
1021                         ../libcli/samsync/decrypt.c'''
1022
1023 NET_SRC1 = '''utils/net.c utils/net_ads.c utils/net_help.c
1024               utils/net_rap.c utils/net_rpc.c utils/net_rpc_samsync.c
1025               utils/net_rpc_join.c utils/net_time.c utils/net_lookup.c
1026               utils/net_cache.c utils/net_groupmap.c utils/net_idmap.c
1027               utils/net_status.c utils/net_rpc_printer.c utils/net_rpc_rights.c
1028               utils/net_rpc_service.c utils/net_rpc_registry.c utils/net_usershare.c
1029               utils/netlookup.c utils/net_sam.c utils/net_rpc_shell.c
1030               utils/net_util.c utils/net_rpc_sh_acct.c utils/net_rpc_audit.c
1031               ${PASSWD_UTIL_SRC} utils/net_dns.c utils/net_ads_gpo.c
1032               utils/net_conf.c utils/net_join.c utils/net_user.c
1033               utils/net_group.c utils/net_file.c utils/net_registry.c
1034               auth/token_util.c utils/net_dom.c utils/net_share.c
1035               utils/net_g_lock.c
1036               utils/net_serverid.c
1037               utils/net_eventlog.c
1038               utils/net_printing.c
1039               ${LIBNDR_NTPRINTING_SRC}
1040               ${LIBNDR_PREG_SRC}
1041               ${LIBCLI_SPOOLSS_SRC}
1042               ${LIBCLI_WINREG_SRC}
1043               ${LIBCLI_DRSUAPI_SRC}
1044               ${LIBCLI_INITSHUTDOWN_SRC}
1045               ${LIBCLI_DSSETUP_SRC}
1046               ${LIBCLI_SVCCTL_SRC}
1047               ${LIBCLI_WKSSVC_SRC}
1048               ${LIBCLI_SRVSVC_SRC}
1049               ${LIBCLI_LSA_SRC}
1050               ${LIBCLI_SAMR_SRC}
1051               ${LIBCLI_NETLOGON_SRC}
1052               ${RPC_CLIENT_SCHANNEL_SRC}
1053               rpc_client/init_netlogon.c
1054               rpc_client/init_samr.c
1055               registry/reg_parse.c registry/reg_format.c
1056               registry/reg_parse_internal.c registry/reg_import.c
1057               lib/cbuf.c lib/srprs.c'''
1058
1059 NET_SRC2 = 'utils/net_registry_util.c utils/net_help_common.c'
1060
1061 NET_SRC = '''${NET_SRC1}
1062              ${NET_SRC2}
1063              ${LIBADDNS_SRC0}
1064              ${LIBMSRPC_SRC} ${LIBMSRPC_GEN_SRC}
1065              ${LIBADS_SRC} ${LIBADS_SERVER_SRC} ${LIBADS_PRINTER_SRC}
1066              ${DCUTIL_SRC}
1067              ${AFS_SRC} ${AFS_SETTOKEN_SRC} ${READLINE_SRC}
1068              ${LIBGPO_SRC} ${DISPLAY_SEC_SRC}
1069              ${LIBNET_SRC} ${LIBNET_DSSYNC_SRC} ${LIBNET_SAMSYNC_SRC}
1070              ${LIB_EVENTLOG_SRC} ${REGFIO_SRC}'''
1071
1072 CUPS_SRC = '''client/smbspool.c ${LIBNDR_GEN_SRC0}'''
1073
1074 NMBLOOKUP_SRC = '''utils/nmblookup.c ${LIBNMB_SRC}'''
1075
1076 SMBTORTURE_SRC1 = '''torture/torture.c torture/nbio.c torture/scanner.c torture/utable.c
1077                 torture/denytest.c torture/mangle_test.c
1078                 torture/nbench.c
1079                 torture/test_posix_append.c'''
1080
1081 SMBTORTURE_SRC = '''${SMBTORTURE_SRC1} ${TLDAP_SRC}
1082         ../nsswitch/libwbclient/wbc_async.c
1083         ../nsswitch/libwbclient/wb_reqtrans.c
1084         ${LIBNDR_GEN_SRC0}'''
1085
1086 MASKTEST_SRC = '''torture/masktest.c
1087                  ${LIBNDR_GEN_SRC0}'''
1088
1089 MSGTEST_SRC = '''torture/msgtest.c
1090                  ${LIBNDR_GEN_SRC0}'''
1091
1092 LOCKTEST_SRC = '''torture/locktest.c ${LOCKING_SRC}
1093                ${LIBNDR_GEN_SRC0} ${FNAME_UTIL_SRC}'''
1094
1095 NSSTEST_SRC = '''torture/nsstest.c ${LIBSAMBAUTIL_SRC}'''
1096
1097 PDBTEST_SRC = '''torture/pdbtest.c
1098                 ${LIBNDR_GEN_SRC0}'''
1099
1100 VFSTEST_SRC = '''torture/cmd_vfs.c torture/vfstest.c ${SMBD_SRC_BASE} ${READLINE_SRC}'''
1101
1102 SMBICONV_SRC = '''torture/smbiconv.c'''
1103
1104 LOG2PCAP_SRC = '''utils/log2pcaphex.c'''
1105
1106 LOCKTEST2_SRC = '''torture/locktest2.c ${LOCKING_SRC}
1107                 ${LIBNDR_GEN_SRC0} ${FNAME_UTIL_SRC}'''
1108
1109 SMBCACLS_SRC = '''utils/smbcacls.c
1110                 ${LIBMSRPC_SRC} ${LIBMSRPC_GEN_SRC}
1111                 ${LIBCLI_LSA_SRC}'''
1112
1113 SMBCQUOTAS_SRC = '''utils/smbcquotas.c
1114                 ${LIBMSRPC_SRC} ${LIBMSRPC_GEN_SRC}
1115                 ${LIBCLI_LSA_SRC}'''
1116
1117 EVTLOGADM_SRC0 = 'utils/eventlogadm.c'
1118
1119 EVTLOGADM_SRC = '''${EVTLOGADM_SRC0}
1120                 registry/reg_eventlog.c ${LIB_EVENTLOG_SRC}
1121                 ../librpc/gen_ndr/ndr_eventlog.c
1122                 ../librpc/gen_ndr/ndr_lsa.c'''
1123
1124 SHARESEC_SRC0 = 'utils/sharesec.c'
1125 SHARESEC_SRC  = '''${SHARESEC_SRC0}'''
1126
1127 DEBUG2HTML_SRC = '''utils/debug2html.c utils/debugparse.c'''
1128
1129 SMBFILTER_SRC = '''utils/smbfilter.c
1130                  ${LIBNDR_GEN_SRC0}'''
1131
1132 WINBIND_WINS_NSS_SRC = '''../nsswitch/wins.c ${PARAM_SRC}
1133         ${LIB_NONSMBD_SRC} ${LIBSMB_ERR_SRC} ${LIBNMB_SRC}'''
1134
1135 PAM_SMBPASS_SRC_0 = '''pam_smbpass/pam_smb_auth.c pam_smbpass/pam_smb_passwd.c
1136                 pam_smbpass/pam_smb_acct.c pam_smbpass/support.c ../lib/util/asn1.c'''
1137 PAM_SMBPASS_SRC = '''${PAM_SMBPASS_SRC_0} ${PARAM_SRC} ${LIB_NONSMBD_SRC} ${PASSDB_SRC} ${GROUPDB_SRC} \
1138                 ${SMBLDAP_SRC} ${LIBSAMBA_SRC} \
1139                 ${LIBTSOCKET_SRC}'''
1140
1141 WBINFO_SRC = '''../nsswitch/wbinfo.c ${AFS_SETTOKEN_SRC}'''
1142
1143 WINBIND_NSS_SRC = '''${WBCOMMON_SRC} ${LIBREPLACE_SRC}'''
1144
1145 WINBIND_KRB5_LOCATOR_SRC1 = '../nsswitch/winbind_krb5_locator.c'
1146 WINBIND_KRB5_LOCATOR_SRC = '''${WINBIND_KRB5_LOCATOR_SRC1} ${LIBREPLACE_SRC}'''
1147
1148 POPT_SRC = '''../lib/popt/findme.c ../lib/popt/popt.c ../lib/popt/poptconfig.c \
1149           ../lib/popt/popthelp.c ../lib/popt/poptparse.c'''
1150
1151 INIPARSER_SRC = '''../lib/iniparser_build/iniparser.c ../lib/iniparser_build/dictionary.c
1152                 ../lib/iniparser_build/strlib.c'''
1153
1154 NTLM_AUTH_SRC1 = '''utils/ntlm_auth.c utils/ntlm_auth_diagnostics.c'''
1155
1156 NTLM_AUTH_SRC = '''${NTLM_AUTH_SRC1}
1157                 ../libcli/auth/spnego_parse.c libsmb/clikrb5.c libads/kerberos.c
1158                 libsmb/samlogon_cache.c
1159                 ${LIBADS_SERVER_SRC}
1160                 ${LIBNMB_SRC}
1161                 ${LIBCLI_LDAP_NDR_SRC}
1162                 ${LIBNDR_GEN_SRC0} ${LIBNDR_NETLOGON_SRC}'''
1163
1164
1165 VLP_SRC = '''printing/tests/vlp.c
1166           ../lib/util/util_tdb.c
1167           ${LIBSAMBAUTIL_SRC}
1168           param/util.c'''
1169
1170 RPC_OPEN_TCP_SRC = 'torture/rpc_open_tcp.c ${LIBMSRPC_SRC} ${LIBMSRPC_GEN_SRC}'
1171
1172 DBWRAP_TOOL_SRC = 'utils/dbwrap_tool.c'
1173
1174 DBWRAP_TORTURE_SRC = 'utils/dbwrap_torture.c'
1175
1176 SPLIT_TOKENS_SRC = 'utils/split_tokens.c'
1177
1178 LIBS='ICONV'
1179
1180 bld.SAMBA_GENERATOR('build_options',
1181                     source='include/config.h script/mkbuildoptions.awk',
1182                     target='smbd/build_options.c',
1183                     rule='${AWK} -f ${SRC[1].abspath(env)} > ${TGT} < ${SRC[0].abspath(env)}')
1184
1185 t = bld.SAMBA_GENERATOR('build_env.h',
1186                         source='script/build_env.sh',
1187                         target='include/build_env.h',
1188                         rule='${SRC} ${SRCDIR} ${BUILDDIR} ${CC} > ${TGT}')
1189 # todo: work out what is really wanted here
1190 t.env.SRCDIR = bld.path.abspath()
1191 t.env.BUILDDIR = bld.path.abspath()
1192
1193
1194 bld.SETUP_BUILD_GROUPS()
1195
1196 bld.RECURSE('../lib/replace')
1197 print "SBINDIR=%s" % bld.env.SBINDIR
1198 bld.RECURSE('build')
1199
1200 bld.RECURSE('../librpc')
1201 bld.RECURSE('librpc/idl')
1202
1203 bld.SAMBA_MKVERSION('include/version.h')
1204
1205 for prefix in bld.env.MODULE_PREFIXES:
1206     static_key = "%s_STATIC" % prefix.upper()
1207     shared_key = "%s_SHARED" % prefix.upper()
1208
1209     # Set up the static modules
1210     static_src = locals()[static_key]
1211     for module in bld.env[static_key]:
1212         static_src += "${%s_SRC} " % module
1213     # for some reason static_src doesn't seem to be a reference, so save it
1214     # back to the locals
1215     locals()[static_key] = static_src
1216
1217     # Set up subsystems for the shared modules
1218     for module in bld.env[shared_key]:
1219         bld.SAMBA_SUBSYSTEM(module,
1220                             source="${%s_SRC}" % module,
1221                             vars=locals())
1222
1223 ######################## SUBSYSTEMS #################################
1224
1225 bld.SAMBA_SUBSYSTEM('WBCOMMON',
1226                     source=WBCOMMON_SRC)
1227
1228 bld.SAMBA_LIBRARY('libwbclient',
1229                     source='''../nsswitch/libwbclient/wbc_guid.c
1230                               ../nsswitch/libwbclient/wbc_idmap.c
1231                               ../nsswitch/libwbclient/wbclient.c
1232                               ../nsswitch/libwbclient/wbc_pam.c
1233                               ../nsswitch/libwbclient/wbc_pwd.c
1234                               ../nsswitch/libwbclient/wbc_sid.c
1235                               ../nsswitch/libwbclient/wbc_util.c''',
1236                     public_deps='talloc WBCOMMON')
1237
1238 bld.SAMBA_LIBRARY('libnetapi',
1239                     source=LIBNETAPI_SRC,
1240                     public_deps='''talloc tdb cap libwbclient LIB_NONSMBD LIBSMB KRBCLIENT
1241                     PASSDB SMBLDAP GROUPDB PARAM_WITHOUT_REG DYNCONFIG''',
1242                     vars=locals())
1243
1244 bld.SAMBA_LIBRARY('libsmbclient',
1245                     source=LIBSMBCLIENT_SRC,
1246                     public_deps='''talloc tdb libwbclient cap PARAM LIB_NONSMBD LIBSMB KRBCLIENT PASSDB SMBLDAP GROUPDB''',
1247                     vars=locals())
1248
1249 bld.SAMBA_LIBRARY('libsmbsharemodes',
1250                     source=LIBSMBSHAREMODES_SRC,
1251                     public_deps='''talloc tdb''',
1252                     vars=locals())
1253
1254 bld.SAMBA_SUBSYSTEM('ASN1_UTIL',
1255                     source='../lib/util/asn1.c',
1256                     deps='talloc',
1257                     local_include=False)
1258
1259 bld.SAMBA_SUBSYSTEM('AVAHI',
1260                     source=AVAHI_SRC,
1261                     deps='avahi-common avahi-client',
1262                     enabled=bld.env.with_avahi)
1263
1264 bld.SAMBA_SUBSYSTEM('GROUPDB',
1265                     source=GROUPDB_SRC)
1266
1267 bld.SAMBA_SUBSYSTEM('TLDAP',
1268                     source=TLDAP_SRC,
1269                     deps='ASN1_UTIL LIBTSOCKET')
1270
1271 bld.SAMBA_SUBSYSTEM('PASSDB',
1272                     source=PASSDB_SRC,
1273                     deps='GROUPDB TLDAP SECRETS SMBLDAP',
1274                     vars=locals())
1275
1276 bld.SAMBA_SUBSYSTEM('PARAM_WITHOUT_REG',
1277                     source=PARAM_WITHOUT_REG_SRC)
1278
1279 bld.SAMBA_SUBSYSTEM('PARAM',
1280                     source=PARAM_SRC,
1281                     deps='PARAM_WITHOUT_REG DYNCONFIG',
1282                     vars=locals())
1283
1284 bld.SAMBA_SUBSYSTEM('POPT_SAMBA',
1285                     source=POPT_LIB_SRC,
1286                     vars=locals())
1287
1288 bld.SAMBA_SUBSYSTEM('KRBCLIENT',
1289                     source=KRBCLIENT_SRC,
1290                     deps='krb5 k5crypto com_err gssapi gssapi_krb5',
1291                     vars=locals())
1292
1293 bld.SAMBA_SUBSYSTEM('LIBS',
1294                     source=LIB_SRC,
1295                     deps='NSS_WRAPPER iconv',
1296                     vars=locals())
1297
1298 bld.SAMBA_SUBSYSTEM('LIB_NONSMBD',
1299                     source=LIB_NONSMBD_SRC,
1300                     deps='LIBS',
1301                     vars=locals())
1302
1303 bld.SAMBA_SUBSYSTEM('LIBSMB_ERR',
1304                     source=LIBSMB_ERR_SRC,
1305                     deps='SECRETS ldap lber',
1306                     vars=locals())
1307
1308 bld.SAMBA_SUBSYSTEM('LIBSAMBA',
1309                     source=LIBSAMBA_SRC,
1310                     deps='LIBSMB_ERR',
1311                     vars=locals())
1312
1313 bld.SAMBA_SUBSYSTEM('LIBSMB',
1314                     source=LIBSMB_SRC,
1315                     deps='LIBSAMBA ZLIB',
1316                     vars=locals())
1317
1318 bld.SAMBA_SUBSYSTEM('SECRETS',
1319                     source=SECRETS_SRC,
1320                     vars=locals())
1321
1322 bld.SAMBA_SUBSYSTEM('SMBLDAP',
1323                     source=SMBLDAP_SRC,
1324                     deps='ldap lber',
1325                     vars=locals())
1326
1327 #FIXME
1328 bld.SAMBA_SUBSYSTEM('LIBNDR',
1329                     source=LIBNDR_SRC,
1330                     vars=locals())
1331
1332 #FIXME
1333 bld.SAMBA_SUBSYSTEM('NDR_STANDARD',
1334                     source=LIBNDR_SRC,
1335                     vars=locals())
1336
1337 bld.SAMBA_SUBSYSTEM('LZXPRESS',
1338                     deps='replace',
1339                     source='../lib/compression/lzxpress.c')
1340
1341 #FIXME
1342 bld.SAMBA_SUBSYSTEM('NDR_SECURITY',
1343                     source=LIBNDR_SRC,
1344                     vars=locals())
1345
1346 bld.SAMBA_SUBSYSTEM('LIBSAMBA-ERRORS',
1347                     source='../libcli/util/doserr.c libsmb/nterr.c')
1348
1349 bld.SAMBA_SUBSYSTEM('NDR_NBT_BUF',
1350                     source='../libcli/nbt/nbtname.c',
1351                     deps='talloc',
1352                     autoproto='nbtname.h')
1353
1354 bld.SAMBA_SUBSYSTEM('LIBCLI_NDR_NETLOGON',
1355                     source='../libcli/ndr_netlogon.c',
1356                     public_deps='LIBNDR NDR_SECURITY')
1357
1358 ########################## BINARIES #################################
1359
1360 bld.SAMBA_BINARY('smbd/smbd',
1361                  source=SMBD_SRC,
1362                  deps='''tdb tevent dl krb5 ldap gssapi gssapi_krb5
1363                  NSS_WRAPPER DYNCONFIG libwbclient crypt nsl cups cap resolv ZLIB PASSDB
1364                  PARAM_WITHOUT_REG LIBS LIBSMB POPT_SAMBA KRBCLIENT AVAHI''',
1365                  install_path='${SBINDIR}',
1366                  vars=locals())
1367
1368 bld.SAMBA_BINARY('nmbd/nmbd',
1369                  source=NMBD_SRC,
1370                  deps='''talloc tdb tevent ZLIB cap resolv libwbclient dl
1371                  NSS_WRAPPER PASSDB PARAM ldap LIB_NONSMBD LIBSMB
1372                  POPT_SAMBA KRBCLIENT''',
1373                  install_path='${SBINDIR}',
1374                  vars=locals())
1375
1376 bld.SAMBA_BINARY('winbindd/winbindd',
1377                  source=WINBINDD_SRC,
1378                  deps='''talloc tdb tevent cap dl ZLIB NSS_WRAPPER
1379                  libwbclient PASSDB ldap resolv PARAM LIB_NONSMBD LIBSMB
1380                  POPT_SAMBA KRBCLIENT''',
1381                  enabled=bld.env.build_winbind,
1382                  install_path='${SBINDIR}',
1383                  vars=locals())
1384
1385 bld.SAMBA_BINARY('web/swat',
1386                  source=SWAT_SRC,
1387                  deps='''talloc tevent cap LIBS LIBSMB libwbclient PARAM
1388                  LIB_NONSMBD resolv PASSDB POPT_SAMBA KRBCLIENT cups''',
1389                  enabled=bld.env.build_swat,
1390                  install_path='${SBINDIR}',
1391                  vars=locals())
1392
1393 bld.SAMBA_BINARY('rpcclient/rpcclient',
1394                  source=RPCCLIENT_SRC,
1395                  deps='''talloc tdb cap resolv POPT_SAMBA PASSDB LIBSMB LIB_NONSMBD
1396                  PARAM_WITHOUT_REG libwbclient PARAM KRBCLIENT''',
1397                  vars=locals())
1398
1399 bld.SAMBA_BINARY('smbclient',
1400                  source=CLIENT_SRC,
1401                  deps='''talloc tdb cap resolv POPT_SAMBA PASSDB LIBSMB LIB_NONSMBD
1402                  PARAM_WITHOUT_REG libwbclient PARAM KRBCLIENT''',
1403                  vars=locals())
1404
1405 bld.SAMBA_BINARY('net',
1406                  source=NET_SRC,
1407                  deps='''talloc tdb libnetapi cap resolv POPT_SAMBA PASSDB LIBSMB LIB_NONSMBD
1408                  PARAM_WITHOUT_REG libwbclient PARAM KRBCLIENT
1409                  LOCALE_DIR''',
1410                  vars=locals())
1411
1412 bld.SAMBA_BINARY('profiles',
1413                  source=PROFILES_SRC,
1414                  deps='''talloc tdb cap tevent POPT_SAMBA PARAM LIBS LIBSMB_ERR LIB_NONSMBD''',
1415                  vars=locals())
1416
1417 bld.SAMBA_BINARY('smbspool',
1418                  source=CUPS_SRC,
1419                  deps='''talloc tdb tevent resolv cap libwbclient POPT_SAMBA PARAM LIBSMB LIB_NONSMBD LIBS
1420                  KRBCLIENT ASN1_UTIL LIBTSOCKET''',
1421                  vars=locals())
1422
1423 bld.SAMBA_BINARY('testparm',
1424                  source=TESTPARM_SRC,
1425                  deps='''talloc tevent ldap cap NSS_WRAPPER
1426                  libwbclient ASN1_UTIL LIBTSOCKET PASSDB PARAM LIB_NONSMBD
1427                  LIBSMB_ERR POPT_SAMBA''',
1428                  vars=locals())
1429
1430 bld.SAMBA_BINARY('smbta-util',
1431                  source=SMBTA_UTIL_SRC,
1432                  deps='''talloc tdb tevent cap PARAM POPT_SAMBA LIB_NONSMBD
1433                  LIBSMB_ERR''',
1434                  vars=locals())
1435
1436 bld.SAMBA_BINARY('smbstatus',
1437                  source=STATUS_SRC,
1438                  deps='''talloc tdb tevent cap PARAM POPT_SAMBA LIB_NONSMBD
1439                  LIBSMB_ERR''',
1440                  vars=locals())
1441
1442 bld.SAMBA_BINARY('smbcontrol',
1443                  source=SMBCONTROL_SRC,
1444                  deps='''talloc tdb tevent cap PARAM LIB_NONSMBD LIBSMB_ERR POPT_SAMBA''',
1445                  vars=locals())
1446
1447 bld.SAMBA_BINARY('smbtree',
1448                  source=SMBTREE_SRC,
1449                  deps='''talloc tdb tevent cap resolv libwbclient PARAM LIB_NONSMBD
1450                  LIBSMB LIBSMB_ERR POPT_SAMBA KRBCLIENT PASSDB SMBLDAP GROUPDB''',
1451                  vars=locals())
1452
1453 bld.SAMBA_BINARY('smbpasswd',
1454                  source=SMBPASSWD_SRC,
1455                  deps='''talloc tdb tevent cap resolv libwbclient PARAM LIB_NONSMBD
1456                  LIBSMB LIBSMB_ERR POPT_SAMBA KRBCLIENT PASSDB SMBLDAP GROUPDB''',
1457                  vars=locals())
1458
1459 bld.SAMBA_BINARY('pdbedit',
1460                  source=PDBEDIT_SRC,
1461                  deps='''talloc tdb tevent cap resolv libwbclient PARAM LIB_NONSMBD
1462                  LIBSAMBA LIBSMB_ERR POPT_SAMBA PASSDB SMBLDAP GROUPDB''',
1463                  vars=locals())
1464
1465 bld.SAMBA_BINARY('smbget',
1466                  source=SMBGET_SRC,
1467                  deps='''talloc tdb libsmbclient POPT_SAMBA''',
1468                  vars=locals())
1469
1470 bld.SAMBA_BINARY('nmblookup',
1471                  source=NMBLOOKUP_SRC,
1472                  deps='''talloc tdb tevent cap resolv PARAM LIB_NONSMBD POPT_SAMBA LIBSMB_ERR''',
1473                  vars=locals())
1474
1475 bld.SAMBA_BINARY('smbtorture',
1476                  source=SMBTORTURE_SRC,
1477                  deps='''talloc tdb tevent cap resolv libwbclient PARAM LIBSMB KRBCLIENT
1478                  LIB_NONSMBD POPT_SAMBA ASN1_UTIL LIBTSOCKET''',
1479                  vars=locals())
1480
1481 bld.SAMBA_BINARY('smbconftort',
1482                  source=SMBCONFTORT_SRC,
1483                  deps='''talloc tdb tevent cap resolv libwbclient PARAM LIB_NONSMBD LIBSMB_ERR POPT_SAMBA''',
1484                  vars=locals())
1485
1486 bld.SAMBA_BINARY('masktest',
1487                  source=MASKTEST_SRC,
1488                  deps='''talloc tdb cap resolv libwbclient PARAM LIB_NONSMBD LIBSMB KRBCLIENT
1489                  ASN1_UTIL LIBTSOCKET''',
1490                  vars=locals())
1491
1492 bld.SAMBA_BINARY('msgtest',
1493                  source=MSGTEST_SRC,
1494                  deps='''talloc tdb tevent cap resolv PARAM LIBSMB_ERR LIB_NONSMBD''',
1495                  vars=locals())
1496
1497 bld.SAMBA_BINARY('smbcacls',
1498                  source=SMBCACLS_SRC,
1499                  deps='''talloc tdb cap resolv libwbclient PARAM LIBSMB KRBCLIENT
1500                  LIB_NONSMBD PASSDB GROUPDB POPT_SAMBA SMBLDAP''',
1501                  vars=locals())
1502
1503 bld.SAMBA_BINARY('smbcquotas',
1504                  source=SMBCQUOTAS_SRC,
1505                  deps='''talloc tdb cap resolv libwbclient PARAM LIB_NONSMBD LIBSMB KRBCLIENT
1506                  POPT_SAMBA PASSDB SMBLDAP GROUPDB''',
1507                  vars=locals())
1508
1509 bld.SAMBA_BINARY('eventlogadm',
1510                  source=EVTLOGADM_SRC,
1511                  deps='''talloc tevent cap POPT_SAMBA LIBS PARAM
1512                  LIB_NONSMBD LIBSMB_ERR PASSDB libwbclient''',
1513                  vars=locals())
1514
1515 bld.SAMBA_BINARY('sharesec',
1516                  source=SHARESEC_SRC,
1517                  deps='''talloc tdb tevent cap resolv libwbclient PARAM LIB_NONSMBD LIBSMB_ERR POPT_SAMBA''',
1518                  vars=locals())
1519
1520 bld.SAMBA_BINARY('locktest',
1521                  source=LOCKTEST_SRC,
1522                  deps='''talloc tdb tevent cap resolv libwbclient PARAM KRBCLIENT LIBSMB LIB_NONSMBD
1523                  ASN1_UTIL LIBTSOCKET''',
1524                  vars=locals())
1525
1526 bld.SAMBA_BINARY('nsstest',
1527                  source=NSSTEST_SRC,
1528                  vars=locals())
1529
1530 bld.SAMBA_BINARY('pdbtest',
1531                  source=PDBTEST_SRC,
1532                  deps='''talloc tdb cap resolv libwbclient PARAM LIBSMB KRBCLIENT LIB_NONSMBD PASSDB GROUPDB
1533                  SMBLDAP POPT_SAMBA''',
1534                  vars=locals())
1535
1536 bld.SAMBA_BINARY('vfstest',
1537                  source=VFSTEST_SRC,
1538                  deps='''talloc tdb tevent cap resolv libwbclient dl krb5 ldap gssapi gssapi_krb5
1539                  NSS_WRAPPER DYNCONFIG libwbclient crypt nsl cups ZLIB PASSDB
1540                  PARAM_WITHOUT_REG LIBS LIBSMB POPT_SAMBA KRBCLIENT AVAHI''',
1541                  vars=locals())
1542
1543 bld.SAMBA_BINARY('smbiconv',
1544                  source=SMBICONV_SRC,
1545                  deps='''talloc tdb tevent cap PARAM LIB_NONSMBD POPT_SAMBA LIBSMB_ERR''',
1546                  vars=locals())
1547
1548 bld.SAMBA_BINARY('log2pcap',
1549                  source=LOG2PCAP_SRC,
1550                  deps='''talloc popt''',
1551                  vars=locals())
1552
1553 bld.SAMBA_BINARY('locktest2',
1554                  source=LOCKTEST2_SRC,
1555                  deps='''talloc tdb tevent cap resolv libwbclient PARAM KRBCLIENT LIBSMB LIB_NONSMBD
1556                  ASN1_UTIL LIBTSOCKET''',
1557                  vars=locals())
1558
1559 bld.SAMBA_BINARY('debug2html',
1560                  source=LOG2PCAP_SRC,
1561                  deps='''talloc popt''',
1562                  vars=locals())
1563
1564 bld.SAMBA_BINARY('smbfilter',
1565                  source=SMBFILTER_SRC,
1566                  deps='''talloc tevent cap resolv libwbclient PARAM LIBSMB LIB_NONSMBD KRBCLIENT ASN1_UTIL LIBTSOCKET''',
1567                  vars=locals())
1568
1569 bld.SAMBA_BINARY('versiontest',
1570                  source='lib/version_test.c ${VERSION_SRC}',
1571                  vars=locals())
1572
1573 bld.SAMBA_BINARY('wbinfo',
1574                  source=WBINFO_SRC,
1575                  deps='''talloc libwbclient tevent cap
1576                  NSS_WRAPPER ASN1_UTIL LIBTSOCKET PASSDB ldap PARAM LIB_NONSMBD
1577                  LIBSAMBA POPT_SAMBA''',
1578                  vars=locals())
1579
1580 bld.SAMBA_BINARY('ntlm_auth',
1581                  source=NTLM_AUTH_SRC,
1582                  deps='''tdb talloc cap resolv krb5 k5crypto com_err libwbclient PARAM LIB_NONSMBD
1583                  LIBS LIBSAMBA POPT_SAMBA ASN1_UTIL LIBTSOCKET
1584                  PASSDB GROUPDB SMBLDAP WBCOMMON LIBINIPARSER''',
1585                  vars=locals())
1586
1587 bld.SAMBA_BINARY('timelimit',
1588                  source='script/tests/timelimit.c',
1589                  vars=locals())
1590
1591 bld.SAMBA_BINARY('rpc_open_tcp',
1592                  source=RPC_OPEN_TCP_SRC,
1593                  deps='''talloc tdb tevent resolv cap libwbclient KRBCLIENT PARAM LIBS LIBSMB LIB_NONSMBD LIBSMB_ERR ASN1_UTIL LIBTSOCKET''',
1594                  vars=locals())
1595
1596 bld.SAMBA_BINARY('test_lp_load',
1597                  source=TEST_LP_LOAD_SRC,
1598                  deps='''talloc tdb tevent cap libwbclient PARAM LIB_NONSMBD POPT_SAMBA LIBSAMBA''',
1599                  vars=locals())
1600
1601 bld.SAMBA_BINARY('dbwrap_tool',
1602                  source=DBWRAP_TOOL_SRC,
1603                  deps='''talloc tdb tevent cap PARAM LIB_NONSMBD LIBSMB_ERR''',
1604                  vars=locals())
1605
1606 bld.SAMBA_BINARY('dbwrap_torture',
1607                  source=DBWRAP_TORTURE_SRC,
1608                  deps='''talloc tdb tevent cap PARAM LIB_NONSMBD LIBSMB_ERR
1609                  POPT_SAMBA''',
1610                  vars=locals())
1611
1612 bld.SAMBA_BINARY('split_tokens',
1613                  source=SPLIT_TOKENS_SRC,
1614                  deps='''talloc tdb tevent cap libwbclient PARAM LIB_NONSMBD POPT_SAMBA
1615                  LIBSAMBA''',
1616                  vars=locals())
1617
1618 swat_files=recursive_dirlist('../swat', '../swat', '*')
1619 bld.INSTALL_FILES('${SWATDIR}', swat_files, base_name='../swat')
1620
1621 ########################## INCLUDES #################################
1622
1623 bld.RECURSE('../lib/socket_wrapper')
1624 bld.RECURSE('../lib/talloc')
1625 bld.RECURSE('../lib/tdb')
1626 bld.RECURSE('../lib/nss_wrapper')
1627 bld.RECURSE('../lib/tevent')
1628 bld.RECURSE('../lib/popt')
1629 bld.RECURSE('../lib/zlib')
1630 bld.RECURSE('../lib/tsocket')
1631 bld.RECURSE('../lib/iniparser/src')
1632
1633 bld.ENFORCE_GROUP_ORDERING()
1634 bld.CHECK_PROJECT_RULES()