source: trunk/samba/source/Makefile.in @ 26

Last change on this file since 26 was 26, checked in by Paul Smedley, 14 years ago

Updated source to 3.0.25rc1

File size: 74.6 KB
Line 
1#########################################################################
2# Makefile.in for Samba - rewritten for autoconf support
3# Copyright Andrew Tridgell 1992-1998
4# Copyright (C) 2001 by Martin Pool <mbp@samba.org>
5# Copyright Andrew Bartlett 2002
6# Copyright (C) 2003 Jim McDonough <jmcd@us.ibm.com>
7# Copyright (C) 2002-2003 Jelmer Vernooij <jelmer@samba.org>
8# Copyright (C) 2006 Lars Mueller <lars@samba.org>
9###########################################################################
10
11prefix=@prefix@
12exec_prefix=@exec_prefix@
13sysconfdir=@sysconfdir@
14localstatedir=@localstatedir@
15datarootdir=@datarootdir@
16
17selftest_prefix=@selftest_prefix@
18smbtorture4_path=@smbtorture4_path@
19
20LIBS=@LIBS@
21CC=@CC@
22SHLD=@SHLD@
23CFLAGS=@CFLAGS@
24CPPFLAGS=-DHAVE_CONFIG_H @CPPFLAGS@
25EXEEXT=@EXEEXT@
26LDFLAGS=@PIE_LDFLAGS@ @LDFLAGS@
27AR=@AR@
28LDSHFLAGS=@LDSHFLAGS@ @LDFLAGS@
29WINBIND_NSS_LDSHFLAGS=@WINBIND_NSS_LDSHFLAGS@ @LDFLAGS@
30AWK=@AWK@
31PICFLAG=@PICFLAG@
32DYNEXP=@DYNEXP@
33PYTHON=@PYTHON@
34PERL=@PERL@
35
36TERMLDFLAGS=@TERMLDFLAGS@
37TERMLIBS=@TERMLIBS@
38PRINT_LIBS=@PRINT_LIBS@
39AUTH_LIBS=@AUTH_LIBS@
40ACL_LIBS=@ACL_LIBS@
41PASSDB_LIBS=@PASSDB_LIBS@
42IDMAP_LIBS=@IDMAP_LIBS@
43KRB5LIBS=@KRB5_LIBS@
44LDAP_LIBS=@LDAP_LIBS@
45NSCD_LIBS=@NSCD_LIBS@
46UUID_LIBS=@UUID_LIBS@
47
48INSTALLCMD=@INSTALL@
49INSTALLLIBCMD_SH=@INSTALLLIBCMD_SH@
50INSTALLLIBCMD_A=@INSTALLLIBCMD_A@
51UNINSTALLLIBCMD_SH=@UNINSTALLLIBCMD_SH@
52UNINSTALLLIBCMD_A=@UNINSTALLLIBCMD_A@
53
54VPATH=@srcdir@
55srcdir=@abs_srcdir@
56builddir=@abs_builddir@
57SHELL=/bin/sh
58DESTDIR=/
59
60# XXX: Perhaps this should be @SHELL@ instead -- apparently autoconf
61# will search for a POSIX-compliant shell, and that might not be
62# /bin/sh on some platforms.  I guess it's not a big problem -- mbp
63
64# See the autoconf manual "Installation Directory Variables" for a
65# discussion of the subtle use of these variables.
66
67BASEDIR= @prefix@
68BINDIR = @bindir@
69# sbindir is mapped to bindir when compiling SAMBA in 2.0.x compatibility mode.
70SBINDIR = @sbindir@
71ROOTSBINDIR = @rootsbindir@
72LIBDIR = @libdir@
73PAMMODULESDIR = @pammodulesdir@
74VFSLIBDIR = $(LIBDIR)/vfs
75PDBLIBDIR = $(LIBDIR)/pdb
76RPCLIBDIR = $(LIBDIR)/rpc
77IDMAPLIBDIR = $(LIBDIR)/idmap
78CHARSETLIBDIR = $(LIBDIR)/charset
79AUTHLIBDIR = $(LIBDIR)/auth
80CONFIGLIBDIR = $(LIBDIR)/config
81CONFIGDIR = @configdir@
82VARDIR = @localstatedir@
83MANDIR = @mandir@
84DATADIR = @datadir@
85
86# The permissions to give the executables
87INSTALLPERMS = 0755
88
89# set these to where to find various files
90# These can be overridden by command line switches (see smbd(8))
91# or in smb.conf (see smb.conf(5))
92LOGFILEBASE = @logfilebase@
93CONFIGFILE = $(CONFIGDIR)/smb.conf
94LMHOSTSFILE = $(CONFIGDIR)/lmhosts
95
96# This is where smbpasswd et al go
97PRIVATEDIR = @privatedir@
98
99SMB_PASSWD_FILE = $(PRIVATEDIR)/smbpasswd
100PRIVATE_DIR = $(PRIVATEDIR)
101
102# This is where SWAT images and help files go
103SWATDIR = @swatdir@
104
105# the directory where lock files go
106LOCKDIR = @lockdir@
107
108# the directory where pid files go
109PIDDIR = @piddir@
110
111LIBSMBCLIENT=bin/libsmbclient.a @LIBSMBCLIENT_SHARED@
112LIBSMBCLIENT_MAJOR=0
113LIBSMBCLIENT_MINOR=1
114
115LIBMSRPC=bin/libmsrpc.a @LIBMSRPC_SHARED@
116LIBMSRPC_MAJOR=0
117LIBMSRPC_MINOR=1
118
119LIBSMBSHAREMODES=bin/libsmbsharemodes.a @LIBSMBSHAREMODES_SHARED@
120LIBSMBSHAREMODES_MAJOR=0
121LIBSMBSHAREMODES_MINOR=2
122
123LIBADDNS=bin/libaddns.a @LIBADDNS_SHARED@
124LIBADDNS_MAJOR=0
125LIBADDNS_MINOR=1
126
127FLAGS1 = $(CFLAGS) @FLAGS1@ @SAMBA_CPPFLAGS@ $(CPPFLAGS)
128FLAGS2 =
129FLAGS3 =
130FLAGS4 =
131FLAGS5 = $(FLAGS1) $(FLAGS2) $(FLAGS3) $(FLAGS4)
132FLAGS  = $(ISA) $(FLAGS5) -I$(srcdir)/lib -D_SAMBA_BUILD_=3
133
134PASSWD_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" -DPRIVATE_DIR=\"$(PRIVATE_DIR)\"
135PATH_FLAGS1 = -DCONFIGFILE=\"$(CONFIGFILE)\"  -DSBINDIR=\"$(SBINDIR)\"
136PATH_FLAGS2 = $(PATH_FLAGS1) -DBINDIR=\"$(BINDIR)\"
137PATH_FLAGS3 = $(PATH_FLAGS2) -DLMHOSTSFILE=\"$(LMHOSTSFILE)\"
138PATH_FLAGS4 = $(PATH_FLAGS3) -DSWATDIR=\"$(SWATDIR)\"  -DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\"
139PATH_FLAGS5 = $(PATH_FLAGS4) -DLIBDIR=\"$(LIBDIR)\" \
140              -DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"@SHLIBEXT@\"
141PATH_FLAGS6 = $(PATH_FLAGS5) -DCONFIGDIR=\"$(CONFIGDIR)\"
142PATH_FLAGS = $(PATH_FLAGS6) $(PASSWD_FLAGS)
143
144# Note that all executable programs now provide for an optional executable suffix.
145
146SBIN_PROGS = bin/smbd@EXEEXT@ bin/nmbd@EXEEXT@ bin/swat@EXEEXT@ @EXTRA_SBIN_PROGS@
147
148ROOT_SBIN_PROGS = @CIFSMOUNT_PROGS@
149
150BIN_PROGS1 = bin/smbclient@EXEEXT@ bin/net@EXEEXT@ bin/smbspool@EXEEXT@ \
151        bin/testparm@EXEEXT@ bin/smbstatus@EXEEXT@ bin/smbget@EXEEXT@
152BIN_PROGS2 = bin/smbcontrol@EXEEXT@ bin/smbtree@EXEEXT@ bin/tdbbackup@EXEEXT@ \
153        bin/nmblookup@EXEEXT@ bin/pdbedit@EXEEXT@ bin/tdbdump@EXEEXT@ \
154        bin/tdbtool@EXEEXT@
155BIN_PROGS3 = bin/smbpasswd@EXEEXT@ bin/rpcclient@EXEEXT@ bin/smbcacls@EXEEXT@ \
156        bin/profiles@EXEEXT@ bin/ntlm_auth@EXEEXT@ \
157        bin/smbcquotas@EXEEXT@ bin/eventlogadm@EXEEXT@
158
159TORTURE_PROGS = bin/smbtorture@EXEEXT@ bin/msgtest@EXEEXT@ \
160        bin/masktest@EXEEXT@ bin/locktest@EXEEXT@ \
161        bin/locktest2@EXEEXT@ bin/nsstest@EXEEXT@ bin/vfstest@EXEEXT@ \
162        bin/pdbtest@EXEEXT@ bin/talloctort@EXEEXT@ bin/replacetort@EXEEXT@
163
164BIN_PROGS = $(BIN_PROGS1) $(BIN_PROGS2) $(BIN_PROGS3) @EXTRA_BIN_PROGS@ \
165        @SMBMOUNT_PROGS@
166
167EVERYTHING_PROGS = bin/debug2html@EXEEXT@ bin/smbfilter@EXEEXT@ \
168        bin/talloctort@EXEEXT@ bin/replacetort@EXEEXT@ \
169        bin/log2pcap@EXEEXT@ bin/sharesec@EXEEXT@
170
171SHLIBS = @LIBSMBCLIENT@ @LIBSMBSHAREMODES@ @LIBMSRPC@ @LIBADDNS@
172
173PAM_MODULES = @PAM_MODULES@
174
175NSS_MODULES = @WINBIND_WINS_NSS@ @WINBIND_NSS@
176
177SCRIPTS = $(srcdir)/script/smbtar $(builddir)/script/findsmb
178
179VFS_MODULES = @VFS_MODULES@
180PDB_MODULES = @PDB_MODULES@
181RPC_MODULES = @RPC_MODULES@
182IDMAP_MODULES = @IDMAP_MODULES@
183CHARSET_MODULES = @CHARSET_MODULES@
184AUTH_MODULES = @AUTH_MODULES@
185NSS_INFO_MODULES = @NSS_INFO_MODULES@
186MODULES = $(VFS_MODULES) $(PDB_MODULES) $(RPC_MODULES) $(IDMAP_MODULES) \
187          $(CHARSET_MODULES) $(AUTH_MODULES) $(NSS_INFO_MODULES)
188
189######################################################################
190# object file lists
191######################################################################
192
193TDBBASE_OBJ = tdb/common/tdb.o tdb/common/dump.o tdb/common/error.o \
194        tdb/common/freelist.o tdb/common/freelistcheck.o tdb/common/io.o tdb/common/lock.o \
195        tdb/common/open.o tdb/common/transaction.o tdb/common/traverse.o
196
197TDB_OBJ = $(TDBBASE_OBJ) lib/util_tdb.o tdb/common/tdbback.o
198
199SMBLDAP_OBJ = @SMBLDAP@ @SMBLDAPUTIL@
200
201VERSION_OBJ = lib/version.o
202
203DOSERR_OBJ = libsmb/doserr.o
204
205WBCOMMON_OBJ = nsswitch/wb_common.o
206
207AFS_OBJ = lib/afs.o
208
209AFS_SETTOKEN_OBJ = lib/afs_settoken.o
210
211SERVER_MUTEX_OBJ = lib/server_mutex.o
212
213ERRORMAP_OBJ = libsmb/errormap.o
214
215PASSCHANGE_OBJ = libsmb/passchange.o
216
217LIBNDR_OBJ = librpc/ndr/ndr_basic.o librpc/ndr/ndr.o librpc/ndr/ndr_misc.o \
218             librpc/ndr/ndr_sec_helper.o librpc/ndr/ndr_string.o librpc/ndr/sid.o \
219             rpc_client/ndr.o
220
221LIBNDR_GEN_OBJ = librpc/gen_ndr/ndr_wkssvc.o librpc/gen_ndr/ndr_notify.o
222
223RPC_PARSE_OBJ0 = rpc_parse/parse_prs.o rpc_parse/parse_misc.o
224
225# this includes only the low level parse code, not stuff
226# that requires knowledge of security contexts
227RPC_PARSE_OBJ1 = $(RPC_PARSE_OBJ0) rpc_parse/parse_sec.o
228
229RPC_PARSE_OBJ2 = rpc_parse/parse_rpc.o rpc_parse/parse_net.o rpc_parse/parse_srv.o
230
231LIBREPLACE_OBJ = @LIBREPLACE_OBJS@
232
233SOCKET_WRAPPER_OBJ = @SOCKET_WRAPPER_OBJS@
234
235TALLOC_OBJ = lib/talloc/talloc.o
236
237LIB_WITHOUT_PROTO_OBJ = $(LIBREPLACE_OBJ) $(SOCKET_WRAPPER_OBJ) $(TALLOC_OBJ)
238
239LIB_WITH_PROTO_OBJ = $(VERSION_OBJ) lib/charcnv.o lib/debug.o lib/fault.o \
240          lib/interface.o lib/md4.o \
241          lib/interfaces.o lib/pidfile.o \
242          lib/signal.o lib/system.o lib/os2ea.o lib/sendfile.o lib/time.o \
243          lib/ufc.o lib/genrand.o lib/username.o \
244          lib/util_pw.o lib/access.o lib/smbrun.o \
245          lib/bitmap.o lib/crc32.o lib/dprintf.o \
246          lib/xfile.o lib/wins_srv.o \
247          lib/util_str.o lib/clobber.o lib/util_sid.o lib/util_uuid.o \
248          lib/util_unistr.o lib/util_file.o lib/data_blob.o \
249          lib/util.o lib/util_sock.o lib/sock_exec.o lib/util_sec.o \
250          lib/substitute.o lib/fsusage.o \
251          lib/ms_fnmatch.o lib/select.o lib/messages.o \
252          lib/tallocmsg.o lib/dmallocmsg.o libsmb/smb_signing.o \
253          lib/md5.o lib/hmacmd5.o lib/arc4.o lib/iconv.o \
254          nsswitch/wb_client.o $(WBCOMMON_OBJ) \
255          lib/pam_errors.o intl/lang_tdb.o \
256          lib/adt_tree.o lib/gencache.o $(TDB_OBJ) \
257          lib/module.o lib/events.o lib/ldap_escape.o @CHARSET_STATIC@ \
258          lib/secdesc.o lib/util_seaccess.o lib/secace.o lib/secacl.o \
259          libads/krb5_errs.o lib/system_smbd.o lib/audit.o
260
261LIB_OBJ = $(LIB_WITHOUT_PROTO_OBJ) $(LIB_WITH_PROTO_OBJ)
262
263LIB_DUMMY_OBJ = lib/dummysmbd.o lib/dummyroot.o
264LIB_NONSMBD_OBJ = $(LIB_OBJ) $(LIB_DUMMY_OBJ)
265
266READLINE_OBJ = lib/readline.o
267
268# Also depends on  $(SECRETS_OBJ) $(LIBSAMBA_OBJ)
269# Be sure to include them into your application
270POPT_LIB_OBJ = lib/popt_common.o
271
272PARAM_OBJ = dynconfig.o param/loadparm.o param/params.o lib/sharesec.o
273
274KRBCLIENT_OBJ = libads/kerberos.o libads/ads_status.o
275
276LIBADDNS_OBJ0 = libaddns/dnsrecord.o libaddns/dnsutils.o  libaddns/dnssock.o \
277               libaddns/dnsgss.o libaddns/dnsmarshall.o
278LIBADDNS_OBJ = $(LIBADDNS_OBJ0) $(TALLOC_OBJ)
279
280LIBGPO_OBJ0 = libgpo/gpo_ldap.o libgpo/gpo_parse.o libgpo/gpo_util.o \
281              libgpo/gpo_fetch.o libgpo/gpo_filesync.o
282LIBGPO_OBJ = $(LIBGPO_OBJ0)
283
284LIBADS_OBJ = libads/ldap.o libads/ldap_printer.o libads/sasl.o \
285             libads/krb5_setpw.o libads/ldap_user.o \
286             libads/ads_struct.o libads/kerberos_keytab.o \
287             libads/disp_sec.o libads/ads_utils.o libads/ldap_utils.o \
288             libads/authdata.o libads/cldap.o
289
290LIBADS_SERVER_OBJ = libads/util.o libads/kerberos_verify.o \
291                    libads/ldap_schema.o
292
293SECRETS_OBJ = passdb/secrets.o passdb/machine_sid.o
294
295LIBNMB_OBJ = libsmb/unexpected.o libsmb/namecache.o libsmb/nmblib.o \
296             libsmb/namequery.o libsmb/conncache.o libads/dns.o
297
298LIBSAMBA_OBJ = libsmb/nterr.o libsmb/dcerpc_err.o libsmb/smbdes.o \
299               libsmb/smbencrypt.o libsmb/ntlm_check.o \
300               libsmb/ntlmssp.o libsmb/ntlmssp_parse.o libsmb/ntlmssp_sign.o
301
302LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \
303             libsmb/clikrb5.o libsmb/clispnego.o libsmb/asn1.o \
304             libsmb/clirap.o libsmb/clierror.o libsmb/climessage.o \
305             libsmb/clireadwrite.o libsmb/clilist.o libsmb/cliprint.o \
306             libsmb/clitrans.o libsmb/clisecdesc.o libsmb/clidgram.o \
307             libsmb/clistr.o libsmb/cliquota.o libsmb/clifsinfo.o libsmb/clidfs.o \
308             libsmb/smberr.o libsmb/credentials.o libsmb/pwd_cache.o \
309             libsmb/clioplock.o $(ERRORMAP_OBJ) libsmb/clirap2.o \
310             $(DOSERR_OBJ) \
311             $(RPC_PARSE_OBJ1) $(LIBSAMBA_OBJ) $(LIBNMB_OBJ)
312
313RPC_CLIENT_OBJ1 = rpc_client/cli_netlogon.o rpc_client/cli_srvsvc.o
314
315LIBMSRPC_OBJ = rpc_client/cli_lsarpc.o rpc_client/cli_samr.o \
316               $(RPC_CLIENT_OBJ1) rpc_client/cli_reg.o $(RPC_CLIENT_OBJ) \
317               rpc_client/cli_spoolss.o rpc_client/cli_spoolss_notify.o  \
318               rpc_client/cli_ds.o rpc_client/cli_svcctl.o \
319               rpc_client/cli_shutdown.o rpc_client/cli_dfs.o rpc_client/cli_echo.o
320
321LIBMSRPC_GEN_OBJ = librpc/gen_ndr/cli_wkssvc.o \
322                   $(LIBNDR_GEN_OBJ) $(LIBNDR_OBJ)
323
324REGOBJS_OBJ = registry/reg_objects.o
325
326REGISTRY_OBJ = registry/reg_frontend.o registry/reg_cachehook.o registry/reg_printing.o \
327               registry/reg_db.o registry/reg_eventlog.o registry/reg_shares.o \
328               registry/reg_util.o registry/reg_dynamic.o registry/reg_perfcount.o
329
330RPC_LSA_OBJ = rpc_server/srv_lsa.o rpc_server/srv_lsa_nt.o
331
332RPC_NETLOG_OBJ = rpc_server/srv_netlog.o rpc_server/srv_netlog_nt.o
333
334RPC_SAMR_OBJ = rpc_server/srv_samr.o rpc_server/srv_samr_nt.o \
335               rpc_server/srv_samr_util.o
336
337REGFIO_OBJ = registry/regfio.o
338
339RPC_REG_OBJ =  rpc_server/srv_reg.o rpc_server/srv_reg_nt.o $(REGFIO_OBJ)
340
341RPC_LSA_DS_OBJ =  rpc_server/srv_lsa_ds.o rpc_server/srv_lsa_ds_nt.o
342
343RPC_SVC_OBJ = rpc_server/srv_srvsvc.o rpc_server/srv_srvsvc_nt.o
344
345RPC_WKS_OBJ =  librpc/gen_ndr/srv_wkssvc.o rpc_server/srv_wkssvc_nt.o
346
347RPC_SVCCTL_OBJ =  rpc_server/srv_svcctl.o rpc_server/srv_svcctl_nt.o \
348                  services/svc_spoolss.o services/svc_rcinit.o services/services_db.o \
349                  services/svc_netlogon.o services/svc_winreg.o \
350                  services/svc_wins.o
351
352RPC_NTSVCS_OBJ = rpc_server/srv_ntsvcs.o rpc_server/srv_ntsvcs_nt.o
353
354RPC_DFS_OBJ =  rpc_server/srv_dfs.o rpc_server/srv_dfs_nt.o
355
356RPC_SPOOLSS_OBJ = rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o
357
358RPC_EVENTLOG_OBJ = rpc_server/srv_eventlog.o rpc_server/srv_eventlog_nt.o rpc_server/srv_eventlog_lib.o
359
360RPC_PIPE_OBJ = rpc_server/srv_pipe_hnd.o \
361               rpc_server/srv_pipe.o rpc_server/srv_lsa_hnd.o
362
363RPC_ECHO_OBJ = rpc_server/srv_echo.o rpc_server/srv_echo_nt.o
364
365RPC_SERVER_OBJ = @RPC_STATIC@ $(RPC_PIPE_OBJ)
366
367RPC_PARSE_OBJ = rpc_parse/parse_lsa.o $(RPC_PARSE_OBJ2) \
368                rpc_parse/parse_samr.o \
369                rpc_parse/parse_ds.o rpc_parse/parse_spoolss.o \
370                rpc_parse/parse_eventlog.o rpc_parse/parse_buffer.o \
371                rpc_parse/parse_ntsvcs.o rpc_parse/parse_svcctl.o $(REGOBJS_OBJ) \
372                rpc_parse/parse_dfs.o \
373                rpc_parse/parse_reg.o rpc_parse/parse_echo.o \
374                rpc_parse/parse_shutdown.o
375
376RPC_CLIENT_OBJ = rpc_client/cli_pipe.o
377
378LOCKING_OBJ = locking/locking.o locking/brlock.o locking/posix.o
379
380PASSDB_GET_SET_OBJ = passdb/pdb_get_set.o
381
382PASSDB_OBJ = $(PASSDB_GET_SET_OBJ) passdb/passdb.o passdb/pdb_interface.o \
383                passdb/util_wellknown.o passdb/util_builtin.o passdb/pdb_compat.o \
384                passdb/util_unixsids.o passdb/lookup_sid.o \
385                passdb/login_cache.o @PDB_STATIC@ \
386                lib/account_pol.o lib/privileges.o lib/util_nscd.o
387
388DEVEL_HELP_WEIRD_OBJ = modules/weird.o
389CP850_OBJ = modules/CP850.o
390CP437_OBJ = modules/CP437.o
391CHARSET_MACOSXFS_OBJ = modules/charset_macosxfs.o
392
393GROUPDB_OBJ = groupdb/mapping.o groupdb/mapping_tdb.o
394
395PROFILE_OBJ = profile/profile.o
396PROFILES_OBJ = utils/profiles.o \
397               $(REGFIO_OBJ) $(REGOBJS_OBJ) $(ERRORMAP_OBJ) \
398               $(RPC_PARSE_OBJ1) $(PARAM_OBJ) $(LIBSAMBA_OBJ) \
399               $(DOSERR_OBJ) $(LIB_OBJ) $(LIB_DUMMY_OBJ) \
400               $(POPT_LIB_OBJ) $(SECRETS_OBJ)
401
402OPLOCK_OBJ = smbd/oplock.o smbd/oplock_irix.o smbd/oplock_linux.o
403
404NOTIFY_OBJ = smbd/notify.o smbd/notify_inotify.o smbd/notify_internal.o
405
406VFS_DEFAULT_OBJ = modules/vfs_default.o
407VFS_AUDIT_OBJ = modules/vfs_audit.o
408VFS_EXTD_AUDIT_OBJ = modules/vfs_extd_audit.o
409VFS_FULL_AUDIT_OBJ = modules/vfs_full_audit.o
410VFS_FAKE_PERMS_OBJ = modules/vfs_fake_perms.o
411VFS_RECYCLE_OBJ = modules/vfs_recycle.o
412VFS_NETATALK_OBJ = modules/vfs_netatalk.o
413VFS_DEFAULT_QUOTA_OBJ = modules/vfs_default_quota.o
414VFS_READONLY_OBJ = modules/vfs_readonly.o modules/getdate.o
415VFS_CAP_OBJ = modules/vfs_cap.o
416VFS_EXPAND_MSDFS_OBJ = modules/vfs_expand_msdfs.o
417VFS_SHADOW_COPY_OBJ = modules/vfs_shadow_copy.o
418VFS_AFSACL_OBJ = modules/vfs_afsacl.o
419VFS_POSIXACL_OBJ = modules/vfs_posixacl.o
420VFS_AIXACL_OBJ = modules/vfs_aixacl.o modules/vfs_aixacl_util.o
421VFS_AIXACL2_OBJ = modules/vfs_aixacl2.o modules/vfs_aixacl_util.o modules/nfs4_acls.o
422VFS_SOLARISACL_OBJ = modules/vfs_solarisacl.o
423VFS_HPUXACL_OBJ = modules/vfs_hpuxacl.o
424VFS_IRIXACL_OBJ = modules/vfs_irixacl.o
425VFS_TRU64ACL_OBJ = modules/vfs_tru64acl.o
426VFS_CATIA_OBJ = modules/vfs_catia.o
427VFS_CACHEPRIME_OBJ = modules/vfs_cacheprime.o
428VFS_PREALLOC_OBJ = modules/vfs_prealloc.o
429VFS_COMMIT_OBJ = modules/vfs_commit.o
430VFS_GPFS_OBJ = modules/vfs_gpfs.o modules/gpfs.o modules/nfs4_acls.o
431VFS_NOTIFY_FAM_OBJ = modules/vfs_notify_fam.o
432VFS_READAHEAD_OBJ = modules/vfs_readahead.o
433
434PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o
435
436SLCACHE_OBJ = libsmb/samlogon_cache.o
437
438DCUTIL_OBJ  = libsmb/namequery_dc.o libsmb/trustdom_cache.o libsmb/trusts_util.o
439
440AUTH_BUILTIN_OBJ = auth/auth_builtin.o
441AUTH_DOMAIN_OBJ = auth/auth_domain.o
442AUTH_SAM_OBJ = auth/auth_sam.o
443AUTH_SERVER_OBJ = auth/auth_server.o
444AUTH_UNIX_OBJ = auth/auth_unix.o
445AUTH_WINBIND_OBJ = auth/auth_winbind.o
446AUTH_SCRIPT_OBJ = auth/auth_script.o
447
448AUTH_OBJ = auth/auth.o @AUTH_STATIC@ auth/auth_util.o auth/auth_compat.o \
449           auth/auth_ntlmssp.o \
450           $(PLAINTEXT_AUTH_OBJ) $(SLCACHE_OBJ) $(DCUTIL_OBJ)
451
452MANGLE_OBJ = smbd/mangle.o smbd/mangle_hash.o smbd/mangle_map.o smbd/mangle_hash2.o
453
454SMBD_OBJ_MAIN = smbd/server.o
455
456BUILDOPT_OBJ = smbd/build_options.o
457
458SMBD_OBJ_SRV = smbd/files.o smbd/chgpasswd.o smbd/connection.o \
459               smbd/utmp.o smbd/session.o smbd/map_username.o \
460               smbd/dfree.o smbd/dir.o smbd/password.o smbd/conn.o \
461               smbd/share_access.o smbd/fileio.o \
462               smbd/ipc.o smbd/lanman.o smbd/negprot.o \
463               smbd/message.o smbd/nttrans.o smbd/pipes.o \
464               smbd/reply.o smbd/sesssetup.o smbd/trans2.o smbd/uid.o \
465               smbd/dosmode.o smbd/filename.o smbd/open.o smbd/close.o \
466               smbd/blocking.o smbd/sec_ctx.o smbd/srvstr.o \
467               smbd/vfs.o smbd/statcache.o \
468               smbd/posix_acls.o lib/sysacls.o $(SERVER_MUTEX_OBJ) \
469               smbd/process.o smbd/service.o smbd/error.o \
470               printing/printfsp.o lib/sysquotas.o lib/sysquotas_linux.o \
471               lib/sysquotas_xfs.o lib/sysquotas_4A.o \
472               smbd/change_trust_pw.o smbd/fake_file.o \
473               smbd/quotas.o smbd/ntquotas.o $(AFS_OBJ) smbd/msdfs.o \
474               $(AFS_SETTOKEN_OBJ) smbd/aio.o smbd/statvfs.o \
475               smbd/dmapi.o $(MANGLE_OBJ) @VFS_STATIC@
476
477SMBD_OBJ_BASE = $(PARAM_OBJ) $(SMBD_OBJ_SRV) $(LIBSMB_OBJ) \
478                $(RPC_SERVER_OBJ) $(RPC_PARSE_OBJ) $(SECRETS_OBJ) \
479                $(LOCKING_OBJ) $(PASSDB_OBJ) $(PRINTING_OBJ) $(PROFILE_OBJ) \
480                $(LIB_OBJ) $(PRINTBACKEND_OBJ) $(OPLOCK_OBJ) \
481                $(NOTIFY_OBJ) $(GROUPDB_OBJ) $(AUTH_OBJ) \
482                $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
483                $(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(LIBADS_SERVER_OBJ) \
484                $(REGISTRY_OBJ) $(POPT_LIB_OBJ) \
485                $(BUILDOPT_OBJ) $(SMBLDAP_OBJ)
486
487PRINTING_OBJ = printing/pcap.o printing/print_svid.o printing/print_aix.o \
488               printing/print_cups.o printing/print_generic.o \
489               printing/lpq_parse.o printing/load.o \
490               printing/print_iprint.o printing/print_test.o
491
492PRINTBASE_OBJ = printing/notify.o printing/printing_db.o
493PRINTBACKEND_OBJ = printing/printing.o printing/nt_printing.o $(PRINTBASE_OBJ)
494
495SMBD_OBJ = $(SMBD_OBJ_BASE) $(SMBD_OBJ_MAIN)
496NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \
497            nmbd/nmbd_become_lmb.o nmbd/nmbd_browserdb.o \
498            nmbd/nmbd_browsesync.o nmbd/nmbd_elections.o \
499            nmbd/nmbd_incomingdgrams.o nmbd/nmbd_incomingrequests.o \
500            nmbd/nmbd_lmhosts.o nmbd/nmbd_logonnames.o nmbd/nmbd_mynames.o \
501            nmbd/nmbd_namelistdb.o nmbd/nmbd_namequery.o \
502            nmbd/nmbd_nameregister.o nmbd/nmbd_namerelease.o \
503            nmbd/nmbd_nodestatus.o nmbd/nmbd_packets.o \
504            nmbd/nmbd_processlogon.o nmbd/nmbd_responserecordsdb.o \
505            nmbd/nmbd_sendannounce.o nmbd/nmbd_serverlistdb.o \
506            nmbd/nmbd_subnetdb.o nmbd/nmbd_winsproxy.o nmbd/nmbd_winsserver.o \
507            nmbd/nmbd_workgroupdb.o nmbd/nmbd_synclists.o
508
509NMBD_OBJ = $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
510           $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ) $(POPT_LIB_OBJ)
511
512SWAT_OBJ1 = web/cgi.o web/diagnose.o web/startstop.o web/statuspage.o \
513           web/swat.o web/neg_lang.o
514
515SWAT_OBJ = $(SWAT_OBJ1) $(PARAM_OBJ) $(PRINTING_OBJ) $(LIBSMB_OBJ) \
516           $(LOCKING_OBJ) $(PASSDB_OBJ) $(SECRETS_OBJ) $(KRBCLIENT_OBJ) \
517           $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) $(PLAINTEXT_AUTH_OBJ) \
518           $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(RPC_PARSE_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ) \
519           $(PASSCHANGE_OBJ)
520
521STATUS_OBJ = utils/status.o utils/status_profile.o \
522             $(LOCKING_OBJ) $(PARAM_OBJ) \
523             $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
524             $(SECRETS_OBJ) $(LIBSAMBA_OBJ) $(ERRORMAP_OBJ) $(RPC_PARSE_OBJ1) \
525             $(DOSERR_OBJ)
526
527SMBCONTROL_OBJ = utils/smbcontrol.o $(LOCKING_OBJ) $(PARAM_OBJ) \
528        $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
529        $(SECRETS_OBJ) $(LIBSAMBA_OBJ) $(RPC_PARSE_OBJ1) $(DOSERR_OBJ) \
530        $(PRINTBASE_OBJ) $(ERRORMAP_OBJ)
531
532SMBTREE_OBJ = utils/smbtree.o $(PARAM_OBJ) \
533             $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSMB_OBJ) \
534             $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) $(SECRETS_OBJ) \
535             rpc_client/cli_pipe.o $(RPC_PARSE_OBJ2) \
536             $(RPC_CLIENT_OBJ1) \
537             $(LIBMSRPC_GEN_OBJ)
538
539TESTPARM_OBJ = utils/testparm.o \
540               $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
541               $(SECRETS_OBJ) $(LIBSAMBA_OBJ) $(RPC_PARSE_OBJ1) $(DOSERR_OBJ)
542
543PASSWD_UTIL_OBJ = utils/passwd_util.o
544
545SMBPASSWD_OBJ = utils/smbpasswd.o $(PASSWD_UTIL_OBJ) $(PASSCHANGE_OBJ) \
546                $(PARAM_OBJ) $(SECRETS_OBJ) $(LIBSMB_OBJ) $(PASSDB_OBJ) \
547                $(GROUPDB_OBJ) $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \
548                $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(RPC_PARSE_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ)
549
550PDBEDIT_OBJ = utils/pdbedit.o $(PASSWD_UTIL_OBJ) $(PARAM_OBJ) $(PASSDB_OBJ) \
551                $(LIBSAMBA_OBJ) $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) \
552                $(SECRETS_OBJ) $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) libsmb/asn1.o \
553                $(RPC_PARSE_OBJ1) $(DOSERR_OBJ) libsmb/errormap.o
554
555SMBGET_OBJ = utils/smbget.o $(POPT_LIB_OBJ) $(LIBSMBCLIENT_OBJ)
556
557DISPLAY_SEC_OBJ= lib/display_sec.o
558
559RPCCLIENT_OBJ1 = rpcclient/rpcclient.o rpcclient/cmd_lsarpc.o \
560                 rpcclient/cmd_samr.o rpcclient/cmd_spoolss.o \
561                 rpcclient/cmd_netlogon.o rpcclient/cmd_srvsvc.o \
562                 rpcclient/cmd_dfs.o \
563                 rpcclient/cmd_ds.o rpcclient/cmd_echo.o \
564                 rpcclient/cmd_shutdown.o rpcclient/cmd_test.o \
565                 $(DISPLAY_SEC_OBJ)
566
567RPCCLIENT_OBJ = $(RPCCLIENT_OBJ1) \
568             $(PARAM_OBJ) $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) \
569             $(RPC_PARSE_OBJ) $(PASSDB_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ) \
570             $(READLINE_OBJ) $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) \
571             $(LIBADS_OBJ) $(SECRETS_OBJ) $(POPT_LIB_OBJ) \
572             $(SMBLDAP_OBJ) $(DCUTIL_OBJ)
573
574PAM_WINBIND_OBJ = nsswitch/pam_winbind.o $(WBCOMMON_OBJ) \
575                  $(LIBREPLACE_OBJ) $(SOCKET_WRAPPER_OBJ) @BUILD_INIPARSER@
576
577LIBSMBCLIENT_OBJ = libsmb/libsmbclient.o libsmb/libsmb_compat.o \
578                   libsmb/libsmb_cache.o \
579                   $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
580                   $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
581                   $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(RPC_PARSE_OBJ) \
582                   $(SECRETS_OBJ) $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ)
583
584CAC_OBJ = $(LIBSMBCLIENT_OBJ) \
585                         libmsrpc/libmsrpc.o libmsrpc/libmsrpc_internal.o \
586                         libmsrpc/cac_lsarpc.o libmsrpc/cac_winreg.o libmsrpc/cac_samr.o \
587                         libmsrpc/cac_svcctl.o
588
589LIBSMBSHAREMODES_OBJ = libsmb/smb_share_modes.o $(TDB_BASE_OBJ)
590
591# This shared library is intended for linking with unit test programs
592# to test Samba internals.  It's called libbigballofmud.so to
593# discourage casual usage.
594
595LIBBIGBALLOFMUD_MAJOR = 0
596
597LIBBIGBALLOFMUD_OBJ = $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ) \
598        $(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_OBJ) \
599        $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) $(SMBLDAP_OBJ)
600
601CLIENT_OBJ1 = client/client.o client/clitar.o rpc_client/cli_pipe.o \
602              $(RPC_CLIENT_OBJ1) \
603              $(RPC_PARSE_OBJ2)
604
605CLIENT_OBJ = $(CLIENT_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) \
606             $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) $(LIBMSRPC_GEN_OBJ) \
607             $(READLINE_OBJ) $(POPT_LIB_OBJ) $(SECRETS_OBJ) \
608             $(DISPLAY_SEC_OBJ)
609
610TOOL_OBJ = client/smbctool.o client/clitar.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
611             $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \
612             $(READLINE_OBJ) $(POPT_LIB_OBJ) $(SECRETS_OBJ) \
613             $(DISPLAY_SEC_OBJ)
614
615NET_OBJ1 = utils/net.o utils/net_ads.o utils/net_domain.o utils/net_help.o \
616           utils/net_rap.o utils/net_rpc.o utils/net_rpc_samsync.o \
617           utils/net_rpc_join.o utils/net_time.o utils/net_lookup.o \
618           utils/net_cache.o utils/net_groupmap.o utils/net_idmap.o \
619           utils/net_status.o utils/net_rpc_printer.o utils/net_rpc_rights.o \
620           utils/net_rpc_service.o utils/net_rpc_registry.o utils/net_usershare.o \
621           utils/netlookup.o utils/net_sam.o utils/net_rpc_shell.o \
622           utils/net_util.o utils/net_rpc_sh_acct.o utils/net_rpc_audit.o \
623           $(PASSWD_UTIL_OBJ) utils/net_dns.o utils/net_ads_gpo.o
624
625NET_OBJ = $(NET_OBJ1) $(PARAM_OBJ) $(SECRETS_OBJ) $(LIBSMB_OBJ) \
626          $(RPC_PARSE_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
627          $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(LIBADDNS_OBJ0) \
628          $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
629          $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) $(POPT_LIB_OBJ) \
630          $(SMBLDAP_OBJ) $(DCUTIL_OBJ) $(SERVER_MUTEX_OBJ) \
631          $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) $(REGFIO_OBJ) $(READLINE_OBJ) \
632          $(LIBGPO_OBJ) $(INIPARSER_OBJ) $(DISPLAY_SEC_OBJ)
633
634CUPS_OBJ = client/smbspool.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
635          $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) $(SECRETS_OBJ)
636
637MOUNT_OBJ = client/smbmount.o \
638             $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ)
639
640MNT_OBJ = client/smbmnt.o $(VERSION_OBJ) $(LIBREPLACE_OBJ) $(SOCKET_WRAPPER_OBJ)
641
642UMOUNT_OBJ = client/smbumount.o $(SOCKET_WRAPPER_OBJ)
643
644CIFS_MOUNT_OBJ = client/mount.cifs.o
645
646CIFS_UMOUNT_OBJ = client/umount.cifs.o
647
648NMBLOOKUP_OBJ = utils/nmblookup.o $(PARAM_OBJ) $(LIBNMB_OBJ) $(RPC_PARSE_OBJ1) $(DOSERR_OBJ) \
649               $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) $(SECRETS_OBJ) $(LIBSAMBA_OBJ)
650
651SMBTORTURE_OBJ1 = torture/torture.o torture/nbio.o torture/scanner.o torture/utable.o \
652                torture/denytest.o torture/mangle_test.o
653
654SMBTORTURE_OBJ = $(SMBTORTURE_OBJ1) $(PARAM_OBJ) \
655        $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ)
656
657MASKTEST_OBJ = torture/masktest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
658                 $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ)
659
660MSGTEST_OBJ = torture/msgtest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
661                 $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ)
662
663LOCKTEST_OBJ = torture/locktest.o $(PARAM_OBJ) $(LOCKING_OBJ) $(KRBCLIENT_OBJ) \
664               $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ)
665
666NSSTEST_OBJ = torture/nsstest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
667                 $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ)
668
669PDBTEST_OBJ = torture/pdbtest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
670                $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
671                $(SMBLDAP_OBJ) $(POPT_LIB_OBJ)
672
673
674VFSTEST_OBJ = torture/cmd_vfs.o torture/vfstest.o $(SMBD_OBJ_BASE) $(READLINE_OBJ)
675
676SMBICONV_OBJ = $(PARAM_OBJ) torture/smbiconv.o $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) $(SECRETS_OBJ) $(LIBSAMBA_OBJ)
677
678LOG2PCAP_OBJ = utils/log2pcaphex.o
679
680LOCKTEST2_OBJ = torture/locktest2.o $(PARAM_OBJ) $(LOCKING_OBJ) $(LIBSMB_OBJ) \
681                $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(SECRETS_OBJ)
682
683SMBCACLS_OBJ = utils/smbcacls.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
684                           $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(RPC_PARSE_OBJ) \
685                           $(PASSDB_OBJ) $(GROUPDB_OBJ) $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(SECRETS_OBJ) \
686                           $(POPT_LIB_OBJ) $(DCUTIL_OBJ) $(LIBADS_OBJ) $(SMBLDAP_OBJ)
687
688SMBCQUOTAS_OBJ = utils/smbcquotas.o $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
689                $(PARAM_OBJ) \
690                $(LIB_NONSMBD_OBJ) $(RPC_PARSE_OBJ) \
691                $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(SECRETS_OBJ) $(POPT_LIB_OBJ) \
692                $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ)
693
694EVTLOGADM_OBJ0  = utils/eventlogadm.o
695
696EVTLOGADM_OBJ   = $(EVTLOGADM_OBJ0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(REGOBJS_OBJ) \
697                $(ERRORMAP_OBJ) $(RPC_PARSE_OBJ1) $(LIBSAMBA_OBJ) $(DOSERR_OBJ) \
698                $(SECRETS_OBJ) \
699                registry/reg_eventlog.o rpc_server/srv_eventlog_lib.o registry/reg_util.o \
700                registry/reg_db.o
701
702SHARESEC_OBJ0 = utils/sharesec.o
703SHARESEC_OBJ  = $(SHARESEC_OBJ0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(REGOBJS_OBJ) \
704                $(ERRORMAP_OBJ) $(RPC_PARSE_OBJ1) $(LIBSAMBA_OBJ) $(DOSERR_OBJ) \
705                $(POPT_LIB_OBJ) $(SECRETS_OBJ)
706
707TALLOCTORT_OBJ = lib/talloc/testsuite.o $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
708                 $(RPC_PARSE_OBJ1) $(DOSERR_OBJ) $(LIBSAMBA_OBJ) $(SECRETS_OBJ)
709
710REPLACETORT_OBJ = lib/replace/test/testsuite.o lib/replace/test/os2_delete.o \
711                $(LIBREPLACE_OBJ)
712
713RPCTORTURE_OBJ = torture/rpctorture.o \
714             rpcclient/display.o \
715             rpcclient/cmd_lsarpc.o \
716             rpcclient/cmd_samr.o \
717             rpcclient/cmd_wkssvc.o \
718             rpcclient/cmd_srvsvc.o \
719             rpcclient/cmd_netlogon.o \
720             $(PARAM_OBJ) $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \
721             $(RPC_CLIENT_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_GET_SET_OBJ) $(SECRETS_OBJ)
722
723DEBUG2HTML_OBJ = utils/debug2html.o utils/debugparse.o
724
725SMBFILTER_OBJ = utils/smbfilter.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(SECRETS_OBJ) \
726                 $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ)
727
728PROTO_OBJ = $(SMBD_OBJ_MAIN) $(LIBNDR_OBJ) $(LIBNDR_GEN_OBJ) \
729            $(SMBD_OBJ_SRV) $(NMBD_OBJ1) $(LIBSMB_OBJ) \
730            $(SMBTORTURE_OBJ1) $(RPCCLIENT_OBJ1) \
731            $(LIBMSRPC_OBJ) \
732            $(LIB_WITH_PROTO_OBJ) \
733            $(RPC_PIPE_OBJ) $(RPC_PARSE_OBJ) $(KRBCLIENT_OBJ) \
734            $(AUTH_OBJ) $(PARAM_OBJ) $(LOCKING_OBJ) $(SECRETS_OBJ) \
735            $(PRINTING_OBJ) $(PRINTBACKEND_OBJ) $(OPLOCK_OBJ) $(NOTIFY_OBJ) \
736            $(PASSDB_OBJ) $(GROUPDB_OBJ) \
737            $(READLINE_OBJ) $(PROFILE_OBJ) $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) \
738            $(AUTH_SAM_OBJ) $(REGISTRY_OBJ) $(POPT_LIB_OBJ) \
739            $(RPC_LSA_OBJ) $(RPC_NETLOG_OBJ) $(RPC_SAMR_OBJ) $(RPC_REG_OBJ) $(RPC_LSA_DS_OBJ) \
740            $(RPC_SVC_OBJ) $(RPC_WKS_OBJ) $(RPC_DFS_OBJ) $(RPC_SPOOLSS_OBJ) \
741            $(RPC_ECHO_OBJ) $(RPC_SVCCTL_OBJ) $(RPC_EVENTLOG_OBJ) $(SMBLDAP_OBJ) \
742            $(IDMAP_OBJ) libsmb/spnego.o $(PASSCHANGE_OBJ) $(RPC_UNIXINFO_OBJ) \
743            $(RPC_NTSVCS_OBJ) $(RPC_INITSHUTDOWN_OBJ) utils/passwd_util.o \
744            $(LIBGPO_OBJ) $(NSS_INFO_OBJ)
745
746WINBIND_WINS_NSS_OBJ = nsswitch/wins.o $(PARAM_OBJ) \
747        $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) $(NSSWINS_OBJ) $(KRBCLIENT_OBJ) $(SECRETS_OBJ)
748
749PAM_SMBPASS_OBJ_0 = pam_smbpass/pam_smb_auth.o pam_smbpass/pam_smb_passwd.o \
750                pam_smbpass/pam_smb_acct.o pam_smbpass/support.o \
751                $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
752                $(SECRETS_OBJ) $(SMBLDAP_OBJ) $(LIBSAMBA_OBJ) \
753                $(RPC_PARSE_OBJ1) $(DOSERR_OBJ)
754
755IDMAP_OBJ     = nsswitch/idmap.o nsswitch/idmap_cache.o nsswitch/idmap_util.o @IDMAP_STATIC@
756
757NSS_INFO_OBJ = nsswitch/nss_info.o @NSS_INFO_STATIC@
758
759IDMAP_NSS_OBJ = sam/idmap_nss.o
760
761WINBINDD_OBJ1 = \
762                nsswitch/winbindd.o       \
763                nsswitch/winbindd_user.o  \
764                nsswitch/winbindd_group.o \
765                nsswitch/winbindd_util.o  \
766                nsswitch/winbindd_cache.o \
767                nsswitch/winbindd_pam.o   \
768                nsswitch/winbindd_sid.o   \
769                nsswitch/winbindd_misc.o  \
770                nsswitch/winbindd_cm.o \
771                nsswitch/winbindd_wins.o \
772                nsswitch/winbindd_rpc.o \
773                nsswitch/winbindd_reconnect.o \
774                nsswitch/winbindd_ads.o \
775                nsswitch/winbindd_passdb.o \
776                nsswitch/winbindd_dual.o \
777                nsswitch/winbindd_async.o \
778                nsswitch/winbindd_creds.o \
779                nsswitch/winbindd_cred_cache.o \
780                nsswitch/winbindd_ccache_access.o
781
782WINBINDD_OBJ = \
783                $(WINBINDD_OBJ1) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
784                $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
785                $(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(RPC_PARSE_OBJ) \
786                $(PROFILE_OBJ) $(SLCACHE_OBJ) $(SMBLDAP_OBJ) \
787                $(SECRETS_OBJ) $(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
788                $(DCUTIL_OBJ) $(IDMAP_OBJ) $(NSS_INFO_OBJ) \
789                $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) \
790                $(LIBADS_SERVER_OBJ) $(SERVER_MUTEX_OBJ)
791
792WBINFO_OBJ = nsswitch/wbinfo.o $(LIBSAMBA_OBJ) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
793                $(SECRETS_OBJ) $(POPT_LIB_OBJ) $(AFS_SETTOKEN_OBJ) $(RPC_PARSE_OBJ1) $(DOSERR_OBJ)
794
795WINBIND_NSS_OBJ = $(WBCOMMON_OBJ) $(LIBREPLACE_OBJ) $(SOCKET_WRAPPER_OBJ) @WINBIND_NSS_EXTRA_OBJS@
796
797SMB_KRB5_LOCATOR_OBJ1 = libads/smb_krb5_locator.o
798SMB_KRB5_LOCATOR_OBJ = $(SMB_KRB5_LOCATOR_OBJ1) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
799                       $(LIBNMB_OBJ) $(RPC_PARSE_OBJ1) $(SECRETS_OBJ) $(LIBSAMBA_OBJ) $(DOSERR_OBJ)
800
801POPT_OBJ=popt/findme.o popt/popt.o popt/poptconfig.o \
802          popt/popthelp.o popt/poptparse.o
803
804INIPARSER_OBJ = iniparser/src/iniparser.o iniparser/src/dictionary.o \
805                iniparser/src/strlib.o
806
807TDBBACKUP_OBJ = tdb/tools/tdbbackup.o tdb/common/tdbback.o $(LIBREPLACE_OBJ) \
808        $(TDBBASE_OBJ) $(SOCKET_WRAPPER_OBJ)
809
810TDBTOOL_OBJ = tdb/tools/tdbtool.o $(TDBBASE_OBJ) $(LIBREPLACE_OBJ) \
811        $(SOCKET_WRAPPER_OBJ)
812
813TDBDUMP_OBJ = tdb/tools/tdbdump.o $(TDBBASE_OBJ) $(LIBREPLACE_OBJ) \
814        $(SOCKET_WRAPPER_OBJ)
815
816NTLM_AUTH_OBJ1 = utils/ntlm_auth.o utils/ntlm_auth_diagnostics.o
817
818NTLM_AUTH_OBJ = ${NTLM_AUTH_OBJ1} $(LIBSAMBA_OBJ) $(POPT_LIB_OBJ) \
819                libsmb/asn1.o libsmb/spnego.o libsmb/clikrb5.o libads/kerberos.o \
820                libads/kerberos_verify.o $(SECRETS_OBJ) $(SERVER_MUTEX_OBJ) \
821                libads/authdata.o $(RPC_PARSE_OBJ1) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
822                $(SMBLDAP_OBJ) $(DOSERR_OBJ) rpc_parse/parse_net.o $(LIBNMB_OBJ) \
823                $(LDB_OBJ) libsmb/errormap.o
824
825######################################################################
826# now the rules...
827######################################################################
828all : SHOWFLAGS $(SBIN_PROGS) $(BIN_PROGS) $(ROOT_SBIN_PROGS) \
829        $(SHLIBS) $(MODULES) $(NSS_MODULES) $(PAM_MODULES) @EXTRA_ALL_TARGETS@
830
831nss_modules : $(NSS_MODULES)
832
833pam_modules : $(PAM_MODULES)
834
835pam_smbpass : SHOWFLAGS bin/pam_smbpass.@SHLIBEXT@
836
837pam_winbind : SHOWFLAGS bin/pam_winbind.@SHLIBEXT@
838
839torture : SHOWFLAGS $(TORTURE_PROGS)
840
841smbtorture : SHOWFLAGS bin/smbtorture@EXEEXT@
842
843masktest : SHOWFLAGS bin/masktest@EXEEXT@
844
845msgtest : SHOWFLAGS bin/msgtest@EXEEXT@
846
847locktest : SHOWFLAGS bin/locktest@EXEEXT@
848
849smbcacls : SHOWFLAGS bin/smbcacls@EXEEXT@
850
851smbcquotas : SHOWFLAGS bin/smbcquotas@EXEEXT@
852
853smbctool: SHOWFLAGS bin/smbctool@EXEEXT@
854
855locktest2 : SHOWFLAGS bin/locktest2@EXEEXT@
856
857rpctorture : SHOWFLAGS bin/rpctorture@EXEEXT@
858
859debug2html : SHOWFLAGS bin/debug2html@EXEEXT@
860
861smbfilter : SHOWFLAGS bin/smbfilter@EXEEXT@
862
863eventlogadm: SHOWFLAGS bin/eventlogadm@EXEEXT@
864
865sharesec: SHOWFLAGS bin/sharesec@EXEEXT@
866
867talloctort : SHOWFLAGS bin/talloctort@EXEEXT@
868
869replacetort : SHOWFLAGS bin/replacetort@EXEEXT@
870
871timelimit : SHOWFLAGS bin/timelimit@EXEEXT@
872
873nsswitch : SHOWFLAGS bin/winbindd@EXEEXT@ bin/wbinfo@EXEEXT@ @WINBIND_NSS@ \
874        @WINBIND_WINS_NSS@ bin/pam_winbind.@SHLIBEXT@
875
876wins : SHOWFLAGS @WINBIND_WINS_NSS@
877
878modules: SHOWFLAGS $(MODULES)
879
880cac: SHOWFLAGS $(LIBMSRPC)
881
882
883everything: all libsmbclient debug2html smbfilter talloctort replacetort modules torture \
884        $(EVERYTHING_PROGS)
885
886.SUFFIXES:
887.SUFFIXES: .c .o .lo
888
889SHOWFLAGS:
890        @echo "Using FLAGS      = $(FLAGS)"
891        @echo "      PICFLAG    = $(PICFLAG)"
892        @echo "      LIBS       = $(LIBS)"
893        @echo "      LDFLAGS    = $(LDFLAGS)"
894        @echo "      DYNEXP     = $(DYNEXP)"
895        @echo "      LDSHFLAGS  = $(LDSHFLAGS)"
896        @echo "      SHLIBEXT   = @SHLIBEXT@"
897        @echo "      SONAMEFLAG = @SONAMEFLAG@"
898
899MAKEDIR = || exec false; \
900          if test -d "$$dir"; then :; else \
901          echo mkdir "$$dir"; \
902          mkdir -p "$$dir" >/dev/null 2>&1 || \
903          test -d "$$dir" || \
904          mkdir "$$dir" || \
905          exec false; fi || exec false
906
907.c.o:
908        @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
909         dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
910        @if test -n "$(CC_CHECKER)"; then \
911          echo "Checking  $*.c with '$(CC_CHECKER)'";\
912          $(CC_CHECKER) -I. -I$(srcdir) $(FLAGS) $(PICFLAG) -c $< -o $@;\
913         fi
914        @echo Compiling $*.c
915        @$(CC) -I. -I$(srcdir) $(FLAGS) $(PICFLAG) -c $< -o $@ && exit 0;\
916                echo "The following command failed:" 1>&2;\
917                echo "$(CC) -I. -I$(srcdir) $(FLAGS) $(PICFLAG) -c $< -o $@" 1>&2;\
918                $(CC) -I. -I$(srcdir) $(FLAGS) $(PICFLAG) -c $< -o $@ >/dev/null 2>&1
919@BROKEN_CC@     -mv `echo $@ | sed 's%^.*/%%g'` $@
920
921# this adds support for precompiled headers. To use it, install a snapshot
922# of gcc-3.4 and run 'make pch' before you do the main build.
923pch: proto_exists
924        rm -f $(builddir)/include/includes.h.gch
925        $(CC) -I. -I$(srcdir) $(FLAGS) $(PICFLAG) -c $(srcdir)/include/includes.h -o $(builddir)/include/includes.h.gch
926
927# These dependencies are only approximately correct: we want to make
928# sure Samba's paths are updated if ./configure is re-run.  Really it
929# would be nice if "make prefix=/opt/samba all" also rebuilt things,
930# but since we also require "make install prefix=/opt/samba" *not* to
931# rebuild it's a bit hard.
932
933dynconfig.o: dynconfig.c Makefile
934        @echo Compiling $*.c
935        @$(CC) $(FLAGS) $(PATH_FLAGS) $(PICFLAG) -c $(srcdir)/dynconfig.c -o $@ && exit 0;\
936                echo "The following command failed:" 1>&2;\
937                echo "$(CC) $(FLAGS) $(PATH_FLAGS) $(PICFLAG) -c $(srcdir)/dynconfig.c -o $@" 1>&2;\
938                $(CC) $(FLAGS) $(PATH_FLAGS) $(PICFLAG) -c $(srcdir)/dynconfig.c -o $@ >/dev/null 2>&1
939
940lib/pidfile.o: lib/pidfile.c
941        @echo Compiling $*.c
942        @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) $(PICFLAG) -c $(srcdir)/lib/pidfile.c -o $@
943
944lib/version.o: lib/version.c include/version.h
945        @echo Compiling $*.c
946        @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) $(PICFLAG) -c $(srcdir)/lib/version.c -o $@
947
948smbd/build_options.o: smbd/build_options.c Makefile include/config.h include/build_env.h include/proto.h
949        @echo Compiling $*.c
950        @$(CC) $(FLAGS) $(PATH_FLAGS) $(PICFLAG) -c smbd/build_options.c -o $@
951
952smbd/build_options.c: include/config.h.in script/mkbuildoptions.awk
953        @echo Generating $@
954        @dir=smbd $(MAKEDIR) && $(AWK) -f $(srcdir)/script/mkbuildoptions.awk > $(builddir)/smbd/build_options.c < $(srcdir)/include/config.h.in
955
956bin/.dummy:
957        @if (: >> $@ || : > $@) >/dev/null 2>&1; then :; else \
958          dir=bin $(MAKEDIR); fi
959        @: >> $@ || : > $@ # what a fancy emoticon!
960
961bin/smbd@EXEEXT@: proto_exists $(SMBD_OBJ) @BUILD_POPT@ bin/.dummy
962        @echo Linking $@
963        @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LDAP_LIBS) \
964                $(KRB5LIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \
965                $(ACL_LIBS) $(PASSDB_LIBS) $(LIBS) @POPTLIBS@ @SMBD_LIBS@
966
967bin/nmbd@EXEEXT@: proto_exists $(NMBD_OBJ) @BUILD_POPT@ bin/.dummy
968        @echo Linking $@
969        @$(CC) $(FLAGS) -o $@ $(NMBD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS)
970
971bin/swat@EXEEXT@: proto_exists $(SWAT_OBJ) @BUILD_POPT@ bin/.dummy
972        @echo Linking $@
973        @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(DYNEXP) $(PRINT_LIBS) \
974          $(AUTH_LIBS) $(LIBS) $(PASSDB_LIBS) @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS)
975
976bin/rpcclient@EXEEXT@: proto_exists $(RPCCLIENT_OBJ) @BUILD_POPT@ bin/.dummy
977        @echo Linking $@
978        @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(PASSDB_LIBS) $(RPCCLIENT_OBJ) \
979                $(DYNEXP) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) @POPTLIBS@ \
980                $(KRB5LIBS) $(LDAP_LIBS)
981
982bin/smbclient@EXEEXT@: proto_exists $(CLIENT_OBJ) @BUILD_POPT@ bin/.dummy
983        @echo Linking $@
984        @$(CC) $(FLAGS) -o $@ $(CLIENT_OBJ) $(LDFLAGS) $(DYNEXP) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS)
985
986bin/smbctool@EXEEXT@: proto_exists $(TOOL_OBJ) @BUILD_POPT@ bin/.dummy
987        @echo Linking $@
988        @$(CC) $(FLAGS) -o $@ $(TOOL_OBJ) $(LDFLAGS) $(DYNEXP) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) -Lbin -lsmbclient
989
990bin/net@EXEEXT@: proto_exists $(NET_OBJ) @BUILD_POPT@ @BUILD_INIPARSER@ bin/.dummy
991        @echo Linking $@
992        @$(CC) $(FLAGS) -o $@ $(NET_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) @POPTLIBS@ $(KRB5LIBS) $(UUID_LIBS) $(LDAP_LIBS) $(PASSDB_LIBS) $(TERMLDFLAGS) $(TERMLIBS) $(NSCD_LIBS) @INIPARSERLIBS@
993
994bin/profiles@EXEEXT@: proto_exists $(PROFILES_OBJ) @BUILD_POPT@ bin/.dummy
995        @echo Linking $@
996        @$(CC) $(FLAGS) -o $@ $(PROFILES_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(LDAP_LIBS) @POPTLIBS@
997
998bin/smbspool@EXEEXT@: proto_exists $(CUPS_OBJ) bin/.dummy
999        @echo Linking $@
1000        @$(CC) $(FLAGS) -o $@ $(CUPS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
1001
1002bin/smbmount@EXEEXT@: proto_exists $(MOUNT_OBJ) bin/.dummy
1003        @echo Linking $@
1004        @$(CC) $(FLAGS) -o $@ $(MOUNT_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
1005
1006bin/smbmnt@EXEEXT@: proto_exists $(MNT_OBJ) bin/.dummy
1007        @echo Linking $@
1008        @$(CC) $(FLAGS) -o $@ $(MNT_OBJ) $(DYNEXP) $(LDFLAGS)
1009
1010bin/smbumount@EXEEXT@: proto_exists $(UMOUNT_OBJ) bin/.dummy
1011        @echo Linking $@
1012        @$(CC) $(FLAGS) -o $@ $(UMOUNT_OBJ) $(DYNEXP) $(LDFLAGS)
1013
1014bin/mount.cifs@EXEEXT@: $(CIFS_MOUNT_OBJ) bin/.dummy
1015        @echo Linking $@
1016        @$(CC) $(FLAGS) -o $@ $(CIFS_MOUNT_OBJ) $(DYNEXP) $(LDFLAGS)
1017
1018bin/umount.cifs@EXEEXT@: $(CIFS_UMOUNT_OBJ) bin/.dummy
1019        @echo Linking $@
1020        @$(CC) $(FLAGS) -o $@ $(CIFS_UMOUNT_OBJ) $(DYNEXP) $(LDFLAGS)
1021
1022bin/testparm@EXEEXT@: proto_exists $(TESTPARM_OBJ) @BUILD_POPT@ bin/.dummy
1023        @echo Linking $@
1024        @$(CC) $(FLAGS) -o $@ $(TESTPARM_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(LDAP_LIBS) @POPTLIBS@
1025
1026bin/smbstatus@EXEEXT@: proto_exists $(STATUS_OBJ) @BUILD_POPT@ bin/.dummy
1027        @echo Linking $@
1028        @$(CC) $(FLAGS) -o $@ $(STATUS_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(LDAP_LIBS) \
1029        @POPTLIBS@
1030
1031bin/smbcontrol@EXEEXT@: proto_exists $(SMBCONTROL_OBJ) @BUILD_POPT@ bin/.dummy
1032        @echo Linking $@
1033        @$(CC) -DUSING_SMBCONTROL $(FLAGS) -o $@ \
1034        $(SMBCONTROL_OBJ) $(DYNEXP) $(LDFLAGS) \
1035        $(LIBS) $(LDAP_LIBS) @LIBUNWIND_PTRACE@ @POPTLIBS@
1036
1037bin/smbtree@EXEEXT@: proto_exists $(SMBTREE_OBJ) @BUILD_POPT@ bin/.dummy
1038        @echo Linking $@
1039        @$(CC) $(FLAGS) -o $@ $(SMBTREE_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS)
1040
1041bin/smbpasswd@EXEEXT@: proto_exists $(SMBPASSWD_OBJ) @BUILD_POPT@ bin/.dummy
1042        @echo Linking $@
1043        @$(CC) $(FLAGS) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(PASSDB_LIBS) \
1044                $(DYNEXP) $(LIBS) @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS)
1045
1046bin/pdbedit@EXEEXT@: proto_exists $(PDBEDIT_OBJ) @BUILD_POPT@ bin/.dummy
1047        @echo Linking $@
1048        @$(CC) $(FLAGS) -o $@ $(PDBEDIT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) @POPTLIBS@ $(PASSDB_LIBS) $(LDAP_LIBS)
1049
1050bin/smbget@EXEEXT@: proto_exists $(SMBGET_OBJ) @BUILD_POPT@ bin/.dummy
1051        @echo Linking $@
1052        @$(CC) $(FLAGS) -o $@ $(SMBGET_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) @POPTLIBS@  $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS)
1053
1054bin/samtest@EXEEXT@: $(SAMTEST_OBJ) @BUILD_POPT@ bin/.dummy
1055        @echo Linking $@
1056        @$(CC) $(FLAGS) -o $@ $(SAMTEST_OBJ) $(LDFLAGS) $(TERMLDFLAGS) $(TERMLIBS) $(DYNEXP) $(LIBS) @POPTLIBS@ $(PASSDB_LIBS) $(KRB5LIBS) $(LDAP_LIBS)
1057
1058bin/nmblookup@EXEEXT@: proto_exists $(NMBLOOKUP_OBJ) @BUILD_POPT@ bin/.dummy
1059        @echo Linking $@
1060        @$(CC) $(FLAGS) -o $@ $(NMBLOOKUP_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) @POPTLIBS@ $(LDAP_LIBS)
1061
1062bin/smbtorture@EXEEXT@: proto_exists $(SMBTORTURE_OBJ) bin/.dummy
1063        @echo Linking $@
1064        @$(CC) $(FLAGS) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
1065
1066bin/talloctort@EXEEXT@: proto_exists $(TALLOCTORT_OBJ) bin/.dummy
1067        @echo Linking $@
1068        @$(CC) $(FLAGS) -o $@ $(TALLOCTORT_OBJ) $(LDFLAGS) \
1069                $(DYNEXP) $(LIBS) $(LDAP_LIBS)
1070
1071bin/replacetort@EXEEXT@: $(REPLACETORT_OBJ) bin/.dummy
1072        @echo Linking $@
1073        @$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(REPLACETORT_OBJ) $(LDFLAGS) \
1074                $(DYNEXP) $(LIBS)
1075
1076bin/masktest@EXEEXT@: proto_exists $(MASKTEST_OBJ) bin/.dummy
1077        @echo Linking $@
1078        @$(CC) $(FLAGS) -o $@ $(MASKTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
1079
1080bin/msgtest@EXEEXT@: proto_exists $(MSGTEST_OBJ) bin/.dummy
1081        @echo Linking $@
1082        @$(CC) $(FLAGS) -o $@ $(MSGTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
1083
1084bin/smbcacls@EXEEXT@: proto_exists $(SMBCACLS_OBJ) @BUILD_POPT@ bin/.dummy
1085        @echo Linking $@
1086        @$(CC) $(FLAGS) -o $@ $(SMBCACLS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) @POPTLIBS@ \
1087        $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS)
1088
1089bin/smbcquotas@EXEEXT@: proto_exists $(SMBCQUOTAS_OBJ) @BUILD_POPT@ bin/.dummy
1090        @echo Linking $@
1091        @$(CC) $(FLAGS) -o $@ $(SMBCQUOTAS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) @POPTLIBS@ \
1092        $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS)
1093
1094bin/eventlogadm@EXEEXT@: proto_exists $(EVTLOGADM_OBJ) @BUILD_POPT@ bin/.dummy
1095        @echo Linking $@
1096        @$(CC) $(FLAGS) -o $@ $(EVTLOGADM_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(LDAP_LIBS) @POPTLIBS@
1097
1098bin/sharesec@EXEEXT@: proto_exists $(SHARESEC_OBJ) @BUILD_POPT@ bin/.dummy
1099        @echo Linking $@
1100        @$(CC) $(FLAGS) -o $@ $(SHARESEC_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(LDAP_LIBS) @POPTLIBS@
1101
1102bin/locktest@EXEEXT@: proto_exists $(LOCKTEST_OBJ) bin/.dummy
1103        @echo Linking $@
1104        @$(CC) $(FLAGS) -o $@ $(LOCKTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
1105
1106bin/nsstest@EXEEXT@: proto_exists $(NSSTEST_OBJ) bin/.dummy
1107        @echo Linking $@
1108        @$(CC) $(FLAGS) -o $@ $(NSSTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS)  $(LDAP_LIBS)
1109
1110bin/pdbtest@EXEEXT@: proto_exists $(PDBTEST_OBJ) bin/.dummy
1111        @echo Linking $@
1112        @$(CC) $(FLAGS) -o $@ $(PDBTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(PASSDB_LIBS) $(LIBS) @POPTLIBS@
1113
1114bin/vfstest@EXEEXT@: proto_exists $(VFSTEST_OBJ) @BUILD_POPT@ bin/.dummy
1115        @echo Linking $@
1116        @$(CC) $(FLAGS) -o $@ $(VFSTEST_OBJ) $(LDFLAGS) $(TERMLDFLAGS) $(TERMLIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) $(ACL_LIBS) $(LIBS) @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) @SMBD_LIBS@ $(NSCD_LIBS)
1117
1118bin/smbiconv@EXEEXT@: $(SMBICONV_OBJ) @BUILD_POPT@ bin/.dummy
1119        @echo Linking $@
1120        @$(CC) $(FLAGS) -o $@ $(SMBICONV_OBJ) $(LDFLAGS) $(TERMLDFLAGS) $(TERMLIBS) $(DYNEXP) $(LIBS) @POPTLIBS@
1121
1122bin/log2pcap@EXEEXT@: proto_exists $(LOG2PCAP_OBJ) @BUILD_POPT@ bin/.dummy
1123        @echo Linking $@
1124        @$(CC) $(FLAGS) -o $@ $(LOG2PCAP_OBJ) $(LDFLAGS) $(DYNEXP) @POPTLIBS@ $(LIBS)
1125
1126bin/locktest2@EXEEXT@: proto_exists $(LOCKTEST2_OBJ) bin/.dummy
1127        @echo Linking $@
1128        @$(CC) $(FLAGS) -o $@ $(LOCKTEST2_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
1129
1130bin/rpctorture@EXEEXT@: $(RPCTORTURE_OBJ) bin/.dummy
1131        @echo Linking $@
1132        @$(CC) $(FLAGS) -o $@ $(RPCTORTURE_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
1133
1134bin/debug2html@EXEEXT@: proto_exists $(DEBUG2HTML_OBJ) bin/.dummy
1135        @echo Linking $@
1136        @$(CC) $(FLAGS) -o $@ $(DEBUG2HTML_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS)
1137
1138bin/smbfilter@EXEEXT@: proto_exists $(SMBFILTER_OBJ) bin/.dummy
1139        @echo Linking $@
1140        @$(CC) $(FLAGS) -o $@ $(SMBFILTER_OBJ) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
1141
1142bin/libaddns.@SHLIBEXT@: proto_exists $(LIBADDNS_OBJ)
1143        @echo Linking libaddns shared library $@
1144        @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBADDNS_OBJ) $(LDFLAGS) $(LIBS) \
1145                $(KRB5LIBS) $(UUID_LIBS)\
1146                @SONAMEFLAG@`basename $@`.$(LIBADDNS_MAJOR)
1147
1148bin/libaddns.a: proto_exists $(LIBADDNS_OBJ)
1149        @echo Linking libaddns non-shared library $@
1150        @-$(AR) -rc $@ $(LIBADDNS_OBJ)
1151
1152bin/libsmbclient.@SHLIBEXT@: proto_exists $(LIBSMBCLIENT_OBJ)
1153        @echo Linking libsmbclient shared library $@
1154        @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBCLIENT_OBJ) $(LDFLAGS) $(LIBS) \
1155                $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1156                @SONAMEFLAG@`basename $@`.$(LIBSMBCLIENT_MAJOR)
1157
1158bin/libsmbclient.a: proto_exists $(LIBSMBCLIENT_OBJ)
1159        @echo Linking libsmbclient non-shared library $@
1160        @-$(AR) -rc $@ $(LIBSMBCLIENT_OBJ)
1161
1162bin/libsmbsharemodes.@SHLIBEXT@: proto_exists $(LIBSMBSHAREMODES_OBJ)
1163        @echo Linking libsmbsharemodes shared library $@
1164        @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBSHAREMODES_OBJ) $(LDFLAGS) $(LIBS) \
1165                $(KRB5LIBS) $(LDAP_LIBS) \
1166                @SONAMEFLAG@`basename $@`.$(LIBSMBSHAREMODES_MAJOR)
1167
1168bin/libsmbsharemodes.a: proto_exists $(LIBSMBSHAREMODES_OBJ)
1169        @echo Linking libsmbsharemodes non-shared library $@
1170        @-$(AR) -rc $@ $(LIBSMBSHAREMODES_OBJ)
1171
1172bin/libmsrpc.@SHLIBEXT@: proto_exists $(CAC_OBJ)
1173        @echo Linking libmsrpc shared library $@
1174        @$(SHLD) $(LDSHFLAGS) -o $@ $(CAC_OBJ) $(LDFLAGS) $(LIBS) \
1175        @SONAMEFLAG@`basename $@`.$(LIBMSRPC_MAJOR)
1176
1177bin/libmsrpc.a: proto_exists $(CAC_OBJ)
1178        @echo Linking libmsrpc non-shared library $@
1179        @-$(AR) -rc $@ $(CAC_OBJ)
1180
1181# This is probably wrong for anything other than the GNU linker.
1182bin/libbigballofmud.@SHLIBEXT@: proto_exists $(LIBBIGBALLOFMUD_OBJ)
1183        @echo Linking bigballofmud shared library $@
1184        @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBBIGBALLOFMUD_OBJ) $(LIBS) \
1185                $(PASSDB_LIBS) $(IDMAP_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
1186                @SONAMEFLAG@`basename $@`.$(LIBBIGBALLOFMUD_MAJOR)
1187        ln -snf libbigballofmud.so bin/libbigballofmud.so.0
1188
1189# It would be nice to build a static bigballofmud too, but when I try
1190# I get linker errors about dl_open and similar things.  I'm not sure if
1191# it can be fixed or if they just can't be called from a static
1192# library.
1193
1194libsmbclient: $(LIBSMBCLIENT)
1195libsmbsharemodes: $(LIBSMBSHAREMODES)
1196libmsrpc: $(LIBMSRPC)
1197libaddns: $(LIBADDNS)
1198
1199bin/librpc_lsarpc.@SHLIBEXT@: proto_exists $(RPC_LSA_OBJ)
1200        @echo "Linking $@"
1201        @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_LSA_OBJ) -lc \
1202                @SONAMEFLAG@`basename $@`
1203
1204bin/librpc_samr.@SHLIBEXT@: proto_exists $(RPC_SAMR_OBJ)
1205        @echo "Linking $@"
1206        @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_SAMR_OBJ) -lc \
1207                @SONAMEFLAG@`basename $@`
1208
1209bin/librpc_unixinfo.@SHLIBEXT@: proto_exists $(RPC_UNIXINFO_OBJ)
1210        @echo "Linking $@"
1211        @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_UNIXINFO_OBJ) -lc \
1212                @SONAMEFLAG@`basename $@`
1213
1214bin/librpc_srvsvc.@SHLIBEXT@: proto_exists $(RPC_SVC_OBJ)
1215        @echo "Linking $@"
1216        @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_SVC_OBJ) -lc \
1217                @SONAMEFLAG@`basename $@`
1218
1219bin/librpc_svcctl.@SHLIBEXT@: proto_exists $(RPC_SVCCTL_OBJ)
1220        @echo "Linking $@"
1221        @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_SVCCTL_OBJ) -lc \
1222                @SONAMEFLAG@`basename $@`
1223
1224bin/librpc_ntsvcs.@SHLIBEXT@: proto_exists $(RPC_NTSVCS_OBJ)
1225        @echo "Linking $@"
1226        @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_NTSVCS_OBJ) -lc \
1227                @SONAMEFLAG@`basename $@`
1228
1229bin/librpc_wkssvc.@SHLIBEXT@: proto_exists $(RPC_WKS_OBJ)
1230        @echo "Linking $@"
1231        @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_WKS_OBJ) -lc \
1232                @SONAMEFLAG@`basename $@`
1233
1234bin/librpc_NETLOGON.@SHLIBEXT@: proto_exists $(RPC_NETLOG_OBJ)
1235        @echo "Linking $@"
1236        @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_NETLOG_OBJ) -lc \
1237                @SONAMEFLAG@`basename $@`
1238
1239bin/librpc_reg.@SHLIBEXT@: proto_exists $(RPC_REG_OBJ)
1240        @echo "Linking $@"
1241        @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_REG_OBJ) -lc \
1242                @SONAMEFLAG@`basename $@`
1243
1244bin/librpc_initshutdown.@SHLIBEXT@: proto_exists $(RPC_INITSHUTDOWN_OBJ)
1245        @echo "Linking $@"
1246        @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_INITSHUTDOWN_OBJ) -lc \
1247                @SONAMEFLAG@`basename $@`
1248
1249bin/librpc_lsa_ds.@SHLIBEXT@: proto_exists $(RPC_LSA_DS_OBJ)
1250        @echo "Linking $@"
1251        @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_LSA_DS_OBJ) -lc \
1252                @SONAMEFLAG@`basename $@`
1253
1254bin/librpc_spoolss.@SHLIBEXT@: proto_exists $(RPC_SPOOLSS_OBJ)
1255        @echo "Linking $@"
1256        @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_SPOOLSS_OBJ) -lc \
1257                @SONAMEFLAG@`basename $@`
1258
1259bin/librpc_eventlog.@SHLIBEXT@: proto_exists $(RPC_EVENTLOG_OBJ)
1260        @echo "Linking $@"
1261        @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_EVENTLOG_OBJ) -lc \
1262                @SONAMEFLAG@`basename $@`
1263
1264bin/librpc_netdfs.@SHLIBEXT@: proto_exists $(RPC_DFS_OBJ)
1265        @echo "Linking $@"
1266        @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_DFS_OBJ) -lc \
1267                @SONAMEFLAG@`basename $@`
1268
1269bin/librpc_echo.@SHLIBEXT@: proto_exists $(RPC_ECHO_OBJ)
1270        @echo "Linking $@"
1271        @$(SHLD) $(LDSHFLAGS) -o $@ $(RPC_ECHO_OBJ) -lc \
1272                @SONAMEFLAG@`basename $@`
1273
1274bin/winbindd@EXEEXT@: proto_exists $(WINBINDD_OBJ) @BUILD_POPT@ bin/.dummy
1275        @echo "Linking $@"
1276        @$(CC) $(FLAGS) -o $@ $(WINBINDD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1277                @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) $(PASSDB_LIBS)
1278
1279@WINBIND_NSS@: $(WINBIND_NSS_OBJ)
1280        @echo "Linking $@"
1281        @$(SHLD) $(WINBIND_NSS_LDSHFLAGS) -o $@ $(WINBIND_NSS_OBJ) \
1282                @WINBIND_NSS_EXTRA_LIBS@ @SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@
1283
1284@WINBIND_WINS_NSS@: proto_exists $(WINBIND_WINS_NSS_OBJ)
1285        @echo "Linking $@"
1286        @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_WINS_NSS_OBJ) \
1287                $(LDAP_LIBS) $(KRB5LIBS) $(LIBS) \
1288                @SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@
1289
1290@SMB_KRB5_LOCATOR@: proto_exists $(SMB_KRB5_LOCATOR_OBJ)
1291        @echo "Linking $@"
1292        @$(SHLD) $(LDSHFLAGS) -o $@ $(SMB_KRB5_LOCATOR_OBJ) \
1293                $(LDAP_LIBS) $(LIBS) -lcom_err \
1294                @SONAMEFLAG@`basename $@`
1295
1296bin/pam_winbind.@SHLIBEXT@: $(PAM_WINBIND_OBJ) bin/.dummy
1297        @echo "Linking shared library $@"
1298        @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_OBJ) -lpam @INIPARSERLIBS@ $(GPLIBS) \
1299                @SONAMEFLAG@`basename $@`
1300
1301bin/builtin.@SHLIBEXT@: proto_exists $(AUTH_BUILTIN_OBJ)
1302        @echo "Building plugin $@"
1303        @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_BUILTIN_OBJ) @SONAMEFLAG@`basename $@`
1304
1305bin/domain.@SHLIBEXT@: proto_exists $(AUTH_DOMAIN_OBJ)
1306        @echo "Building plugin $@"
1307        @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_DOMAIN_OBJ) @SONAMEFLAG@`basename $@`
1308
1309bin/script.@SHLIBEXT@: proto_exists $(AUTH_SCRIPT_OBJ)
1310        @echo "Building plugin $@"
1311        @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_SCRIPT_OBJ) @SONAMEFLAG@`basename $@`
1312
1313bin/smbserver.@SHLIBEXT@: proto_exists $(AUTH_SERVER_OBJ)
1314        @echo "Building plugin $@"
1315        @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_SERVER_OBJ) @SONAMEFLAG@`basename $@`
1316
1317bin/winbind.@SHLIBEXT@: proto_exists $(AUTH_WINBIND_OBJ)
1318        @echo "Building plugin $@"
1319        @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_WINBIND_OBJ) @SONAMEFLAG@`basename $@`
1320
1321bin/unix.@SHLIBEXT@: proto_exists $(AUTH_UNIX_OBJ)
1322        @echo "Building plugin $@"
1323        @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_UNIX_OBJ) @SONAMEFLAG@`basename $@`
1324
1325bin/sam.@SHLIBEXT@: proto_exists $(AUTH_SAM_OBJ)
1326        @echo "Building plugin $@"
1327        @$(SHLD) $(LDSHFLAGS) -o $@ $(AUTH_SAM_OBJ) @SONAMEFLAG@`basename $@`
1328
1329bin/ldapsam.@SHLIBEXT@: passdb/pdb_ldap.o
1330        @echo "Building plugin $@"
1331        @$(SHLD) $(LDSHFLAGS) $(LDAP_LIBS) -o $@ passdb/pdb_ldap.o \
1332                @SONAMEFLAG@`basename $@`
1333
1334bin/tdbsam.@SHLIBEXT@: proto_exists passdb/pdb_tdb.o
1335        @echo "Building plugin $@"
1336        @$(SHLD) $(LDSHFLAGS) -o $@ passdb/pdb_tdb.o \
1337                @SONAMEFLAG@`basename $@`
1338
1339bin/smbpasswd.@SHLIBEXT@: proto_exists passdb/pdb_smbpasswd.o
1340        @echo "Building plugin $@"
1341        @$(SHLD) $(LDSHFLAGS) -o $@ passdb/pdb_smbpasswd.o \
1342                @SONAMEFLAG@`basename $@`
1343
1344bin/rid.@SHLIBEXT@: proto_exists nsswitch/idmap_rid.o
1345        @echo "Building plugin $@"
1346        @$(SHLD) $(LDSHFLAGS) -o $@ nsswitch/idmap_rid.o \
1347                @SONAMEFLAG@`basename $@`
1348
1349bin/ad.@SHLIBEXT@: nsswitch/idmap_ad.o
1350        @echo "Building plugin $@"
1351        @$(SHLD) $(LDSHFLAGS) -o $@ nsswitch/idmap_ad.o \
1352                @SONAMEFLAG@`basename $@`
1353
1354bin/weird.@SHLIBEXT@: proto_exists $(DEVEL_HELP_WEIRD_OBJ)
1355        @echo "Building plugin $@"
1356        @$(SHLD) $(LDSHFLAGS) -o $@ $(DEVEL_HELP_WEIRD_OBJ) \
1357                @SONAMEFLAG@`basename $@`
1358
1359bin/CP850.@SHLIBEXT@: proto_exists $(CP850_OBJ)
1360        @echo "Building plugin $@"
1361        @$(SHLD) $(LDSHFLAGS) -o $@ $(CP850_OBJ) \
1362                @SONAMEFLAG@`basename $@`
1363
1364bin/CP437.@SHLIBEXT@: proto_exists $(CP437_OBJ)
1365        @echo "Building plugin $@"
1366        @$(SHLD) $(LDSHFLAGS) -o $@ $(CP437_OBJ) \
1367                @SONAMEFLAG@`basename $@`
1368
1369bin/macosxfs.@SHLIBEXT@: $(CHARSET_MACOSXFS_OBJ)
1370        @echo "Building plugin $@"
1371        @$(SHLD) $(LDSHFLAGS) -o $@ $(CHARSET_MACOSXFS_OBJ) \
1372                -framework CoreFoundation @SONAMEFLAG@`basename $@`
1373
1374# NOTE, there is no build rule for a dynamic default VFS module because
1375# this one MUST MUST MUST be built statically.
1376
1377bin/audit.@SHLIBEXT@: proto_exists $(VFS_AUDIT_OBJ)
1378        @echo "Building plugin $@"
1379        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_AUDIT_OBJ) \
1380                @SONAMEFLAG@`basename $@`
1381
1382bin/extd_audit.@SHLIBEXT@: proto_exists $(VFS_EXTD_AUDIT_OBJ)
1383        @echo "Building plugin $@"
1384        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_EXTD_AUDIT_OBJ) \
1385                @SONAMEFLAG@`basename $@`
1386
1387bin/full_audit.@SHLIBEXT@: proto_exists $(VFS_FULL_AUDIT_OBJ)
1388        @echo "Building plugin $@"
1389        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_FULL_AUDIT_OBJ) \
1390                @SONAMEFLAG@`basename $@`
1391
1392bin/recycle.@SHLIBEXT@: proto_exists $(VFS_RECYCLE_OBJ)
1393        @echo "Building plugin $@"
1394        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_RECYCLE_OBJ) \
1395                @SONAMEFLAG@`basename $@`
1396
1397bin/netatalk.@SHLIBEXT@: proto_exists $(VFS_NETATALK_OBJ)
1398        @echo "Building plugin $@"
1399        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_NETATALK_OBJ) \
1400                @SONAMEFLAG@`basename $@`
1401
1402bin/fake_perms.@SHLIBEXT@: proto_exists $(VFS_FAKE_PERMS_OBJ)
1403        @echo "Building plugin $@"
1404        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_FAKE_PERMS_OBJ) \
1405                @SONAMEFLAG@`basename $@`
1406
1407bin/default_quota.@SHLIBEXT@: proto_exists $(VFS_DEFAULT_QUOTA_OBJ)
1408        @echo "Building plugin $@"
1409        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_DEFAULT_QUOTA_OBJ) \
1410                @SONAMEFLAG@`basename $@`
1411
1412bin/readonly.@SHLIBEXT@: proto_exists $(VFS_READONLY_OBJ)
1413        @echo "Building plugin $@"
1414        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_READONLY_OBJ) \
1415                @SONAMEFLAG@`basename $@`
1416
1417bin/shadow_copy.@SHLIBEXT@: proto_exists $(VFS_SHADOW_COPY_OBJ)
1418        @echo "Building plugin $@"
1419        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_SHADOW_COPY_OBJ) \
1420                @SONAMEFLAG@`basename $@`
1421
1422bin/cap.@SHLIBEXT@: proto_exists $(VFS_CAP_OBJ)
1423        @echo "Building plugin $@"
1424        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_CAP_OBJ) \
1425                @SONAMEFLAG@`basename $@`
1426
1427bin/expand_msdfs.@SHLIBEXT@: proto_exists $(VFS_EXPAND_MSDFS_OBJ)
1428        @echo "Building plugin $@"
1429        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_EXPAND_MSDFS_OBJ) \
1430                @SONAMEFLAG@`basename $@`
1431
1432bin/afsacl.@SHLIBEXT@: $(VFS_AFSACL_OBJ:.o=.po)
1433        @echo "Building plugin $@"
1434        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_AFSACL_OBJ:.o=.po) \
1435                @SONAMEFLAG@`basename $@`
1436
1437bin/posixacl.@SHLIBEXT@: $(VFS_POSIXACL_OBJ)
1438        @echo "Building plugin $@"
1439        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_POSIXACL_OBJ) \
1440                @SONAMEFLAG@`basename $@`
1441
1442bin/aixacl.@SHLIBEXT@: $(VFS_AIXACL_OBJ)
1443        @echo "Building plugin $@"
1444        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_AIXACL_OBJ) \
1445                @SONAMEFLAG@`basename $@`
1446
1447bin/aixacl2.@SHLIBEXT@: $(VFS_AIXACL2_OBJ)
1448        @echo "Building plugin $@"
1449        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_AIXACL2_OBJ) \
1450                @SONAMEFLAG@`basename $@`
1451
1452bin/solarisacl.@SHLIBEXT@: $(VFS_SOLARISACL_OBJ)
1453        @echo "Building plugin $@"
1454        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_SOLARISACL_OBJ) \
1455                @SONAMEFLAG@`basename $@`
1456
1457bin/irixacl.@SHLIBEXT@: proto_exists $(VFS_IRIXACL_OBJ)
1458        @echo "Building plugin $@"
1459        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_IRIXACL_OBJ) \
1460                @SONAMEFLAG@`basename $@`
1461
1462bin/hpuxacl.@SHLIBEXT@: proto_exists $(VFS_HPUXACL_OBJ)
1463        @echo "Building plugin $@"
1464        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_HPUXACL_OBJ) \
1465                @SONAMEFLAG@`basename $@`
1466
1467bin/tru64acl.@SHLIBEXT@: $(VFS_TRU64ACL_OBJ)
1468        @echo "Building plugin $@"
1469        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_TRU64ACL_OBJ) \
1470                @SONAMEFLAG@`basename $@`
1471
1472bin/catia.@SHLIBEXT@: proto_exists $(VFS_CATIA_OBJ)
1473        @echo "Building plugin $@"
1474        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_CATIA_OBJ) \
1475                @SONAMEFLAG@`basename $@`
1476
1477bin/cacheprime.@SHLIBEXT@: proto_exists $(VFS_CACHEPRIME_OBJ)
1478        @echo "Building plugin $@"
1479        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_CACHEPRIME_OBJ) \
1480                @SONAMEFLAG@`basename $@`
1481
1482bin/prealloc.@SHLIBEXT@: proto_exists $(VFS_PREALLOC_OBJ)
1483        @echo "Building plugin $@"
1484        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_PREALLOC_OBJ) \
1485                @SONAMEFLAG@`basename $@`
1486
1487bin/commit.@SHLIBEXT@: proto_exists $(VFS_COMMIT_OBJ)
1488        @echo "Building plugin $@"
1489        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_COMMIT_OBJ) \
1490                @SONAMEFLAG@`basename $@`
1491
1492bin/gpfs.@SHLIBEXT@: $(VFS_GPFS_OBJ)
1493        @echo "Building plugin $@"
1494        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_GPFS_OBJ) \
1495                @SONAMEFLAG@`basename $@`
1496
1497bin/notify_fam.@SHLIBEXT@: $(VFS_NOTIFY_FAM_OBJ)
1498        @echo "Building plugin $@"
1499        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_NOTIFY_FAM_OBJ) \
1500                @SONAMEFLAG@`basename $@`
1501
1502bin/readahead.@SHLIBEXT@: $(VFS_READAHEAD_OBJ)
1503        @echo "Building plugin $@"
1504        @$(SHLD) $(LDSHFLAGS) -o $@ $(VFS_READAHEAD_OBJ) \
1505                @SONAMEFLAG@`basename $@`
1506
1507#########################################################
1508## IdMap NSS plugins
1509
1510## None here right now
1511#########################################################
1512
1513bin/wbinfo@EXEEXT@: proto_exists $(WBINFO_OBJ) @BUILD_POPT@ bin/.dummy
1514        @echo Linking $@
1515        @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(WBINFO_OBJ) $(DYNEXP) $(LIBS) $(LDAP_LIBS) @POPTLIBS@
1516
1517bin/ntlm_auth@EXEEXT@: proto_exists $(NTLM_AUTH_OBJ) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1518                @BUILD_POPT@ bin/.dummy
1519        @echo Linking $@
1520        @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(DYNEXP) $(NTLM_AUTH_OBJ) \
1521                $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBS) \
1522                @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS)
1523
1524bin/pam_smbpass.@SHLIBEXT@: $(PAM_SMBPASS_OBJ)
1525        @echo "Linking shared library $@"
1526        @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_SMBPASS_OBJ) -lpam $(DYNEXP) $(LIBS) $(LDAP_LIBS) $(KRB5LIBS) $(NSCD_LIBS)
1527
1528bin/tdbbackup@EXEEXT@: proto_exists $(TDBBACKUP_OBJ) bin/.dummy
1529        @echo Linking $@
1530        @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(DYNEXP) $(LIBS) $(TDBBACKUP_OBJ)
1531
1532bin/tdbtool@EXEEXT@: $(TDBTOOL_OBJ) bin/.dummy
1533        @echo Linking $@
1534        @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(DYNEXP) $(LIBS) $(TDBTOOL_OBJ)
1535
1536bin/tdbdump@EXEEXT@: $(TDBDUMP_OBJ) bin/.dummy
1537        @echo Linking $@
1538        @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(DYNEXP) $(LIBS) $(TDBDUMP_OBJ)
1539
1540bin/t_strcmp@EXEEXT@: proto_exists bin/libbigballofmud.@SHLIBEXT@ torture/t_strcmp.o
1541        $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) torture/t_strcmp.o -L ./bin -lbigballofmud
1542
1543bin/t_strstr@EXEEXT@: proto_exists bin/libbigballofmud.@SHLIBEXT@ torture/t_strstr.o
1544        $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) torture/t_strstr.o -L ./bin -lbigballofmud
1545
1546bin/t_strappend@EXEEXT@: proto_exists bin/libbigballofmud.@SHLIBEXT@ torture/t_strappend.o
1547        $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) torture/t_strappend.o -L ./bin -lbigballofmud
1548
1549bin/t_stringoverflow@EXEEXT@: bin/libbigballofmud.@SHLIBEXT@ torture/t_stringoverflow.o
1550        $(CC) $(FLAGS) -o $@ $(DYNEXP) torture/t_stringoverflow.o -L./bin -lbigballofmud
1551
1552bin/t_doschar@EXEEXT@: proto_exists bin/libbigballofmud.@SHLIBEXT@ torture/t_doschar.o
1553        $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) torture/t_doschar.o -L ./bin -lbigballofmud
1554bin/t_push_ucs2@EXEEXT@: proto_exists bin/libbigballofmud.@SHLIBEXT@ torture/t_push_ucs2.o
1555        $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) torture/t_push_ucs2.o -L ./bin -lbigballofmud
1556
1557bin/timelimit@EXEEXT@: script/tests/timelimit.o
1558        @echo Linking $@
1559        @$(CC) $(FLAGS) -o $@ $(DYNEXP) script/tests/timelimit.o
1560
1561install: installservers installbin @INSTALL_CIFSMOUNT@ installman installscripts installdat installswat installmodules @INSTALL_LIBSMBCLIENT@ @INSTALL_LIBMSRPC@ @INSTALL_PAM_MODULES@ @INSTALL_LIBSMBSHAREMODES@
1562
1563
1564install-everything: install installmodules
1565
1566# DESTDIR is used here to prevent packagers wasting their time
1567# duplicating the Makefile. Remove it and you will have the privelege
1568# of package each samba release for muliple versions of multiple
1569# distributions and operating systems, or at least supplying patches
1570# to all the packaging files required for this, prior to committing
1571# the removal of DESTDIR. Do not remove it even though you think it
1572# is not used
1573
1574installdirs:
1575        @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(BINDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(PRIVATEDIR) $(PIDDIR) $(LOCKDIR) $(MANDIR)
1576
1577installservers: all installdirs
1578        @$(SHELL) script/installbin.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(SBINDIR) $(SBIN_PROGS)
1579
1580installbin: all installdirs
1581        @$(SHELL) script/installbin.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(BINDIR) $(BIN_PROGS)
1582
1583installcifsmount: @CIFSMOUNT_PROGS@
1584        @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS) $(DESTDIR) $(ROOTSBINDIR)
1585        @$(SHELL) script/installbin.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(ROOTSBINDIR) @CIFSMOUNT_PROGS@
1586
1587# Some symlinks are required for the 'probing' of modules.
1588# This mechanism should go at some point..
1589installmodules: modules installdirs
1590        @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(VFSLIBDIR) $(VFS_MODULES)
1591        @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(PDBLIBDIR) $(PDB_MODULES)
1592        @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(RPCLIBDIR) $(RPC_MODULES)
1593        @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(IDMAPLIBDIR) $(IDMAP_MODULES)
1594        @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(CHARSETLIBDIR) $(CHARSET_MODULES)
1595        @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(AUTHLIBDIR) $(AUTH_MODULES)
1596        @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(PDBLIBDIR) ldapsam.@SHLIBEXT@ ldapsam_compat.@SHLIBEXT@
1597        @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) rhosts.@SHLIBEXT@ hostsequiv.@SHLIBEXT@
1598        @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) sam.@SHLIBEXT@ sam_ignoredomain.@SHLIBEXT@
1599        @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) domain.@SHLIBEXT@ trustdomain.@SHLIBEXT@ ntdomain.@SHLIBEXT@
1600        @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) builtin.@SHLIBEXT@ guest.@SHLIBEXT@ fixed_challenge.@SHLIBEXT@ name_to_ntstatus.@SHLIBEXT@
1601
1602installscripts: installdirs
1603        @$(SHELL) $(srcdir)/script/installscripts.sh $(INSTALLPERMS) $(DESTDIR)$(BINDIR) $(SCRIPTS)
1604
1605installdat: installdirs
1606        @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR) $(LIBDIR) $(srcdir)
1607
1608installmsg: installdirs
1609        @$(SHELL) $(srcdir)/script/installmsg.sh $(DESTDIR) $(LIBDIR) $(srcdir)
1610
1611installswat: installdirs installmsg
1612        @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR) $(SWATDIR) $(srcdir)
1613
1614installclientlib: installdirs libsmbclient
1615        @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS) $(DESTDIR) $(LIBDIR)
1616        -$(INSTALLLIBCMD_SH) bin/libsmbclient.@SHLIBEXT@ $(DESTDIR)$(LIBDIR)
1617        -$(INSTALLLIBCMD_A) bin/libsmbclient.a $(DESTDIR)$(LIBDIR)
1618        @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS) $(DESTDIR) ${prefix}/include
1619        -$(INSTALLCMD) $(srcdir)/include/libsmbclient.h $(DESTDIR)${prefix}/include
1620
1621installlibmsrpc: installdirs libmsrpc
1622        @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS) $(DESTDIR) $(LIBDIR)
1623        -$(INSTALLLIBCMD_SH) bin/libmsrpc.@SHLIBEXT@ $(DESTDIR)$(LIBDIR)
1624        -$(INSTALLLIBCMD_A) bin/libmsrpc.a $(DESTDIR)$(LIBDIR)
1625        @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS) $(DESTDIR) ${prefix}/include
1626        -$(INSTALLCMD) $(srcdir)/include/libmsrpc.h $(DESTDIR)${prefix}/include
1627
1628installlibsmbsharemodes: installdirs libsmbsharemodes
1629        @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS) $(DESTDIR) $(LIBDIR)
1630        -$(INSTALLLIBCMD_SH) bin/libsmbsharemodes.@SHLIBEXT@ $(DESTDIR)$(LIBDIR)
1631        -$(INSTALLLIBCMD_A) bin/libsmbsharemodes.a $(DESTDIR)$(LIBDIR)
1632
1633installlibaddns: installdirs libaddns
1634        @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS) $(DESTDIR) $(LIBDIR)
1635        -$(INSTALLLIBCMD_SH) bin/libaddns.@SHLIBEXT@ $(DESTDIR)$(LIBDIR)
1636        -$(INSTALLLIBCMD_A) bin/libaddns.a $(DESTDIR)$(LIBDIR)
1637
1638installpammodules: $(PAM_MODULES)
1639        @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS) $(DESTDIR) $(PAMMODULESDIR)
1640        @for module in $(PAM_MODULES); do \
1641                echo "Installing module $${module} as $(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@ "; \
1642                $(INSTALLCMD) -m $(INSTALLPERMS) bin/$${module}.@SHLIBEXT@ \
1643                        "$(DESTDIR)/$(PAMMODULESDIR)"; \
1644        done
1645
1646# Python extensions
1647
1648PYTHON_OBJ = $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSMB_OBJ) $(RPC_PARSE_OBJ) \
1649        $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
1650        $(SECRETS_OBJ) $(KRBCLIENT_OBJ) $(SMBLDAP_OBJ)
1651
1652python_ext: $(PYTHON_OBJ)
1653        @if test -z "$(PYTHON)"; then \
1654                echo Use the option --with-python to configure python; \
1655                exit 1; \
1656        fi
1657        PYTHON_OBJS="$(PYTHON_OBJ)" \
1658        PYTHON_CFLAGS="$(CFLAGS) $(CPPFLAGS) $(FLAGS)" \
1659        LIBS="$(LDFLAGS) $(LIBS) $(PASSDB_LIBS) $(IDMAP_LIBS) $(KRB5LIBS) $(LDAP_LIBS)" \
1660                $(PYTHON) python/setup.py build
1661
1662python_install: $(PYTHON_OBJ)
1663        @if test -z "$(PYTHON)"; then \
1664                echo Use the option --with-python to configure python; \
1665                exit 1; \
1666        fi
1667        PYTHON_OBJS="$(PYTHON_OBJ)" \
1668        PYTHON_CFLAGS="$(CFLAGS) $(CPPFLAGS)" \
1669        LIBS="$(LDFLAGS) $(LIBS)" \
1670                $(PYTHON) python/setup.py install --root=$(DESTDIR)
1671
1672python_clean:
1673        @-if test -n "$(PYTHON)"; then $(PYTHON) python/setup.py clean; fi
1674
1675# revert to the previously installed version
1676revert:
1677        @$(SHELL) $(srcdir)/script/revert.sh $(SBINDIR) $(SBIN_PROGS)
1678        @$(SHELL) $(srcdir)/script/revert.sh $(BINDIR) $(BIN_PROGS) $(SCRIPTS)
1679
1680installman: installdirs
1681        @SMBMOUNT_PROGS="@SMBMOUNT_PROGS@" $(SHELL) \
1682                $(srcdir)/script/installman.sh $(DESTDIR)$(MANDIR) $(srcdir) C "@ROFF@"
1683
1684.PHONY: showlayout
1685
1686showlayout:
1687        @echo "Samba will be installed into:"
1688        @echo "  prefix:      $(prefix)"
1689        @echo "  bindir:      $(BINDIR)"
1690        @echo "  sbindir:     $(SBINDIR)"
1691        @echo "  libdir:      $(LIBDIR)"
1692        @echo "  vardir:      $(VARDIR)"
1693        @echo "  mandir:      $(MANDIR)"
1694        @echo "  privatedir:  $(PRIVATE_DIR)"
1695        @echo "  configdir:   $(CONFIGDIR)"
1696        @echo "  lockdir:     $(LOCKDIR)"
1697        @echo "  piddir:      $(PIDDIR)"
1698        @echo "  swatdir:     $(SWATDIR)"
1699
1700
1701uninstall: uninstallman uninstallservers uninstallbin @UNINSTALL_CIFSMOUNT@ uninstallscripts uninstalldat uninstallswat uninstallmodules @UNINSTALL_LIBSMBCLIENT@ @UNINSTALL_LIBMSRPC@ @UNINSTALL_PAM_MODULES@ @UNINSTALL_LIBSMBSHAREMODES@
1702
1703uninstallman:
1704        @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(MANDIR) $(srcdir) C
1705
1706uninstallservers:
1707        @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(SBINDIR) $(SBIN_PROGS)
1708
1709uninstallbin:
1710        @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(BINDIR) $(BIN_PROGS)
1711
1712uninstallcifsmount:
1713        @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(ROOTSBINDIR) @CIFSMOUNT_PROGS@
1714
1715uninstallmodules:
1716        @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(VFSLIBDIR) $(VFS_MODULES)
1717        @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(PDBLIBDIR) $(PDB_MODULES)
1718        @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(RPCLIBDIR) $(RPC_MODULES)
1719        @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(IDMAPLIBDIR) $(IDMAP_MODULES)
1720        @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(CHARSETLIBDIR) $(CHARSET_MODULES)
1721        @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(AUTHLIBDIR) $(AUTH_MODULES)
1722
1723uninstallscripts:
1724        @$(SHELL) $(srcdir)/script/uninstallscripts.sh $(INSTALLPERMS) $(DESTDIR)$(BINDIR) $(SCRIPTS)
1725
1726uninstalldat:
1727        @$(SHELL) $(srcdir)/script/uninstalldat.sh $(DESTDIR) $(LIBDIR) $(srcdir)
1728
1729uninstallmsg:
1730        @$(SHELL) $(srcdir)/script/uninstallmsg.sh $(DESTDIR) $(LIBDIR) $(srcdir)
1731
1732uninstallswat: uninstallmsg
1733        @$(SHELL) $(srcdir)/script/uninstallswat.sh $(DESTDIR) $(SWATDIR) $(srcdir)
1734
1735uninstallclientlib:
1736        -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/libsmbclient.@SHLIBEXT@
1737        -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/libsmbclient.a
1738        -rm -f $(DESTDIR)${prefix}/include/libsmbclient.h
1739
1740uninstalllibmsrpc:
1741        -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/libmsrpc.@SHLIBEXT@
1742        -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/libmsrpc.a
1743        -rm -f $(DESTDIR)${prefix}/include/libmsrpc.h
1744
1745uninstalllibsmbsharemodes:
1746        -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/libsmbsharemodes.@SHLIBEXT@
1747        -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/libsmbsharemodes.a
1748
1749uninstalllibaddns:
1750        -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/libaddns.@SHLIBEXT@
1751        -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/libaddns.a
1752
1753uninstallpammodules:
1754        @for module in $(PAM_MODULES); do \
1755                echo "Removing $(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@ "; \
1756                rm -f "$(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@"; \
1757        done
1758
1759# Toplevel clean files
1760TOPFILES=dynconfig.o
1761
1762clean: delheaders python_clean
1763        -rm -f core */*~ *~ */*.o */*/*.o */*/*/*.o \
1764                */*.@SHLIBEXT@ */*/*.@SHLIBEXT@ */*/*/*.@SHLIBEXT@ \
1765                $(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) $(ROOT_SBIN_PROGS) \
1766                $(MODULES) $(TORTURE_PROGS) $(LIBSMBCLIENT) $(LIBADDNS) \
1767                $(LIBSMBSHAREMODES) $(EVERYTHING_PROGS) $(LIBMSRPC) \
1768                .headers.stamp */src/*.o proto_exists
1769        -rm -rf t_dir
1770
1771# Making this target will just make sure that the prototype files
1772# exist, not necessarily that they are up to date.  Since they're
1773# removed by "make clean" this will always be run when you do anything
1774# afterwards.
1775proto_exists: include/proto.h include/build_env.h \
1776        nsswitch/winbindd_proto.h web/swat_proto.h \
1777        client/client_proto.h utils/net_proto.h utils/ntlm_auth_proto.h smbd/build_options.c
1778        @touch proto_exists
1779
1780delheaders:
1781        @echo Removing prototype headers
1782        @rm -f include/proto.h include/build_env.h \
1783                nsswitch/winbindd_proto.h web/swat_proto.h \
1784                client/client_proto.h utils/net_proto.h \
1785                smbd/build_options.c utils/ntlm_auth_proto.h \
1786                utils/passwd_proto.h
1787
1788MKPROTO_SH = $(srcdir)/script/mkproto.sh
1789
1790include/proto.h: smbd/build_options.c
1791        @echo Building include/proto.h
1792        @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \
1793          -h _PROTO_H_ $(builddir)/include/proto.h \
1794          $(PROTO_OBJ)
1795
1796include/build_env.h: script/build_env.sh
1797        @echo Building include/build_env.h
1798        @$(SHELL) $(srcdir)/script/build_env.sh $(srcdir) $(builddir) $(CC) \
1799          > $(builddir)/include/build_env.h
1800
1801nsswitch/winbindd_proto.h:
1802        @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \
1803          -h _WINBINDD_PROTO_H_ $(builddir)/nsswitch/winbindd_proto.h \
1804          $(WINBINDD_OBJ1)
1805
1806web/swat_proto.h:
1807        @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \
1808          -h _SWAT_PROTO_H_ $(builddir)/web/swat_proto.h \
1809          $(SWAT_OBJ1)
1810
1811client/client_proto.h:
1812        @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \
1813          -h _CLIENT_PROTO_H_ $(builddir)/client/client_proto.h \
1814          $(CLIENT_OBJ1)
1815
1816utils/net_proto.h:
1817        @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \
1818          -h _NET_PROTO_H_ $(builddir)/utils/net_proto.h \
1819          $(NET_OBJ1)
1820
1821utils/passwd_proto.h:
1822        @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \
1823          -h _PASSWD_PROTO_H_ $(builddir)/utils/passwd_proto.h \
1824          $(PASSWD_UTIL_OBJ)
1825
1826utils/ntlm_auth_proto.h:
1827        @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \
1828          -h _NTLM_AUTH_PROTO_H_ $(builddir)/utils/ntlm_auth_proto.h \
1829          $(NTLM_AUTH_OBJ1)
1830
1831# "make headers" or "make proto" calls a subshell because we need to
1832# make sure these commands are executed in sequence even for a
1833# parallel make.
1834headers:
1835        $(MAKE) delheaders; \
1836        $(MAKE) smbd/build_options.c; \
1837        $(MAKE) include/proto.h; \
1838        $(MAKE) include/build_env.h; \
1839        $(MAKE) nsswitch/winbindd_proto.h; \
1840        $(MAKE) web/swat_proto.h; \
1841        $(MAKE) client/client_proto.h; \
1842        $(MAKE) utils/ntlm_auth_proto.h; \
1843        $(MAKE) utils/net_proto.h; \
1844        $(MAKE) utils/passwd_proto.h;
1845
1846proto: headers
1847
1848.PHONY: headers proto
1849
1850etags:
1851        etags `find $(srcdir) -name "*.[ch]" | grep -v /.svn/`
1852
1853ctags:
1854        ctags `find $(srcdir) -name "*.[ch]" | grep -v /.svn/`
1855
1856realclean: clean delheaders
1857        -rm -f config.log bin/.dummy script/findsmb script/gen-8bit-gap.sh
1858        -rm -f script/installbin.sh script/uninstallbin.sh
1859
1860distclean: realclean
1861        -rm -f include/stamp-h
1862        -rm -f include/config.h Makefile
1863        -rm -f config.status config.cache so_locations
1864        -rm -rf .deps TAGS
1865
1866realdistclean: distclean
1867        -rm -f include/config.h.in
1868        -rm -f include/version.h
1869        -rm -f configure
1870
1871# this target is really just for my use. It only works on a limited
1872# range of machines and is used to produce a list of potentially
1873# dead (ie. unused) functions in the code. (tridge)
1874finddead:
1875        nm */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt
1876        nm */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt
1877        comm -13 nmused.txt nmfns.txt
1878
1879
1880# when configure.in is updated, reconfigure
1881$(srcdir)/configure: $(srcdir)/configure.in
1882        @echo "WARNING: you need to rerun ./autogen.sh"
1883
1884config.status: $(srcdir)/configure
1885        @echo "WARNING: you need to run ./configure"
1886
1887Makefile: $(srcdir)/Makefile.in config.status
1888        @echo "WARNING: you need to run ./config.status"
1889
1890######################################################################
1891# Samba Testing Framework
1892
1893# Check for NSS module problems.
1894test_nss_modules: nss_modules
1895        @echo "Testing $(NSS_MODULES) "
1896        @for module in $(NSS_MODULES); do \
1897                ./script/tests/dlopen.sh $${module} \
1898                        || exit 1; \
1899        done
1900
1901# Check for PAM module problems.  Specifically, check that every module we
1902# built can actually be loaded by a minimal PAM-aware application.
1903test_pam_modules: pam_modules
1904        @echo "Testing $(PAM_MODULES) "
1905        @for module in $(PAM_MODULES); do \
1906                ./script/tests/dlopen.sh -lpam -ldl bin/$${module}.@SHLIBEXT@ \
1907                        || exit 1; \
1908        done
1909
1910##
1911## Targets for 'make test'
1912##
1913test: all torture timelimit
1914        @echo Running Test suite
1915        @sh $(srcdir)/script/tests/selftest.sh ${selftest_prefix}/st all "${smbtorture4_path}"
1916
1917valgrindtest: all torture timelimit
1918        @echo Running Test suite with valgrind
1919        @NMBD_VALGRIND="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \
1920         SMBD_VALGRIND="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \
1921         VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/st/valgrind.log" \
1922         $(srcdir)/script/tests/selftest.sh ${selftest_prefix}/st all "${smbtorture4_path}"
Note: See TracBrowser for help on using the repository browser.