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