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