librpc: make NDR_KRB5PAC a shared library (libndr-krb5pac.so).
[samba.git] / source3 / wscript_build
1 #!/usr/bin/env python
2
3 from samba_utils import *
4 import samba_version
5
6 TDB_LIB_SRC = '''
7           lib/dbwrap.c lib/dbwrap_tdb.c
8           lib/dbwrap_ctdb.c
9           lib/g_lock.c
10           lib/dbwrap_rbt.c'''
11
12 TDB_VALIDATE_SRC = '''lib/tdb_validate.c'''
13
14 SMBLDAP_SRC = '''lib/smbldap.c lib/smbldap_util.c'''
15
16 VERSION_SRC = '''lib/version.c'''
17
18 WBCOMMON_SRC = '../nsswitch/wb_common.c'
19
20 AFS_SRC = 'lib/afs.c'
21
22 AFS_SETTOKEN_SRC = 'lib/afs_settoken.c'
23
24 AVAHI_SRC = 'lib/avahi.c smbd/avahi_register.c'
25
26 SERVER_MUTEX_SRC = 'lib/server_mutex.c'
27
28 PASSCHANGE_SRC = '''libsmb/passchange.c'''
29
30 COMPRESSION_SRC = '../lib/compression/mszip.c'
31
32 DRSUAPI_SRC = '''${COMPRESSION_SRC}'''
33
34 LIBNDR_SRC = '''librpc/ndr/util.c'''
35
36 LIBCLI_SPOOLSS_SRC = '''rpc_client/cli_spoolss.c
37                      rpc_client/init_spoolss.c'''
38
39 LIBCLI_LSA_SRC = '''rpc_client/cli_lsarpc.c'''
40
41 LIBCLI_SAMR_SRC = 'rpc_client/cli_samr.c'
42
43 LIBRPCCLI_NETLOGON_SRC = 'rpc_client/cli_netlogon.c rpc_client/util_netlogon.c'
44
45 LIBCLI_WINREG_SRC = '''rpc_client/cli_winreg.c
46                        rpc_client/cli_winreg_int.c'''
47
48 # this includes only the low level parse code, not stuff
49 # that requires knowledge of security contexts
50 REG_PARSE_PRS_SRC = '''registry/reg_parse_prs.c'''
51
52 LIBREPLACE_SRC = '''${LIBREPLACE_SRCS}'''
53
54 LIBSAMBAUTIL_SRC = '''${LIBREPLACE_SRC}'''
55
56 UTIL_SRC = '''
57         ../lib/util/become_daemon.c
58         ../lib/util/blocking.c
59         ../lib/util/data_blob.c
60         ../lib/util/fsusage.c
61         ../lib/util/genrand.c
62         ../lib/util/params.c
63         ../lib/util/rbtree.c
64         ../lib/util/rfc1738.c
65         ../lib/util/select.c
66         ../lib/util/signal.c
67         ../lib/util/smb_threads.c
68         ../lib/util/system.c
69         ../lib/util/talloc_stack.c
70         ../lib/util/time.c
71         ../lib/util/util.c
72         ../lib/util/util_file.c
73         ../lib/util/util_id.c
74         ../lib/util/util_net.c
75         ../lib/util/util_strlist.c
76         ../lib/util/xfile.c
77         '''
78
79 LIBTEVENT_SRC0 = ''
80
81 PTHREADPOOL_SRC = ''
82
83 LIBREPLACE_SRCS = ''
84
85 LIB_SRC = '''${LIBSAMBAUTIL_SRC}
86           lib/messages.c lib/messages_local.c
87           lib/messages_ctdbd.c lib/packet.c lib/ctdbd_conn.c
88           lib/interfaces.c lib/memcache.c
89           lib/talloc_dict.c
90           lib/util_sconn.c
91           lib/serverid.c
92           lib/util_transfer_file.c
93           lib/addrchange.c
94           ${TDB_LIB_SRC}
95           lib/debug.c lib/fault.c
96           lib/interface.c lib/pidfile.c
97           lib/system.c lib/sendfile.c lib/recvfile.c lib/time.c
98           lib/username.c
99           ../libds/common/flag_mapping.c
100           lib/access.c lib/smbrun.c
101           lib/bitmap.c lib/dprintf.c ${UTIL_REG_SRC}
102           lib/wins_srv.c
103           lib/clobber.c lib/util_sid.c
104           lib/util_file.c
105           lib/util.c lib/util_names.c
106           lib/util_sock.c lib/sock_exec.c lib/util_sec.c
107           lib/substitute.c lib/dbwrap_util.c
108           lib/ms_fnmatch.c
109           lib/tallocmsg.c lib/dmallocmsg.c
110           libsmb/clisigning.c libsmb/smb_signing.c
111           intl/lang_tdb.c
112           lib/conn_tdb.c lib/adt_tree.c lib/gencache.c
113           lib/sessionid_tdb.c
114           lib/module.c lib/events.c ${LIBTEVENT_SRC0}
115           lib/server_contexts.c
116           lib/ldap_escape.c
117           lib/secdesc.c ${PTHREADPOOL_SRC}
118           lib/fncall.c
119           libads/krb5_errs.c lib/system_smbd.c lib/audit.c
120           lib/file_id.c lib/idmap_cache.c'''
121
122 LIB_DUMMY_SRC = '''lib/dummysmbd.c lib/dummyroot.c'''
123 LIB_NONSMBD_SRC = '''${LIB_DUMMY_SRC}'''
124
125 POPT_LIB_SRC = '''lib/popt_common.c'''
126
127 PARAM_UTIL_SRC = '''param/util.c'''
128
129 PARAM_WITHOUT_REG_SRC = '''param/loadparm.c param/loadparm_server_role.c
130                            lib/sharesec.c lib/ldap_debug_handler.c'''
131
132 KRBCLIENT_SRC = '''libads/kerberos.c libads/ads_status.c'''
133
134 LIBGPO_SRC0 = '''../libgpo/gpo_ldap.c ../libgpo/gpo_ini.c ../libgpo/gpo_util.c
135               ../libgpo/gpo_fetch.c libgpo/gpo_filesync.c ../libgpo/gpo_sec.c
136               libgpo/gpo_reg.c'''
137 LIBGPO_SRC = '''${LIBGPO_SRC0}'''
138
139 LIBADS_SRC = '''libads/ldap.c
140              libads/sasl.c libads/sasl_wrapping.c
141              libads/krb5_setpw.c
142              libads/kerberos_util.c
143              libads/ldap_user.c
144              libads/ads_struct.c libads/kerberos_keytab.c
145              libads/disp_sec.c libads/ldap_utils.c
146              libads/ldap_schema.c libads/util.c libads/ndr.c'''
147
148 LIBADS_SERVER_SRC = '''libads/kerberos_verify.c libads/authdata.c'''
149
150 LIBADS_PRINTER_SRC = '''libads/ldap_printer.c'''
151
152 SECRETS_SRC = '''passdb/secrets.c passdb/machine_account_secrets.c
153                  passdb/machine_sid.c'''
154
155 LIBNMB_SRC = '''libsmb/unexpected.c libsmb/namecache.c libsmb/nmblib.c
156              libsmb/namequery.c ../libcli/nbt/lmhosts.c libsmb/conncache.c
157              libads/dns.c libads/sitename_cache.c'''
158
159 DCE_RPC_ERR_SRC = '../librpc/rpc/dcerpc_error.c'
160
161 LIBSMB_ERR_SRC = '''${DCE_RPC_ERR_SRC}'''
162
163 LIBSMB_SRC0 = '''
164                libsmb/ntlmssp.c
165                libsmb/ntlmssp_wrap.c
166                ../libcli/auth/ntlmssp.c
167                ../libcli/auth/ntlmssp_sign.c
168                ../libcli/auth/ntlmssp_ndr.c
169                ../libcli/auth/ntlmssp_server.c'''
170
171 LIBSAMBA_SRC = '${LIBSMB_SRC0}'
172
173 CLDAP_SRC = '''libads/cldap.c
174         ../libcli/cldap/cldap.c
175         ../lib/util/idtree.c'''
176
177 TLDAP_SRC = '''lib/tldap.c lib/tldap_util.c lib/util_tsock.c'''
178
179 SCHANNEL_SRC = '''../libcli/auth/schannel_sign.c'''
180
181 LIBSMB_SRC = '''libsmb/clientgen.c libsmb/cliconnect.c libsmb/clifile.c
182              libsmb/clikrb5.c libsmb/clispnego.c
183              libsmb/clirap.c libsmb/clierror.c libsmb/climessage.c
184              libsmb/clireadwrite.c libsmb/clilist.c libsmb/cliprint.c
185              libsmb/clitrans.c libsmb/clisecdesc.c libsmb/clidgram.c
186              libsmb/clistr.c libsmb/cliquota.c libsmb/clifsinfo.c libsmb/clidfs.c
187              libsmb/clioplock.c libsmb/clirap2.c
188              libsmb/smb_seal.c libsmb/async_smb.c
189              libsmb/cli_np_tstream.c
190              libsmb/smbsock_connect.c'''
191
192 LIBMSRPC_SRC = '''
193                ${SCHANNEL_SRC}
194                rpc_client/cli_pipe.c
195                librpc/crypto/gse_krb5.c
196                librpc/crypto/gse.c
197                librpc/crypto/cli_spnego.c
198                librpc/rpc/rpc_common.c
199                rpc_client/rpc_transport_np.c
200                rpc_client/rpc_transport_sock.c
201                rpc_client/rpc_transport_tstream.c
202                ../librpc/rpc/binding.c
203                ../librpc/rpc/dcerpc_util.c
204                librpc/rpc/dcerpc_helpers.c
205                ../librpc/rpc/binding_handle.c'''
206
207 #
208 # registry-related objects
209 #
210 UTIL_REG_SRC = '''../libcli/registry/util_reg.c'''
211
212 REG_INIT_BASIC_SRC = '''registry/reg_init_basic.c'''
213 REG_INIT_SMBCONF_SRC = '''registry/reg_init_smbconf.c'''
214 REG_INIT_FULL_SRC = '''registry/reg_init_full.c'''
215
216 REGFIO_SRC = '''registry/regfio.c ${REG_PARSE_PRS_SRC}'''
217
218 REG_API_REGF_SRC = '''registry/reg_api_regf.c'''
219
220 REGSRCS_SRC = '''registry/reg_objects.c'''
221
222 REG_BACKENDS_BASE_SRC = '''registry/reg_backend_db.c'''
223
224 REG_BACKENDS_SMBCONF_SRC = '''registry/reg_backend_smbconf.c'''
225
226 REG_BACKENDS_EXTRA_SRC = '''registry/reg_backend_printing.c
227                          registry/reg_backend_shares.c
228                          registry/reg_backend_netlogon_params.c
229                          registry/reg_backend_prod_options.c
230                          registry/reg_backend_tcpip_params.c
231                          registry/reg_backend_hkpt_params.c
232                          registry/reg_backend_current_version.c
233                          registry/reg_backend_perflib.c'''
234
235 REG_BASE_SRC = '''registry/reg_api.c
236                registry/reg_dispatcher.c
237                registry/reg_cachehook.c
238                ${REGSRCS_SRC}
239                registry/reg_util_internal.c
240                lib/util_nttoken.c
241                ${REG_BACKENDS_BASE_SRC}
242                ${REG_INIT_BASIC_SRC}'''
243
244 REG_SMBCONF_SRC = '''
245                   ${REG_BACKENDS_SMBCONF_SRC}
246                   ${REG_INIT_SMBCONF_SRC}
247                   registry/reg_util_token.c
248                   registry/reg_api_util.c'''
249
250 REG_FULL_SRC = '''
251                ${REG_BACKENDS_EXTRA_SRC}
252                ${REG_INIT_FULL_SRC}
253                registry/reg_perfcount.c'''
254
255 SERVICES_SRC = '''services/svc_spoolss.c
256                   services/svc_rcinit.c
257                   services/svc_winreg_glue.c
258                   services/svc_netlogon.c
259                   services/svc_winreg.c
260                   services/svc_wins.c'''
261
262 LIB_EVENTLOG_SRC = '''lib/eventlog/eventlog.c'''
263
264 RPC_CLIENT_SCHANNEL_SRC = '''rpc_client/cli_pipe_schannel.c'''
265
266 LOCKING_SRC = '''locking/locking.c locking/brlock.c locking/posix.c'''
267
268 PRIVILEGES_SRC = '''lib/privileges.c'''
269
270 PASSDB_GET_SET_SRC = '''passdb/pdb_get_set.c'''
271
272 PASSDB_SRC = '''${PASSDB_GET_SET_SRC} passdb/passdb.c
273                 passdb/util_wellknown.c passdb/util_builtin.c passdb/pdb_compat.c
274                 passdb/util_unixsids.c passdb/lookup_sid.c
275                 passdb/login_cache.c
276                 passdb/account_pol.c ${PRIVILEGES_SRC}
277                 lib/util_nscd.c lib/winbind_util.c ${SERVER_MUTEX_SRC}'''
278 #FIXME: lib/winbind_util.c probably is not part of PASSDB_SRC
279
280 GROUPDB_SRC = '''groupdb/mapping.c groupdb/mapping_tdb.c'''
281
282 PROFILE_SRC = '''profile/profile.c'''
283 PROFILES_SRC = '''utils/profiles.c'''
284
285 OPLOCK_SRC = '''smbd/oplock.c smbd/oplock_irix.c smbd/oplock_linux.c
286              smbd/oplock_onefs.c'''
287
288 NOTIFY_SRC = '''smbd/notify.c smbd/notify_inotify.c smbd/notify_internal.c'''
289
290 FNAME_UTIL_SRC = '''smbd/filename_util.c'''
291
292
293 PLAINTEXT_AUTH_SRC = '''auth/pampass.c auth/pass_check.c'''
294
295 SLCACHE_SRC = '''libsmb/samlogon_cache.c'''
296
297 DCUTIL_SRC  = '''libsmb/namequery_dc.c libsmb/trustdom_cache.c libsmb/trusts_util.c libsmb/dsgetdcname.c'''
298
299 WINBINDD_SRC1 = '''winbindd/winbindd.c
300                    winbindd/winbindd_group.c
301                    winbindd/winbindd_util.c
302                    winbindd/winbindd_cache.c
303                    winbindd/winbindd_pam.c
304                    winbindd/winbindd_misc.c
305                    winbindd/winbindd_cm.c
306                    winbindd/winbindd_wins.c
307                    winbindd/winbindd_msrpc.c
308                    winbindd/winbindd_rpc.c
309                    winbindd/winbindd_reconnect.c
310                    winbindd/winbindd_ads.c
311                    winbindd/winbindd_samr.c
312                    winbindd/winbindd_dual.c
313                    winbindd/winbindd_dual_ndr.c
314                    winbindd/winbindd_dual_srv.c
315                    winbindd/winbindd_async.c
316                    winbindd/winbindd_creds.c
317                    winbindd/winbindd_cred_cache.c
318                    winbindd/winbindd_ccache_access.c
319                    winbindd/winbindd_domain.c
320                    winbindd/winbindd_idmap.c
321                    winbindd/winbindd_locator.c
322                    winbindd/winbindd_ndr.c
323                    winbindd/wb_ping.c
324                    winbindd/wb_lookupsid.c
325                    winbindd/wb_lookupname.c
326                    winbindd/wb_sid2uid.c
327                    winbindd/wb_sid2gid.c
328                    winbindd/wb_uid2sid.c
329                    winbindd/wb_gid2sid.c
330                    winbindd/wb_queryuser.c
331                    winbindd/wb_lookupuseraliases.c
332                    winbindd/wb_lookupusergroups.c
333                    winbindd/wb_getpwsid.c
334                    winbindd/wb_gettoken.c
335                    winbindd/wb_seqnum.c
336                    winbindd/wb_seqnums.c
337                    winbindd/wb_group_members.c
338                    winbindd/wb_getgrsid.c
339                    winbindd/wb_query_user_list.c
340                    winbindd/wb_fill_pwent.c
341                    winbindd/wb_next_pwent.c
342                    winbindd/wb_next_grent.c
343                    winbindd/wb_dsgetdcname.c
344                    winbindd/winbindd_lookupsid.c
345                    winbindd/winbindd_lookupname.c
346                    winbindd/winbindd_sid_to_uid.c
347                    winbindd/winbindd_sid_to_gid.c
348                    winbindd/winbindd_uid_to_sid.c
349                    winbindd/winbindd_gid_to_sid.c
350                    winbindd/winbindd_allocate_uid.c
351                    winbindd/winbindd_allocate_gid.c
352                    winbindd/winbindd_getpwsid.c
353                    winbindd/winbindd_getpwnam.c
354                    winbindd/winbindd_getpwuid.c
355                    winbindd/winbindd_getsidaliases.c
356                    winbindd/winbindd_getuserdomgroups.c
357                    winbindd/winbindd_getgroups.c
358                    winbindd/winbindd_show_sequence.c
359                    winbindd/winbindd_getgrgid.c
360                    winbindd/winbindd_getgrnam.c
361                    winbindd/winbindd_getusersids.c
362                    winbindd/winbindd_lookuprids.c
363                    winbindd/winbindd_setpwent.c
364                    winbindd/winbindd_getpwent.c
365                    winbindd/winbindd_endpwent.c
366                    winbindd/winbindd_setgrent.c
367                    winbindd/winbindd_getgrent.c
368                    winbindd/winbindd_endgrent.c
369                    winbindd/winbindd_dsgetdcname.c
370                    winbindd/winbindd_getdcname.c
371                    winbindd/winbindd_list_users.c
372                    winbindd/winbindd_list_groups.c
373                    winbindd/winbindd_check_machine_acct.c
374                    winbindd/winbindd_change_machine_acct.c
375                    winbindd/winbindd_ping_dc.c
376                    winbindd/winbindd_pam_auth.c
377                    winbindd/winbindd_pam_logoff.c
378                    winbindd/winbindd_pam_chauthtok.c
379                    winbindd/winbindd_pam_auth_crap.c
380                    winbindd/winbindd_pam_chng_pswd_auth_crap.c
381                    auth/auth_util.c
382                    auth/user_util.c
383                    auth/check_samsec.c
384                    auth/server_info.c
385                    auth/server_info_sam.c
386                    auth/user_info.c
387                    auth/user_util.c
388                    lib/wb_reqtrans.c'''
389
390 WINBINDD_SRC = '''${WINBINDD_SRC1}
391                   ${TDB_VALIDATE_SRC}'''
392
393 MANGLE_SRC = '''smbd/mangle.c smbd/mangle_hash.c smbd/mangle_hash2.c'''
394
395 SMBD_SRC_MAIN = '''smbd/server.c smbd/server_exit.c'''
396
397 BUILDOPT_SRC = '''smbd/build_options.c'''
398
399 SMBD_SRC_SRV = '''smbd/server_reload.c smbd/files.c smbd/connection.c
400                smbd/utmp.c smbd/session.c
401                smbd/dfree.c smbd/dir.c smbd/password.c smbd/conn.c
402                smbd/share_access.c smbd/fileio.c
403                smbd/ipc.c smbd/lanman.c smbd/negprot.c
404                smbd/message.c smbd/nttrans.c smbd/pipes.c
405                smbd/reply.c smbd/sesssetup.c smbd/trans2.c smbd/uid.c
406                smbd/dosmode.c smbd/filename.c smbd/open.c smbd/close.c
407                smbd/blocking.c smbd/sec_ctx.c smbd/srvstr.c
408                smbd/vfs.c smbd/perfcount.c smbd/statcache.c smbd/seal.c
409                smbd/posix_acls.c lib/sysacls.c
410                smbd/process.c smbd/service.c smbd/error.c
411                printing/printspoolss.c
412                lib/sysquotas.c lib/sysquotas_linux.c
413                lib/sysquotas_xfs.c lib/sysquotas_4A.c
414                lib/sysquotas_nfs.c
415                smbd/fake_file.c
416                smbd/quotas.c smbd/ntquotas.c smbd/msdfs.c
417                smbd/aio.c smbd/statvfs.c
418                smbd/dmapi.c smbd/signing.c
419                smbd/file_access.c
420                smbd/dnsregister.c smbd/globals.c
421                smbd/smb2_server.c
422                smbd/smb2_signing.c
423                smbd/smb2_glue.c
424                smbd/smb2_negprot.c
425                smbd/smb2_sesssetup.c
426                smbd/smb2_tcon.c
427                smbd/smb2_create.c
428                smbd/smb2_close.c
429                smbd/smb2_flush.c
430                smbd/smb2_read.c
431                smbd/smb2_write.c
432                smbd/smb2_lock.c
433                smbd/smb2_ioctl.c
434                smbd/smb2_keepalive.c
435                smbd/smb2_find.c
436                smbd/smb2_notify.c
437                smbd/smb2_getinfo.c
438                smbd/smb2_setinfo.c
439                smbd/smb2_break.c
440                ${MANGLE_SRC}'''
441
442 SMBD_SRC_BASE = '''${SMBD_SRC_SRV}
443                 ${OPLOCK_SRC} ${NOTIFY_SRC}
444                 ${BUILDOPT_SRC}'''
445
446 PRINTING_SRC = '''printing/pcap.c printing/print_svid.c printing/print_aix.c
447                printing/print_cups.c printing/print_generic.c
448                printing/lpq_parse.c printing/load.c printing/print_standard.c
449                printing/print_iprint.c printing/printer_list.c'''
450
451 PRINTBASE_SRC = '''printing/notify.c printing/printing_db.c'''
452 PRINTBACKEND_SRC = '''printing/printing.c
453                       printing/nt_printing.c
454                       printing/nt_printing_tdb.c
455                       printing/nt_printing_migrate.c
456                       printing/nt_printing_ads.c'''
457
458 SMBD_SRC = '''${SMBD_SRC_BASE} ${SMBD_SRC_MAIN}'''
459
460 NMBD_SRC1 = '''nmbd/asyncdns.c nmbd/nmbd.c nmbd/nmbd_become_dmb.c
461             nmbd/nmbd_become_lmb.c nmbd/nmbd_browserdb.c
462             nmbd/nmbd_browsesync.c nmbd/nmbd_elections.c
463             nmbd/nmbd_incomingdgrams.c nmbd/nmbd_incomingrequests.c
464             nmbd/nmbd_lmhosts.c nmbd/nmbd_logonnames.c nmbd/nmbd_mynames.c
465             nmbd/nmbd_namelistdb.c nmbd/nmbd_namequery.c
466             nmbd/nmbd_nameregister.c nmbd/nmbd_namerelease.c
467             nmbd/nmbd_nodestatus.c nmbd/nmbd_packets.c
468             nmbd/nmbd_processlogon.c nmbd/nmbd_responserecordsdb.c
469             nmbd/nmbd_sendannounce.c nmbd/nmbd_serverlistdb.c
470             nmbd/nmbd_subnetdb.c nmbd/nmbd_winsproxy.c nmbd/nmbd_winsserver.c
471             nmbd/nmbd_workgroupdb.c nmbd/nmbd_synclists.c'''
472
473 NMBD_SRC = '${NMBD_SRC1}'
474
475 SWAT_SRC1 = '''web/cgi.c web/diagnose.c web/startstop.c web/statuspage.c
476                web/swat.c web/neg_lang.c'''
477
478 SWAT_SRC = '''${SWAT_SRC1}'''
479
480 STATUS_SRC = '''utils/status.c utils/status_profile.c'''
481
482 SMBCONTROL_SRC = '''utils/smbcontrol.c'''
483
484 SMBTREE_SRC = '''utils/smbtree.c'''
485
486 TESTPARM_SRC = 'utils/testparm.c'
487
488 SMBTA_UTIL_SRC = '''utils/smbta-util.c'''
489
490 TEST_LP_LOAD_SRC = '''param/test_lp_load.c'''
491
492 PASSWD_UTIL_SRC = 'utils/passwd_util.c'
493
494 SMBPASSWD_SRC = '''utils/smbpasswd.c'''
495
496 PDBEDIT_SRC = '''utils/pdbedit.c'''
497
498 SMBGET_SRC = '''utils/smbget.c'''
499
500 RPCCLIENT_SRC1 = '''rpcclient/rpcclient.c rpcclient/cmd_lsarpc.c
501                     rpcclient/cmd_samr.c rpcclient/cmd_spoolss.c
502                     rpcclient/cmd_netlogon.c rpcclient/cmd_srvsvc.c
503                     rpcclient/cmd_dfs.c rpcclient/cmd_epmapper.c
504                     rpcclient/cmd_dssetup.c rpcclient/cmd_echo.c
505                     rpcclient/cmd_shutdown.c rpcclient/cmd_test.c
506                     rpcclient/cmd_wkssvc.c rpcclient/cmd_ntsvcs.c
507                     rpcclient/cmd_drsuapi.c rpcclient/cmd_eventlog.c
508                     rpcclient/cmd_winreg.c'''
509
510 RPCCLIENT_SRC = '''${RPCCLIENT_SRC1}'''
511
512 PAM_WINBIND_SRC = '../nsswitch/pam_winbind.c'
513
514 LIBSMBCLIENT_THREAD_SRC = '''libsmb/libsmb_thread_impl.c
515                         libsmb/libsmb_thread_posix.c'''
516
517 LIBSMBCLIENT_SRC0 = '''libsmb/libsmb_cache.c
518                     libsmb/libsmb_compat.c
519                     libsmb/libsmb_context.c
520                     libsmb/libsmb_dir.c
521                     libsmb/libsmb_file.c
522                     libsmb/libsmb_misc.c
523                     libsmb/libsmb_path.c
524                     libsmb/libsmb_printjob.c
525                     libsmb/libsmb_server.c
526                     libsmb/libsmb_stat.c
527                     libsmb/libsmb_xattr.c
528                     libsmb/libsmb_setget.c'''
529
530 LIBSMBCLIENT_SRC1 = '''${LIBSMBCLIENT_SRC0}'''
531
532 LIBSMBCLIENT_SRC = '${LIBSMBCLIENT_SRC1}'
533
534 LIBSMBSHAREMODES_SRC0 = 'libsmb/smb_share_modes.c'
535
536 LIBSMBSHAREMODES_SRC = '${LIBSMBSHAREMODES_SRC0}'
537
538 LIBNETAPI_SRC0 = '''lib/netapi/netapi.c
539                     lib/netapi/cm.c
540                     lib/netapi/libnetapi.c
541                     lib/netapi/joindomain.c
542                     lib/netapi/serverinfo.c
543                     lib/netapi/getdc.c
544                     lib/netapi/user.c
545                     lib/netapi/group.c
546                     lib/netapi/localgroup.c
547                     lib/netapi/samr.c
548                     lib/netapi/sid.c
549                     lib/netapi/share.c
550                     lib/netapi/file.c
551                     lib/netapi/shutdown.c
552                     lib/netapi/netlogon.c'''
553
554 LIBNETAPI_SRC = '''${LIBNETAPI_SRC0}'''
555
556 # FIXME:  bigballofmud
557
558 CLIENT_SRC1 = '''client/client.c client/clitar.c
559                  client/dnsbrowse.c'''
560
561 CLIENT_SRC = '''${CLIENT_SRC1}'''
562
563 LIB_SMBCONF_SRC = 'lib/smbconf/smbconf_init.c lib/smbconf/smbconf_reg.c'
564
565 SMBCONFTORT_SRC0 = 'lib/smbconf/testsuite.c'
566
567 SMBCONFTORT_SRC = '''${SMBCONFTORT_SRC0}'''
568
569 LIBNET_SRC = 'libnet/libnet_join.c libnet/libnet_keytab.c'
570
571
572 LIBNET_DSSYNC_SRC = '''libnet/libnet_dssync.c
573                        libnet/libnet_dssync_passdb.c
574                        libnet/libnet_dssync_keytab.c'''
575
576 LIBNET_SAMSYNC_SRC = '''libnet/libnet_samsync.c
577                         libnet/libnet_samsync_ldif.c
578                         libnet/libnet_samsync_passdb.c
579                         libnet/libnet_samsync_display.c
580                         libnet/libnet_samsync_keytab.c'''
581
582 NET_SRC1 = '''utils/net.c utils/net_ads.c utils/net_help.c
583               utils/net_rap.c utils/net_rpc.c utils/net_rpc_samsync.c
584               utils/net_rpc_join.c utils/net_time.c utils/net_lookup.c
585               utils/net_cache.c utils/net_groupmap.c utils/net_idmap.c
586               utils/net_status.c utils/net_rpc_printer.c utils/net_rpc_rights.c
587               utils/net_rpc_service.c utils/net_rpc_registry.c utils/net_usershare.c
588               utils/netlookup.c utils/net_sam.c utils/net_rpc_shell.c
589               utils/net_util.c utils/net_rpc_sh_acct.c utils/net_rpc_audit.c
590               utils/net_dns.c utils/net_ads_gpo.c
591               utils/net_conf.c utils/net_join.c utils/net_user.c
592               utils/net_group.c utils/net_file.c utils/net_registry.c
593               utils/net_dom.c utils/net_share.c
594               utils/net_g_lock.c
595               utils/net_serverid.c
596               utils/net_eventlog.c
597               utils/net_printing.c
598               registry/reg_parse.c registry/reg_format.c
599               registry/reg_parse_internal.c registry/reg_import.c
600               lib/cbuf.c lib/srprs.c'''
601
602 NET_SRC2 = 'utils/net_registry_util.c utils/net_help_common.c'
603
604 NET_SRC = '''${NET_SRC1}
605              ${NET_SRC2}'''
606
607 CUPS_SRC = '''client/smbspool.c'''
608
609 NMBLOOKUP_SRC = '''utils/nmblookup.c'''
610
611 SMBTORTURE_SRC1 = '''torture/torture.c torture/nbio.c torture/scanner.c torture/utable.c
612                 torture/denytest.c torture/mangle_test.c
613                 torture/nbench.c
614                 torture/test_async_echo.c
615                 torture/test_addrchange.c
616                 torture/test_posix_append.c
617                 torture/test_smbsock_any_connect.c'''
618
619 SMBTORTURE_SRC = '''${SMBTORTURE_SRC1}
620         torture/wbc_async.c
621         lib/wb_reqtrans.c'''
622
623 MASKTEST_SRC = '''torture/masktest.c'''
624
625 MSGTEST_SRC = '''torture/msgtest.c'''
626
627 LOCKTEST_SRC = '''torture/locktest.c'''
628
629 NSSTEST_SRC = '''../nsswitch/nsstest.c ${LIBSAMBAUTIL_SRC}'''
630
631 PDBTEST_SRC = '''torture/pdbtest.c'''
632
633 VFSTEST_SRC = '''torture/cmd_vfs.c torture/vfstest.c'''
634
635 SMBICONV_SRC = '''torture/smbiconv.c'''
636
637 LOG2PCAP_SRC = '''utils/log2pcaphex.c'''
638
639 LOCKTEST2_SRC = '''torture/locktest2.c'''
640
641 SMBCACLS_SRC = '''utils/smbcacls.c'''
642
643 SMBCQUOTAS_SRC = '''utils/smbcquotas.c'''
644
645 EVTLOGADM_SRC0 = 'utils/eventlogadm.c'
646
647 EVTLOGADM_SRC = '''${EVTLOGADM_SRC0}'''
648
649 SHARESEC_SRC0 = 'utils/sharesec.c'
650 SHARESEC_SRC  = '''${SHARESEC_SRC0}'''
651
652 DEBUG2HTML_SRC = '''utils/debug2html.c utils/debugparse.c'''
653
654 SMBFILTER_SRC = '''utils/smbfilter.c'''
655
656 WINBIND_WINS_NSS_SRC = '''../nsswitch/wins.c'''
657
658 WBINFO_SRC = '''../nsswitch/wbinfo.c'''
659
660 NTLM_AUTH_SRC1 = '''utils/ntlm_auth.c utils/ntlm_auth_diagnostics.c'''
661
662 NTLM_AUTH_SRC = '''${NTLM_AUTH_SRC1}
663                 libsmb/clikrb5.c libads/kerberos.c'''
664
665
666 VLP_SRC = '''printing/tests/vlp.c'''
667
668 RPC_OPEN_TCP_SRC = 'torture/rpc_open_tcp.c'
669
670 DBWRAP_TOOL_SRC = 'utils/dbwrap_tool.c'
671
672 DBWRAP_TORTURE_SRC = 'utils/dbwrap_torture.c'
673
674 SPLIT_TOKENS_SRC = 'utils/split_tokens.c'
675
676 LIBS='ICONV'
677
678 bld.SAMBA_GENERATOR('build_options',
679                     source='include/config.h script/mkbuildoptions-waf.awk',
680                     target='smbd/build_options.c',
681                     rule='${AWK} -f ${SRC[1].abspath(env)} > ${TGT} < ${SRC[0].abspath(env)}')
682
683 t = bld.SAMBA_GENERATOR('build_env.h',
684                         source='script/build_env.sh',
685                         target='include/build_env.h',
686                         rule='${SRC} ${SRCDIR} ${BUILDDIR} ${CC} > ${TGT}')
687 # todo: work out what is really wanted here
688 t.env.SRCDIR = bld.path.abspath()
689 t.env.BUILDDIR = bld.path.abspath()
690
691
692 bld.SETUP_BUILD_GROUPS()
693
694 samba_version.load_version(bld.env)
695
696 bld.SAMBA_MKVERSION('include/version.h')
697
698 bld.RECURSE('../lib/replace')
699 print "SBINDIR=%s" % bld.env.SBINDIR
700 bld.RECURSE('build')
701
702 ######################## SUBSYSTEMS #################################
703
704 bld.SAMBA_SUBSYSTEM('winbind-client',
705                     source=WBCOMMON_SRC,
706                     deps='replace',
707                     cflags='-DSOCKET_WRAPPER_DISABLE=1 -DWINBINDD_SOCKET_DIR=\"%s\"' % bld.env.WINBINDD_SOCKET_DIR)
708
709 bld.SAMBA_LIBRARY('netapi',
710                     source=LIBNETAPI_SRC,
711                     public_deps='''talloc tdb cap wbclient LIB_NONSMBD LIBSMB KRBCLIENT
712                     PASSDB SMBLDAP GROUPDB PARAM_WITHOUT_REG DYNCONFIG
713                     LIBMSRPC_GEN LIBMSRPC LIBADS LIBNET DCUTIL NDR_LIBNETAPI
714                     RPC_CLIENT_SCHANNEL LIB_SMBCONF REG_SMBCONF TOKEN_UTIL
715                     LIBCLI_SAMR LIBCLI_LSA LIBRPCCLI_NETLOGON
716                     RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_INITSHUTDOWN
717                     INIT_NETLOGON INIT_SAMR''',
718                     public_headers='lib/netapi/netapi.h',
719                     vnum='0',
720                     vars=locals())
721
722 bld.SAMBA_LIBRARY('smbclient',
723                     source=LIBSMBCLIENT_SRC,
724                     public_deps='''talloc tdb wbclient cap PARAM LIB_NONSMBD LIBSMB KRBCLIENT PASSDB SMBLDAP GROUPDB
725                     LIBMSRPC_GEN LIBMSRPC LIBCLI_LSA RPC_NDR_SRVSVC''',
726                     public_headers='include/libsmbclient.h',
727                     vnum='0',
728                     vars=locals())
729
730 bld.SAMBA_LIBRARY('smbsharemodes',
731                     source=LIBSMBSHAREMODES_SRC,
732                     public_deps='''talloc tdb''',
733                     public_headers='include/smb_share_modes.h',
734                     vnum='0',
735                     vars=locals())
736
737 bld.SAMBA_LIBRARY('nss_winbind',
738                   source='../nsswitch/winbind_nss_linux.c',
739                   deps='winbind-client',
740                   realname='libnss_winbind.so.2',
741                   vnum='2')
742
743 bld.SAMBA_LIBRARY('nss_wins',
744                   source=WINBIND_WINS_NSS_SRC,
745                   deps='''winbind-client PARAM LIBSMB LIB_NONSMBD LIBTSOCKET KRBCLIENT
746                   cap wbclient''',
747                   realname='libnss_wins.so.2',
748                   vnum='2')
749
750 if bld.CONFIG_SET('WITH_PAM_MODULES'):
751         bld.SAMBA_LIBRARY('pamwinbind',
752                           source=PAM_WINBIND_SRC,
753                           deps='intl talloc wbclient winbind-client LIBINIPARSER pam',
754                           cflags='-DLOCALEDIR=\"%s/locale\"' % bld.env.DATADIR,
755                           realname='pam_winbind.so')
756
757 if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):
758         bld.SAMBA_LIBRARY('winbind_krb5_locator',
759                           source='../nsswitch/winbind_krb5_locator.c',
760                           deps='wbclient krb5',
761                           realname='winbind_krb5_locator.so')
762
763 bld.SAMBA_SUBSYSTEM('LIBMSRPC',
764                     source='${LIBMSRPC_SRC}',
765                     deps='''ndr ndr-util NDR_SECURITY NDR_DCERPC NDR_SCHANNEL
766                     RPC_NDR_EPMAPPER COMMON_SCHANNELDB LIBCLI_AUTH''',
767                     vars=locals())
768
769 bld.SAMBA_SUBSYSTEM('LIBMSRPC_GEN',
770                     source='',
771                     deps='''ndr-standard NDR_DSSETUP NDR_SPOOLSS''',
772                     vars=locals())
773
774 bld.SAMBA_SUBSYSTEM('LIBGPO',
775                     source='${LIBGPO_SRC}',
776                     deps='gpext',
777                     vars=locals())
778
779 bld.SAMBA_SUBSYSTEM('ASN1_UTIL',
780                     source='../lib/util/asn1.c',
781                     deps='talloc',
782                     local_include=False)
783
784 bld.SAMBA_SUBSYSTEM('AVAHI',
785                     source=AVAHI_SRC,
786                     deps='avahi-common avahi-client',
787                     enabled=bld.env.with_avahi)
788
789 bld.SAMBA_SUBSYSTEM('GROUPDB',
790                     source=GROUPDB_SRC)
791
792 bld.SAMBA_SUBSYSTEM('TLDAP',
793                     source=TLDAP_SRC,
794                     deps='ASN1_UTIL LIBTSOCKET')
795
796 bld.SAMBA_SUBSYSTEM('PASSDB',
797                     source=PASSDB_SRC,
798                     deps='''GROUPDB TLDAP SECRETS SMBLDAP pdb''',
799                     vars=locals())
800
801 bld.SAMBA_SUBSYSTEM('PARAM_UTIL',
802                     source=PARAM_UTIL_SRC)
803
804 bld.SAMBA_SUBSYSTEM('PARAM_WITHOUT_REG',
805                     source=PARAM_WITHOUT_REG_SRC,
806                     deps='''PARAM_UTIL''',
807                     vars=locals())
808
809 bld.SAMBA_SUBSYSTEM('PARAM',
810                     source='',
811                     deps='PARAM_WITHOUT_REG DYNCONFIG LIB_SMBCONF',
812                     vars=locals())
813
814 bld.SAMBA_SUBSYSTEM('REGFIO',
815                     source=REGFIO_SRC,
816                     vars=locals())
817
818 bld.SAMBA_SUBSYSTEM('REG_API_REGF',
819                     source=REG_API_REGF_SRC,
820                     vars=locals())
821
822 bld.SAMBA_SUBSYSTEM('REG_BASE',
823                     source=REG_BASE_SRC,
824                     vars=locals())
825
826 bld.SAMBA_SUBSYSTEM('REG_SMBCONF',
827                     source=REG_SMBCONF_SRC,
828                     deps='REG_BASE',
829                     vars=locals())
830
831 bld.SAMBA_SUBSYSTEM('REG_FULL',
832                     source=REG_FULL_SRC,
833                     deps='REG_SMBCONF',
834                     vars=locals())
835
836 bld.SAMBA_SUBSYSTEM('POPT_SAMBA',
837                     source=POPT_LIB_SRC,
838                     vars=locals())
839
840 bld.SAMBA_SUBSYSTEM('KRBCLIENT',
841                     source=KRBCLIENT_SRC,
842                     deps='krb5 k5crypto com_err gssapi gssapi_krb5',
843                     vars=locals())
844
845 bld.SAMBA_SUBSYSTEM('LIBS',
846                     source=LIB_SRC,
847                     deps='LIBCRYPTO ndr ndr-util security NDR_SECURITY charset NDR_MESSAGING LIBASYNC_REQ tdb-wrap samba-util CHARSET UTIL_TDB SAMBA_VERSION',
848                     vars=locals())
849
850 bld.SAMBA_SUBSYSTEM('LIB_NONSMBD',
851                     source=LIB_NONSMBD_SRC,
852                     deps='LIBS',
853                     vars=locals())
854
855 bld.SAMBA_SUBSYSTEM('LIBSMB_ERR',
856                     source=LIBSMB_ERR_SRC,
857                     deps='errors SECRETS ldap lber MSRPC_PARSE LIBCLI_AUTH',
858                     vars=locals())
859
860 bld.SAMBA_SUBSYSTEM('LIBSAMBA',
861                     source=LIBSAMBA_SRC,
862                     deps='LIBSMB_ERR NDR_NTLMSSP ntlm_check',
863                     vars=locals())
864
865 bld.SAMBA_SUBSYSTEM('LIBSMB',
866                     source=LIBSMB_SRC,
867                     deps='LIBSAMBA CLDAP LIBNMB LIBNBT LIBDRSUAPI SPNEGO_PARSE',
868                     vars=locals())
869
870 bld.SAMBA_SUBSYSTEM('LIBDRSUAPI',
871                     source=DRSUAPI_SRC,
872                     deps='z LZXPRESS NDR_DRSUAPI NDR_DRSBLOBS',
873                     vars=locals())
874
875 bld.SAMBA_SUBSYSTEM('CLDAP',
876                     source=CLDAP_SRC,
877                     deps='LIBCLI_LDAP_MESSAGE LIBCLI_LDAP_NDR',
878                     vars=locals())
879
880 bld.SAMBA_SUBSYSTEM('SECRETS',
881                     source=SECRETS_SRC,
882                     deps='NDR_SECRETS',
883                     vars=locals())
884
885 bld.SAMBA_SUBSYSTEM('SMBLDAP',
886                     source=SMBLDAP_SRC,
887                     deps='ldap lber',
888                     vars=locals(),
889                     enabled=bld.env.HAVE_LDAP)
890
891 bld.SAMBA_SUBSYSTEM('LIBADS',
892                     source=LIBADS_SRC,
893                     deps='LIBCLI_LDAP_NDR',
894                     vars=locals())
895
896 bld.SAMBA_SUBSYSTEM('LIBADS_SERVER',
897                     source=LIBADS_SERVER_SRC,
898                     deps='ndr-krb5pac',
899                     vars=locals())
900
901 bld.SAMBA_SUBSYSTEM('LIBADS_PRINTER',
902                     source=LIBADS_PRINTER_SRC,
903                     vars=locals())
904
905 bld.SAMBA_SUBSYSTEM('LIBAFS',
906                     source=AFS_SRC,
907                     vars=locals())
908
909 bld.SAMBA_SUBSYSTEM('LIBAFS_SETTOKEN',
910                     source=AFS_SETTOKEN_SRC,
911                     vars=locals())
912
913 bld.SAMBA_SUBSYSTEM('LIB_SMBCONF',
914                     source=LIB_SMBCONF_SRC,
915                     deps='LIBSMBCONF REG_BASE REG_SMBCONF',
916                     vars=locals())
917
918 bld.SAMBA_SUBSYSTEM('SMBD_BASE',
919                     source=SMBD_SRC_BASE,
920                     deps='''tdb tevent dl krb5 ldap gssapi gssapi_krb5
921                     DYNCONFIG wbclient crypt nsl cups cap resolv z PASSDB
922                     PARAM_WITHOUT_REG LIBS LIBSMB POPT_SAMBA KRBCLIENT AVAHI
923                     LIBMSRPC_GEN LIBMSRPC LIBADS LIBADS_SERVER LIBADS_PRINTER
924                     vfs vfs_default vfs_posixacl auth rpc LOCKING LIBAFS LIBAFS_SETTOKEN PROFILE
925                     PRINTING PRINTBACKEND NDR_XATTR NDR_NOTIFY REGFIO
926                     LIB_SMBCONF REG_FULL FNAME_UTIL
927                     LIBCLI_SAMR LIBCLI_LSA LIBRPCCLI_NETLOGON LIBCLI_SPOOLSS
928                     RPC_NDR_SRVSVC NAMED_PIPE_AUTH_TSTREAM INIT_NETLOGON INIT_SAMR
929                     LIBCLI_SMB_COMMON RPC_SERVER
930                     ''',
931                     vars=locals())
932
933 bld.SAMBA_SUBSYSTEM('LOCKING',
934                     source='${LOCKING_SRC}',
935                     deps='''tdb talloc''',
936                     vars=locals())
937
938 bld.SAMBA_SUBSYSTEM('PROFILE',
939                     source='${PROFILE_SRC}',
940                     vars=locals())
941
942 bld.SAMBA_SUBSYSTEM('PRINTBASE',
943                     source=PRINTBASE_SRC,
944                     vars=locals())
945
946 bld.SAMBA_SUBSYSTEM('PRINTBACKEND',
947                     source=PRINTBACKEND_SRC,
948                     deps='PRINTBASE NDR_NTPRINTING LIBADS_PRINTER',
949                     vars=locals())
950
951 bld.SAMBA_SUBSYSTEM('PRINTING',
952                     source=PRINTING_SRC,
953                     vars=locals())
954
955 bld.SAMBA_SUBSYSTEM('PASSWD_UTIL',
956                     source=PASSWD_UTIL_SRC,
957                     vars=locals())
958
959 bld.SAMBA_SUBSYSTEM('FNAME_UTIL',
960                     source=FNAME_UTIL_SRC,
961                     vars=locals())
962
963 bld.SAMBA_SUBSYSTEM('UTIL_TDB',
964         source='../lib/util/util_tdb.c',
965         local_include=False,
966         public_deps='tdb talloc'
967         )
968
969 bld.SAMBA_SUBSYSTEM('UTIL_TEVENT',
970         source='../lib/util/tevent_unix.c ../lib/util/tevent_ntstatus.c ../lib/util/tevent_werror.c',
971         local_include=False,
972         public_deps='tevent',
973         public_headers='../lib/util/tevent_ntstatus.h ../lib/util/tevent_unix.h ../lib/util/tevent_werror.h',
974         header_path=[ ('*', 'util') ],
975         )
976
977 bld.SAMBA_SUBSYSTEM('LIBNET',
978                     source=LIBNET_SRC,
979                     deps='NDR_LIBNET_JOIN',
980                     vars=locals())
981
982 bld.SAMBA_SUBSYSTEM('LIBNET_DSSYNC',
983                     source=LIBNET_DSSYNC_SRC,
984                     deps='LIBNET LIBCLI_DRSUAPI',
985                     vars=locals())
986
987 bld.SAMBA_SUBSYSTEM('LIBNET_SAMSYNC',
988                     source=LIBNET_SAMSYNC_SRC,
989                     deps='LIBNET LIBCLI_SAMSYNC',
990                     vars=locals())
991
992 bld.SAMBA_SUBSYSTEM('LIBEVENTLOG',
993                     source=LIB_EVENTLOG_SRC,
994                     deps='NDR_EVENTLOG',
995                     vars=locals())
996
997 bld.SAMBA_SUBSYSTEM('LIBNMB',
998                     source=LIBNMB_SRC,
999                     vars=locals())
1000
1001 bld.SAMBA_SUBSYSTEM('LIBNBT',
1002                     source='',
1003                     deps='NDR_SVCCTL NDR_NBT NDR_NBT_BUF LIBCLI_NETLOGON LIBCLI_NDR_NETLOGON',
1004                     vars=locals())
1005
1006 bld.SAMBA_SUBSYSTEM('SERVICES',
1007                     source=SERVICES_SRC,
1008                     vars=locals())
1009
1010 bld.SAMBA_SUBSYSTEM('PLAINTEXT_AUTH',
1011                     source=PLAINTEXT_AUTH_SRC,
1012                     deps='pam PAM_ERRORS',
1013                     vars=locals())
1014
1015 bld.SAMBA_SUBSYSTEM('PASSCHANGE',
1016                     source=PASSCHANGE_SRC,
1017                     deps='LIBCLI_SAMR',
1018                     vars=locals())
1019
1020 bld.SAMBA_SUBSYSTEM('SAMBA_VERSION',
1021                     source=VERSION_SRC,
1022                     vars=locals())
1023
1024 bld.SAMBA_SUBSYSTEM('SLCACHE',
1025                     source=SLCACHE_SRC,
1026                     vars=locals())
1027
1028 bld.SAMBA_SUBSYSTEM('SPNEGO_PARSE',
1029                     source='../libcli/auth/spnego_parse.c',
1030                     vars=locals())
1031
1032 bld.SAMBA_SUBSYSTEM('DCUTIL',
1033                     source=DCUTIL_SRC,
1034                     vars=locals())
1035
1036 bld.SAMBA_SUBSYSTEM('ndr-util',
1037                     source=LIBNDR_SRC,
1038                     vars=locals())
1039
1040 bld.SAMBA_SUBSYSTEM('tdb-wrap',
1041                     source='lib/util_tdb.c',
1042                     vars=locals())
1043
1044 bld.SAMBA_SUBSYSTEM('CHARSET',
1045                     source='''lib/util_str.c lib/util_unistr.c lib/charcnv.c lib/iconv.c''',
1046                     public_deps='iconv',
1047                     deps='DYNCONFIG')
1048
1049 bld.SAMBA_SUBSYSTEM('samba-util',
1050                     source=UTIL_SRC,
1051                     deps='talloc CHARSET LIBCRYPTO',
1052                     vars=locals())
1053 #FIXME
1054 bld.SAMBA_SUBSYSTEM('ndr-standard',
1055                     source='',
1056                     deps='''
1057                     NDR_SECURITY NDR_LSA NDR_SAMR NDR_NETLOGON NDR_EVENTLOG NDR_DFS
1058                     NDR_NTSVCS NDR_SVCCTL NDR_INITSHUTDOWN NDR_WKSSVC NDR_SRVSVC NDR_WINREG
1059                     NDR_ECHO security NDR_DNS
1060                     ''',
1061                     vars=locals())
1062
1063 #FIXME
1064 bld.SAMBA_SUBSYSTEM('dcerpc', '', deps='UTIL_TEVENT')
1065
1066 bld.SAMBA_SUBSYSTEM('ldb',
1067                     source='lib/ldb_compat.c')
1068
1069 bld.SAMBA_SUBSYSTEM('NDR_SECURITY',
1070                     source='''../librpc/gen_ndr/ndr_security.c ../librpc/ndr/ndr_sec_helper.c''',
1071                     deps='ndr',
1072                     vars=locals())
1073
1074 bld.SAMBA_SUBSYSTEM('NDR_DCERPC',
1075                     source='../librpc/gen_ndr/ndr_dcerpc.c',
1076                     vars=locals())
1077
1078 bld.SAMBA_SUBSYSTEM('errors',
1079         source='../libcli/util/doserr.c libsmb/nterr.c libsmb/errormap.c libsmb/smberr.c lib/errmap_unix.c')
1080
1081 bld.SAMBA_SUBSYSTEM('NDR_NBT_BUF',
1082         source='../libcli/nbt/nbtname.c',
1083         deps='talloc',
1084         autoproto='nbtname.h')
1085
1086 bld.SAMBA_SUBSYSTEM('LIBCLI_SAMR',
1087                     source=LIBCLI_SAMR_SRC,
1088                     deps='RPC_NDR_SAMR')
1089
1090 bld.SAMBA_SUBSYSTEM('LIBCLI_LSA',
1091                     source=LIBCLI_LSA_SRC,
1092                     deps='RPC_NDR_LSA INIT_LSA')
1093
1094 bld.SAMBA_SUBSYSTEM('LIBRPCCLI_NETLOGON',
1095                     source=LIBRPCCLI_NETLOGON_SRC,
1096                     deps='RPC_NDR_NETLOGON')
1097
1098 bld.SAMBA_SUBSYSTEM('LIBCLI_SPOOLSS',
1099                     source=LIBCLI_SPOOLSS_SRC,
1100                     deps='RPC_NDR_SPOOLSS')
1101
1102 bld.SAMBA_SUBSYSTEM('LIBCLI_WINREG',
1103                     source=LIBCLI_WINREG_SRC,
1104                     deps='RPC_NDR_WINREG')
1105
1106 bld.SAMBA_SUBSYSTEM('RPC_CLIENT_SCHANNEL',
1107         source=RPC_CLIENT_SCHANNEL_SRC,
1108         vars=locals())
1109
1110 bld.SAMBA_SUBSYSTEM('INIT_LSA',
1111                     source='rpc_client/init_lsa.c')
1112
1113 bld.SAMBA_SUBSYSTEM('INIT_NETLOGON',
1114                     source='rpc_client/init_netlogon.c')
1115
1116 bld.SAMBA_SUBSYSTEM('INIT_SAMR',
1117                     source='rpc_client/init_samr.c')
1118
1119 ########################## BINARIES #################################
1120
1121 bld.SAMBA_BINARY('smbd/smbd',
1122                  source='${SMBD_SRC_MAIN}',
1123                  deps='''SMBD_BASE''',
1124                  install_path='${SBINDIR}',
1125                  vars=locals())
1126
1127 bld.SAMBA_BINARY('nmbd/nmbd',
1128                  source=NMBD_SRC,
1129                  deps='''talloc tdb tevent z cap resolv wbclient dl
1130                  PASSDB PARAM ldap LIB_NONSMBD LIBSMB
1131                  POPT_SAMBA KRBCLIENT NDR_SAMR NDR_LSA''',
1132                  install_path='${SBINDIR}',
1133                  vars=locals())
1134
1135 bld.SAMBA_BINARY('winbindd/winbindd',
1136                  source=WINBINDD_SRC,
1137                  deps='''talloc tdb tevent cap dl z
1138                  wbclient PASSDB ldap resolv PARAM LIB_NONSMBD LIBSMB
1139                  POPT_SAMBA KRBCLIENT LIBMSRPC_GEN LIBMSRPC LIBADS LIBADS_SERVER
1140                  SRV_NDR_WBINT RPC_NDR_WBINT LIBAFS
1141                  LIBAFS_SETTOKEN PROFILE SLCACHE DCUTIL idmap nss_info
1142                  TOKEN_UTIL
1143                  LIBCLI_SAMR LIBCLI_LSA LIBRPCCLI_NETLOGON
1144                  RPC_NDR_DSSETUP NAMED_PIPE_AUTH_TSTREAM INIT_NETLOGON
1145                  RPC_NCACN_NP RPC_PIPE_REGISTER RPC_SAMR RPC_LSARPC
1146                  PAM_ERRORS
1147                  ''',
1148                  enabled=bld.env.build_winbind,
1149                  install_path='${SBINDIR}',
1150                  vars=locals())
1151
1152 bld.SAMBA_BINARY('web/swat',
1153                  source=SWAT_SRC,
1154                  deps='''talloc tevent cap LIBS LIBSMB wbclient PARAM
1155                  LIB_NONSMBD resolv PASSDB POPT_SAMBA KRBCLIENT cups
1156                  LIBMSRPC_GEN LIBMSRPC LOCKING PLAINTEXT_AUTH PRINTBASE PRINTING FNAME_UTIL
1157                  LIBCLI_SAMR INIT_LSA PASSCHANGE''',
1158                  enabled=bld.env.build_swat,
1159                  install_path='${SBINDIR}',
1160                  vars=locals())
1161
1162 bld.SAMBA_BINARY('rpcclient/rpcclient',
1163                  source=RPCCLIENT_SRC,
1164                  deps='''talloc tdb cap resolv POPT_SAMBA PASSDB LIBSMB LIB_NONSMBD
1165                  PARAM_WITHOUT_REG wbclient PARAM KRBCLIENT LIBMSRPC_GEN LIBMSRPC
1166                  LIBADS SMBREADLINE DCUTIL RPC_NDR_WINREG RPC_NDR_ECHO
1167                  RPC_CLIENT_SCHANNEL
1168                  LIBCLI_SAMR LIBCLI_LSA LIBRPCCLI_NETLOGON LIBCLI_SPOOLSS
1169                  RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_DSSETUP RPC_NDR_DFS
1170                  RPC_NDR_DRSUAPI RPC_NDR_NTSVCS RPC_NDR_EVENTLOG INIT_NETLOGON
1171                  INIT_SAMR
1172                  ''',
1173                  vars=locals())
1174
1175 bld.SAMBA_BINARY('client/smbclient',
1176                  source=CLIENT_SRC,
1177                  deps='''talloc tdb cap resolv POPT_SAMBA PASSDB LIBSMB LIB_NONSMBD
1178                  PARAM_WITHOUT_REG wbclient PARAM KRBCLIENT LIBMSRPC_GEN
1179                  LIBMSRPC SMBREADLINE smbclient RPC_NDR_SRVSVC INIT_LSA''',
1180                  vars=locals())
1181
1182 bld.SAMBA_BINARY('net',
1183                  source=NET_SRC,
1184                  deps='''talloc tdb netapi addns cap resolv intl POPT_SAMBA PASSDB LIBSMB LIB_NONSMBD
1185                  PARAM_WITHOUT_REG wbclient PARAM KRBCLIENT LIBMSRPC_GEN LIBMSRPC LIBGPO LIBADS LIBADS_SERVER LIBADS_PRINTER
1186                  LOCALE_DIR LIBAFS LIBAFS_SETTOKEN SMBREADLINE PASSWD_UTIL LIBNET
1187                  LIBNET_DSSYNC LIBNET_SAMSYNC LIBEVENTLOG DCUTIL
1188                  REGFIO NDR_NTPRINTING RPC_NDR_WINREG
1189                  RPC_CLIENT_SCHANNEL TOKEN_UTIL
1190                  LIBCLI_SAMR LIBCLI_LSA LIBRPCCLI_NETLOGON LIBCLI_SPOOLSS
1191                  RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_SVCCTL RPC_NDR_DSSETUP
1192                  RPC_NDR_INITSHUTDOWN RPC_NDR_DRSUAPI INIT_NETLOGON INIT_SAMR
1193                  ''',
1194                  vars=locals())
1195
1196 bld.SAMBA_BINARY('profiles',
1197                  source=PROFILES_SRC,
1198                  deps='''talloc tdb cap tevent POPT_SAMBA PARAM LIBS LIBSMB_ERR LIB_NONSMBD REGFIO''',
1199                  vars=locals())
1200
1201 bld.SAMBA_BINARY('smbspool',
1202                  source=CUPS_SRC,
1203                  deps='''talloc tdb tevent resolv cap wbclient POPT_SAMBA PARAM LIBSMB LIB_NONSMBD LIBS
1204                  KRBCLIENT ASN1_UTIL LIBTSOCKET NDR_SAMR NDR_LSA''',
1205                  vars=locals())
1206
1207 bld.SAMBA_BINARY('testparm',
1208                  source=TESTPARM_SRC,
1209                  deps='''talloc tevent ldap cap 
1210                  wbclient ASN1_UTIL LIBTSOCKET PASSDB PARAM LIB_NONSMBD
1211                  LIBSMB_ERR POPT_SAMBA''',
1212                  vars=locals())
1213
1214 bld.SAMBA_BINARY('smbta-util',
1215                  source=SMBTA_UTIL_SRC,
1216                  deps='''talloc tdb tevent cap PARAM POPT_SAMBA LIB_NONSMBD
1217                  LIBSMB_ERR''',
1218                  vars=locals())
1219
1220 bld.SAMBA_BINARY('smbstatus',
1221                  source=STATUS_SRC,
1222                  deps='''talloc tdb tevent cap PARAM POPT_SAMBA LIB_NONSMBD
1223                  LIBSMB_ERR LOCKING PROFILE FNAME_UTIL''',
1224                  vars=locals())
1225
1226 bld.SAMBA_BINARY('smbcontrol',
1227                  source=SMBCONTROL_SRC,
1228                  deps='''talloc tdb tevent cap PARAM LIB_NONSMBD LIBSMB_ERR POPT_SAMBA PRINTBASE''',
1229                  vars=locals())
1230
1231 bld.SAMBA_BINARY('smbtree',
1232                  source=SMBTREE_SRC,
1233                  deps='''talloc tdb tevent cap resolv wbclient PARAM LIB_NONSMBD
1234                  LIBSMB LIBSMB_ERR POPT_SAMBA KRBCLIENT PASSDB SMBLDAP GROUPDB LIBMSRPC_GEN LIBMSRPC PROFILE
1235                  RPC_NDR_SRVSVC''',
1236                  vars=locals())
1237
1238 bld.SAMBA_BINARY('smbpasswd',
1239                  source=SMBPASSWD_SRC,
1240                  deps='''talloc tdb tevent cap resolv wbclient PARAM LIB_NONSMBD
1241                  LIBSMB LIBSMB_ERR POPT_SAMBA KRBCLIENT PASSDB SMBLDAP GROUPDB LIBMSRPC_GEN LIBMSRPC PASSWD_UTIL
1242                  LIBCLI_SAMR INIT_LSA PASSCHANGE''',
1243                  vars=locals())
1244
1245 bld.SAMBA_BINARY('pdbedit',
1246                  source=PDBEDIT_SRC,
1247                  deps='''talloc tdb tevent cap resolv wbclient PARAM LIB_NONSMBD
1248                  LIBSAMBA LIBSMB_ERR POPT_SAMBA PASSDB SMBLDAP GROUPDB
1249                  PASSWD_UTIL LIBCLI_LDAP_NDR''',
1250                  vars=locals())
1251
1252 bld.SAMBA_BINARY('smbget',
1253                  source=SMBGET_SRC,
1254                  deps='''talloc tdb smbclient POPT_SAMBA''',
1255                  vars=locals())
1256
1257 bld.SAMBA_BINARY('nmblookup',
1258                  source=NMBLOOKUP_SRC,
1259                  deps='''talloc tdb tevent cap resolv PARAM LIB_NONSMBD POPT_SAMBA LIBSMB_ERR LIBNMB''',
1260                  vars=locals())
1261
1262 bld.SAMBA_BINARY('smbtorture',
1263                  source=SMBTORTURE_SRC,
1264                  deps='''talloc tdb tevent cap resolv wbclient PARAM LIBSMB KRBCLIENT TLDAP
1265                  LIB_NONSMBD POPT_SAMBA ASN1_UTIL LIBTSOCKET NDR_LSA LIBMSRPC LIBMSRPC_GEN RPC_NDR_ECHO''',
1266                  vars=locals())
1267
1268 bld.SAMBA_BINARY('smbconftort',
1269                  source=SMBCONFTORT_SRC,
1270                  deps='''talloc tdb tevent cap resolv wbclient PARAM LIB_NONSMBD LIBSMB_ERR POPT_SAMBA''',
1271                  vars=locals())
1272
1273 bld.SAMBA_BINARY('masktest',
1274                  source=MASKTEST_SRC,
1275                  deps='''talloc tdb cap resolv wbclient PARAM LIB_NONSMBD LIBSMB KRBCLIENT
1276                  ASN1_UTIL LIBTSOCKET NDR_SAMR NDR_LSA''',
1277                  vars=locals())
1278
1279 bld.SAMBA_BINARY('msgtest',
1280                  source=MSGTEST_SRC,
1281                  deps='''talloc tdb tevent cap resolv PARAM LIBSMB_ERR LIB_NONSMBD''',
1282                  vars=locals())
1283
1284 bld.SAMBA_BINARY('smbcacls',
1285                  source=SMBCACLS_SRC,
1286                  deps='''talloc tdb cap resolv wbclient PARAM LIBSMB KRBCLIENT
1287                  LIB_NONSMBD PASSDB GROUPDB POPT_SAMBA SMBLDAP LIBMSRPC_GEN
1288                  LIBMSRPC LIBCLI_LSA''',
1289                  vars=locals())
1290
1291 bld.SAMBA_BINARY('smbcquotas',
1292                  source=SMBCQUOTAS_SRC,
1293                  deps='''talloc tdb cap resolv wbclient PARAM LIB_NONSMBD LIBSMB KRBCLIENT
1294                  POPT_SAMBA PASSDB SMBLDAP GROUPDB LIBMSRPC_GEN LIBMSRPC
1295                  LIBCLI_LSA''',
1296                  vars=locals())
1297
1298 bld.SAMBA_BINARY('eventlogadm',
1299                  source=EVTLOGADM_SRC,
1300                  deps='''talloc tevent cap POPT_SAMBA LIBS PARAM
1301                  LIB_NONSMBD LIBSMB_ERR PASSDB wbclient LIBEVENTLOG''',
1302                  vars=locals())
1303
1304 bld.SAMBA_BINARY('sharesec',
1305                  source=SHARESEC_SRC,
1306                  deps='''talloc tdb tevent cap resolv wbclient PARAM LIB_NONSMBD LIBSMB_ERR POPT_SAMBA''',
1307                  vars=locals())
1308
1309 bld.SAMBA_BINARY('locktest',
1310                  source=LOCKTEST_SRC,
1311                  deps='''talloc tdb tevent cap resolv wbclient PARAM KRBCLIENT LIBSMB LIB_NONSMBD
1312                  ASN1_UTIL LIBTSOCKET NDR_SAMR NDR_LSA LOCKING FNAME_UTIL''',
1313                  vars=locals())
1314
1315 bld.SAMBA_BINARY('nsstest',
1316                  source=NSSTEST_SRC,
1317                  deps='dl',
1318                  vars=locals())
1319
1320 bld.SAMBA_BINARY('pdbtest',
1321                  source=PDBTEST_SRC,
1322                  deps='''talloc tdb cap resolv wbclient PARAM LIBSMB KRBCLIENT LIB_NONSMBD PASSDB GROUPDB
1323                  SMBLDAP POPT_SAMBA NDR_SAMR NDR_LSA''',
1324                  vars=locals())
1325
1326 bld.SAMBA_BINARY('vfstest',
1327                  source=VFSTEST_SRC,
1328                  deps='''SMBD_BASE SMBREADLINE''',
1329                  vars=locals())
1330
1331 bld.SAMBA_BINARY('smbiconv',
1332                  source=SMBICONV_SRC,
1333                  deps='''talloc tdb tevent cap PARAM LIB_NONSMBD POPT_SAMBA LIBSMB_ERR''',
1334                  vars=locals())
1335
1336 bld.SAMBA_BINARY('log2pcap',
1337                  source=LOG2PCAP_SRC,
1338                  deps='''talloc popt''',
1339                  vars=locals())
1340
1341 bld.SAMBA_BINARY('locktest2',
1342                  source=LOCKTEST2_SRC,
1343                  deps='''talloc tdb tevent cap resolv wbclient PARAM KRBCLIENT LIBSMB LIB_NONSMBD
1344                  ASN1_UTIL LIBTSOCKET NDR_SAMR NDR_LSA LOCKING FNAME_UTIL''',
1345                  vars=locals())
1346
1347 bld.SAMBA_BINARY('debug2html',
1348                  source=DEBUG2HTML_SRC,
1349                  deps='''talloc popt''',
1350                  vars=locals())
1351
1352 bld.SAMBA_BINARY('smbfilter',
1353                  source=SMBFILTER_SRC,
1354                  deps='''talloc tevent cap resolv wbclient PARAM LIBSMB LIB_NONSMBD KRBCLIENT ASN1_UTIL LIBTSOCKET
1355                  NDR_SAMR NDR_LSA''',
1356                  vars=locals())
1357
1358 bld.SAMBA_BINARY('versiontest',
1359                  source='lib/version_test.c',
1360                  deps='SAMBA_VERSION',
1361                  vars=locals())
1362
1363 bld.SAMBA_BINARY('wbinfo',
1364                  source=WBINFO_SRC,
1365                  deps='''talloc wbclient tevent cap
1366                  ASN1_UTIL LIBTSOCKET PASSDB ldap PARAM LIB_NONSMBD
1367                  LIBSAMBA POPT_SAMBA LIBAFS_SETTOKEN''',
1368                  vars=locals())
1369
1370 bld.SAMBA_BINARY('ntlm_auth',
1371                  source=NTLM_AUTH_SRC,
1372                  deps='''tdb talloc cap resolv krb5 k5crypto com_err wbclient PARAM LIB_NONSMBD
1373                  LIBS LIBSAMBA POPT_SAMBA ASN1_UTIL LIBTSOCKET
1374                  PASSDB GROUPDB SMBLDAP winbind-client LIBINIPARSER LIBADS_SERVER
1375                  NDR_SAMR NDR_LSA NDR_NETLOGON LIBCLI_LDAP_NDR LIBNMB SLCACHE SPNEGO_PARSE''',
1376                  vars=locals())
1377
1378 bld.SAMBA_BINARY('timelimit',
1379                  source='script/tests/timelimit.c',
1380                  vars=locals())
1381
1382 bld.SAMBA_BINARY('rpc_open_tcp',
1383                  source=RPC_OPEN_TCP_SRC,
1384                  deps='''talloc tdb tevent resolv cap wbclient KRBCLIENT PARAM LIBS LIBSMB LIB_NONSMBD
1385                  LIBSMB_ERR ASN1_UTIL LIBTSOCKET LIBMSRPC_GEN LIBMSRPC''',
1386                  vars=locals())
1387
1388 bld.SAMBA_BINARY('test_lp_load',
1389                  source=TEST_LP_LOAD_SRC,
1390                  deps='''talloc tdb tevent cap wbclient PARAM LIB_NONSMBD POPT_SAMBA LIBSAMBA''',
1391                  vars=locals())
1392
1393 bld.SAMBA_BINARY('dbwrap_tool',
1394                  source=DBWRAP_TOOL_SRC,
1395                  deps='''talloc tdb tevent cap PARAM LIB_NONSMBD LIBSMB_ERR''',
1396                  vars=locals())
1397
1398 bld.SAMBA_BINARY('dbwrap_torture',
1399                  source=DBWRAP_TORTURE_SRC,
1400                  deps='''talloc tdb tevent cap PARAM LIB_NONSMBD LIBSMB_ERR
1401                  POPT_SAMBA''',
1402                  vars=locals())
1403
1404 bld.SAMBA_BINARY('split_tokens',
1405                  source=SPLIT_TOKENS_SRC,
1406                  deps='''talloc tdb tevent cap wbclient PARAM LIB_NONSMBD POPT_SAMBA
1407                  LIBSAMBA''',
1408                  vars=locals())
1409
1410 bld.SAMBA_BINARY('vlp',
1411                  source=VLP_SRC,
1412                  deps='''talloc tdb PARAM_UTIL UTIL_TDB''',
1413                  vars=locals())
1414
1415 swat_files=recursive_dirlist('../swat', '../swat', '*')
1416 bld.INSTALL_FILES('${SWATDIR}', swat_files, base_name='../swat')
1417
1418 ########################## INCLUDES #################################
1419
1420 bld.RECURSE('../auth')
1421 bld.RECURSE('../lib/addns')
1422 bld.RECURSE('../lib/async_req')
1423 bld.RECURSE('../libcli/auth')
1424 bld.RECURSE('../libcli/drsuapi')
1425 bld.RECURSE('../libcli/ldap')
1426 bld.RECURSE('../libcli/named_pipe_auth')
1427 bld.RECURSE('../libcli/netlogon')
1428 bld.RECURSE('../libcli/samsync')
1429 bld.RECURSE('../libcli/security')
1430 bld.RECURSE('../libcli/smb')
1431 bld.RECURSE('../libcli/smbreadline')
1432 bld.RECURSE('../lib/crypto')
1433 bld.RECURSE('../lib/iniparser/src')
1434 bld.RECURSE('../lib/nss_wrapper')
1435 bld.RECURSE('../lib/popt')
1436 bld.RECURSE('../librpc')
1437 bld.RECURSE('../lib/smbconf')
1438 bld.RECURSE('../lib/socket_wrapper')
1439 bld.RECURSE('../lib/talloc')
1440 bld.RECURSE('../lib/tdb')
1441 bld.RECURSE('../lib/tevent')
1442 bld.RECURSE('../lib/tsocket')
1443 bld.RECURSE('../lib/zlib')
1444 bld.RECURSE('../nsswitch/libwbclient')
1445 bld.RECURSE('auth')
1446 bld.RECURSE('libgpo/gpext')
1447 bld.RECURSE('librpc')
1448 bld.RECURSE('librpc/idl')
1449 bld.RECURSE('modules')
1450 bld.RECURSE('pam_smbpass')
1451 bld.RECURSE('passdb')
1452 bld.RECURSE('rpc_server')
1453 bld.RECURSE('winbindd')
1454
1455 bld.ENFORCE_GROUP_ORDERING()
1456 bld.CHECK_PROJECT_RULES()