s3: Replace sid_binstring and sid_guidstring with PIDL-based alternatives
[metze/samba/wip.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_PREG_SRC = '''librpc/gen_ndr/ndr_preg.c
70                      librpc/ndr/ndr_preg.c'''
71
72 LIBNDR_XATTR_SRC = '''../librpc/gen_ndr/ndr_xattr.c
73                   ../librpc/ndr/ndr_xattr.c'''
74
75 LIBCLI_SPOOLSS_SRC = '''
76                      ../librpc/gen_ndr/cli_spoolss.c
77                      ../librpc/gen_ndr/ndr_spoolss_c.c
78                      rpc_client/cli_spoolss.c
79                      rpc_client/init_spoolss.c'''
80
81 LIBCLI_EVENTLOG_SRC = '''
82                       ../librpc/gen_ndr/cli_eventlog.c
83                       ../librpc/gen_ndr/ndr_eventlog_c.c'''
84
85 LIBCLI_WINREG_SRC = '''
86                     ../librpc/gen_ndr/cli_winreg.c
87                     ../librpc/gen_ndr/ndr_winreg_c.c'''
88
89 LIBCLI_NTSVCS_SRC = '''
90                     ../librpc/gen_ndr/cli_ntsvcs.c
91                     ../librpc/gen_ndr/ndr_ntsvcs_c.c'''
92
93 LIBCLI_DRSUAPI_SRC = '''
94                      ../librpc/gen_ndr/cli_drsuapi.c
95                      ../librpc/gen_ndr/ndr_drsuapi_c.c'''
96
97 LIBCLI_DFS_SRC = '''
98                  ../librpc/gen_ndr/cli_dfs.c
99                  ../librpc/gen_ndr/ndr_dfs_c.c'''
100
101 LIBCLI_ECHO_SRC = '''
102                   ../librpc/gen_ndr/cli_echo.c
103                   ../librpc/gen_ndr/ndr_echo_c.c'''
104
105 LIBCLI_INITSHUTDOWN_SRC = '''
106                           ../librpc/gen_ndr/cli_initshutdown.c
107                           ../librpc/gen_ndr/ndr_initshutdown_c.c'''
108
109 LIBCLI_DSSETUP_SRC = '''
110                      ../librpc/gen_ndr/cli_dssetup.c
111                      ../librpc/gen_ndr/ndr_dssetup_c.c'''
112
113 LIBCLI_SVCCTL_SRC = '''
114                     ../librpc/gen_ndr/cli_svcctl.c
115                     ../librpc/gen_ndr/ndr_svcctl_c.c'''
116
117 LIBCLI_WKSSVC_SRC = '''
118                     ../librpc/gen_ndr/cli_wkssvc.c
119                     ../librpc/gen_ndr/ndr_wkssvc_c.c'''
120
121 LIBCLI_SRVSVC_SRC = '''
122                     ../librpc/gen_ndr/cli_srvsvc.c
123                     ../librpc/gen_ndr/ndr_srvsvc_c.c'''
124
125 LIBCLI_LSA_SRC = '''
126                  ../librpc/gen_ndr/cli_lsa.c
127                  ../librpc/gen_ndr/ndr_lsa_c.c
128                  rpc_client/cli_lsarpc.c
129                  rpc_client/init_lsa.c'''
130
131 LIBCLI_SAMR_SRC = '''
132                   ../librpc/gen_ndr/cli_samr.c
133                   ../librpc/gen_ndr/ndr_samr_c.c
134                   rpc_client/cli_samr.c'''
135
136 LIBCLI_NETLOGON_SRC = '''
137                       ../librpc/gen_ndr/cli_netlogon.c
138                       ../librpc/gen_ndr/ndr_netlogon_c.c
139                       rpc_client/cli_netlogon.c'''
140
141 LIBCLI_EPMAPPER_SRC = '''
142                       ../librpc/gen_ndr/cli_epmapper.c
143                       ../librpc/gen_ndr/ndr_epmapper_c.c'''
144
145 LIBNDR_GEN_SRC = '''../librpc/gen_ndr/ndr_wkssvc.c
146                  ${LIBNDR_GEN_SRC0}
147                  ../librpc/gen_ndr/ndr_dfs.c
148                  ../librpc/gen_ndr/ndr_echo.c
149                  ../librpc/gen_ndr/ndr_winreg.c
150                  ../librpc/gen_ndr/ndr_initshutdown.c
151                  ../librpc/gen_ndr/ndr_srvsvc.c
152                  ../librpc/gen_ndr/ndr_eventlog.c
153                  ${LIBNDR_NETLOGON_SRC}
154                  ../librpc/gen_ndr/ndr_dssetup.c
155                  ../librpc/gen_ndr/ndr_epmapper.c
156                  ../librpc/gen_ndr/ndr_ntsvcs.c
157                  ${LIBNDR_SPOOLSS_SRC}'''
158
159 LIBNDR_NTPRINTING_SRC = '''../librpc/gen_ndr/ndr_ntprinting.c
160                            ../librpc/ndr/ndr_ntprinting.c'''
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 lib/util_uuid.c
223           lib/util_unistr.c lib/util_file.c lib/util_names.c
224           lib/util.c lib/util_sock.c lib/sock_exec.c lib/util_sec.c
225           lib/substitute.c lib/dbwrap_util.c
226           lib/ms_fnmatch.c lib/select.c lib/errmap_unix.c
227           lib/tallocmsg.c lib/dmallocmsg.c
228           libsmb/clisigning.c libsmb/smb_signing.c
229           lib/iconv.c lib/pam_errors.c intl/lang_tdb.c
230           lib/conn_tdb.c lib/adt_tree.c lib/gencache.c
231           lib/sessionid_tdb.c
232           lib/module.c lib/events.c ${LIBTEVENT_SRC0}
233           lib/server_contexts.c
234           lib/ldap_escape.c ${CHARSET_STATIC}
235           lib/secdesc.c lib/util_seaccess.c ../libcli/security/secace.c
236           ../libcli/security/sddl.c
237           ../libcli/security/secacl.c ${PTHREADPOOL_SRC}
238           lib/fncall.c
239           libads/krb5_errs.c lib/system_smbd.c lib/audit.c ${LIBNDR_SRC}
240           lib/file_id.c lib/idmap_cache.c
241           ../libcli/security/dom_sid.c ../libcli/security/security_descriptor.c'''
242
243 LIB_DUMMY_SRC = '''lib/dummysmbd.c lib/dummyroot.c'''
244 LIB_NONSMBD_SRC = '''${LIB_DUMMY_SRC}'''
245
246 READLINE_SRC = '''lib/readline.c'''
247
248 POPT_LIB_SRC = '''lib/popt_common.c'''
249
250 PARAM_WITHOUT_REG_SRC = '''param/loadparm.c param/util.c param/loadparm_server_role.c
251                            lib/sharesec.c lib/ldap_debug_handler.c'''
252 PARAM_REG_ADD_SRC = '''${REG_SMBCONF_SRC} ${LIBSMBCONF_SRC} ${PRIVILEGES_BASIC_SRC}'''
253 PARAM_SRC = '''${PARAM_REG_ADD_SRC}'''
254
255 KRBCLIENT_SRC = '''libads/kerberos.c libads/ads_status.c'''
256
257 LIBADDNS_SRC0 = '''libaddns/dnsrecord.c libaddns/dnsutils.c  libaddns/dnssock.c
258                libaddns/dnsgss.c libaddns/dnsmarshall.c'''
259 LIBADDNS_SRC = '''${LIBADDNS_SRC0} ${SOCKET_WRAPPER_SRC}'''
260
261 GPEXT_STATIC = ''
262 GPEXT_REGISTRY_SRC = 'libgpo/gpext/registry.c'
263 GPEXT_SCRIPTS_SRC = 'libgpo/gpext/scripts.c'
264 GPEXT_SECURITY_SRC = 'libgpo/gpext/security.c'
265
266 GPEXT_SRC = '''../libgpo/gpext/gpext.c ${GPEXT_STATIC}'''
267
268 LIBGPO_SRC0 = '''../libgpo/gpo_ldap.c ../libgpo/gpo_ini.c ../libgpo/gpo_util.c
269               ../libgpo/gpo_fetch.c libgpo/gpo_filesync.c ../libgpo/gpo_sec.c
270               libgpo/gpo_reg.c
271               ${GPEXT_SRC}'''
272 LIBGPO_SRC = '''${LIBGPO_SRC0}'''
273
274 LIBADS_SRC = '''libads/ldap.c
275              libads/sasl.c libads/sasl_wrapping.c
276              libads/krb5_setpw.c
277              libads/kerberos_util.c
278              libads/ldap_user.c
279              libads/ads_struct.c libads/kerberos_keytab.c
280              libads/disp_sec.c libads/ldap_utils.c
281              libads/ldap_schema.c libads/util.c libads/ndr.c'''
282
283 LIBADS_PRINTER_SRC = '''libads/ldap_printer.c'''
284
285 LIBADS_SERVER_SRC = '''libads/kerberos_verify.c libads/authdata.c
286                     ../librpc/ndr/ndr_krb5pac.c
287                     ../librpc/gen_ndr/ndr_krb5pac.c'''
288
289 LIBNBT_SRC = '''../libcli/nbt/nbtname.c
290              ../libcli/netlogon.c
291              ../libcli/ndr_netlogon.c
292              ../librpc/gen_ndr/ndr_nbt.c
293              ../librpc/gen_ndr/ndr_svcctl.c
294              ../librpc/ndr/ndr_svcctl.c'''
295
296 LIBNMB_SRC = '''libsmb/unexpected.c libsmb/namecache.c libsmb/nmblib.c
297              libsmb/namequery.c ../libcli/nbt/lmhosts.c libsmb/conncache.c
298              libads/dns.c libads/sitename_cache.c'''
299
300 NTERR_SRC = '''libsmb/nterr.c libsmb/smberr.c'''
301 DOSERR_SRC = '../libcli/util/doserr.c'
302 ERRORMAP_SRC = 'libsmb/errormap.c'
303 DCE_RPC_ERR_SRC = '../librpc/rpc/dcerpc_error.c'
304
305 LIBSMB_ERR_SRC0 = '''${NTERR_SRC} ${DOSERR_SRC} ${ERRORMAP_SRC} ${DCE_RPC_ERR_SRC}'''
306
307 LIBSMB_ERR_SRC1 = '''../libcli/auth/smbdes.c ../libcli/auth/smbencrypt.c ../libcli/auth/msrpc_parse.c ../libcli/auth/session.c'''
308
309 LIBSMB_ERR_SRC = '${LIBSMB_ERR_SRC0} ${LIBSMB_ERR_SRC1}'
310
311 LIBSMB_SRC0 = '''
312                ../libcli/auth/ntlm_check.c
313                libsmb/ntlmssp.c
314                libsmb/ntlmssp_wrap.c
315                ../libcli/auth/ntlmssp.c
316                ../libcli/auth/ntlmssp_sign.c
317                ${LIBNDR_NTLMSSP_SRC}
318                ../libcli/auth/ntlmssp_ndr.c
319                ../libcli/auth/ntlmssp_server.c'''
320
321 LIBSAMBA_SRC = '${LIBSMB_SRC0}'
322
323 LIBCLI_LDAP_MESSAGE_SRC = '''../libcli/ldap/ldap_message.c'''
324 LIBCLI_LDAP_NDR_SRC = '''../libcli/ldap/ldap_ndr.c lib/ldb_compat.c'''
325
326 CLDAP_SRC = '''libads/cldap.c
327         ../libcli/cldap/cldap.c
328         ../lib/util/idtree.c
329         ${LIBCLI_LDAP_MESSAGE_SRC} ${LIBCLI_LDAP_NDR_SRC}'''
330
331 TLDAP_SRC = '''lib/tldap.c lib/tldap_util.c lib/util_tsock.c'''
332
333 SCHANNEL_SRC = '''../libcli/auth/credentials.c
334                ../libcli/auth/schannel_sign.c
335                ../libcli/auth/schannel_state_tdb.c
336                ${LIBNDR_SCHANNEL_SRC}'''
337
338 LIBSMB_SRC = '''libsmb/clientgen.c libsmb/cliconnect.c libsmb/clifile.c
339              libsmb/clikrb5.c libsmb/clispnego.c
340              ../libcli/auth/spnego_parse.c
341              libsmb/clirap.c libsmb/clierror.c libsmb/climessage.c
342              libsmb/clireadwrite.c libsmb/clilist.c libsmb/cliprint.c
343              libsmb/clitrans.c libsmb/clisecdesc.c libsmb/clidgram.c
344              libsmb/clistr.c libsmb/cliquota.c libsmb/clifsinfo.c libsmb/clidfs.c
345              libsmb/clioplock.c libsmb/clirap2.c
346              libsmb/smb_seal.c libsmb/async_smb.c
347              ${LIBNMB_SRC}
348              ${LIBNBT_SRC}
349              ${CLDAP_SRC}
350              ${DRSUAPI_SRC}'''
351
352 LIBMSRPC_SRC = '''
353                ${SCHANNEL_SRC}
354                rpc_client/cli_pipe.c
355                librpc/rpc/rpc_common.c
356                librpc/rpc/dcerpc_gssapi.c
357                librpc/rpc/dcerpc_krb5.c
358                librpc/rpc/dcerpc_spnego.c
359                rpc_client/rpc_transport_np.c
360                rpc_client/rpc_transport_sock.c
361                rpc_client/rpc_transport_tstream.c
362                ../librpc/rpc/binding.c
363                ../librpc/rpc/dcerpc_util.c
364                librpc/rpc/dcerpc_helpers.c
365                ../librpc/rpc/binding_handle.c'''
366
367 LIBMSRPC_GEN_SRC = '''
368                    ${LIBCLI_EPMAPPER_SRC}
369                    ${LIBNDR_GEN_SRC}'''
370
371 #
372 # registry-related objects
373 #
374 UTIL_REG_SRC = '''../libcli/registry/util_reg.c'''
375
376 REG_INIT_BASIC_SRC = '''registry/reg_init_basic.c'''
377 REG_INIT_SMBCONF_SRC = '''registry/reg_init_smbconf.c'''
378 REG_INIT_FULL_SRC = '''registry/reg_init_full.c'''
379
380 REGFIO_SRC = '''registry/regfio.c ${REG_PARSE_PRS_SRC}'''
381
382 REG_API_REGF_SRC = '''registry/reg_api_regf.c'''
383
384 REGSRCS_SRC = '''registry/reg_objects.c'''
385
386 REG_BACKENDS_BASE_SRC = '''registry/reg_backend_db.c'''
387
388 REG_BACKENDS_SMBCONF_SRC = '''registry/reg_backend_smbconf.c'''
389
390 REG_BACKENDS_EXTRA_SRC = '''registry/reg_backend_printing.c
391                          registry/reg_backend_shares.c
392                          registry/reg_backend_netlogon_params.c
393                          registry/reg_backend_prod_options.c
394                          registry/reg_backend_tcpip_params.c
395                          registry/reg_backend_hkpt_params.c
396                          registry/reg_backend_current_version.c
397                          registry/reg_backend_perflib.c'''
398
399 REG_BASE_SRC = '''registry/reg_api.c
400                registry/reg_dispatcher.c
401                registry/reg_cachehook.c
402                ${REGSRCS_SRC}
403                registry/reg_util_internal.c
404                lib/util_nttoken.c
405                ${REG_BACKENDS_BASE_SRC}
406                ${REG_INIT_BASIC_SRC}'''
407
408 REG_SMBCONF_SRC = '''${REG_BASE_SRC}
409                   ${REG_BACKENDS_SMBCONF_SRC}
410                   ${REG_INIT_SMBCONF_SRC}
411                   registry/reg_util_token.c
412                   registry/reg_api_util.c'''
413
414 REG_FULL_SRC = '''${REG_SMBCONF_SRC}
415                ${REG_BACKENDS_EXTRA_SRC}
416                ${REG_INIT_FULL_SRC}
417                registry/reg_eventlog.c
418                registry/reg_perfcount.c
419                librpc/gen_ndr/ndr_perfcount.c
420                registry/reg_util_legacy.c'''
421
422 LIB_EVENTLOG_SRC = '''lib/eventlog/eventlog.c'''
423
424 RPC_STATIC = ''
425
426 RPC_LSARPC_SRC = '''rpc_server/srv_lsa_nt.c
427                     ../librpc/gen_ndr/srv_lsa.c'''
428
429 RPC_NETLOGON_SRC = '''rpc_server/srv_netlog_nt.c
430                       ../librpc/gen_ndr/srv_netlogon.c'''
431
432 RPC_SAMR_SRC = '''rpc_server/srv_samr_nt.c
433                rpc_server/srv_samr_util.c
434                rpc_server/srv_samr_chgpasswd.c
435                ../librpc/gen_ndr/srv_samr.c'''
436
437 RPC_INITSHUTDOWN_SRC = ''' ../librpc/gen_ndr/srv_initshutdown.c rpc_server/srv_initshutdown_nt.c'''
438
439 RPC_WINREG_SRC = '''rpc_server/srv_winreg_nt.c
440                     ../librpc/gen_ndr/srv_winreg.c'''
441
442 RPC_DSSETUP_SRC = ''' rpc_server/srv_dssetup_nt.c ../librpc/gen_ndr/srv_dssetup.c'''
443
444 RPC_SRVSVC_SRC = '''rpc_server/srv_srvsvc_nt.c
445                     ../librpc/gen_ndr/srv_srvsvc.c'''
446
447 RPC_WKSSVC_SRC = '''../librpc/gen_ndr/srv_wkssvc.c
448                     rpc_server/srv_wkssvc_nt.c'''
449
450 RPC_SVCCTL_SRC = ''' rpc_server/srv_svcctl_nt.c
451                   ../librpc/gen_ndr/srv_svcctl.c
452                   services/svc_spoolss.c services/svc_rcinit.c services/services_db.c
453                   services/svc_netlogon.c services/svc_winreg.c
454                   services/svc_wins.c'''
455
456 RPC_NTSVCS_SRC = '''rpc_server/srv_ntsvcs_nt.c
457                  ../librpc/gen_ndr/srv_ntsvcs.c'''
458
459 RPC_NETDFS_SRC = '''../librpc/gen_ndr/srv_dfs.c
460                     rpc_server/srv_dfs_nt.c'''
461
462 RPC_SPOOLSS_SRC = '''rpc_server/srv_spoolss_nt.c
463                      rpc_server/srv_spoolss_util.c
464                   ../librpc/gen_ndr/srv_spoolss.c'''
465
466 RPC_EVENTLOG_SRC = '''rpc_server/srv_eventlog_nt.c
467                    ${LIB_EVENTLOG_SRC} ../librpc/gen_ndr/srv_eventlog.c'''
468
469 NPA_TSTREAM_SRC = '''../libcli/named_pipe_auth/npa_tstream.c
470                      ../librpc/gen_ndr/ndr_named_pipe_auth.c'''
471
472 RPC_NCACN_NP = '''rpc_server/srv_pipe_register.c rpc_server/rpc_ncacn_np.c
473                   rpc_server/rpc_handles.c'''
474
475 RPC_SERVICE = '''rpc_server/rpc_server.c'''
476
477 RPC_PIPE_SRC = '''rpc_server/srv_pipe_hnd.c rpc_server/srv_pipe.c
478                ${RPC_NCACN_NP} ${RPC_SERVICE}'''
479
480 RPC_RPCECHO_SRC = '''rpc_server/srv_echo_nt.c ../librpc/gen_ndr/srv_echo.c'''
481
482 RPC_SERVER_SRC = '''${RPC_PIPE_SRC} ${NPA_TSTREAM_SRC} ${RPC_STATIC}'''
483
484 RPC_CLIENT_SCHANNEL_SRC = '''rpc_client/cli_pipe_schannel.c'''
485
486 LOCKING_SRC = '''locking/locking.c locking/brlock.c locking/posix.c'''
487
488 PRIVILEGES_BASIC_SRC = '''../libcli/security/privileges.c'''
489
490 PRIVILEGES_SRC = '''lib/privileges.c'''
491
492 PASSDB_GET_SET_SRC = '''passdb/pdb_get_set.c'''
493
494 PDB_STATIC =        ''
495 PDB_TDBSAM_SRC =    'passdb/pdb_tdb.c'
496 PDB_LDAP_SRC =      'passdb/pdb_ldap.c passdb/pdb_nds.c'
497 PDB_ADS_SRC =       'passdb/pdb_ads.c'
498 PDB_SMBPASSWD_SRC = 'passdb/pdb_smbpasswd.c'
499 PDB_WBC_SAM_SRC =   'passdb/pdb_wbc_sam.c'
500
501 SECRETS_SRC = '''passdb/secrets.c passdb/machine_account_secrets.c
502                  passdb/machine_sid.c librpc/gen_ndr/ndr_secrets.c'''
503
504 PASSDB_SRC = '''${PASSDB_GET_SET_SRC} passdb/passdb.c passdb/pdb_interface.c
505                 passdb/util_wellknown.c passdb/util_builtin.c passdb/pdb_compat.c
506                 passdb/util_unixsids.c passdb/lookup_sid.c
507                 passdb/login_cache.c ${PDB_STATIC}
508                 passdb/account_pol.c ${PRIVILEGES_SRC}
509                 lib/util_nscd.c lib/winbind_util.c ${SERVER_MUTEX_SRC}'''
510 #FIXME: lib/winbind_util.c probably is not part of PASSDB_SRC
511
512 CHARSET_STATIC = ''
513 CHARSET_WEIRD_SRC = 'modules/weird.c'
514 CHARSET_CP850_SRC = 'modules/CP850.c'
515 CHARSET_CP437_SRC = 'modules/CP437.c'
516 CHARSET_MACOSXFS_SRC = 'modules/charset_macosxfs.c'
517
518 GROUPDB_SRC = '''groupdb/mapping.c groupdb/mapping_tdb.c'''
519
520 PROFILE_SRC = '''profile/profile.c'''
521 PROFILES_SRC = '''utils/profiles.c
522                ${LIBSMB_ERR_SRC}
523                ${PARAM_SRC}
524                ${LIB_SRC} ${LIB_DUMMY_SRC}'''
525
526 OPLOCK_SRC = '''smbd/oplock.c smbd/oplock_irix.c smbd/oplock_linux.c
527              smbd/oplock_onefs.c'''
528
529 NOTIFY_SRC = '''smbd/notify.c smbd/notify_inotify.c smbd/notify_internal.c
530                 librpc/gen_ndr/ndr_notify.c'''
531
532 FNAME_UTIL_SRC = '''smbd/filename_util.c'''
533
534 VFS_STATIC = ''
535 VFS_DEFAULT_SRC = '''modules/vfs_default.c'''
536 VFS_AUDIT_SRC = '''modules/vfs_audit.c'''
537 VFS_EXTD_AUDIT_SRC = '''modules/vfs_extd_audit.c'''
538 VFS_FULL_AUDIT_SRC = '''modules/vfs_full_audit.c'''
539 VFS_FAKE_PERMS_SRC = '''modules/vfs_fake_perms.c'''
540 VFS_RECYCLE_SRC = '''modules/vfs_recycle.c'''
541 VFS_NETATALK_SRC = '''modules/vfs_netatalk.c'''
542 VFS_DEFAULT_QUOTA_SRC = '''modules/vfs_default_quota.c'''
543 VFS_READONLY_SRC = '''modules/vfs_readonly.c modules/getdate.c'''
544 VFS_CAP_SRC = '''modules/vfs_cap.c'''
545 VFS_EXPAND_MSDFS_SRC = '''modules/vfs_expand_msdfs.c'''
546 VFS_SHADOW_COPY_SRC = '''modules/vfs_shadow_copy.c'''
547 VFS_SHADOW_COPY2_SRC = '''modules/vfs_shadow_copy2.c'''
548 VFS_AFSACL_SRC = '''modules/vfs_afsacl.c'''
549 VFS_XATTR_TDB_SRC = '''modules/vfs_xattr_tdb.c'''
550 VFS_POSIXACL_SRC = '''modules/vfs_posixacl.c'''
551 VFS_AIXACL_SRC = '''modules/vfs_aixacl.c modules/vfs_aixacl_util.c'''
552 VFS_AIXACL2_SRC = '''modules/vfs_aixacl2.c modules/vfs_aixacl_util.c modules/nfs4_acls.c'''
553 VFS_SOLARISACL_SRC = '''modules/vfs_solarisacl.c'''
554 VFS_ZFSACL_SRC = '''modules/vfs_zfsacl.c modules/nfs4_acls.c'''
555 VFS_HPUXACL_SRC = '''modules/vfs_hpuxacl.c'''
556 VFS_IRIXACL_SRC = '''modules/vfs_irixacl.c'''
557 VFS_TRU64ACL_SRC = '''modules/vfs_tru64acl.c'''
558 VFS_CATIA_SRC = 'modules/vfs_catia.c'
559 VFS_STREAMS_XATTR_SRC = 'modules/vfs_streams_xattr.c'
560 VFS_STREAMS_DEPOT_SRC = 'modules/vfs_streams_depot.c'
561 VFS_CACHEPRIME_SRC = 'modules/vfs_cacheprime.c'
562 VFS_PREALLOC_SRC = 'modules/vfs_prealloc.c'
563 VFS_COMMIT_SRC = 'modules/vfs_commit.c'
564 VFS_GPFS_SRC = 'modules/vfs_gpfs.c modules/gpfs.c modules/nfs4_acls.c'
565 VFS_NOTIFY_FAM_SRC = 'modules/vfs_notify_fam.c'
566 VFS_READAHEAD_SRC = 'modules/vfs_readahead.c'
567 VFS_TSMSM_SRC = 'modules/vfs_tsmsm.c'
568 VFS_FILEID_SRC = 'modules/vfs_fileid.c'
569 VFS_AIO_FORK_SRC = 'modules/vfs_aio_fork.c'
570 VFS_PREOPEN_SRC = 'modules/vfs_preopen.c'
571 VFS_SYNCOPS_SRC = 'modules/vfs_syncops.c'
572 VFS_ACL_XATTR_SRC = 'modules/vfs_acl_xattr.c'
573 VFS_ACL_TDB_SRC = 'modules/vfs_acl_tdb.c'
574 VFS_SMB_TRAFFIC_ANALYZER_SRC = 'modules/vfs_smb_traffic_analyzer.c'
575 VFS_ONEFS_SRC = '''modules/vfs_onefs.c modules/onefs_acl.c modules/onefs_system.c
576                 modules/onefs_open.c modules/onefs_streams.c modules/onefs_dir.c
577                 modules/onefs_cbrl.c modules/onefs_notify.c modules/onefs_config.c'''
578 VFS_ONEFS_SHADOW_COPY_SRC = 'modules/vfs_onefs_shadow_copy.c modules/onefs_shadow_copy.c'
579 VFS_DIRSORT_SRC = 'modules/vfs_dirsort.c'
580 VFS_SCANNEDONLY_SRC = 'modules/vfs_scannedonly.c'
581 VFS_CROSSRENAME_SRC = 'modules/vfs_crossrename.c'
582
583 PLAINTEXT_AUTH_SRC = '''auth/pampass.c auth/pass_check.c'''
584
585 SLCACHE_SRC = '''libsmb/samlogon_cache.c'''
586
587 DCUTIL_SRC  = '''libsmb/namequery_dc.c libsmb/trustdom_cache.c libsmb/trusts_util.c libsmb/dsgetdcname.c'''
588
589 AUTH_BUILTIN_SRC = 'auth/auth_builtin.c'
590 AUTH_DOMAIN_SRC = 'auth/auth_domain.c'
591 AUTH_SAM_SRC = 'auth/auth_sam.c'
592 AUTH_SERVER_SRC = 'auth/auth_server.c'
593 AUTH_UNIX_SRC = 'auth/auth_unix.c'
594 AUTH_WINBIND_SRC = 'auth/auth_winbind.c'
595 AUTH_WBC_SRC = 'auth/auth_wbc.c'
596 AUTH_SCRIPT_SRC = 'auth/auth_script.c'
597 AUTH_NETLOGOND_SRC = 'auth/auth_netlogond.c'
598
599 AUTH_STATIC = ''
600 AUTH_SRC = '''${AUTH_STATIC} auth/auth.c auth/auth_util.c auth/token_util.c
601            auth/auth_compat.c auth/auth_ntlmssp.c auth/user_info.c auth/check_samsec.c
602            auth/user_util.c auth/user_krb5.c auth/server_info.c auth/server_info_sam.c
603            ${PLAINTEXT_AUTH_SRC} ${SLCACHE_SRC} ${DCUTIL_SRC}'''
604
605 #FIXME: set IDMAP_STATIC during configuration
606 IDMAP_STATIC=''
607 IDMAP_SRC = 'winbindd/idmap.c winbindd/idmap_util.c ${IDMAP_STATIC}'
608
609 #FIXME: set NSS_INFO_STATIC during configuration
610 NSS_INFO_STATIC = ''
611 NSS_INFO_TEMPLATE_SRC = 'winbindd/nss_info_template.c'
612 NSS_INFO_SRC = 'winbindd/nss_info.c ${NSS_INFO_STATIC}'
613
614 IDMAP_HASH_SRC = '''winbindd/idmap_hash/idmap_hash.c
615                     winbindd/idmap_hash/mapfile.c'''
616
617 IDMAP_ADEX_SRC = '''winbindd/idmap_adex/idmap_adex.c
618                     winbindd/idmap_adex/cell_util.c
619                     winbindd/idmap_adex/likewise_cell.c
620                     winbindd/idmap_adex/provider_unified.c
621                     winbindd/idmap_adex/gc_util.c
622                     winbindd/idmap_adex/domain_util.c'''
623
624 PERFCOUNT_STATIC = ''
625 PERFCOUNT_ONEFS_SRC = 'modules/perfcount_onefs.c'
626 PERFCOUNT_TEST_SRC = 'modules/perfcount_test.c'
627
628 WINBINDD_SRC1 = '''winbindd/winbindd.c
629                    winbindd/winbindd_group.c
630                    winbindd/winbindd_util.c
631                    winbindd/winbindd_cache.c
632                    winbindd/winbindd_pam.c
633                    winbindd/winbindd_misc.c
634                    winbindd/winbindd_cm.c
635                    winbindd/winbindd_wins.c
636                    winbindd/winbindd_msrpc.c
637                    winbindd/winbindd_rpc.c
638                    winbindd/winbindd_reconnect.c
639                    winbindd/winbindd_ads.c
640                    winbindd/winbindd_samr.c
641                    winbindd/winbindd_dual.c
642                    winbindd/winbindd_dual_ndr.c
643                    winbindd/winbindd_dual_srv.c
644                    librpc/gen_ndr/cli_wbint.c
645                    librpc/gen_ndr/srv_wbint.c
646                    librpc/gen_ndr/ndr_wbint.c
647                    librpc/gen_ndr/ndr_wbint_c.c
648                    winbindd/winbindd_async.c
649                    winbindd/winbindd_creds.c
650                    winbindd/winbindd_cred_cache.c
651                    winbindd/winbindd_ccache_access.c
652                    winbindd/winbindd_domain.c
653                    winbindd/winbindd_idmap.c
654                    winbindd/winbindd_locator.c
655                    winbindd/winbindd_ndr.c
656                    winbindd/wb_ping.c
657                    winbindd/wb_lookupsid.c
658                    winbindd/wb_lookupname.c
659                    winbindd/wb_sid2uid.c
660                    winbindd/wb_sid2gid.c
661                    winbindd/wb_uid2sid.c
662                    winbindd/wb_gid2sid.c
663                    winbindd/wb_queryuser.c
664                    winbindd/wb_lookupuseraliases.c
665                    winbindd/wb_lookupusergroups.c
666                    winbindd/wb_getpwsid.c
667                    winbindd/wb_gettoken.c
668                    winbindd/wb_seqnum.c
669                    winbindd/wb_seqnums.c
670                    winbindd/wb_group_members.c
671                    winbindd/wb_getgrsid.c
672                    winbindd/wb_query_user_list.c
673                    winbindd/wb_fill_pwent.c
674                    winbindd/wb_next_pwent.c
675                    winbindd/wb_next_grent.c
676                    winbindd/wb_dsgetdcname.c
677                    winbindd/winbindd_lookupsid.c
678                    winbindd/winbindd_lookupname.c
679                    winbindd/winbindd_sid_to_uid.c
680                    winbindd/winbindd_sid_to_gid.c
681                    winbindd/winbindd_uid_to_sid.c
682                    winbindd/winbindd_gid_to_sid.c
683                    winbindd/winbindd_allocate_uid.c
684                    winbindd/winbindd_allocate_gid.c
685                    winbindd/winbindd_getpwsid.c
686                    winbindd/winbindd_getpwnam.c
687                    winbindd/winbindd_getpwuid.c
688                    winbindd/winbindd_getsidaliases.c
689                    winbindd/winbindd_getuserdomgroups.c
690                    winbindd/winbindd_getgroups.c
691                    winbindd/winbindd_show_sequence.c
692                    winbindd/winbindd_getgrgid.c
693                    winbindd/winbindd_getgrnam.c
694                    winbindd/winbindd_getusersids.c
695                    winbindd/winbindd_lookuprids.c
696                    winbindd/winbindd_setpwent.c
697                    winbindd/winbindd_getpwent.c
698                    winbindd/winbindd_endpwent.c
699                    winbindd/winbindd_setgrent.c
700                    winbindd/winbindd_getgrent.c
701                    winbindd/winbindd_endgrent.c
702                    winbindd/winbindd_dsgetdcname.c
703                    winbindd/winbindd_getdcname.c
704                    winbindd/winbindd_list_users.c
705                    winbindd/winbindd_list_groups.c
706                    winbindd/winbindd_check_machine_acct.c
707                    winbindd/winbindd_change_machine_acct.c
708                    winbindd/winbindd_ping_dc.c
709                    winbindd/winbindd_pam_auth.c
710                    winbindd/winbindd_pam_logoff.c
711                    winbindd/winbindd_pam_chauthtok.c
712                    winbindd/winbindd_pam_auth_crap.c
713                    winbindd/winbindd_pam_chng_pswd_auth_crap.c
714                    auth/auth_util.c
715                    auth/token_util.c
716                    auth/user_util.c
717                    auth/check_samsec.c
718                    auth/server_info.c
719                    auth/server_info_sam.c
720                    auth/user_info.c
721                    auth/user_util.c
722                    rpc_server/srv_samr_chgpasswd.c
723                    ../nsswitch/libwbclient/wb_reqtrans.c'''
724
725 WINBINDD_SRC = '''${WINBINDD_SRC1}
726                   ${LIBMSRPC_SRC} ${LIBMSRPC_GEN_SRC}
727                   ${PROFILE_SRC} ${SLCACHE_SRC}
728                   ${LIBADS_SRC}
729                   ${DCUTIL_SRC} ${IDMAP_SRC} ${NSS_INFO_SRC}
730                   ${AFS_SRC} ${AFS_SETTOKEN_SRC}
731                   ${LIBADS_SERVER_SRC}
732                   ${RPC_NCACN_NP} ${NPA_TSTREAM_SRC} ${RPC_SAMR_SRC} ${RPC_LSARPC_SRC}
733                   ${TDB_VALIDATE_SRC}
734                   ${LIBCLI_DSSETUP_SRC}
735                   ${LIBCLI_LSA_SRC}
736                   ${LIBCLI_SAMR_SRC}
737                   ${LIBCLI_NETLOGON_SRC}
738                   rpc_client/init_netlogon.c'''
739
740 LIBNET_SRC = 'libnet/libnet_join.c libnet/libnet_keytab.c librpc/gen_ndr/ndr_libnet_join.c'
741
742 LIBSMBCONF_SRC = '''../lib/smbconf/smbconf.c ../lib/smbconf/smbconf_util.c
743                     ../lib/smbconf/smbconf_txt.c lib/smbconf/smbconf_reg.c
744                     lib/smbconf/smbconf_init.c'''
745
746 MANGLE_SRC = '''smbd/mangle.c smbd/mangle_hash.c smbd/mangle_hash2.c'''
747
748 SMBD_SRC_MAIN = '''smbd/server.c smbd/server_exit.c'''
749
750 BUILDOPT_SRC = '''smbd/build_options.c'''
751
752 SMBD_SRC_SRV = '''smbd/server_reload.c smbd/files.c smbd/connection.c
753                smbd/utmp.c smbd/session.c
754                smbd/dfree.c smbd/dir.c smbd/password.c smbd/conn.c
755                smbd/share_access.c smbd/fileio.c
756                smbd/ipc.c smbd/lanman.c smbd/negprot.c
757                smbd/message.c smbd/nttrans.c smbd/pipes.c
758                smbd/reply.c smbd/sesssetup.c smbd/trans2.c smbd/uid.c
759                smbd/dosmode.c smbd/filename.c smbd/open.c smbd/close.c
760                smbd/blocking.c smbd/sec_ctx.c smbd/srvstr.c
761                smbd/vfs.c smbd/perfcount.c smbd/statcache.c smbd/seal.c
762                smbd/posix_acls.c lib/sysacls.c
763                smbd/process.c smbd/service.c smbd/error.c
764                printing/printspoolss.c
765                lib/sysquotas.c lib/sysquotas_linux.c
766                lib/sysquotas_xfs.c lib/sysquotas_4A.c
767                smbd/fake_file.c
768                smbd/quotas.c smbd/ntquotas.c ${AFS_SRC} smbd/msdfs.c
769                ${AFS_SETTOKEN_SRC} smbd/aio.c smbd/statvfs.c
770                smbd/dmapi.c smbd/signing.c
771                smbd/file_access.c
772                smbd/dnsregister.c smbd/globals.c
773                smbd/smb2_server.c
774                smbd/smb2_signing.c
775                smbd/smb2_glue.c
776                smbd/smb2_negprot.c
777                smbd/smb2_sesssetup.c
778                smbd/smb2_tcon.c
779                smbd/smb2_create.c
780                smbd/smb2_close.c
781                smbd/smb2_flush.c
782                smbd/smb2_read.c
783                smbd/smb2_write.c
784                smbd/smb2_lock.c
785                smbd/smb2_ioctl.c
786                smbd/smb2_keepalive.c
787                smbd/smb2_find.c
788                smbd/smb2_notify.c
789                smbd/smb2_getinfo.c
790                smbd/smb2_setinfo.c
791                smbd/smb2_break.c
792                ../libcli/smb/smb2_create_blob.c
793                ${MANGLE_SRC} ${VFS_STATIC}'''
794
795 SMBD_SRC_BASE = '''${SMBD_SRC_SRV}
796                 ${RPC_SERVER_SRC}
797                 ${LOCKING_SRC} ${PRINTING_SRC}
798                 ${PROFILE_SRC} ${PRINTBACKEND_SRC}
799                 ${OPLOCK_SRC} ${NOTIFY_SRC} ${FNAME_UTIL_SRC}
800                 ${LIBMSRPC_SRC}
801                 ${LIBMSRPC_GEN_SRC} ${LIBADS_SRC}
802                 ${LIBADS_SERVER_SRC} ${LIBADS_PRINTER_SRC} ${REG_FULL_SRC}
803                 ${BUILDOPT_SRC}
804                 ${LIBNET_SRC} ${LIBSMBCONF_SRC}
805                 ${LIBCLI_SPOOLSS_SRC}
806                 ${LIBCLI_WINREG_SRC}
807                 ${LIBCLI_SRVSVC_SRC}
808                 ${LIBCLI_LSA_SRC}
809                 ${LIBCLI_SAMR_SRC}
810                 ${LIBCLI_NETLOGON_SRC}
811                 ${RPC_CLIENT_SCHANNEL_SRC}
812                 rpc_client/init_netlogon.c
813                 rpc_client/init_samr.c
814                 ${AUTH_SRC}
815                 ${PRIVILEGES_BASIC_SRC}
816                 ${REGFIO_SRC}
817                 ${REG_API_REGF_SRC}
818                 ${LIBNDR_XATTR_SRC}'''
819
820 PRINTING_SRC = '''printing/pcap.c printing/print_svid.c printing/print_aix.c
821                printing/print_cups.c printing/print_generic.c
822                printing/lpq_parse.c printing/load.c printing/print_standard.c
823                printing/print_iprint.c printing/printer_list.c'''
824
825 PRINTBASE_SRC = '''printing/notify.c printing/printing_db.c'''
826 PRINTBACKEND_SRC = '''printing/printing.c
827                       printing/nt_printing.c
828                       printing/nt_printing_tdb.c
829                       printing/nt_printing_migrate.c
830                       printing/nt_printing_ads.c
831                       ${LIBNDR_NTPRINTING_SRC}
832                       ${PRINTBASE_SRC}'''
833
834 SMBD_SRC = '''${SMBD_SRC_BASE} ${SMBD_SRC_MAIN}'''
835
836 NMBD_SRC1 = '''nmbd/asyncdns.c nmbd/nmbd.c nmbd/nmbd_become_dmb.c
837             nmbd/nmbd_become_lmb.c nmbd/nmbd_browserdb.c
838             nmbd/nmbd_browsesync.c nmbd/nmbd_elections.c
839             nmbd/nmbd_incomingdgrams.c nmbd/nmbd_incomingrequests.c
840             nmbd/nmbd_lmhosts.c nmbd/nmbd_logonnames.c nmbd/nmbd_mynames.c
841             nmbd/nmbd_namelistdb.c nmbd/nmbd_namequery.c
842             nmbd/nmbd_nameregister.c nmbd/nmbd_namerelease.c
843             nmbd/nmbd_nodestatus.c nmbd/nmbd_packets.c
844             nmbd/nmbd_processlogon.c nmbd/nmbd_responserecordsdb.c
845             nmbd/nmbd_sendannounce.c nmbd/nmbd_serverlistdb.c
846             nmbd/nmbd_subnetdb.c nmbd/nmbd_winsproxy.c nmbd/nmbd_winsserver.c
847             nmbd/nmbd_workgroupdb.c nmbd/nmbd_synclists.c'''
848
849 NMBD_SRC = '${NMBD_SRC1} ${PROFILE_SRC} ${LIBNDR_GEN_SRC0}'
850
851 SWAT_SRC1 = '''web/cgi.c web/diagnose.c web/startstop.c web/statuspage.c
852                web/swat.c web/neg_lang.c'''
853
854 SWAT_SRC = '''${SWAT_SRC1} ${PRINTING_SRC} ${PRINTBASE_SRC}
855            ${LOCKING_SRC}
856            ${PLAINTEXT_AUTH_SRC}
857            ${LIBMSRPC_GEN_SRC} ${LIBMSRPC_SRC}
858            ${PASSCHANGE_SRC} ${FNAME_UTIL_SRC}
859            ${LIBCLI_SAMR_SRC}
860            rpc_client/init_lsa.c'''
861
862 WBINFO_SRC = '../nsswitch/wbinfo.c ${AFS_SETTOKEN_SRC}'
863
864 TESTPARM_SRC = 'utils/testparm.c'
865
866 EVTLOGADM_SRC0 = 'utils/eventlogadm.c'
867
868 EVTLOGADM_SRC = '''${EVTLOGADM_SRC0}
869                 registry/reg_eventlog.c ${LIB_EVENTLOG_SRC}
870                 ../librpc/gen_ndr/ndr_eventlog.c
871                 ../librpc/gen_ndr/ndr_lsa.c'''
872
873 DISPLAY_SEC_SRC= '../libcli/security/display_sec.c'
874
875 CLIENT_SRC1 = '''client/client.c client/clitar.c
876                  client/dnsbrowse.c
877                  ${LIBMSRPC_SRC}'''
878
879 CLIENT_SRC = '''${CLIENT_SRC1} ${LIBMSRPC_GEN_SRC}
880                 ${READLINE_SRC} ${DISPLAY_SEC_SRC}
881                 ${LIBCLI_SRVSVC_SRC}
882                 rpc_client/init_lsa.c'''
883
884 RPCCLIENT_SRC1 = '''rpcclient/rpcclient.c rpcclient/cmd_lsarpc.c
885                     rpcclient/cmd_samr.c rpcclient/cmd_spoolss.c
886                     rpcclient/cmd_netlogon.c rpcclient/cmd_srvsvc.c
887                     rpcclient/cmd_dfs.c rpcclient/cmd_epmapper.c
888                     rpcclient/cmd_dssetup.c rpcclient/cmd_echo.c
889                     rpcclient/cmd_shutdown.c rpcclient/cmd_test.c
890                     rpcclient/cmd_wkssvc.c rpcclient/cmd_ntsvcs.c
891                     rpcclient/cmd_drsuapi.c rpcclient/cmd_eventlog.c
892                     rpcclient/cmd_winreg.c
893                     ${DISPLAY_SEC_SRC}'''
894
895 RPCCLIENT_SRC = '''${RPCCLIENT_SRC1}
896                    ${LIBMSRPC_GEN_SRC}
897                    ${LIBMSRPC_SRC}
898                    ${READLINE_SRC}
899                    ${LIBADS_SRC}
900                    ${DCUTIL_SRC}
901                    ${LIBCLI_SPOOLSS_SRC}
902                    ${LIBCLI_EVENTLOG_SRC}
903                    ${LIBCLI_NTSVCS_SRC}
904                    ${LIBCLI_DRSUAPI_SRC}
905                    ${LIBCLI_DFS_SRC}
906                    ${LIBCLI_ECHO_SRC}
907                    ${LIBCLI_DSSETUP_SRC}
908                    ${LIBCLI_WKSSVC_SRC}
909                    ${LIBCLI_SRVSVC_SRC}
910                    ${LIBCLI_LSA_SRC}
911                    ${LIBCLI_SAMR_SRC}
912                    ${LIBCLI_WINREG_SRC}
913                    ${LIBCLI_NETLOGON_SRC}
914                    ${RPC_CLIENT_SCHANNEL_SRC}
915                    rpc_client/init_netlogon.c
916                    rpc_client/init_samr.c'''
917
918 LIBNET_DSSYNC_SRC = '''libnet/libnet_dssync.c
919                        libnet/libnet_dssync_keytab.c
920                        ../libcli/drsuapi/repl_decrypt.c'''
921
922 LIBNET_SAMSYNC_SRC = '''libnet/libnet_samsync.c
923                         libnet/libnet_samsync_ldif.c
924                         libnet/libnet_samsync_passdb.c
925                         libnet/libnet_samsync_display.c
926                         libnet/libnet_samsync_keytab.c
927                         ../libcli/samsync/decrypt.c'''
928
929 PASSWD_UTIL_SRC = 'utils/passwd_util.c'
930
931 NET_SRC1 = '''utils/net.c utils/net_ads.c utils/net_help.c
932               utils/net_rap.c utils/net_rpc.c utils/net_rpc_samsync.c
933               utils/net_rpc_join.c utils/net_time.c utils/net_lookup.c
934               utils/net_cache.c utils/net_groupmap.c utils/net_idmap.c
935               utils/net_status.c utils/net_rpc_printer.c utils/net_rpc_rights.c
936               utils/net_rpc_service.c utils/net_rpc_registry.c utils/net_usershare.c
937               utils/netlookup.c utils/net_sam.c utils/net_rpc_shell.c
938               utils/net_util.c utils/net_rpc_sh_acct.c utils/net_rpc_audit.c
939               ${PASSWD_UTIL_SRC} utils/net_dns.c utils/net_ads_gpo.c
940               utils/net_conf.c utils/net_join.c utils/net_user.c
941               utils/net_group.c utils/net_file.c utils/net_registry.c
942               auth/token_util.c utils/net_dom.c utils/net_share.c
943               utils/net_g_lock.c
944               utils/net_serverid.c
945               utils/net_eventlog.c
946               utils/net_printing.c
947               ${LIBNDR_NTPRINTING_SRC}
948               ${LIBNDR_PREG_SRC}
949               ${LIBCLI_SPOOLSS_SRC}
950               ${LIBCLI_WINREG_SRC}
951               ${LIBCLI_DRSUAPI_SRC}
952               ${LIBCLI_INITSHUTDOWN_SRC}
953               ${LIBCLI_DSSETUP_SRC}
954               ${LIBCLI_SVCCTL_SRC}
955               ${LIBCLI_WKSSVC_SRC}
956               ${LIBCLI_SRVSVC_SRC}
957               ${LIBCLI_LSA_SRC}
958               ${LIBCLI_SAMR_SRC}
959               ${LIBCLI_NETLOGON_SRC}
960               ${RPC_CLIENT_SCHANNEL_SRC}
961               rpc_client/init_netlogon.c
962               rpc_client/init_samr.c'''
963
964
965 NET_SRC2 = 'utils/net_registry_util.c utils/net_help_common.c'
966
967 NET_SRC = '''${NET_SRC1}
968              ${NET_SRC2}
969              ${LIBADDNS_SRC0}
970              ${LIBMSRPC_SRC} ${LIBMSRPC_GEN_SRC}
971              ${LIBADS_SRC} ${LIBADS_SERVER_SRC} ${LIBADS_PRINTER_SRC}
972              ${DCUTIL_SRC}
973              ${AFS_SRC} ${AFS_SETTOKEN_SRC} ${READLINE_SRC}
974              ${LIBGPO_SRC} ${DISPLAY_SEC_SRC}
975              ${LIBNET_SRC} ${LIBNET_DSSYNC_SRC} ${LIBNET_SAMSYNC_SRC}
976              ${LIB_EVENTLOG_SRC} ${REGFIO_SRC}'''
977
978 LIBS='ICONV'
979
980 bld.SAMBA_GENERATOR('build_options',
981                     source='include/config.h script/mkbuildoptions.awk',
982                     target='smbd/build_options.c',
983                     rule='${AWK} -f ${SRC[1].abspath(env)} > ${TGT} < ${SRC[0].abspath(env)}')
984
985 t = bld.SAMBA_GENERATOR('build_env.h',
986                         source='script/build_env.sh',
987                         target='include/build_env.h',
988                         rule='${SRC} ${SRCDIR} ${BUILDDIR} ${CC} > ${TGT}')
989 # todo: work out what is really wanted here
990 t.env.SRCDIR = bld.path.abspath()
991 t.env.BUILDDIR = bld.path.abspath()
992
993
994 bld.SETUP_BUILD_GROUPS()
995
996 bld.RECURSE('../lib/replace')
997 print "SBINDIR=%s" % bld.env.SBINDIR
998 bld.RECURSE('build')
999
1000 bld.RECURSE('../librpc/idl')
1001 bld.RECURSE('librpc/idl')
1002
1003 bld.SAMBA_MKVERSION('include/version.h')
1004
1005 for prefix in bld.env.MODULE_PREFIXES:
1006     static_key = "%s_STATIC" % prefix.upper()
1007     shared_key = "%s_SHARED" % prefix.upper()
1008
1009     # Set up the static modules
1010     static_src = locals()[static_key]
1011     for module in bld.env[static_key]:
1012         static_src += "${%s_SRC} " % module
1013     # for some reason static_src doesn't seem to be a reference, so save it
1014     # back to the locals
1015     locals()[static_key] = static_src
1016
1017     # Set up subsystems for the shared modules
1018     for module in bld.env[shared_key]:
1019         bld.SAMBA_SUBSYSTEM(module,
1020                             source="${%s_SRC}" % module,
1021                             vars=locals())
1022
1023 ######################## SUBSYSTEMS #################################
1024
1025 bld.SAMBA_SUBSYSTEM('WBCOMMON',
1026                     source=WBCOMMON_SRC)
1027
1028 bld.SAMBA_LIBRARY('libwbclient',
1029                     source='''../nsswitch/libwbclient/wbc_guid.c
1030                               ../nsswitch/libwbclient/wbc_idmap.c
1031                               ../nsswitch/libwbclient/wbclient.c
1032                               ../nsswitch/libwbclient/wbc_pam.c
1033                               ../nsswitch/libwbclient/wbc_pwd.c
1034                               ../nsswitch/libwbclient/wbc_sid.c
1035                               ../nsswitch/libwbclient/wbc_util.c''',
1036                     public_deps='talloc WBCOMMON')
1037
1038 bld.SAMBA_LIBRARY('libnetapi',
1039                     source='''lib/netapi/netapi.c
1040                               lib/netapi/cm.c
1041                               librpc/gen_ndr/ndr_libnetapi.c
1042                               lib/netapi/libnetapi.c
1043                               lib/netapi/joindomain.c
1044                               lib/netapi/serverinfo.c
1045                               lib/netapi/getdc.c
1046                               lib/netapi/user.c
1047                               lib/netapi/group.c
1048                               lib/netapi/localgroup.c
1049                               lib/netapi/samr.c
1050                               lib/netapi/sid.c
1051                               lib/netapi/share.c
1052                               lib/netapi/file.c
1053                               lib/netapi/shutdown.c
1054                               lib/netapi/netlogon.c''',
1055                     public_deps='''talloc tdb''')
1056
1057 bld.SAMBA_SUBSYSTEM('ASN1_UTIL',
1058                     source='../lib/util/asn1.c',
1059                     deps='talloc',
1060                     local_include=False)
1061
1062 bld.SAMBA_SUBSYSTEM('AVAHI',
1063                     source=AVAHI_SRC,
1064                     deps='avahi-common avahi-client',
1065                     enabled=bld.env.with_avahi)
1066
1067 bld.SAMBA_SUBSYSTEM('GROUPDB',
1068                     source=GROUPDB_SRC)
1069
1070 bld.SAMBA_SUBSYSTEM('TLDAP',
1071                     source=TLDAP_SRC,
1072                     deps='ASN1_UTIL LIBTSOCKET')
1073
1074 bld.SAMBA_SUBSYSTEM('PASSDB',
1075                     source=PASSDB_SRC,
1076                     deps='GROUPDB TLDAP SECRETS',
1077                     vars=locals())
1078
1079 bld.SAMBA_SUBSYSTEM('PARAM_WITHOUT_REG',
1080                     source=PARAM_WITHOUT_REG_SRC)
1081
1082 bld.SAMBA_SUBSYSTEM('PARAM',
1083                     source=PARAM_SRC,
1084                     deps='PARAM_WITHOUT_REG',
1085                     vars=locals())
1086
1087 bld.SAMBA_SUBSYSTEM('POPT_SAMBA',
1088                     source=POPT_LIB_SRC,
1089                     vars=locals())
1090
1091 bld.SAMBA_SUBSYSTEM('KRBCLIENT',
1092                     source=KRBCLIENT_SRC,
1093                     deps='krb5 k5crypto com_err gssapi gssapi_krb5',
1094                     vars=locals())
1095
1096 bld.SAMBA_SUBSYSTEM('LIBS',
1097                     source=LIB_SRC,
1098                     deps='NSS_WRAPPER iconv',
1099                     vars=locals())
1100
1101 bld.SAMBA_SUBSYSTEM('LIB_NONSMBD',
1102                     source=LIB_NONSMBD_SRC,
1103                     deps='LIBS',
1104                     vars=locals())
1105
1106 bld.SAMBA_SUBSYSTEM('LIBSMB_ERR',
1107                     source=LIBSMB_ERR_SRC,
1108                     deps='SECRETS SMBLDAP',
1109                     vars=locals())
1110
1111 bld.SAMBA_SUBSYSTEM('LIBSAMBA',
1112                     source=LIBSAMBA_SRC,
1113                     deps='LIBSMB_ERR',
1114                     vars=locals())
1115
1116 bld.SAMBA_SUBSYSTEM('LIBSMB',
1117                     source=LIBSMB_SRC,
1118                     deps='LIBSAMBA ZLIB',
1119                     vars=locals())
1120
1121 bld.SAMBA_SUBSYSTEM('SECRETS',
1122                     source=SECRETS_SRC,
1123                     vars=locals())
1124
1125 bld.SAMBA_SUBSYSTEM('SMBLDAP',
1126                     source=SMBLDAP_SRC,
1127                     deps='ldap lber',
1128                     vars=locals())
1129
1130 ########################## BINARIES #################################
1131
1132 bld.SAMBA_BINARY('smbd/smbd',
1133                  source=SMBD_SRC,
1134                  deps='''tdb DYNCONFIG tevent dl krb5 ldap gssapi gssapi_krb5
1135                  NSS_WRAPPER libwbclient crypt nsl cups cap resolv ZLIB PASSDB
1136                  PARAM_WITHOUT_REG LIBS LIBSMB POPT_SAMBA KRBCLIENT AVAHI''',
1137                  install_path='${SBINDIR}',
1138                  vars=locals())
1139
1140 bld.SAMBA_BINARY('nmbd/nmbd',
1141                  source=NMBD_SRC,
1142                  deps='''talloc tdb tevent ZLIB cap resolv libwbclient dl
1143                  NSS_WRAPPER DYNCONFIG PASSDB PARAM ldap LIB_NONSMBD LIBSMB
1144                  POPT_SAMBA KRBCLIENT''',
1145                  install_path='${SBINDIR}',
1146                  vars=locals())
1147
1148 bld.SAMBA_BINARY('winbindd/winbindd',
1149                  source=WINBINDD_SRC,
1150                  deps='''talloc tdb tevent cap dl DYNCONFIG ZLIB NSS_WRAPPER
1151                  libwbclient PASSDB ldap resolv PARAM LIB_NONSMBD LIBSMB
1152                  POPT_SAMBA KRBCLIENT''',
1153                  enabled=bld.env.build_winbind,
1154                  install_path='${SBINDIR}',
1155                  vars=locals())
1156
1157 bld.SAMBA_BINARY('web/swat',
1158                  source=SWAT_SRC,
1159                  deps='''talloc tevent cap DYNCONFIG LIBS LIBSMB libwbclient PARAM
1160                  LIB_NONSMBD resolv PASSDB POPT_SAMBA KRBCLIENT cups''',
1161                  enabled=bld.env.build_swat,
1162                  install_path='${SBINDIR}',
1163                  vars=locals())
1164
1165 bld.SAMBA_BINARY('smbclient',
1166                  source=CLIENT_SRC,
1167                  deps='''talloc tdb cap resolv POPT_SAMBA PASSDB LIBSMB LIB_NONSMBD
1168                  PARAM_WITHOUT_REG libwbclient DYNCONFIG PARAM KRBCLIENT''',
1169                  vars=locals())
1170
1171 bld.SAMBA_BINARY('rpcclient/rpcclient',
1172                  source=RPCCLIENT_SRC,
1173                  deps='''talloc tdb cap resolv POPT_SAMBA PASSDB LIBSMB LIB_NONSMBD
1174                  PARAM_WITHOUT_REG libwbclient DYNCONFIG PARAM KRBCLIENT''',
1175                  vars=locals())
1176
1177 bld.SAMBA_BINARY('wbinfo',
1178                  source=WBINFO_SRC,
1179                  deps='''talloc libwbclient DYNCONFIG tevent cap
1180                  NSS_WRAPPER ASN1_UTIL LIBTSOCKET PASSDB ldap PARAM LIB_NONSMBD
1181                  LIBSAMBA POPT_SAMBA''',
1182                  vars=locals())
1183
1184 bld.SAMBA_BINARY('testparm',
1185                  source=TESTPARM_SRC,
1186                  deps='''talloc tevent DYNCONFIG ldap cap NSS_WRAPPER
1187                  libwbclient ASN1_UTIL LIBTSOCKET PASSDB PARAM LIB_NONSMBD
1188                  LIBSMB_ERR POPT_SAMBA''',
1189                  vars=locals())
1190
1191 bld.SAMBA_BINARY('eventlogadm',
1192                  source=EVTLOGADM_SRC,
1193                  deps='''talloc tevent cap POPT_SAMBA DYNCONFIG LIBS PARAM
1194                  LIB_NONSMBD LIBSMB_ERR PASSDB libwbclient''',
1195                  vars=locals())
1196
1197 bld.SAMBA_BINARY('net',
1198                  source=NET_SRC,
1199                  deps='''talloc tdb libnetapi cap resolv POPT_SAMBA PASSDB LIBSMB LIB_NONSMBD
1200                  PARAM_WITHOUT_REG libwbclient DYNCONFIG PARAM KRBCLIENT
1201                  LOCALE_DIR''',
1202                  vars=locals())
1203
1204 swat_files=recursive_dirlist('../swat', '../swat', '*')
1205 bld.INSTALL_FILES('${SWATDIR}', swat_files, base_name='../swat')
1206
1207 ########################## INCLUDES #################################
1208
1209 bld.RECURSE('../lib/socket_wrapper')
1210 bld.RECURSE('../lib/talloc')
1211 bld.RECURSE('../lib/tdb')
1212 bld.RECURSE('../lib/nss_wrapper')
1213 bld.RECURSE('../lib/tevent')
1214 bld.RECURSE('../lib/popt')
1215 bld.RECURSE('../lib/zlib')
1216 bld.RECURSE('../lib/tsocket')
1217
1218 bld.ENFORCE_GROUP_ORDERING()
1219 bld.CHECK_PROJECT_RULES()