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

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

Code updated to Samba 3.0.25rc2 level

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