s3: Added SMB_VFS_INIT_SEARCH_OP to initialize data at the beginning of SMB search...
[ira/wip.git] / source3 / Makefile.in
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 # Copyright (C) 2007 James Peach <jpeach@samba.org>
10 # Copyright (C) 2008 Michael Adam <obnox@samba.org>
11 ###########################################################################
12
13 prefix=@prefix@
14 exec_prefix=@exec_prefix@
15 sysconfdir=@sysconfdir@
16 localstatedir=@localstatedir@
17 datarootdir=@datarootdir@
18
19 selftest_prefix=@selftest_prefix@
20 selftest_shrdir=@selftest_shrdir@
21 smbtorture4_path=@smbtorture4_path@
22 smbtorture4_option=@smbtorture4_option@
23 selftest_custom_conf=@selftest_custom_conf@
24
25 LIBS=@LIBS@
26 CC=@CC@
27 SHLD=@SHLD@
28 LIB_PATH_VAR=@LIB_PATH_VAR@
29
30 ## Dynamic shared libraries build settings
31 DSO_EXPORTS_CMD=-Wl,--version-script,$(srcdir)/exports/`basename $@ | sed 's/@SHLIBEXT@\(.[0-9]\{1,\}\)\{0,1\}$$/@SYMSEXT@/'`
32 DSO_EXPORTS=@DSO_EXPORTS@
33 SHLD_DSO = $(SHLD) $(LDSHFLAGS) $(DSO_EXPORTS) -o $@
34
35 # The MODULE_EXPORTS variable contains the platform-specific linker flags
36 # needed to restrict the exports for VFS, IDMAP, RPC and PASSDB modules.
37 MODULE_EXPORTS=@MODULE_EXPORTS@
38
39 # Add $(DEVELOPER_CFLAGS) to $(CFLAGS) to enable extra compiler
40 # (GCC) warnings. This is done automtically for --enable-developer,
41 # --enable-picky-developer and --enable-krb5developer.
42 DEVELOPER_CFLAGS=@DEVELOPER_CFLAGS@
43 CFLAGS=@CFLAGS@
44 CPPFLAGS=-DHAVE_CONFIG_H @CPPFLAGS@
45
46 EXEEXT=@EXEEXT@
47 AR=@AR@
48 LDSHFLAGS=@LDSHFLAGS@ @RELRO_LDFLAGS@ @LDFLAGS@
49 LDFLAGS=@PIE_LDFLAGS@ @RELRO_LDFLAGS@ @LDFLAGS@
50
51 WINBIND_NSS_LDSHFLAGS=@WINBIND_NSS_LDSHFLAGS@ @LDFLAGS@
52 AWK=@AWK@
53 PICFLAG=@PICFLAG@
54 DYNEXP=@DYNEXP@
55 PERL=@PERL@
56
57 PIDL_ARGS=@PIDL_ARGS@
58
59 TERMLDFLAGS=@TERMLDFLAGS@
60 TERMLIBS=@TERMLIBS@
61 PRINT_LIBS=@PRINT_LIBS@
62 ZLIB_LIBS=@ZLIB_LIBS@
63 AUTH_LIBS=@AUTH_LIBS@
64 ACL_LIBS=@ACL_LIBS@
65 PASSDB_LIBS=@PASSDB_LIBS@
66 IDMAP_LIBS=@IDMAP_LIBS@
67 KRB5LIBS=@KRB5_LIBS@
68 LDAP_LIBS=@LDAP_LIBS@
69 NSCD_LIBS=@NSCD_LIBS@
70 UUID_LIBS=@UUID_LIBS@
71 WINBIND_LIBS=@WINBIND_LIBS@
72 WINBIND_NSS_EXTRA_LIBS=@WINBIND_NSS_EXTRA_LIBS@
73 WINBIND_NSS_PTHREAD=@WINBIND_NSS_PTHREAD@
74 PAM_WINBIND_EXTRA_LIBS=@PAM_WINBIND_EXTRA_LIBS@
75 DNSSD_LIBS=@DNSSD_LIBS@
76 POPT_LIBS=@POPTLIBS@
77 LIBTALLOC_LIBS=@LIBTALLOC_LIBS@
78 LIBTDB_LIBS=@LIBTDB_LIBS@
79 LIBNETAPI_LIBS=@LIBNETAPI_LIBS@
80 LIBLUA_LIBS=@LIBLUA_LIBS@
81
82 INSTALLCMD=@INSTALL@
83 INSTALLLIBCMD_SH=@INSTALLLIBCMD_SH@
84 INSTALLLIBCMD_A=@INSTALLLIBCMD_A@
85 UNINSTALLLIBCMD_SH=@UNINSTALLLIBCMD_SH@
86 UNINSTALLLIBCMD_A=@UNINSTALLLIBCMD_A@
87
88 VPATH=@srcdir@
89 srcdir=@abs_srcdir@
90 builddir=@abs_builddir@
91 SHELL=/bin/sh
92 DESTDIR=/
93
94 # XXX: Perhaps this should be @SHELL@ instead -- apparently autoconf
95 # will search for a POSIX-compliant shell, and that might not be
96 # /bin/sh on some platforms.  I guess it's not a big problem -- mbp
97
98 # See the autoconf manual "Installation Directory Variables" for a
99 # discussion of the subtle use of these variables.
100
101 BASEDIR= @prefix@
102 BINDIR = @bindir@
103 # sbindir is mapped to bindir when compiling SAMBA in 2.0.x compatibility mode.
104 SBINDIR = @sbindir@
105 ROOTSBINDIR = @rootsbindir@
106 LIBDIR = @libdir@
107 MODULESDIR = @modulesdir@
108 INCLUDEDIR=@includedir@
109 PAMMODULESDIR = @pammodulesdir@
110 VFSLIBDIR = $(MODULESDIR)/vfs
111 PERFCOUNTLIBDIR = $(MODULESDIR)/perfcount
112 PDBLIBDIR = $(MODULESDIR)/pdb
113 RPCLIBDIR = $(MODULESDIR)/rpc
114 IDMAPLIBDIR = $(MODULESDIR)/idmap
115 NSSINFOLIBDIR = $(MODULESDIR)/nss_info
116 CHARSETLIBDIR = $(MODULESDIR)/charset
117 AUTHLIBDIR = $(MODULESDIR)/auth
118 CONFIGLIBDIR = $(MODULESDIR)/config
119 GPEXTLIBDIR = $(MODULESDIR)/gpext
120 CONFIGDIR = @configdir@
121 VARDIR = @localstatedir@
122 MANDIR = @mandir@
123 DATADIR = @datadir@
124
125 # The permissions to give the executables and other data
126 INSTALLPERMS_BIN = 0755
127 INSTALLPERMS_DATA = 0644
128
129 # set these to where to find various files
130 # These can be overridden by command line switches (see smbd(8))
131 # or in smb.conf (see smb.conf(5))
132 LOGFILEBASE = @logfilebase@
133 CONFIGFILE = $(CONFIGDIR)/smb.conf
134 LMHOSTSFILE = $(CONFIGDIR)/lmhosts
135 NCALRPCDIR = @ncalrpcdir@
136
137 # This is where smbpasswd et al go
138 PRIVATEDIR = @privatedir@
139
140 SMB_PASSWD_FILE = $(PRIVATEDIR)/smbpasswd
141 PRIVATE_DIR = $(PRIVATEDIR)
142
143 # This is where SWAT images and help files go
144 SWATDIR = @swatdir@
145
146 # This is where locale(mo) files go
147 LOCALEDIR= @localedir@
148
149 # the directory where lock files go
150 LOCKDIR = @lockdir@
151
152 # FHS directories; equal to LOCKDIR if not using --with-fhs, but also settable
153 CACHEDIR = @cachedir@
154 STATEDIR = @statedir@
155
156 # Where to look for (and install) codepage databases.
157 CODEPAGEDIR = @codepagedir@
158
159 # the directory where pid files go
160 PIDDIR = @piddir@
161
162 FLAGS = -I. -I$(srcdir) @FLAGS1@ @SAMBA_CPPFLAGS@ $(CPPFLAGS) -I$(CTDBDIR)/include $(ISA) -I$(srcdir)/lib -I.. -D_SAMBA_BUILD_=3 -I../source4
163
164 PATH_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" \
165         -DPRIVATE_DIR=\"$(PRIVATE_DIR)\" \
166         -DCONFIGFILE=\"$(CONFIGFILE)\" \
167         -DSBINDIR=\"$(SBINDIR)\" \
168         -DBINDIR=\"$(BINDIR)\" \
169         -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" \
170         -DSWATDIR=\"$(SWATDIR)\" \
171         -DLOCKDIR=\"$(LOCKDIR)\" \
172         -DPIDDIR=\"$(PIDDIR)\" \
173         -DLIBDIR=\"$(LIBDIR)\" \
174         -DMODULESDIR=\"$(MODULESDIR)\" \
175         -DLOGFILEBASE=\"$(LOGFILEBASE)\" \
176         -DSHLIBEXT=\"@SHLIBEXT@\" \
177         -DCTDBDIR=\"$(CTDBDIR)\" \
178         -DNCALRPCDIR=\"$(NCALRPCDIR)\" \
179         -DCONFIGDIR=\"$(CONFIGDIR)\" \
180         -DCODEPAGEDIR=\"$(CODEPAGEDIR)\" \
181         -DCACHEDIR=\"$(CACHEDIR)\" \
182         -DSTATEDIR=\"$(STATEDIR)\" \
183         -DLOCALEDIR=\"$(LOCALEDIR)\"
184
185 # Note that all executable programs now provide for an optional executable suffix.
186
187 SBIN_PROGS = bin/smbd@EXEEXT@ bin/nmbd@EXEEXT@ @SWAT_SBIN_TARGETS@ @EXTRA_SBIN_PROGS@
188
189 ROOT_SBIN_PROGS = @CIFSMOUNT_PROGS@
190
191 BIN_PROGS1 = bin/smbclient@EXEEXT@ bin/net@EXEEXT@ bin/smbspool@EXEEXT@ \
192         bin/testparm@EXEEXT@ bin/smbstatus@EXEEXT@ bin/smbget@EXEEXT@
193 BIN_PROGS2 = bin/smbcontrol@EXEEXT@ bin/smbtree@EXEEXT@ bin/tdbbackup@EXEEXT@ \
194         bin/nmblookup@EXEEXT@ bin/pdbedit@EXEEXT@ bin/tdbdump@EXEEXT@ \
195         bin/tdbtool@EXEEXT@
196 BIN_PROGS3 = bin/smbpasswd@EXEEXT@ bin/rpcclient@EXEEXT@ bin/smbcacls@EXEEXT@ \
197         bin/profiles@EXEEXT@ bin/ntlm_auth@EXEEXT@ bin/sharesec@EXEEXT@ \
198         bin/smbcquotas@EXEEXT@ bin/eventlogadm@EXEEXT@
199 BIN_PROGS4 = bin/ldbedit@EXEEXT@ bin/ldbsearch@EXEEXT@ bin/ldbadd@EXEEXT@ \
200         bin/ldbdel@EXEEXT@ bin/ldbmodify@EXEEXT@
201
202 TORTURE_PROGS = bin/smbtorture@EXEEXT@ bin/msgtest@EXEEXT@ \
203         bin/masktest@EXEEXT@ bin/locktest@EXEEXT@ \
204         bin/locktest2@EXEEXT@ bin/nsstest@EXEEXT@ bin/vfstest@EXEEXT@ \
205         bin/pdbtest@EXEEXT@ bin/talloctort@EXEEXT@ bin/replacetort@EXEEXT@ \
206         bin/tdbtorture@EXEEXT@ \
207         bin/smbconftort@EXEEXT@ bin/vlp@EXEEXT@
208
209 BIN_PROGS = @EXTRA_BIN_PROGS@ \
210         $(BIN_PROGS1) $(BIN_PROGS2) $(BIN_PROGS3) $(BIN_PROGS4) 
211
212 EVERYTHING_PROGS = bin/debug2html@EXEEXT@ bin/smbfilter@EXEEXT@ \
213         bin/talloctort@EXEEXT@ bin/replacetort@EXEEXT@ \
214         bin/log2pcap@EXEEXT@ \
215         bin/vlp@EXEEXT@ bin/smbiconv@EXEEXT@
216
217 PAM_MODULES = @PAM_MODULES@
218
219 NSS_MODULES = @NSS_MODULES@
220
221 SCRIPTS = $(srcdir)/script/smbtar $(builddir)/script/findsmb
222
223 VFS_MODULES = @VFS_MODULES@
224 PERFCOUNT_MODULES = @PERFCOUNT_MODULES@
225 PDB_MODULES = @PDB_MODULES@
226 RPC_MODULES = @RPC_MODULES@
227 IDMAP_MODULES = @IDMAP_MODULES@
228 CHARSET_MODULES = @CHARSET_MODULES@
229 AUTH_MODULES = @AUTH_MODULES@
230 NSS_INFO_MODULES = @NSS_INFO_MODULES@
231 GPEXT_MODULES = @GPEXT_MODULES@
232 MODULES = $(VFS_MODULES) $(PDB_MODULES) $(RPC_MODULES) $(IDMAP_MODULES) \
233           $(CHARSET_MODULES) $(AUTH_MODULES) $(NSS_INFO_MODULES) \
234           $(GPEXT_MODULES) $(PERFCOUNT_MODULES)
235
236 EXTRA_ALL_TARGETS = @EXTRA_ALL_TARGETS@
237
238 ######################################################################
239 # object file lists
240 ######################################################################
241
242 TDB_LIB_OBJ = lib/util_tdb.o ../lib/util/util_tdb.o \
243           lib/dbwrap.o lib/dbwrap_tdb.o \
244           lib/dbwrap_ctdb.o \
245           lib/dbwrap_rbt.o @LIBTDB_STATIC@
246
247 TDB_VALIDATE_OBJ = lib/tdb_validate.o
248
249 SMBLDAP_OBJ = @SMBLDAP@ @SMBLDAPUTIL@
250
251 VERSION_OBJ = lib/version.o
252
253 WBCOMMON_OBJ = ../nsswitch/wb_common.o
254
255 AFS_OBJ = lib/afs.o
256
257 AFS_SETTOKEN_OBJ = lib/afs_settoken.o
258
259 SERVER_MUTEX_OBJ = lib/server_mutex.o
260
261 PASSCHANGE_OBJ = libsmb/passchange.o
262
263 LIBNDR_DRSUAPI_OBJ = ../librpc/ndr/ndr_drsuapi.o \
264                      ../librpc/ndr/ndr_compression.o \
265                      ../librpc/gen_ndr/ndr_drsuapi.o \
266                      ../librpc/ndr/ndr_drsblobs.o \
267                      ../librpc/gen_ndr/ndr_drsblobs.o
268
269 ZLIB_OBJ = @ZLIB_OBJS@
270
271 COMPRESSION_OBJ = ../lib/compression/mszip.o \
272                                   ../lib/compression/lzxpress.o \
273                                   $(ZLIB_OBJ)
274
275 DRSUAPI_OBJ = $(LIBNDR_DRSUAPI_OBJ) \
276               $(COMPRESSION_OBJ)
277
278 LIBNDR_OBJ = ../librpc/ndr/ndr_basic.o \
279              ../librpc/ndr/ndr.o \
280              ../librpc/ndr/ndr_misc.o \
281              ../librpc/gen_ndr/ndr_misc.o \
282              ../librpc/gen_ndr/ndr_security.o \
283              ../librpc/ndr/ndr_sec_helper.o \
284              librpc/ndr/ndr_string.o \
285              ../librpc/ndr/uuid.o \
286                  librpc/ndr/util.o
287
288 RPCCLIENT_NDR_OBJ = rpc_client/ndr.o
289
290 LIBNDR_GEN_OBJ0 = ../librpc/gen_ndr/ndr_samr.o \
291                   ../librpc/gen_ndr/ndr_lsa.o
292
293 LIBNDR_GEN_OBJ1 = ../librpc/gen_ndr/ndr_netlogon.o \
294                   ../librpc/ndr/ndr_netlogon.o
295
296 LIBNDR_GEN_OBJ2 = ../librpc/gen_ndr/ndr_spoolss.o \
297                   ../librpc/ndr/ndr_spoolss_buf.o
298
299 LIBNDR_GEN_OBJ = ../librpc/gen_ndr/ndr_wkssvc.o \
300                  $(LIBNDR_GEN_OBJ0) \
301                  ../librpc/gen_ndr/ndr_dfs.o \
302                  ../librpc/gen_ndr/ndr_echo.o \
303                  ../librpc/gen_ndr/ndr_winreg.o \
304                  ../librpc/gen_ndr/ndr_initshutdown.o \
305                  ../librpc/gen_ndr/ndr_srvsvc.o \
306                  ../librpc/gen_ndr/ndr_eventlog.o \
307                  $(LIBNDR_GEN_OBJ1) \
308                  ../librpc/gen_ndr/ndr_dssetup.o \
309                  librpc/gen_ndr/ndr_notify.o \
310                  ../librpc/gen_ndr/ndr_xattr.o \
311                  ../librpc/gen_ndr/ndr_epmapper.o \
312                  ../librpc/gen_ndr/ndr_named_pipe_auth.o \
313                  ../librpc/gen_ndr/ndr_ntsvcs.o \
314                  $(LIBNDR_GEN_OBJ2)
315
316 RPC_PARSE_OBJ0 = rpc_parse/parse_prs.o rpc_parse/parse_misc.o
317
318 # this includes only the low level parse code, not stuff
319 # that requires knowledge of security contexts
320 RPC_PARSE_OBJ1 = $(RPC_PARSE_OBJ0) rpc_parse/parse_sec.o
321
322 RPC_PARSE_OBJ2 = rpc_parse/parse_rpc.o \
323                  rpc_client/init_netlogon.o \
324                  rpc_client/init_lsa.o
325
326 LIBREPLACE_OBJ = @LIBREPLACE_OBJS@
327
328 SOCKET_WRAPPER_OBJ = @SOCKET_WRAPPER_OBJS@
329 NSS_WRAPPER_OBJ = @NSS_WRAPPER_OBJS@
330
331 LIBSAMBAUTIL_OBJ = @LIBTALLOC_STATIC@ \
332                 $(LIBREPLACE_OBJ) \
333                 $(SOCKET_WRAPPER_OBJ) \
334                 $(NSS_WRAPPER_OBJ)
335
336 UTIL_OBJ = ../lib/util/rbtree.o ../lib/util/signal.o ../lib/util/time.o \
337                    ../lib/util/xfile.o ../lib/util/util_strlist.o  \
338                    ../lib/util/util_file.o ../lib/util/data_blob.o \
339                    ../lib/util/util.o ../lib/util/fsusage.o \
340                    ../lib/util/params.o ../lib/util/talloc_stack.o \
341                    ../lib/util/genrand.o ../lib/util/util_net.o
342
343 CRYPTO_OBJ = ../lib/crypto/crc32.o ../lib/crypto/md5.o \
344                          ../lib/crypto/hmacmd5.o ../lib/crypto/arcfour.o \
345                          ../lib/crypto/md4.o
346
347 LIB_OBJ = $(LIBSAMBAUTIL_OBJ) $(UTIL_OBJ) $(CRYPTO_OBJ) \
348           lib/messages.o librpc/gen_ndr/ndr_messaging.o lib/messages_local.o \
349           lib/messages_ctdbd.o lib/packet.o lib/ctdbd_conn.o \
350           lib/interfaces.o lib/memcache.o \
351           lib/util_transfer_file.o ../lib/async_req/async_req.o \
352           ../lib/async_req/async_sock.o ../lib/async_req/async_req_ntstatus.o \
353           $(TDB_LIB_OBJ) \
354           $(VERSION_OBJ) lib/charcnv.o lib/debug.o lib/fault.o \
355           lib/interface.o lib/pidfile.o \
356           lib/system.o lib/sendfile.o lib/recvfile.o lib/time.o \
357           lib/username.o \
358           lib/util_pw.o lib/access.o lib/smbrun.o \
359           lib/bitmap.o lib/dprintf.o $(UTIL_REG_OBJ) \
360           lib/wins_srv.o \
361           lib/util_str.o lib/clobber.o lib/util_sid.o lib/util_uuid.o \
362           lib/util_unistr.o lib/util_file.o \
363           lib/util.o lib/util_sock.o lib/sock_exec.o lib/util_sec.o \
364           lib/substitute.o lib/dbwrap_util.o \
365           lib/ms_fnmatch.o lib/select.o lib/errmap_unix.o \
366           lib/tallocmsg.o lib/dmallocmsg.o libsmb/smb_signing.o \
367           lib/iconv.o lib/pam_errors.o intl/lang_tdb.o lib/conn_tdb.o \
368           lib/adt_tree.o lib/gencache.o \
369           lib/module.o lib/events.o @LIBTEVENT_OBJ0@ \
370           lib/ldap_escape.o @CHARSET_STATIC@ \
371           lib/secdesc.o lib/util_seaccess.o lib/secace.o lib/secacl.o \
372           libads/krb5_errs.o lib/system_smbd.o lib/audit.o $(LIBNDR_OBJ) \
373           lib/file_id.o lib/idmap_cache.o \
374           ../libcli/security/dom_sid.o
375
376 LIB_DUMMY_OBJ = lib/dummysmbd.o lib/dummyroot.o
377 LIB_NONSMBD_OBJ = $(LIB_OBJ) $(LIB_DUMMY_OBJ)
378
379 READLINE_OBJ = lib/readline.o
380
381 # Also depends on  $(SECRETS_OBJ) $(LIBSAMBA_OBJ)
382 # Be sure to include them into your application
383 POPT_LIB_OBJ = lib/popt_common.o
384
385 PARAM_WITHOUT_REG_OBJ = dynconfig.o param/loadparm.o param/util.o lib/sharesec.o lib/ldap_debug_handler.o
386 PARAM_REG_ADD_OBJ = $(REG_SMBCONF_OBJ) $(LIBSMBCONF_OBJ) $(PRIVILEGES_BASIC_OBJ)
387 PARAM_OBJ = $(PARAM_WITHOUT_REG_OBJ) $(PARAM_REG_ADD_OBJ)
388
389 KRBCLIENT_OBJ = libads/kerberos.o libads/ads_status.o
390
391 LIBADDNS_OBJ0 = libaddns/dnsrecord.o libaddns/dnsutils.o  libaddns/dnssock.o \
392                libaddns/dnsgss.o libaddns/dnsmarshall.o
393 LIBADDNS_OBJ = $(LIBADDNS_OBJ0) $(SOCKET_WRAPPER_OBJ) @LIBTALLOC_STATIC@
394
395 GPEXT_OBJ = libgpo/gpext/gpext.o @GPEXT_STATIC@
396
397 LIBGPO_OBJ0 = libgpo/gpo_ldap.o libgpo/gpo_ini.o libgpo/gpo_util.o \
398               libgpo/gpo_fetch.o libgpo/gpo_filesync.o libgpo/gpo_sec.o \
399               libgpo/gpo_reg.o \
400               $(GPEXT_OBJ)
401 LIBGPO_OBJ = $(LIBGPO_OBJ0)
402
403 LIBADS_OBJ = libads/ldap.o libads/ldap_printer.o \
404              libads/sasl.o libads/sasl_wrapping.o \
405              libads/krb5_setpw.o libads/ldap_user.o \
406              libads/ads_struct.o libads/kerberos_keytab.o \
407              libads/disp_sec.o libads/ads_utils.o libads/ldap_utils.o \
408              libads/ldap_schema.o libads/util.o libads/ndr.o
409
410 LIBADS_SERVER_OBJ = libads/kerberos_verify.o libads/authdata.o \
411                     ../librpc/ndr/ndr_krb5pac.o \
412                     ../librpc/gen_ndr/ndr_krb5pac.o
413
414 SECRETS_OBJ = passdb/secrets.o passdb/machine_sid.o
415
416 LIBNBT_OBJ = ../libcli/nbt/nbtname.o \
417              ../libcli/netlogon.o \
418              ../libcli/ndr_netlogon.o \
419              ../librpc/gen_ndr/ndr_nbt.o \
420              ../librpc/gen_ndr/ndr_svcctl.o \
421              ../librpc/ndr/ndr_svcctl.o
422
423 LIBNMB_OBJ = libsmb/unexpected.o libsmb/namecache.o libsmb/nmblib.o \
424              libsmb/namequery.o libsmb/conncache.o libads/dns.o
425
426 NTERR_OBJ = libsmb/nterr.o
427 DOSERR_OBJ = ../libcli/util/doserr.o
428 ERRORMAP_OBJ = libsmb/errormap.o
429 DCE_RPC_ERR_OBJ = ../librpc/rpc/dcerpc_error.o
430
431 LIBSMB_ERR_OBJ0 = $(NTERR_OBJ) $(DOSERR_OBJ) $(ERRORMAP_OBJ) $(DCE_RPC_ERR_OBJ) \
432                   libsmb/smbdes.o libsmb/smbencrypt.o libsmb/ntlmssp_parse.o
433
434 LIBSMB_ERR_OBJ = $(LIBSMB_ERR_OBJ0) \
435                  $(RPC_PARSE_OBJ1) \
436                  $(SECRETS_OBJ)
437
438 LIBSMB_OBJ0 = \
439                libsmb/ntlm_check.o \
440                libsmb/ntlmssp.o \
441                libsmb/ntlmssp_sign.o
442
443 LIBSAMBA_OBJ = $(LIBSMB_OBJ0) \
444                $(LIBSMB_ERR_OBJ)
445
446 CLDAP_OBJ = libads/cldap.o
447
448 LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \
449              libsmb/clikrb5.o libsmb/clispnego.o ../lib/util/asn1.o \
450              libsmb/clirap.o libsmb/clierror.o libsmb/climessage.o \
451              libsmb/clireadwrite.o libsmb/clilist.o libsmb/cliprint.o \
452              libsmb/clitrans.o libsmb/clisecdesc.o libsmb/clidgram.o \
453              libsmb/clistr.o libsmb/cliquota.o libsmb/clifsinfo.o libsmb/clidfs.o \
454              libsmb/smberr.o libsmb/credentials.o libsmb/pwd_cache.o \
455              libsmb/clioplock.o libsmb/clirap2.o \
456              libsmb/smb_seal.o libsmb/async_smb.o \
457              $(LIBSAMBA_OBJ) \
458              $(LIBNMB_OBJ) \
459              $(LIBNBT_OBJ) \
460              $(CLDAP_OBJ) \
461              $(DRSUAPI_OBJ)
462
463 RPC_CLIENT_OBJ1 = rpc_client/cli_netlogon.o
464
465 LIBMSRPC_OBJ = rpc_client/cli_lsarpc.o rpc_client/cli_samr.o \
466                $(RPC_CLIENT_OBJ1) rpc_client/cli_reg.o $(RPC_CLIENT_OBJ) \
467                rpc_client/cli_spoolss.o rpc_client/cli_spoolss_notify.o  \
468                rpc_client/init_samr.o \
469                    librpc/rpc/dcerpc.o \
470                    ../librpc/rpc/binding.o
471
472 LIBMSRPC_GEN_OBJ = ../librpc/gen_ndr/cli_lsa.o \
473                    ../librpc/gen_ndr/cli_dfs.o \
474                    ../librpc/gen_ndr/cli_echo.o \
475                    ../librpc/gen_ndr/cli_srvsvc.o \
476                    ../librpc/gen_ndr/cli_svcctl.o \
477                    ../librpc/gen_ndr/cli_winreg.o \
478                    ../librpc/gen_ndr/cli_initshutdown.o \
479                    ../librpc/gen_ndr/cli_eventlog.o \
480                    ../librpc/gen_ndr/cli_wkssvc.o \
481                    ../librpc/gen_ndr/cli_netlogon.o \
482                    ../librpc/gen_ndr/cli_samr.o \
483                    ../librpc/gen_ndr/cli_dssetup.o \
484                    ../librpc/gen_ndr/cli_ntsvcs.o \
485                    ../librpc/gen_ndr/cli_epmapper.o \
486                    ../librpc/gen_ndr/cli_drsuapi.o \
487                    ../librpc/gen_ndr/cli_spoolss.o \
488                    $(LIBNDR_GEN_OBJ) \
489                    $(RPCCLIENT_NDR_OBJ)
490
491 #
492 # registry-related objects
493 #
494 UTIL_REG_OBJ = lib/util_reg.o
495 UTIL_REG_API_OBJ = lib/util_reg_api.o
496
497 REG_INIT_BASIC_OBJ = registry/reg_init_basic.o
498 REG_INIT_SMBCONF_OBJ = registry/reg_init_smbconf.o
499 REG_INIT_FULL_OBJ = registry/reg_init_full.o
500
501 REGFIO_OBJ = registry/regfio.o
502
503 REGOBJS_OBJ = registry/reg_objects.o
504
505 REG_BACKENDS_BASE_OBJ = registry/reg_backend_db.o
506
507 REG_BACKENDS_SMBCONF_OBJ = registry/reg_backend_smbconf.o
508
509 REG_BACKENDS_EXTRA_OBJ = registry/reg_backend_printing.o \
510                          registry/reg_backend_shares.o \
511                          registry/reg_backend_netlogon_params.o \
512                          registry/reg_backend_prod_options.o \
513                          registry/reg_backend_tcpip_params.o \
514                          registry/reg_backend_hkpt_params.o \
515                          registry/reg_backend_current_version.o \
516                          registry/reg_backend_perflib.o
517
518 REG_BASE_OBJ = registry/reg_api.o \
519                registry/reg_dispatcher.o \
520                registry/reg_cachehook.o \
521                $(REGFIO_OBJ) \
522                $(REGOBJS_OBJ) \
523                registry/reg_util.o \
524                $(UTIL_REG_API_OBJ) \
525                lib/util_nttoken.o \
526                $(REG_BACKENDS_BASE_OBJ) \
527                $(REG_INIT_BASIC_OBJ)
528
529 REG_SMBCONF_OBJ = $(REG_BASE_OBJ) \
530                   $(REG_BACKENDS_SMBCONF_OBJ) \
531                   $(REG_INIT_SMBCONF_OBJ)
532
533 REG_FULL_OBJ = $(REG_SMBCONF_OBJ) \
534                $(REG_BACKENDS_EXTRA_OBJ) \
535                $(REG_INIT_FULL_OBJ) \
536                registry/reg_eventlog.o \
537                registry/reg_perfcount.o \
538                registry/reg_util_legacy.o
539
540 LIB_EVENTLOG_OBJ = rpc_server/srv_eventlog_lib.o
541
542 RPC_LSA_OBJ = rpc_server/srv_lsa_nt.o ../librpc/gen_ndr/srv_lsa.o
543
544 RPC_NETLOG_OBJ = rpc_server/srv_netlog_nt.o \
545                  ../librpc/gen_ndr/srv_netlogon.o
546
547 RPC_SAMR_OBJ = rpc_server/srv_samr_nt.o \
548                rpc_server/srv_samr_util.o \
549                ../librpc/gen_ndr/srv_samr.o
550
551 RPC_INITSHUTDOWN_OBJ =  ../librpc/gen_ndr/srv_initshutdown.o rpc_server/srv_initshutdown_nt.o
552
553 RPC_REG_OBJ =  rpc_server/srv_winreg_nt.o \
554                ../librpc/gen_ndr/srv_winreg.o
555
556 RPC_DSSETUP_OBJ =  rpc_server/srv_dssetup_nt.o ../librpc/gen_ndr/srv_dssetup.o
557
558 RPC_SVC_OBJ = rpc_server/srv_srvsvc_nt.o \
559               ../librpc/gen_ndr/srv_srvsvc.o
560
561 RPC_WKS_OBJ =  ../librpc/gen_ndr/srv_wkssvc.o rpc_server/srv_wkssvc_nt.o
562
563 RPC_SVCCTL_OBJ =  rpc_server/srv_svcctl_nt.o \
564                   ../librpc/gen_ndr/srv_svcctl.o \
565                   services/svc_spoolss.o services/svc_rcinit.o services/services_db.o \
566                   services/svc_netlogon.o services/svc_winreg.o \
567                   services/svc_wins.o
568
569 RPC_NTSVCS_OBJ = rpc_server/srv_ntsvcs_nt.o \
570                  ../librpc/gen_ndr/srv_ntsvcs.o
571
572 RPC_DFS_OBJ =  ../librpc/gen_ndr/srv_dfs.o rpc_server/srv_dfs_nt.o
573
574 RPC_SPOOLSS_OBJ = rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o \
575                   ../librpc/gen_ndr/srv_spoolss.o
576
577 RPC_EVENTLOG_OBJ = rpc_server/srv_eventlog_nt.o \
578                    $(LIB_EVENTLOG_OBJ) ../librpc/gen_ndr/srv_eventlog.o
579
580 RPC_PIPE_OBJ = rpc_server/srv_pipe_hnd.o \
581                rpc_server/srv_pipe.o rpc_server/srv_lsa_hnd.o
582
583 RPC_ECHO_OBJ = rpc_server/srv_echo_nt.o ../librpc/gen_ndr/srv_echo.o
584
585 RPC_SERVER_OBJ = @RPC_STATIC@ $(RPC_PIPE_OBJ)
586
587 RPC_PARSE_OBJ = $(RPC_PARSE_OBJ2) \
588                 rpc_parse/parse_spoolss.o \
589                 rpc_parse/parse_buffer.o
590
591 RPC_CLIENT_OBJ = rpc_client/cli_pipe.o rpc_client/rpc_transport_np.o \
592         rpc_client/rpc_transport_sock.o rpc_client/rpc_transport_smbd.o
593
594 LOCKING_OBJ = locking/locking.o locking/brlock.o locking/posix.o
595
596 PRIVILEGES_BASIC_OBJ = lib/privileges_basic.o
597
598 PRIVILEGES_OBJ = lib/privileges.o
599
600 PASSDB_GET_SET_OBJ = passdb/pdb_get_set.o
601
602 PASSDB_OBJ = $(PASSDB_GET_SET_OBJ) passdb/passdb.o passdb/pdb_interface.o \
603                 passdb/util_wellknown.o passdb/util_builtin.o passdb/pdb_compat.o \
604                 passdb/util_unixsids.o passdb/lookup_sid.o \
605                 passdb/login_cache.o @PDB_STATIC@ \
606                 lib/account_pol.o $(PRIVILEGES_OBJ) \
607                 lib/util_nscd.o lib/winbind_util.o
608
609 DEVEL_HELP_WEIRD_OBJ = modules/weird.o
610 CP850_OBJ = modules/CP850.o
611 CP437_OBJ = modules/CP437.o
612 CHARSET_MACOSXFS_OBJ = modules/charset_macosxfs.o
613
614 GROUPDB_OBJ = groupdb/mapping.o groupdb/mapping_tdb.o groupdb/mapping_ldb.o
615
616 PROFILE_OBJ = profile/profile.o
617 PROFILES_OBJ = utils/profiles.o \
618                $(LIBSAMBA_OBJ) \
619                $(PARAM_OBJ) \
620                $(LIB_OBJ) $(LIB_DUMMY_OBJ) \
621                $(POPT_LIB_OBJ)
622
623 OPLOCK_OBJ = smbd/oplock.o smbd/oplock_irix.o smbd/oplock_linux.o smbd/oplock_onefs.o
624
625 NOTIFY_OBJ = smbd/notify.o smbd/notify_inotify.o smbd/notify_internal.o
626
627 VFS_DEFAULT_OBJ = modules/vfs_default.o
628 VFS_AUDIT_OBJ = modules/vfs_audit.o
629 VFS_EXTD_AUDIT_OBJ = modules/vfs_extd_audit.o
630 VFS_FULL_AUDIT_OBJ = modules/vfs_full_audit.o
631 VFS_FAKE_PERMS_OBJ = modules/vfs_fake_perms.o
632 VFS_RECYCLE_OBJ = modules/vfs_recycle.o
633 VFS_NETATALK_OBJ = modules/vfs_netatalk.o
634 VFS_DEFAULT_QUOTA_OBJ = modules/vfs_default_quota.o
635 VFS_READONLY_OBJ = modules/vfs_readonly.o modules/getdate.o
636 VFS_CAP_OBJ = modules/vfs_cap.o
637 VFS_EXPAND_MSDFS_OBJ = modules/vfs_expand_msdfs.o
638 VFS_SHADOW_COPY_OBJ = modules/vfs_shadow_copy.o
639 VFS_SHADOW_COPY2_OBJ = modules/vfs_shadow_copy2.o
640 VFS_AFSACL_OBJ = modules/vfs_afsacl.o
641 VFS_XATTR_TDB_OBJ = modules/vfs_xattr_tdb.o
642 VFS_POSIXACL_OBJ = modules/vfs_posixacl.o
643 VFS_AIXACL_OBJ = modules/vfs_aixacl.o modules/vfs_aixacl_util.o
644 VFS_AIXACL2_OBJ = modules/vfs_aixacl2.o modules/vfs_aixacl_util.o modules/nfs4_acls.o
645 VFS_SOLARISACL_OBJ = modules/vfs_solarisacl.o
646 VFS_ZFSACL_OBJ = modules/vfs_zfsacl.o modules/nfs4_acls.o
647 VFS_HPUXACL_OBJ = modules/vfs_hpuxacl.o
648 VFS_IRIXACL_OBJ = modules/vfs_irixacl.o
649 VFS_TRU64ACL_OBJ = modules/vfs_tru64acl.o
650 VFS_CATIA_OBJ = modules/vfs_catia.o
651 VFS_STREAMS_XATTR_OBJ = modules/vfs_streams_xattr.o
652 VFS_STREAMS_DEPOT_OBJ = modules/vfs_streams_depot.o
653 VFS_CACHEPRIME_OBJ = modules/vfs_cacheprime.o
654 VFS_PREALLOC_OBJ = modules/vfs_prealloc.o
655 VFS_COMMIT_OBJ = modules/vfs_commit.o
656 VFS_GPFS_OBJ = modules/vfs_gpfs.o modules/gpfs.o modules/nfs4_acls.o
657 VFS_NOTIFY_FAM_OBJ = modules/vfs_notify_fam.o
658 VFS_READAHEAD_OBJ = modules/vfs_readahead.o
659 VFS_TSMSM_OBJ = modules/vfs_tsmsm.o
660 VFS_FILEID_OBJ = modules/vfs_fileid.o
661 VFS_AIO_FORK_OBJ = modules/vfs_aio_fork.o
662 VFS_SYNCOPS_OBJ = modules/vfs_syncops.o
663 VFS_ACL_XATTR_OBJ = modules/vfs_acl_xattr.o
664 VFS_ACL_TDB_OBJ = modules/vfs_acl_tdb.o
665 VFS_SMB_TRAFFIC_ANALYZER_OBJ = modules/vfs_smb_traffic_analyzer.o
666 VFS_ONEFS_OBJ = modules/vfs_onefs.o modules/onefs_acl.o modules/onefs_system.o \
667                 modules/onefs_open.o modules/onefs_streams.o
668 PERFCOUNT_ONEFS_OBJ = modules/perfcount_onefs.o
669
670 PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o
671
672 SLCACHE_OBJ = libsmb/samlogon_cache.o
673
674 DCUTIL_OBJ  = libsmb/namequery_dc.o libsmb/trustdom_cache.o libsmb/trusts_util.o libsmb/dsgetdcname.o
675
676 AUTH_BUILTIN_OBJ = auth/auth_builtin.o
677 AUTH_DOMAIN_OBJ = auth/auth_domain.o
678 AUTH_SAM_OBJ = auth/auth_sam.o
679 AUTH_SERVER_OBJ = auth/auth_server.o
680 AUTH_UNIX_OBJ = auth/auth_unix.o
681 AUTH_WINBIND_OBJ = auth/auth_winbind.o
682 AUTH_SCRIPT_OBJ = auth/auth_script.o
683 AUTH_NETLOGOND_OBJ = auth/auth_netlogond.o
684
685 AUTH_OBJ = auth/auth.o @AUTH_STATIC@ auth/auth_util.o auth/token_util.o \
686            auth/auth_compat.o auth/auth_ntlmssp.o \
687            $(PLAINTEXT_AUTH_OBJ) $(SLCACHE_OBJ) $(DCUTIL_OBJ)
688
689 MANGLE_OBJ = smbd/mangle.o smbd/mangle_hash.o smbd/mangle_hash2.o
690
691 SMBD_OBJ_MAIN = smbd/server.o
692
693 BUILDOPT_OBJ = smbd/build_options.o
694
695 SMBD_OBJ_SRV = smbd/files.o smbd/chgpasswd.o smbd/connection.o \
696                smbd/utmp.o smbd/session.o smbd/map_username.o \
697                smbd/dfree.o smbd/dir.o smbd/password.o smbd/conn.o \
698                smbd/share_access.o smbd/fileio.o \
699                smbd/ipc.o smbd/lanman.o smbd/negprot.o \
700                smbd/message.o smbd/nttrans.o smbd/pipes.o \
701                smbd/reply.o smbd/sesssetup.o smbd/trans2.o smbd/uid.o \
702                smbd/dosmode.o smbd/filename.o smbd/open.o smbd/close.o \
703                smbd/blocking.o smbd/sec_ctx.o smbd/srvstr.o \
704                smbd/vfs.o smbd/perfcount.o smbd/statcache.o smbd/seal.o \
705                smbd/posix_acls.o lib/sysacls.o $(SERVER_MUTEX_OBJ) \
706                smbd/process.o smbd/service.o smbd/error.o \
707                printing/printfsp.o lib/sysquotas.o lib/sysquotas_linux.o \
708                lib/sysquotas_xfs.o lib/sysquotas_4A.o \
709                smbd/change_trust_pw.o smbd/fake_file.o \
710                smbd/quotas.o smbd/ntquotas.o $(AFS_OBJ) smbd/msdfs.o \
711                $(AFS_SETTOKEN_OBJ) smbd/aio.o smbd/statvfs.o \
712                smbd/dmapi.o \
713                smbd/file_access.o \
714                smbd/dnsregister.o smbd/globals.o \
715                $(MANGLE_OBJ) @VFS_STATIC@
716
717 SMBD_OBJ_BASE = $(PARAM_WITHOUT_REG_OBJ) $(SMBD_OBJ_SRV) $(LIBSMB_OBJ) \
718                 $(RPC_SERVER_OBJ) $(RPC_PARSE_OBJ) \
719                 $(LOCKING_OBJ) $(PASSDB_OBJ) $(PRINTING_OBJ) $(PROFILE_OBJ) \
720                 $(LIB_OBJ) $(PRINTBACKEND_OBJ) $(OPLOCK_OBJ) \
721                 $(NOTIFY_OBJ) $(GROUPDB_OBJ) $(AUTH_OBJ) \
722                 $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
723                 $(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(LIBADS_SERVER_OBJ) \
724                 $(REG_FULL_OBJ) $(POPT_LIB_OBJ) $(BUILDOPT_OBJ) \
725                 $(SMBLDAP_OBJ) $(LDB_OBJ) $(LIBNET_OBJ) @LIBWBCLIENT_STATIC@ \
726                 $(LIBSMBCONF_OBJ) \
727                 $(PRIVILEGES_BASIC_OBJ)
728
729 PRINTING_OBJ = printing/pcap.o printing/print_svid.o printing/print_aix.o \
730                printing/print_cups.o printing/print_generic.o \
731                printing/lpq_parse.o printing/load.o \
732                printing/print_iprint.o
733
734 PRINTBASE_OBJ = printing/notify.o printing/printing_db.o
735 PRINTBACKEND_OBJ = printing/printing.o printing/nt_printing.o $(PRINTBASE_OBJ)
736
737 SMBD_OBJ = $(SMBD_OBJ_BASE) $(SMBD_OBJ_MAIN)
738
739 NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \
740             nmbd/nmbd_become_lmb.o nmbd/nmbd_browserdb.o \
741             nmbd/nmbd_browsesync.o nmbd/nmbd_elections.o \
742             nmbd/nmbd_incomingdgrams.o nmbd/nmbd_incomingrequests.o \
743             nmbd/nmbd_lmhosts.o nmbd/nmbd_logonnames.o nmbd/nmbd_mynames.o \
744             nmbd/nmbd_namelistdb.o nmbd/nmbd_namequery.o \
745             nmbd/nmbd_nameregister.o nmbd/nmbd_namerelease.o \
746             nmbd/nmbd_nodestatus.o nmbd/nmbd_packets.o \
747             nmbd/nmbd_processlogon.o nmbd/nmbd_responserecordsdb.o \
748             nmbd/nmbd_sendannounce.o nmbd/nmbd_serverlistdb.o \
749             nmbd/nmbd_subnetdb.o nmbd/nmbd_winsproxy.o nmbd/nmbd_winsserver.o \
750             nmbd/nmbd_workgroupdb.o nmbd/nmbd_synclists.o smbd/connection.o
751
752 NMBD_OBJ = $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
753            $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
754            $(LIBNDR_GEN_OBJ0)
755
756 SWAT_OBJ1 = web/cgi.o web/diagnose.o web/startstop.o web/statuspage.o \
757            web/swat.o web/neg_lang.o
758
759 SWAT_OBJ = $(SWAT_OBJ1) $(PARAM_OBJ) $(PRINTING_OBJ) $(PRINTBASE_OBJ) $(LIBSMB_OBJ) \
760            $(LOCKING_OBJ) $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(KRBCLIENT_OBJ) \
761            $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) $(PLAINTEXT_AUTH_OBJ) \
762            $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(RPC_PARSE_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ) \
763            $(PASSCHANGE_OBJ) $(LDB_OBJ)
764
765 STATUS_OBJ = utils/status.o utils/status_profile.o \
766              $(LOCKING_OBJ) $(PARAM_OBJ) \
767              $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
768              $(LIBSAMBA_OBJ)
769
770 SMBCONTROL_OBJ = utils/smbcontrol.o $(LOCKING_OBJ) $(PARAM_OBJ) \
771         $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
772         $(LIBSAMBA_OBJ) \
773         $(PRINTBASE_OBJ)
774
775 SMBTREE_OBJ = utils/smbtree.o $(PARAM_OBJ) \
776              $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSMB_OBJ) \
777              $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
778              $(RPC_CLIENT_OBJ) ../librpc/rpc/binding.o $(RPC_PARSE_OBJ2) \
779              $(RPC_CLIENT_OBJ1) \
780              $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(SMBLDAP_OBJ) $(LDB_OBJ) $(GROUPDB_OBJ) \
781              $(LIBMSRPC_GEN_OBJ)
782
783 TESTPARM_OBJ = utils/testparm.o \
784                $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
785                $(LIBSAMBA_OBJ)
786
787 TEST_LP_LOAD_OBJ = param/test_lp_load.o \
788                    $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
789                    $(POPT_LIB_OBJ) $(LIBSAMBA_OBJ)
790
791 PASSWD_UTIL_OBJ = utils/passwd_util.o
792
793 SMBPASSWD_OBJ = utils/smbpasswd.o $(PASSWD_UTIL_OBJ) $(PASSCHANGE_OBJ) \
794                 $(PARAM_OBJ) $(LIBSMB_OBJ) $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ \
795                 $(GROUPDB_OBJ) $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \
796                 $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(RPC_PARSE_OBJ) \
797                 $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ) $(LDB_OBJ)
798
799 PDBEDIT_OBJ = utils/pdbedit.o $(PASSWD_UTIL_OBJ) $(PARAM_OBJ) $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ \
800                 $(LIBSAMBA_OBJ) \
801                 $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) \
802                 $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) ../lib/util/asn1.o \
803                 $(LDB_OBJ)
804
805 SMBGET_OBJ = utils/smbget.o $(POPT_LIB_OBJ) $(LIBSMBCLIENT_OBJ1) @LIBWBCLIENT_STATIC@
806
807 DISPLAY_SEC_OBJ= lib/display_sec.o
808
809 RPCCLIENT_OBJ1 = rpcclient/rpcclient.o rpcclient/cmd_lsarpc.o \
810                  rpcclient/cmd_samr.o rpcclient/cmd_spoolss.o \
811                  rpcclient/cmd_netlogon.o rpcclient/cmd_srvsvc.o \
812                  rpcclient/cmd_dfs.o rpcclient/cmd_epmapper.o \
813                  rpcclient/cmd_dssetup.o rpcclient/cmd_echo.o \
814                  rpcclient/cmd_shutdown.o rpcclient/cmd_test.o \
815                  rpcclient/cmd_wkssvc.o rpcclient/cmd_ntsvcs.o \
816                  rpcclient/cmd_drsuapi.o rpcclient/cmd_eventlog.o \
817                  $(DISPLAY_SEC_OBJ)
818
819 RPCCLIENT_OBJ = $(RPCCLIENT_OBJ1) \
820              $(PARAM_OBJ) $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) \
821              $(RPC_PARSE_OBJ) $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ) \
822              $(READLINE_OBJ) $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) \
823              $(LIBADS_OBJ) $(POPT_LIB_OBJ) \
824              $(SMBLDAP_OBJ) $(DCUTIL_OBJ) $(LDB_OBJ) 
825
826 PAM_WINBIND_OBJ = ../nsswitch/pam_winbind.o localedir.o $(WBCOMMON_OBJ) \
827                   $(LIBREPLACE_OBJ) @BUILD_INIPARSER@
828
829 LIBSMBCLIENT_OBJ0 = \
830                     libsmb/libsmb_cache.o \
831                     libsmb/libsmb_compat.o \
832                     libsmb/libsmb_context.o \
833                     libsmb/libsmb_dir.o \
834                     libsmb/libsmb_file.o \
835                     libsmb/libsmb_misc.o \
836                     libsmb/libsmb_path.o \
837                     libsmb/libsmb_printjob.o \
838                     libsmb/libsmb_server.o \
839                     libsmb/libsmb_stat.o \
840                     libsmb/libsmb_xattr.o \
841                     libsmb/libsmb_setget.o
842
843 LIBSMBCLIENT_OBJ1 = $(LIBSMBCLIENT_OBJ0) \
844                     $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
845                     $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
846                     $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(RPC_PARSE_OBJ) \
847                     $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) $(LDB_OBJ)
848
849 LIBSMBCLIENT_OBJ = $(LIBSMBCLIENT_OBJ1) @LIBWBCLIENT_STATIC@
850
851 # This shared library is intended for linking with unit test programs
852 # to test Samba internals.  It's called libbigballofmud.so to
853 # discourage casual usage.
854
855 LIBBIGBALLOFMUD_MAJOR = 0
856
857 LIBBIGBALLOFMUD_OBJ = $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
858         $(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ \
859         $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) $(SMBLDAP_OBJ) $(LDB_OBJ)
860
861 CLIENT_OBJ1 = client/client.o client/clitar.o $(RPC_CLIENT_OBJ) \
862               ../librpc/rpc/binding.o \
863               client/dnsbrowse.o \
864               $(RPC_CLIENT_OBJ1) \
865               $(RPC_PARSE_OBJ2)
866
867 CLIENT_OBJ = $(CLIENT_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) \
868              $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) $(LIBMSRPC_GEN_OBJ) \
869              $(READLINE_OBJ) $(POPT_LIB_OBJ) \
870              $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(SMBLDAP_OBJ) $(GROUPDB_OBJ) $(LDB_OBJ) \
871              $(DISPLAY_SEC_OBJ)
872
873 LIBSMBCONF_OBJ = ../lib/smbconf/smbconf.o \
874                  ../lib/smbconf/smbconf_util.o \
875                  ../lib/smbconf/smbconf_txt.o \
876                  lib/smbconf/smbconf_reg.o \
877                  lib/smbconf/smbconf_init.o
878
879 SMBCONFTORT_OBJ0 = lib/smbconf/testsuite.o
880
881 SMBCONFTORT_OBJ = $(SMBCONFTORT_OBJ0) \
882                   $(LIB_NONSMBD_OBJ) \
883                   $(PARAM_OBJ) \
884                   $(LIBSMB_ERR_OBJ) \
885                   $(POPT_LIB_OBJ)
886
887 LIBNET_OBJ = libnet/libnet_join.o \
888              libnet/libnet_keytab.o \
889              libnet/libnet_samsync.o \
890              libnet/libnet_samsync_ldif.o \
891              libnet/libnet_samsync_passdb.o \
892              libnet/libnet_samsync_display.o \
893              libnet/libnet_samsync_keytab.o \
894              libnet/libnet_dssync.o \
895              libnet/libnet_dssync_keytab.o \
896              librpc/gen_ndr/ndr_libnet_join.o
897
898 NET_OBJ1 = utils/net.o utils/net_ads.o utils/net_help.o \
899            utils/net_rap.o utils/net_rpc.o utils/net_rpc_samsync.o \
900            utils/net_rpc_join.o utils/net_time.o utils/net_lookup.o \
901            utils/net_cache.o utils/net_groupmap.o utils/net_idmap.o \
902            utils/net_status.o utils/net_rpc_printer.o utils/net_rpc_rights.o \
903            utils/net_rpc_service.o utils/net_rpc_registry.o utils/net_usershare.o \
904            utils/netlookup.o utils/net_sam.o utils/net_rpc_shell.o \
905            utils/net_util.o utils/net_rpc_sh_acct.o utils/net_rpc_audit.o \
906            $(PASSWD_UTIL_OBJ) utils/net_dns.o utils/net_ads_gpo.o \
907            utils/net_conf.o utils/net_join.o utils/net_user.o \
908            utils/net_group.o utils/net_file.o utils/net_registry.o \
909            auth/token_util.o utils/net_dom.o utils/net_share.o utils/net_lua.o \
910            utils/net_eventlog.o
911
912 # these are not processed by make proto
913 NET_OBJ2 = utils/net_registry_util.o utils/net_help_common.o
914
915 NET_OBJ = $(NET_OBJ1) \
916           $(NET_OBJ2) @FAKE_KASERVER_OBJ@\
917           $(PARAM_WITHOUT_REG_OBJ) $(LIBSMB_OBJ) \
918           $(RPC_PARSE_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
919           $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(LIBADDNS_OBJ0) \
920           $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
921           $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) $(POPT_LIB_OBJ) \
922           $(SMBLDAP_OBJ) $(DCUTIL_OBJ) $(SERVER_MUTEX_OBJ) \
923           $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) $(READLINE_OBJ) \
924           $(LDB_OBJ) $(LIBGPO_OBJ) @BUILD_INIPARSER@ $(DISPLAY_SEC_OBJ) \
925           $(REG_SMBCONF_OBJ) @LIBNETAPI_STATIC@ $(LIBNET_OBJ) \
926           $(LIBSMBCONF_OBJ) \
927           @LIBWBCLIENT_STATIC@ \
928           $(PRIVILEGES_BASIC_OBJ) @LIBLUA_STATIC@ \
929           $(LIB_EVENTLOG_OBJ)
930
931 CUPS_OBJ = client/smbspool.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
932           $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
933           $(LIBNDR_GEN_OBJ0)
934
935 CIFS_MOUNT_OBJ = client/mount.cifs.o client/mtab.o
936
937 CIFS_UMOUNT_OBJ = client/umount.cifs.o client/mtab.o
938
939 CIFS_UPCALL_OBJ = client/cifs.upcall.o
940
941 NMBLOOKUP_OBJ = utils/nmblookup.o $(PARAM_OBJ) $(LIBNMB_OBJ) \
942                $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) $(LIBSAMBA_OBJ)
943
944 SMBTORTURE_OBJ1 = torture/torture.o torture/nbio.o torture/scanner.o torture/utable.o \
945                 torture/denytest.o torture/mangle_test.o
946
947 SMBTORTURE_OBJ = $(SMBTORTURE_OBJ1) $(PARAM_OBJ) \
948         $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) \
949         lib/wb_reqtrans.o lib/wbclient.o \
950         @LIBWBCLIENT_STATIC@ \
951         $(LIBNDR_GEN_OBJ0)
952
953 MASKTEST_OBJ = torture/masktest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
954                  $(LIB_NONSMBD_OBJ) \
955                  $(LIBNDR_GEN_OBJ0)
956
957 MSGTEST_OBJ = torture/msgtest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
958                  $(LIB_NONSMBD_OBJ) \
959                  $(LIBNDR_GEN_OBJ0)
960
961 LOCKTEST_OBJ = torture/locktest.o $(PARAM_OBJ) $(LOCKING_OBJ) $(KRBCLIENT_OBJ) \
962                $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) \
963                $(LIBNDR_GEN_OBJ0)
964
965 NSSTEST_OBJ = torture/nsstest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
966                  $(LIB_NONSMBD_OBJ) \
967                  $(LIBNDR_GEN_OBJ0)
968
969 PDBTEST_OBJ = torture/pdbtest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
970                 $(LIB_NONSMBD_OBJ) $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(GROUPDB_OBJ) \
971                 $(SMBLDAP_OBJ) $(POPT_LIB_OBJ) $(LDB_OBJ) \
972                 $(LIBNDR_GEN_OBJ0)
973
974 VFSTEST_OBJ = torture/cmd_vfs.o torture/vfstest.o $(SMBD_OBJ_BASE) $(READLINE_OBJ)
975
976 SMBICONV_OBJ = $(PARAM_OBJ) torture/smbiconv.o $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) $(LIBSAMBA_OBJ)
977
978 LOG2PCAP_OBJ = utils/log2pcaphex.o
979
980 LOCKTEST2_OBJ = torture/locktest2.o $(PARAM_OBJ) $(LOCKING_OBJ) $(LIBSMB_OBJ) \
981                 $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) \
982                 $(LIBNDR_GEN_OBJ0)
983
984 SMBCACLS_OBJ = utils/smbcacls.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
985                 $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(RPC_PARSE_OBJ) \
986                 $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(GROUPDB_OBJ) $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
987                 $(POPT_LIB_OBJ) $(DCUTIL_OBJ) $(LIBADS_OBJ) $(SMBLDAP_OBJ) $(LDB_OBJ)
988
989 SMBCQUOTAS_OBJ = utils/smbcquotas.o $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
990                 $(PARAM_OBJ) \
991                 $(LIB_NONSMBD_OBJ) $(RPC_PARSE_OBJ) \
992                 $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(POPT_LIB_OBJ) \
993                 $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(SMBLDAP_OBJ) $(GROUPDB_OBJ) $(LDB_OBJ)
994
995 EVTLOGADM_OBJ0  = utils/eventlogadm.o
996
997 EVTLOGADM_OBJ   = $(EVTLOGADM_OBJ0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
998                 $(LIBSAMBA_OBJ) \
999                 registry/reg_eventlog.o $(LIB_EVENTLOG_OBJ) \
1000                 ../librpc/gen_ndr/ndr_eventlog.o \
1001                 ../librpc/gen_ndr/ndr_lsa.o
1002
1003 SHARESEC_OBJ0 = utils/sharesec.o
1004 SHARESEC_OBJ  = $(SHARESEC_OBJ0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1005                 $(LIBSAMBA_OBJ) \
1006                 $(POPT_LIB_OBJ)
1007
1008 TALLOCTORT_OBJ = @tallocdir@/testsuite.o @tallocdir@/testsuite_main.o \
1009                 $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSAMBA_OBJ)
1010
1011 REPLACETORT_OBJ = @libreplacedir@/test/testsuite.o \
1012                 @libreplacedir@/test/getifaddrs.o \
1013                 @libreplacedir@/test/os2_delete.o \
1014                 @libreplacedir@/test/strptime.o \
1015                 @libreplacedir@/test/main.o \
1016                 $(LIBREPLACE_OBJ)
1017
1018 DEBUG2HTML_OBJ = utils/debug2html.o utils/debugparse.o
1019
1020 SMBFILTER_OBJ = utils/smbfilter.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
1021                  $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \
1022                  $(LIBNDR_GEN_OBJ0)
1023
1024 WINBIND_WINS_NSS_OBJ = ../nsswitch/wins.o $(PARAM_OBJ) \
1025         $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) $(NSSWINS_OBJ) $(KRBCLIENT_OBJ) \
1026         $(LIBNDR_GEN_OBJ0)
1027
1028 PAM_SMBPASS_OBJ_0 = pam_smbpass/pam_smb_auth.o pam_smbpass/pam_smb_passwd.o \
1029                 pam_smbpass/pam_smb_acct.o pam_smbpass/support.o
1030 PAM_SMBPASS_OBJ = $(PAM_SMBPASS_OBJ_0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(GROUPDB_OBJ) \
1031                 $(SMBLDAP_OBJ) $(LIBSAMBA_OBJ) \
1032                 $(LDB_OBJ)
1033
1034 IDMAP_OBJ     = winbindd/idmap.o winbindd/idmap_util.o @IDMAP_STATIC@
1035
1036 NSS_INFO_OBJ = winbindd/nss_info.o @NSS_INFO_STATIC@
1037
1038 IDMAP_HASH_OBJ = \
1039                 winbindd/idmap_hash/idmap_hash.o \
1040                 winbindd/idmap_hash/mapfile.o
1041
1042 IDMAP_ADEX_OBJ = \
1043                 winbindd/idmap_adex/idmap_adex.o \
1044                 winbindd/idmap_adex/cell_util.o \
1045                 winbindd/idmap_adex/likewise_cell.o \
1046                 winbindd/idmap_adex/provider_unified.o \
1047                 winbindd/idmap_adex/gc_util.o \
1048                 winbindd/idmap_adex/domain_util.o
1049
1050 WINBINDD_OBJ1 = \
1051                 winbindd/winbindd.o       \
1052                 winbindd/winbindd_user.o  \
1053                 winbindd/winbindd_group.o \
1054                 winbindd/winbindd_util.o  \
1055                 winbindd/winbindd_cache.o \
1056                 winbindd/winbindd_pam.o   \
1057                 winbindd/winbindd_sid.o   \
1058                 winbindd/winbindd_misc.o  \
1059                 winbindd/winbindd_cm.o    \
1060                 winbindd/winbindd_wins.o  \
1061                 winbindd/winbindd_rpc.o   \
1062                 winbindd/winbindd_reconnect.o \
1063                 winbindd/winbindd_ads.o   \
1064                 winbindd/winbindd_passdb.o \
1065                 winbindd/winbindd_dual.o  \
1066                 winbindd/winbindd_async.o \
1067                 winbindd/winbindd_creds.o \
1068                 winbindd/winbindd_cred_cache.o \
1069                 winbindd/winbindd_ccache_access.o \
1070                 winbindd/winbindd_domain.o \
1071                 winbindd/winbindd_idmap.o \
1072                 winbindd/winbindd_locator.o \
1073                 winbindd/winbindd_ndr.o \
1074                 auth/token_util.o \
1075                 smbd/connection.o
1076
1077 WINBINDD_OBJ = \
1078                 $(WINBINDD_OBJ1) $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(GROUPDB_OBJ) \
1079                 $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1080                 $(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(RPC_PARSE_OBJ) \
1081                 $(PROFILE_OBJ) $(SLCACHE_OBJ) $(SMBLDAP_OBJ) \
1082                 $(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
1083                 $(DCUTIL_OBJ) $(IDMAP_OBJ) $(NSS_INFO_OBJ) \
1084                 $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) \
1085                 $(LIBADS_SERVER_OBJ) $(SERVER_MUTEX_OBJ) $(LDB_OBJ) \
1086                 $(TDB_VALIDATE_OBJ)
1087
1088 WBINFO_OBJ = ../nsswitch/wbinfo.o $(LIBSAMBA_OBJ) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1089                 $(POPT_LIB_OBJ) $(AFS_SETTOKEN_OBJ) \
1090                 lib/winbind_util.o $(WBCOMMON_OBJ) @LIBWBCLIENT_STATIC@
1091
1092 WINBIND_NSS_OBJ = $(WBCOMMON_OBJ) $(LIBREPLACE_OBJ) @WINBIND_NSS_EXTRA_OBJS@
1093
1094 LDB_COMMON_OBJ=lib/ldb/common/ldb.o lib/ldb/common/ldb_ldif.o \
1095           lib/ldb/common/ldb_parse.o lib/ldb/common/ldb_msg.o lib/ldb/common/ldb_utf8.o \
1096           lib/ldb/common/ldb_debug.o lib/ldb/common/ldb_modules.o \
1097           lib/ldb/common/ldb_dn.o lib/ldb/common/ldb_match.o lib/ldb/common/ldb_attributes.o \
1098           lib/ldb/common/attrib_handlers.o lib/ldb/common/ldb_controls.o lib/ldb/common/qsort.o
1099
1100 LDB_TDB_OBJ=lib/ldb/ldb_tdb/ldb_tdb.o \
1101        lib/ldb/ldb_tdb/ldb_pack.o lib/ldb/ldb_tdb/ldb_search.o lib/ldb/ldb_tdb/ldb_index.o \
1102        lib/ldb/ldb_tdb/ldb_cache.o lib/ldb/ldb_tdb/ldb_tdb_wrap.o
1103
1104 LDB_MODULES_OBJ=lib/ldb/modules/operational.o lib/ldb/modules/rdn_name.o \
1105           lib/ldb/modules/objectclass.o \
1106           lib/ldb/modules/paged_results.o lib/ldb/modules/sort.o lib/ldb/modules/asq.o
1107
1108 # enabled in configure.in
1109 LDB_LDAP_OBJ=@LDBLDAP@
1110
1111 LDB_OBJ = ${LDB_COMMON_OBJ} ${LDB_TDB_OBJ} ${LDB_LDAP_OBJ} ${LDB_MODULES_OBJ}
1112
1113 LDB_CMDLINE_OBJ = $(PARAM_OBJ) \
1114           $(POPT_LIB_OBJ) $(LIB_OBJ) $(LIB_DUMMY_OBJ) $(LIBSMB_ERR_OBJ0) \
1115           $(RPC_PARSE_OBJ1) $(SECRETS_OBJ) \
1116           $(LDB_OBJ) lib/ldb/tools/cmdline.o 
1117
1118
1119 LDBEDIT_OBJ = $(LDB_CMDLINE_OBJ) lib/ldb/tools/ldbedit.o
1120 LDBSEARCH_OBJ = $(LDB_CMDLINE_OBJ) lib/ldb/tools/ldbsearch.o
1121 LDBADD_OBJ = $(LDB_CMDLINE_OBJ) lib/ldb/tools/ldbadd.o
1122 LDBDEL_OBJ = $(LDB_CMDLINE_OBJ) lib/ldb/tools/ldbdel.o
1123 LDBMODIFY_OBJ = $(LDB_CMDLINE_OBJ) lib/ldb/tools/ldbmodify.o
1124
1125 WINBIND_KRB5_LOCATOR_OBJ1 = ../nsswitch/winbind_krb5_locator.o
1126 WINBIND_KRB5_LOCATOR_OBJ = $(WINBIND_KRB5_LOCATOR_OBJ1) $(LIBREPLACE_OBJ)
1127
1128 POPT_OBJ=../lib/popt/findme.o ../lib/popt/popt.o ../lib/popt/poptconfig.o \
1129           ../lib/popt/popthelp.o ../lib/popt/poptparse.o
1130
1131 INIPARSER_OBJ = iniparser_build/iniparser.o iniparser_build/dictionary.o \
1132                 iniparser_build/strlib.o
1133
1134 TDBBACKUP_OBJ = @tdbdir@/tools/tdbbackup.o $(LIBREPLACE_OBJ) \
1135         @LIBTDB_STATIC@ $(SOCKET_WRAPPER_OBJ)
1136
1137 TDBTOOL_OBJ = @tdbdir@/tools/tdbtool.o @LIBTDB_STATIC@ $(LIBREPLACE_OBJ) \
1138         $(SOCKET_WRAPPER_OBJ)
1139
1140 TDBDUMP_OBJ = @tdbdir@/tools/tdbdump.o @LIBTDB_STATIC@ $(LIBREPLACE_OBJ) \
1141         $(SOCKET_WRAPPER_OBJ)
1142
1143 TDBTORTURE_OBJ = @tdbdir@/tools/tdbtorture.o @LIBTDB_STATIC@ $(LIBREPLACE_OBJ) \
1144         $(SOCKET_WRAPPER_OBJ)
1145
1146
1147 NTLM_AUTH_OBJ1 = utils/ntlm_auth.o utils/ntlm_auth_diagnostics.o
1148
1149 NTLM_AUTH_OBJ = ${NTLM_AUTH_OBJ1} $(LIBSAMBA_OBJ) $(POPT_LIB_OBJ) \
1150                 ../lib/util/asn1.o libsmb/spnego.o libsmb/clikrb5.o libads/kerberos.o \
1151                 $(SERVER_MUTEX_OBJ) $(LIBADS_SERVER_OBJ) \
1152                 $(PASSDB_OBJ) $(GROUPDB_OBJ) \
1153                 $(SMBLDAP_OBJ) $(LIBNMB_OBJ) \
1154                 $(LDB_OBJ) $(WBCOMMON_OBJ) @LIBWBCLIENT_STATIC@ \
1155                 $(LIBNDR_GEN_OBJ0) $(LIBNDR_GEN_OBJ1)
1156
1157
1158 VLP_OBJ1 = printing/tests/vlp.o $(RPC_CLIENT_OBJ1) $(RPC_PARSE_OBJ2) $(RPC_CLIENT_OBJ) ../librpc/rpc/binding.o
1159
1160 VLP_OBJ = $(VLP_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) \
1161           $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) $(LIBMSRPC_GEN_OBJ) \
1162           $(READLINE_OBJ) $(POPT_LIB_OBJ) \
1163           $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(SMBLDAP_OBJ) $(GROUPDB_OBJ) $(LDB_OBJ) \
1164           $(DISPLAY_SEC_OBJ)
1165
1166 RPC_OPEN_TCP_OBJ = torture/rpc_open_tcp.o \
1167                    $(LIBSMB_OBJ) \
1168                    $(PARAM_OBJ) \
1169                    $(PASSDB_OBJ) \
1170                    @LIBWBCLIENT_STATIC@ $(SMBLDAP_OBJ) $(LDB_OBJ) $(GROUPDB_OBJ) \
1171                    $(LIB_NONSMBD_OBJ) \
1172                    $(KRBCLIENT_OBJ) \
1173                    $(RPC_PARSE_OBJ2) \
1174                    $(RPC_CLIENT_OBJ1) \
1175                    rpc_client/cli_pipe.o \
1176                    ../librpc/rpc/binding.o \
1177                    $(LIBMSRPC_GEN_OBJ)
1178
1179
1180 ######################################################################
1181 # now the rules...
1182 ######################################################################
1183 all:: SHOWFLAGS basics libs $(SBIN_PROGS) $(BIN_PROGS) $(ROOT_SBIN_PROGS) \
1184         $(MODULES) $(NSS_MODULES) $(PAM_MODULES) @CIFSUPCALL_PROGS@ \
1185         $(EXTRA_ALL_TARGETS)
1186
1187 basics::
1188
1189 nss_modules:: $(NSS_MODULES)
1190
1191 pam_modules:: $(PAM_MODULES)
1192
1193 pam_smbpass: SHOWFLAGS bin/pam_smbpass.@SHLIBEXT@
1194
1195 pam_winbind: SHOWFLAGS bin/pam_winbind.@SHLIBEXT@
1196
1197 gpext_modules:: $(GPEXT_MODULES)
1198
1199 torture:: SHOWFLAGS basics $(TORTURE_PROGS) 
1200
1201 smbtorture : SHOWFLAGS bin/smbtorture@EXEEXT@
1202
1203 masktest : SHOWFLAGS bin/masktest@EXEEXT@
1204
1205 msgtest : SHOWFLAGS bin/msgtest@EXEEXT@
1206
1207 locktest : SHOWFLAGS bin/locktest@EXEEXT@
1208
1209 smbcacls : SHOWFLAGS bin/smbcacls@EXEEXT@
1210
1211 smbcquotas : SHOWFLAGS bin/smbcquotas@EXEEXT@
1212
1213 locktest2 : SHOWFLAGS bin/locktest2@EXEEXT@
1214
1215 debug2html : SHOWFLAGS bin/debug2html@EXEEXT@
1216
1217 smbfilter : SHOWFLAGS bin/smbfilter@EXEEXT@
1218
1219 eventlogadm: SHOWFLAGS bin/eventlogadm@EXEEXT@
1220
1221 sharesec: SHOWFLAGS bin/sharesec@EXEEXT@
1222
1223 talloctort : SHOWFLAGS bin/talloctort@EXEEXT@
1224
1225 replacetort : SHOWFLAGS bin/replacetort@EXEEXT@
1226
1227 smbconftort : SHOWFLAGS bin/smbconftort@EXEEXT@
1228
1229 timelimit : SHOWFLAGS bin/timelimit@EXEEXT@
1230
1231 nsswitch : SHOWFLAGS bin/winbindd@EXEEXT@ bin/wbinfo@EXEEXT@ @WINBIND_NSS@ \
1232         @WINBIND_WINS_NSS@ @WINBIND_KRB5_LOCATOR@ \
1233         bin/pam_winbind.@SHLIBEXT@ bin/smbcontrol@EXEEXT@
1234
1235 wins : SHOWFLAGS @WINBIND_WINS_NSS@
1236
1237 modules:: SHOWFLAGS $(MODULES)
1238
1239 #####################################################################
1240 ## Perl IDL Compiler
1241 samba3-idl::
1242         @PIDL_OUTPUTDIR="../librpc/gen_ndr" PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \
1243          srcdir="$(srcdir)" ../librpc/build_idl.sh ../librpc/idl/*.idl
1244         @PIDL_OUTPUTDIR="librpc/gen_ndr" PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \
1245          srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh \
1246                 librpc/idl/messaging.idl librpc/idl/libnetapi.idl librpc/idl/notify.idl
1247
1248 #####################################################################
1249
1250
1251 everything:: all libtalloc libsmbclient libnetapi debug2html smbfilter talloctort replacetort smbconftort modules torture \
1252         $(EVERYTHING_PROGS)
1253
1254 .SUFFIXES:
1255 .SUFFIXES: .c .o .lo
1256
1257 SHOWFLAGS::
1258         @echo "Using CFLAGS     = $(CFLAGS)"
1259         @echo "      PICFLAG    = $(PICFLAG)"
1260         @echo "      LIBS       = $(LIBS)"
1261         @echo "      LDFLAGS    = $(LDFLAGS)"
1262         @echo "      DYNEXP     = $(DYNEXP)"
1263         @echo "      LDSHFLAGS  = $(LDSHFLAGS)"
1264         @echo "      SHLIBEXT   = @SHLIBEXT@"
1265         @echo "      SONAMEFLAG = @SONAMEFLAG@"
1266
1267 MAKEDIR = || exec false; \
1268           if test -d "$$dir"; then :; else \
1269           echo mkdir "$$dir"; \
1270           mkdir -p "$$dir" >/dev/null 2>&1 || \
1271           test -d "$$dir" || \
1272           mkdir "$$dir" || \
1273           exec false; fi || exec false
1274
1275 # Run a static checker.
1276 CHECK_CC = $(CC_CHECKER) $(CFLAGS) $(PICFLAG) -c $< -o $@
1277 # Compile a source file.
1278 COMPILE_CC = $(CC) $(CFLAGS) $(PICFLAG) -c $< -o $@
1279 # Compile a source file with the installation paths defined.
1280 COMPILE_CC_PATH = $(CC) $(PATH_FLAGS) $(CFLAGS) $(PICFLAG) -c $< -o $@
1281
1282 COMPILE = $(COMPILE_CC)
1283
1284 .c.o:
1285         @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
1286          dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
1287         @if test -n "$(CC_CHECKER)"; then \
1288           echo "Checking  $*.c with '$(CC_CHECKER)'";\
1289           $(CHECK_CC); \
1290          fi
1291         @echo Compiling $*.c
1292         @$(COMPILE) && exit 0;\
1293                 echo "The following command failed:" 1>&2;\
1294                 echo "$(subst ",\",$(COMPILE_CC))" 1>&2;\
1295                 $(COMPILE_CC) >/dev/null 2>&1
1296 @BROKEN_CC@     -mv `echo $@ | sed 's%^.*/%%g'` $@
1297
1298 PRECOMPILED_HEADER = $(builddir)/include/includes.h.gch
1299
1300 # this adds support for precompiled headers. To use it, install a snapshot
1301 # of gcc-3.4 and run 'make pch' before you do the main build.
1302 pch::
1303         rm -f $(PRECOMPILED_HEADER)
1304         $(MAKE) $(PRECOMPILED_HEADER)
1305
1306 $(PRECOMPILED_HEADER): $(srcdir)/include/includes.h
1307         $(COMPILE)
1308
1309 BINARY_PREREQS = bin/.dummy
1310
1311 # These dependencies are only approximately correct: we want to make
1312 # sure Samba's paths are updated if ./configure is re-run.  Really it
1313 # would be nice if "make prefix=/opt/samba all" also rebuilt things,
1314 # but since we also require "make install prefix=/opt/samba" *not* to
1315 # rebuild it's a bit hard.
1316
1317 dynconfig.o: dynconfig.c Makefile
1318         @echo Compiling $*.c
1319         @$(COMPILE_CC_PATH) && exit 0;\
1320                 echo "The following command failed:" 1>&2;\
1321                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1322                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1323
1324 localedir.o: localedir.c Makefile
1325         @echo Compiling $*.c
1326         @$(COMPILE_CC_PATH) && exit 0;\
1327                 echo "The following command failed:" 1>&2;\
1328                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1329                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1330
1331 lib/pidfile.o: lib/pidfile.c
1332         @echo Compiling $*.c
1333         @$(COMPILE_CC_PATH) && exit 0;\
1334                 echo "The following command failed:" 1>&2;\
1335                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1336                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1337
1338 lib/version.o: lib/version.c include/version.h
1339         @echo Compiling $*.c
1340         @$(COMPILE_CC_PATH) && exit 0;\
1341                 echo "The following command failed:" 1>&2;\
1342                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1343                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1344
1345 smbd/build_options.o: smbd/build_options.c Makefile include/config.h include/build_env.h include/proto.h
1346         @echo Compiling $*.c
1347         @$(COMPILE_CC_PATH) && exit 0;\
1348                 echo "The following command failed:" 1>&2;\
1349                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1350                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1351
1352 smbd/build_options.c: include/config.h.in script/mkbuildoptions.awk
1353         @echo Generating $@
1354         @dir=smbd $(MAKEDIR) && $(AWK) -f $(srcdir)/script/mkbuildoptions.awk > $(builddir)/smbd/build_options.c < $(srcdir)/include/config.h.in
1355
1356 bin/.dummy:
1357         @if (: >> $@ || : > $@) >/dev/null 2>&1; then :; else \
1358           dir=bin $(MAKEDIR); fi
1359         @: >> $@ || : > $@ # what a fancy emoticon!
1360
1361 bin/smbd@EXEEXT@: $(BINARY_PREREQS) $(SMBD_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @BUILD_POPT@
1362         @echo Linking $@
1363         @$(CC) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LDAP_LIBS) \
1364                 $(KRB5LIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \
1365                 $(ACL_LIBS) $(PASSDB_LIBS) $(LIBS) $(DNSSD_LIBS) \
1366                 $(POPT_LIBS) @SMBD_LIBS@ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
1367                 $(WINBIND_LIBS) $(ZLIB_LIBS)
1368
1369 bin/nmbd@EXEEXT@: $(BINARY_PREREQS) $(NMBD_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1370         @echo Linking $@
1371         @$(CC) -o $@ $(NMBD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1372                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(POPT_LIBS) \
1373                 $(KRB5LIBS) $(LDAP_LIBS) $(ZLIB_LIBS)
1374
1375 bin/swat@EXEEXT@: $(BINARY_PREREQS) $(SWAT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1376         @echo Linking $@
1377         @$(CC) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(DYNEXP) $(PRINT_LIBS) \
1378           $(AUTH_LIBS) $(LIBS) $(PASSDB_LIBS) $(POPT_LIBS) $(KRB5LIBS) \
1379           $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
1380
1381 bin/rpcclient@EXEEXT@: $(BINARY_PREREQS) $(RPCCLIENT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1382         @echo Linking $@
1383         @$(CC) -o $@ $(LDFLAGS) $(PASSDB_LIBS) $(RPCCLIENT_OBJ) \
1384                 $(DYNEXP) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
1385                 $(KRB5LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
1386                 $(WINBIND_LIBS) $(ZLIB_LIBS)
1387
1388 bin/smbclient@EXEEXT@: $(BINARY_PREREQS) $(CLIENT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1389         @echo Linking $@
1390         @$(CC) -o $@ $(CLIENT_OBJ) $(LDFLAGS) $(DYNEXP) \
1391                 $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
1392                 $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(DNSSD_LIBS) \
1393                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
1394
1395 bin/net@EXEEXT@: $(BINARY_PREREQS) $(NET_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @LIBNETAPI_SHARED@ @LIBLUA_SHARED@
1396         @echo Linking $@
1397         @$(CC) -o $@ $(NET_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
1398                 $(POPT_LIBS) $(KRB5LIBS) $(UUID_LIBS) $(LDAP_LIBS) \
1399                 $(PASSDB_LIBS) $(TERMLDFLAGS) $(TERMLIBS) $(NSCD_LIBS) \
1400                 @INIPARSERLIBS@ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(LIBNETAPI_LIBS)  $(LIBLUA_LIBS) -lm \
1401                 $(ZLIB_LIBS)
1402
1403 bin/profiles@EXEEXT@: $(BINARY_PREREQS) $(PROFILES_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1404         @echo Linking $@
1405         @$(CC) -o $@ $(PROFILES_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
1406                 $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1407
1408 bin/smbspool@EXEEXT@: $(BINARY_PREREQS) $(CUPS_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1409         @echo Linking $@
1410         @$(CC) -o $@ $(CUPS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
1411                 $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
1412
1413 bin/mount.cifs@EXEEXT@: $(BINARY_PREREQS) $(CIFS_MOUNT_OBJ) @BUILD_POPT@
1414         @echo Linking $@
1415         @$(CC) -o $@ $(CIFS_MOUNT_OBJ) $(DYNEXP) $(LDFLAGS) $(POPT_LIBS)
1416
1417 bin/umount.cifs@EXEEXT@: $(BINARY_PREREQS) $(CIFS_UMOUNT_OBJ) @BUILD_POPT@
1418         @echo Linking $@
1419         @$(CC) -o $@ $(CIFS_UMOUNT_OBJ) $(DYNEXP) $(LDFLAGS) $(POPT_LIBS)
1420
1421 bin/cifs.upcall@EXEEXT@: $(BINARY_PREREQS) $(CIFS_UPCALL_OBJ) $(LIBSMBCLIENT_OBJ1) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1422         @echo Linking $@
1423         @$(CC) -o $@ $(CIFS_UPCALL_OBJ) $(DYNEXP) $(LDFLAGS) \
1424                 -lkeyutils $(LIBS) $(LIBSMBCLIENT_OBJ1) $(KRB5LIBS) \
1425                 $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(WINBIND_LIBS) \
1426                 $(LIBTDB_LIBS) $(NSCD_LIBS)
1427
1428 bin/testparm@EXEEXT@: $(BINARY_PREREQS) $(TESTPARM_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1429         @echo Linking $@
1430         @$(CC) -o $@ $(TESTPARM_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1431                 $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1432
1433 bin/smbstatus@EXEEXT@: $(BINARY_PREREQS) $(STATUS_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1434         @echo Linking $@
1435         @$(CC) -o $@ $(STATUS_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1436                 $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1437
1438 bin/smbcontrol@EXEEXT@: $(BINARY_PREREQS) $(SMBCONTROL_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1439         @echo Linking $@
1440         @$(CC) -DUSING_SMBCONTROL -o $@ \
1441                 $(SMBCONTROL_OBJ) $(DYNEXP) $(LDFLAGS) \
1442                 $(LIBS) $(LDAP_LIBS) @LIBUNWIND_PTRACE@ $(POPT_LIBS) \
1443                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1444
1445 bin/smbtree@EXEEXT@: $(BINARY_PREREQS) $(SMBTREE_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1446         @echo Linking $@
1447         @$(CC) -o $@ $(SMBTREE_OBJ) $(LDFLAGS) $(DYNEXP) \
1448                 $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1449                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
1450
1451 bin/smbpasswd@EXEEXT@: $(BINARY_PREREQS) $(SMBPASSWD_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1452         @echo Linking $@
1453         @$(CC) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(PASSDB_LIBS) \
1454                 $(DYNEXP) $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
1455                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
1456
1457 bin/pdbedit@EXEEXT@: $(BINARY_PREREQS) $(PDBEDIT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1458         @echo Linking $@
1459         @$(CC) -o $@ $(PDBEDIT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1460                 $(POPT_LIBS) $(PASSDB_LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) \
1461                 $(LIBTDB_LIBS) $(WINBIND_LIBS)
1462
1463 bin/smbget@EXEEXT@: $(BINARY_PREREQS) $(SMBGET_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1464         @echo Linking $@
1465         @$(CC) -o $@ $(SMBGET_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1466                 $(POPT_LIBS)  $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1467                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
1468
1469 bin/nmblookup@EXEEXT@: $(BINARY_PREREQS) $(NMBLOOKUP_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1470         @echo Linking $@
1471         @$(CC) -o $@ $(NMBLOOKUP_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1472                 $(POPT_LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1473
1474 bin/smbtorture@EXEEXT@: $(BINARY_PREREQS) $(SMBTORTURE_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1475         @echo Linking $@
1476         @$(CC) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(DYNEXP) \
1477                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) \
1478                 $(LIBTDB_LIBS) $(ZLIB_LIBS) $(WINBIND_LIBS)
1479
1480 bin/talloctort@EXEEXT@: $(BINARY_PREREQS) $(TALLOCTORT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1481         @echo Linking $@
1482         @$(CC) -o $@ $(TALLOCTORT_OBJ) $(LDFLAGS) \
1483                 $(DYNEXP) $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1484                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1485
1486 bin/replacetort@EXEEXT@: $(REPLACETORT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@
1487         @echo Linking $@
1488         @$(CC) @PIE_LDFLAGS@ -o $@ $(REPLACETORT_OBJ) $(LDFLAGS) \
1489                 $(DYNEXP) $(LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS)
1490
1491 bin/smbconftort@EXEEXT@: $(SMBCONFTORT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1492         @echo Linking $@
1493         @$(CC) @PIE_LDFLAGS@ -o $@ $(SMBCONFTORT_OBJ) $(LDFLAGS) \
1494                 $(DYNEXP) $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1495                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1496
1497 bin/masktest@EXEEXT@: $(BINARY_PREREQS) $(MASKTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1498         @echo Linking $@
1499         @$(CC) -o $@ $(MASKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
1500                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1501                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
1502
1503 bin/msgtest@EXEEXT@: $(BINARY_PREREQS) $(MSGTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1504         @echo Linking $@
1505         @$(CC) -o $@ $(MSGTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
1506                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1507                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
1508
1509 bin/smbcacls@EXEEXT@: $(BINARY_PREREQS) $(SMBCACLS_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1510         @echo Linking $@
1511         @$(CC) -o $@ $(SMBCACLS_OBJ) $(DYNEXP) $(LDFLAGS) \
1512                 $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1513                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
1514
1515 bin/smbcquotas@EXEEXT@: $(BINARY_PREREQS) $(SMBCQUOTAS_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1516         @echo Linking $@
1517         @$(CC) -o $@ $(SMBCQUOTAS_OBJ) $(DYNEXP) $(LDFLAGS) \
1518                 $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1519                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
1520
1521 bin/eventlogadm@EXEEXT@: $(BINARY_PREREQS) $(EVTLOGADM_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1522         @echo Linking $@
1523         @$(CC) -o $@ $(EVTLOGADM_OBJ) $(DYNEXP) $(LDFLAGS) \
1524                 $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1525
1526 bin/sharesec@EXEEXT@: $(BINARY_PREREQS) $(SHARESEC_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1527         @echo Linking $@
1528         @$(CC) -o $@ $(SHARESEC_OBJ) $(DYNEXP) $(LDFLAGS) \
1529                 $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1530
1531 bin/locktest@EXEEXT@: $(BINARY_PREREQS) $(LOCKTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1532         @echo Linking $@
1533         @$(CC) -o $@ $(LOCKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
1534                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1535                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
1536
1537 bin/nsstest@EXEEXT@: $(BINARY_PREREQS) $(NSSTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1538         @echo Linking $@
1539         @$(CC) -o $@ $(NSSTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
1540                 $(LIBS) $(KRB5LIBS)  $(LDAP_LIBS) $(POPT_LIBS) \
1541                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
1542
1543 bin/pdbtest@EXEEXT@: $(BINARY_PREREQS) $(PDBTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1544         @echo Linking $@
1545         @$(CC) -o $@ $(PDBTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
1546                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(PASSDB_LIBS) \
1547                 $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
1548
1549 bin/vfstest@EXEEXT@: $(BINARY_PREREQS) $(VFSTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1550         @echo Linking $@
1551         @$(CC) -o $@ $(VFSTEST_OBJ) $(LDFLAGS) $(TERMLDFLAGS) \
1552                 $(TERMLIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) $(DNSSD_LIBS) \
1553                 $(ACL_LIBS) $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
1554                 @SMBD_LIBS@ $(NSCD_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
1555                 $(WINBIND_LIBS) $(ZLIB_LIBS)
1556
1557 bin/smbiconv@EXEEXT@: $(BINARY_PREREQS) $(SMBICONV_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1558         @echo Linking $@
1559         @$(CC) -o $@ $(SMBICONV_OBJ) $(LDFLAGS) $(TERMLDFLAGS) \
1560                 $(TERMLIBS) $(DYNEXP) $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1561                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1562
1563 bin/log2pcap@EXEEXT@: $(BINARY_PREREQS) $(LOG2PCAP_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@
1564         @echo Linking $@
1565         @$(CC) -o $@ $(LOG2PCAP_OBJ) $(LDFLAGS) $(DYNEXP) \
1566                 $(POPT_LIBS) $(LIBS) $(LIBTALLOC_LIBS)
1567
1568 bin/locktest2@EXEEXT@: $(BINARY_PREREQS) $(LOCKTEST2_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1569         @echo Linking $@
1570         @$(CC) -o $@ $(LOCKTEST2_OBJ) $(LDFLAGS) $(DYNEXP) \
1571                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1572                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
1573
1574 bin/debug2html@EXEEXT@: $(BINARY_PREREQS) $(DEBUG2HTML_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@
1575         @echo Linking $@
1576         @$(CC) -o $@ $(DEBUG2HTML_OBJ) $(LDFLAGS) $(DYNEXP) \
1577                 $(LIBS) $(LIBTALLOC_LIBS)
1578
1579 bin/smbfilter@EXEEXT@: $(BINARY_PREREQS) $(SMBFILTER_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1580         @echo Linking $@
1581         @$(CC) -o $@ $(SMBFILTER_OBJ) $(LDFLAGS) $(LIBS) \
1582                 $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1583                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
1584
1585 bin/ldbedit: $(BINARY_PREREQS) $(LDBEDIT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1586         @echo Linking $@
1587         @$(CC) -o $@ $(LDBEDIT_OBJ) $(DYNEXP) $(LDFLAGS) \
1588                 $(LIBS) $(POPT_LIBS) $(LDAP_LIBS) \
1589                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
1590
1591 bin/ldbsearch: $(BINARY_PREREQS) $(LDBSEARCH_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1592         @echo Linking $@
1593         @$(CC) -o $@ $(LDBSEARCH_OBJ) $(DYNEXP) $(LDFLAGS) \
1594                 $(LIBS) $(POPT_LIBS) $(LDAP_LIBS) \
1595                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
1596
1597 bin/ldbadd: $(BINARY_PREREQS) $(LDBADD_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1598         @echo Linking $@
1599         @$(CC) -o $@ $(LDBADD_OBJ) $(DYNEXP) $(LDFLAGS) \
1600                 $(LIBS) $(POPT_LIBS) $(LDAP_LIBS) \
1601                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
1602
1603 bin/ldbmodify: $(BINARY_PREREQS) $(LDBMODIFY_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1604         @echo Linking $@
1605         @$(CC) -o $@ $(LDBMODIFY_OBJ) $(DYNEXP) $(LDFLAGS) \
1606                 $(LIBS) $(POPT_LIBS) $(LDAP_LIBS) \
1607                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
1608
1609 bin/ldbdel: $(BINARY_PREREQS) $(LDBDEL_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1610         @echo Linking $@
1611         @$(CC) -o $@ $(LDBDEL_OBJ) $(DYNEXP) $(LDFLAGS) \
1612                 $(LIBS) $(POPT_LIBS) $(LDAP_LIBS) \
1613                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
1614
1615
1616 #####################################################################
1617 #
1618 # libraries
1619 #
1620 #####################################################################
1621
1622 MKSYMS_SH = $(srcdir)/script/mksyms.sh
1623
1624
1625 #-------------------------------------------------------------------
1626 #
1627 # libtalloc
1628 #
1629 #-------------------------------------------------------------------
1630
1631
1632 LIBTALLOC_OBJ0 = @LIBTALLOC_OBJ0@
1633 LIBTALLOC_OBJ = $(LIBTALLOC_OBJ0) $(LIBREPLACE_OBJ)
1634
1635 LIBTALLOC_SHARED_TARGET=@LIBTALLOC_SHARED_TARGET@
1636 LIBTALLOC_SOVER=@LIBTALLOC_SOVER@
1637 LIBTALLOC_SHARED_TARGET_SONAME=$(LIBTALLOC_SHARED_TARGET).$(LIBTALLOC_SOVER)
1638 LIBTALLOC_STATIC_TARGET=@LIBTALLOC_STATIC_TARGET@
1639 LIBTALLOC=$(LIBTALLOC_STATIC_TARGET) @LIBTALLOC_SHARED@
1640 LIBTALLOC_SYMS=$(srcdir)/exports/libtalloc.@SYMSEXT@
1641 LIBTALLOC_HEADERS=$(srcdir)/@tallocdir@/talloc.h
1642
1643 $(LIBTALLOC_SYMS): $(LIBTALLOC_HEADERS)
1644         @$(MKSYMS_SH) $(AWK) $@ $(LIBTALLOC_HEADERS)
1645
1646 $(LIBTALLOC_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBTALLOC_OBJ) $(LIBTALLOC_SYMS)
1647         @echo Linking shared library $@
1648         @$(SHLD_DSO) $(LIBTALLOC_OBJ) @SONAMEFLAG@`basename $@`
1649
1650 $(LIBTALLOC_SHARED_TARGET): $(LIBTALLOC_SHARED_TARGET_SONAME)
1651         @rm -f $@
1652         @ln -s -f `basename $(LIBTALLOC_SHARED_TARGET_SONAME)` $@
1653
1654 $(LIBTALLOC_STATIC_TARGET): $(BINARY_PREREQS) $(LIBTALLOC_OBJ0)
1655         @echo Linking non-shared library $@
1656         @-$(AR) -rc $@ $(LIBTALLOC_OBJ0)
1657
1658 libtalloc: $(LIBTALLOC)
1659
1660 cleanlibtalloc::
1661         -rm -f \
1662                 $(LIBTALLOC_SYMS) \
1663                 $(LIBTALLOC_STATIC_TARGET) \
1664                 $(LIBTALLOC_SHARED_TARGET) \
1665                 $(LIBTALLOC_SHARED_TARGET_SONAME)
1666
1667 installlibtalloc:: installdirs libtalloc
1668         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
1669         -$(INSTALLLIBCMD_SH) $(LIBTALLOC_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
1670         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBTALLOC_SHARED_TARGET)`
1671         -if test -r $(LIBTALLOC_SHARED_TARGET_SONAME) ; then \
1672                 ln -s -f `basename $(LIBTALLOC_SHARED_TARGET_SONAME)` \
1673                         $(DESTDIR)$(LIBDIR)/`basename $(LIBTALLOC_SHARED_TARGET)` ; \
1674         fi
1675         -$(INSTALLLIBCMD_A) $(LIBTALLOC_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
1676         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
1677         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBTALLOC_HEADERS) $(DESTDIR)${prefix}/include
1678
1679 uninstalllibtalloc::
1680         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBTALLOC_SHARED_TARGET)`
1681         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBTALLOC_SHARED_TARGET_SONAME)`
1682         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBTALLOC_STATIC_TARGET)`
1683         -rm -f $(DESTDIR)${prefix}/include/talloc.h
1684
1685 libs:: libtalloc
1686 installlibs:: @INSTALL_LIBTALLOC@
1687 uninstalllibs:: @UNINSTALL_LIBTALLOC@
1688 cleanlibs:: cleanlibtalloc
1689 shlibs test_shlibs: @LIBTALLOC_SHARED@
1690
1691 #-------------------------------------------------------------------
1692 #
1693 # libtdb
1694 #
1695 #-------------------------------------------------------------------
1696
1697 LIBTDB_OBJ0 = @LIBTDB_OBJ0@
1698 LIBTDB_OBJ = $(LIBTDB_OBJ0) $(LIBREPLACE_OBJ)
1699
1700 LIBTDB_SHARED_TARGET=@LIBTDB_SHARED_TARGET@
1701 LIBTDB_SOVER=@LIBTDB_SOVER@
1702 LIBTDB_SHARED_TARGET_SONAME=$(LIBTDB_SHARED_TARGET).$(LIBTDB_SOVER)
1703 LIBTDB_STATIC_TARGET=@LIBTDB_STATIC_TARGET@
1704 LIBTDB=$(LIBTDB_STATIC_TARGET) @LIBTDB_SHARED@
1705 LIBTDB_SYMS=$(srcdir)/exports/libtdb.@SYMSEXT@
1706 LIBTDB_HEADERS=$(srcdir)/@tdbdir@/include/tdb.h
1707
1708 $(LIBTDB_SYMS): $(LIBTDB_HEADERS)
1709         @$(MKSYMS_SH) $(AWK) $@ $(LIBTDB_HEADERS)
1710
1711 $(LIBTDB_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBTDB_OBJ) $(LIBTDB_SYMS)
1712         @echo Linking shared library $@
1713         @$(SHLD_DSO) $(LIBTDB_OBJ) \
1714                 @SONAMEFLAG@`basename $@`
1715
1716 $(LIBTDB_SHARED_TARGET): $(LIBTDB_SHARED_TARGET_SONAME)
1717         @rm -f $@
1718         @ln -s -f `basename $(LIBTDB_SHARED_TARGET_SONAME)` $@
1719
1720 $(LIBTDB_STATIC_TARGET): $(BINARY_PREREQS) $(LIBTDB_OBJ0)
1721         @echo Linking non-shared library $@
1722         @-$(AR) -rc $@ $(LIBTDB_OBJ0)
1723
1724 libtdb: $(LIBTDB)
1725
1726 cleanlibtdb::
1727         -rm -f \
1728                 $(LIBTDB_SYMS) \
1729                 $(LIBTDB_STATIC_TARGET) \
1730                 $(LIBTDB_SHARED_TARGET) \
1731                 $(LIBTDB_SHARED_TARGET_SONAME)
1732
1733
1734 installlibtdb:: installdirs libtdb
1735         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
1736         -$(INSTALLLIBCMD_SH) $(LIBTDB_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
1737         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBTDB_SHARED_TARGET)`
1738         -if test -r $(LIBTDB_SHARED_TARGET_SONAME) ; then \
1739                 ln -s -f `basename $(LIBTDB_SHARED_TARGET_SONAME)` \
1740                         $(DESTDIR)$(LIBDIR)/`basename $(LIBTDB_SHARED_TARGET)` ; \
1741         fi
1742         -$(INSTALLLIBCMD_A) $(LIBTDB_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
1743         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
1744         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBTDB_HEADERS) $(DESTDIR)${prefix}/include
1745
1746 uninstalllibtdb::
1747         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBTDB_SHARED_TARGET)`
1748         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBTDB_SHARED_TARGET_SONAME)`
1749         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBTDB_STATIC_TARGET)`
1750         -rm -f $(DESTDIR)${prefix}/include/tdb.h
1751
1752 libs:: libtdb
1753 installlibs:: @INSTALL_LIBTDB@
1754 uninstalllibs:: @UNINSTALL_LIBTDB@
1755 cleanlibs:: cleanlibtdb
1756 shlibs test_shlibs: @LIBTDB_SHARED@
1757
1758 #-------------------------------------------------------------------
1759 #
1760 # libwbclient
1761 #
1762 #-------------------------------------------------------------------
1763
1764 LIBWBCLIENT_OBJ0 = ../nsswitch/libwbclient/wbclient.o \
1765                   ../nsswitch/libwbclient/wbc_util.o \
1766                   ../nsswitch/libwbclient/wbc_pwd.o \
1767                   ../nsswitch/libwbclient/wbc_idmap.o \
1768                   ../nsswitch/libwbclient/wbc_sid.o \
1769                   ../nsswitch/libwbclient/wbc_guid.o \
1770                   ../nsswitch/libwbclient/wbc_pam.o
1771 LIBWBCLIENT_OBJ = $(LIBWBCLIENT_OBJ0) \
1772                   $(WBCOMMON_OBJ) \
1773                   @LIBTALLOC_STATIC@ $(LIBREPLACE_OBJ)
1774
1775 LIBWBCLIENT_SHARED_TARGET=@LIBWBCLIENT_SHARED_TARGET@
1776 LIBWBCLIENT_SOVER=@LIBWBCLIENT_SOVER@
1777 LIBWBCLIENT_SHARED_TARGET_SONAME=$(LIBWBCLIENT_SHARED_TARGET).$(LIBWBCLIENT_SOVER)
1778 LIBWBCLIENT_STATIC_TARGET=@LIBWBCLIENT_STATIC_TARGET@
1779 LIBWBCLIENT=@LIBWBCLIENT_STATIC@ @LIBWBCLIENT_SHARED@
1780 LIBWBCLIENT_SYMS=$(srcdir)/exports/libwbclient.@SYMSEXT@
1781 LIBWBCLIENT_HEADERS=$(srcdir)/../nsswitch/libwbclient/wbclient.h
1782
1783 $(LIBWBCLIENT_SYMS): $(LIBWBCLIENT_HEADERS)
1784         @$(MKSYMS_SH) $(AWK) $@ $(LIBWBCLIENT_HEADERS)
1785
1786 $(LIBWBCLIENT_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ) $(LIBWBCLIENT_SYMS) @LIBTALLOC_SHARED@
1787         @echo Linking shared library $@
1788         @$(SHLD_DSO) $(LIBTALLOC_LIBS) $(LIBWBCLIENT_OBJ) \
1789                 @SONAMEFLAG@`basename $@`
1790
1791 $(LIBWBCLIENT_SHARED_TARGET): $(LIBWBCLIENT_SHARED_TARGET_SONAME)
1792         @rm -f $@
1793         @ln -s -f `basename $(LIBWBCLIENT_SHARED_TARGET_SONAME)` $@
1794
1795 $(LIBWBCLIENT_STATIC_TARGET): $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ0) $(WBCOMMON_OBJ)
1796         @echo Linking non-shared library $@
1797         @-$(AR) -rc $@ $(LIBWBCLIENT_OBJ0) $(WBCOMMON_OBJ)
1798
1799 libwbclient: $(LIBWBCLIENT)
1800
1801 cleanlibwbclient::
1802         -rm -f \
1803                 $(LIBWBCLIENT_SYMS) \
1804                 $(LIBWBCLIENT_STATIC_TARGET) \
1805                 $(LIBWBCLIENT_SHARED_TARGET) \
1806                 $(LIBWBCLIENT_SHARED_TARGET_SONAME)
1807
1808 installlibwbclient:: installdirs libwbclient
1809         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
1810         -$(INSTALLLIBCMD_SH) $(LIBWBCLIENT_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
1811         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET)`
1812         -if test -r $(LIBWBCLIENT_SHARED_TARGET_SONAME) ; then \
1813                 ln -s -f `basename $(LIBWBCLIENT_SHARED_TARGET_SONAME)` \
1814                         $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET)` ; \
1815         fi
1816         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
1817         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBWBCLIENT_HEADERS) $(DESTDIR)${prefix}/include
1818
1819 uninstalllibwbclient::
1820         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET)`
1821         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET_SONAME)`
1822         -rm -f $(DESTDIR)${prefix}/include/wbclient.h
1823
1824 libs:: libwbclient
1825 installlibs:: @INSTALL_LIBWBCLIENT@
1826 uninstalllibs:: uninstalllibwbclient
1827 cleanlibs:: cleanlibwbclient
1828 shlibs test_shlibs: @LIBWBCLIENT_SHARED@
1829
1830
1831 #-------------------------------------------------------------------
1832 #
1833 # libaddns
1834 #
1835 #-------------------------------------------------------------------
1836
1837
1838 LIBADDNS_SHARED_TARGET=@LIBADDNS_SHARED_TARGET@
1839 LIBADDNS_SOVER=@LIBADDNS_SOVER@
1840 LIBADDNS_SHARED_TARGET_SONAME=$(LIBADDNS_SHARED_TARGET).$(LIBADDNS_SOVER)
1841 LIBADDNS_STATIC_TARGET=@LIBADDNS_STATIC_TARGET@
1842 LIBADDNS=$(LIBADDNS_STATIC_TARGET) @LIBADDNS_SHARED@
1843 #LIBADDNS_SYMS=$(srcdir)/exports/libaddns.@SYMSEXT@
1844 LIBADDNS_HEADERS=$(srcdir)/libaddns/addns.h
1845
1846 $(LIBADDNS_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBADDNS_OBJ) @LIBTALLOC_SHARED@
1847         @echo Linking shared library $@
1848         @$(SHLD_DSO) $(LIBADDNS_OBJ) $(LIBS) \
1849                 $(KRB5LIBS) $(UUID_LIBS) $(LIBTALLOC_LIBS) \
1850                 @SONAMEFLAG@`basename $@`
1851
1852 $(LIBADDNS_SHARED_TARGET): $(LIBADDNS_SHARED_TARGET_SONAME)
1853         @rm -f $@
1854         @ln -s -f `basename $(LIBADDNS_SHARED_TARGET_SONAME)` $@
1855
1856 $(LIBADDNS_STATIC_TARGET): $(BINARY_PREREQS) $(LIBADDNS_OBJ0)
1857         @echo Linking non-shared library $@
1858         @-$(AR) -rc $@ $(LIBADDNS_OBJ0)
1859
1860 libaddns: $(LIBADDNS)
1861
1862 cleanlibaddns::
1863         -rm -f \
1864                 $(LIBADDNS_SHARED_TARGET) \
1865                 $(LIBADDNS_SHARED_TARGET_SONAME) \
1866                 $(LIBADDNS_STATIC_TARGET)
1867
1868 installlibaddns:: installdirs libaddns
1869         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
1870         -$(INSTALLLIBCMD_SH) $(LIBADDNS_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
1871         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_SHARED_TARGET)`
1872         -if test -r $(LIBADDNS_SHARED_TARGET_SONAME) ; then \
1873                 ln -s -f `basename $(LIBADDNS_SHARED_TARGET_SONAME)` \
1874                         $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_SHARED_TARGET)` ; \
1875         fi
1876         -$(INSTALLLIBCMD_A) $(LIBADDNS_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
1877
1878 uninstalllibaddns::
1879         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_SHARED_TARGET_SONAME)`
1880         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_SHARED_TARGET)`
1881         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_STATIC_TARGET)`
1882
1883 libs:: libaddns
1884 installlibs:: @INSTALL_LIBADDNS@
1885 uninstalllibs:: @UNINSTALL_LIBADDNS@
1886 cleanlibs:: cleanlibaddns
1887 shlibs test_shlibs: @LIBADDNS_SHARED@
1888
1889 #-------------------------------------------------------------------
1890 #
1891 # libnetapi
1892 #
1893 #-------------------------------------------------------------------
1894
1895 LIBNETAPI_OBJ0 = lib/netapi/netapi.o \
1896                  lib/netapi/cm.o \
1897                  librpc/gen_ndr/ndr_libnetapi.o \
1898                  lib/netapi/libnetapi.o \
1899                  lib/netapi/joindomain.o \
1900                  lib/netapi/serverinfo.o \
1901                  lib/netapi/getdc.o \
1902                  lib/netapi/user.o \
1903                  lib/netapi/group.o \
1904                  lib/netapi/localgroup.o \
1905                  lib/netapi/samr.o \
1906                  lib/netapi/sid.o \
1907                  lib/netapi/share.o \
1908                  lib/netapi/file.o
1909
1910 LIBNETAPI_OBJ  = $(LIBNETAPI_OBJ0) $(LIBNET_OBJ) \
1911                  $(LIBSMBCONF_OBJ) \
1912                  $(REG_SMBCONF_OBJ) \
1913                  $(PARAM_WITHOUT_REG_OBJ) $(LIB_NONSMBD_OBJ) \
1914                  $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
1915                  $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(RPC_PARSE_OBJ) \
1916                  $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(SMBLDAP_OBJ) $(GROUPDB_OBJ) $(LDB_OBJ) \
1917                  $(DCUTIL_OBJ) $(LIBADS_OBJ) $(PRIVILEGES_BASIC_OBJ) \
1918                  auth/token_util.o
1919
1920 LIBNETAPI_SHARED_TARGET=@LIBNETAPI_SHARED_TARGET@
1921 LIBNETAPI_SOVER=@LIBNETAPI_SOVER@
1922 LIBNETAPI_SHARED_TARGET_SONAME=$(LIBNETAPI_SHARED_TARGET).$(LIBNETAPI_SOVER)
1923 LIBNETAPI_STATIC_TARGET=@LIBNETAPI_STATIC_TARGET@
1924 LIBNETAPI=$(LIBNETAPI_STATIC_TARGET) @LIBNETAPI_SHARED@
1925 LIBNETAPI_SYMS=$(srcdir)/exports/libnetapi.@SYMSEXT@
1926 LIBNETAPI_HEADERS=$(srcdir)/lib/netapi/netapi.h
1927
1928 $(LIBNETAPI_SYMS): $(LIBNETAPI_HEADERS)
1929         @$(MKSYMS_SH) $(AWK) $@ $(LIBNETAPI_HEADERS)
1930
1931 $(LIBNETAPI_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBNETAPI_OBJ) $(LIBNETAPI_SYMS) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1932         @echo Linking shared library $@
1933         @$(SHLD_DSO) $(LIBNETAPI_OBJ) \
1934                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(LIBS) \
1935                 $(LDAP_LIBS) $(KRB5LIBS) $(NSCD_LIBS) \
1936                 @SONAMEFLAG@`basename $@`
1937
1938 $(LIBNETAPI_SHARED_TARGET): $(LIBNETAPI_SHARED_TARGET_SONAME)
1939         @rm -f $@
1940         @ln -s -f `basename $(LIBNETAPI_SHARED_TARGET_SONAME)` $@
1941
1942 $(LIBNETAPI_STATIC_TARGET): $(BINARY_PREREQS) $(LIBNETAPI_OBJ0)
1943         @echo Linking non-shared library $@
1944         @-$(AR) -rc $@ $(LIBNETAPI_OBJ0)
1945
1946 libnetapi: $(LIBNETAPI)
1947
1948 cleanlibnetapi::
1949         -rm -f \
1950                 $(LIBNETAPI_SYMS) \
1951                 $(LIBNETAPI_STATIC_TARGET) \
1952                 $(LIBNETAPI_SHARED_TARGET) \
1953                 $(LIBNETAPI_SHARED_TARGET_SONAME)
1954
1955 installlibnetapi:: installdirs libnetapi
1956         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
1957         -$(INSTALLLIBCMD_SH) $(LIBNETAPI_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
1958         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_SHARED_TARGET)`
1959         -if test -r $(LIBNETAPI_SHARED_TARGET_SONAME) ; then \
1960                 ln -s -f `basename $(LIBNETAPI_SHARED_TARGET_SONAME)` \
1961                         $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_SHARED_TARGET)` ; \
1962         fi
1963         -$(INSTALLLIBCMD_A) $(LIBNETAPI_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
1964         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
1965         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(srcdir)/lib/netapi/netapi.h $(DESTDIR)${prefix}/include
1966
1967 uninstalllibnetapi::
1968         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_SHARED_TARGET)`
1969         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_SHARED_TARGET_SONAME)`
1970         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_STATIC_TARGET)`
1971         -rm -f $(DESTDIR)${prefix}/include/netapi.h
1972
1973 libs:: libnetapi
1974 installlibs:: @INSTALL_LIBNETAPI@
1975 uninstalllibs:: @UNINSTALL_LIBNETAPI@
1976 cleanlibs:: cleanlibnetapi
1977 shlibs test_shlibs: @LIBNETAPI_SHARED@
1978
1979 #-------------------------------------------------------------------
1980 #
1981 # libsmbclient
1982 #
1983 #-------------------------------------------------------------------
1984
1985 LIBSMBCLIENT_SHARED_TARGET=@LIBSMBCLIENT_SHARED_TARGET@
1986 LIBSMBCLIENT_SOVER=@LIBSMBCLIENT_SOVER@
1987 LIBSMBCLIENT_SHARED_TARGET_SONAME=$(LIBSMBCLIENT_SHARED_TARGET).$(LIBSMBCLIENT_SOVER)
1988 LIBSMBCLIENT_STATIC_TARGET=@LIBSMBCLIENT_STATIC_TARGET@
1989 LIBSMBCLIENT=$(LIBSMBCLIENT_STATIC_TARGET) @LIBSMBCLIENT_SHARED@
1990 LIBSMBCLIENT_SYMS=$(srcdir)/exports/libsmbclient.@SYMSEXT@
1991 LIBSMBCLIENT_HEADERS=$(srcdir)/include/libsmbclient.h
1992
1993 $(LIBSMBCLIENT_SYMS): $(LIBSMBCLIENT_HEADERS)
1994         @$(MKSYMS_SH) $(AWK) $@ $(LIBSMBCLIENT_HEADERS)
1995
1996 $(LIBSMBCLIENT_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) $(LIBSMBCLIENT_SYMS) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1997         @echo Linking shared library $@
1998         @$(SHLD_DSO) $(LIBSMBCLIENT_OBJ) \
1999                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(LIBS) \
2000                 $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
2001                 @SONAMEFLAG@`basename $@`
2002
2003 $(LIBSMBCLIENT_SHARED_TARGET): $(LIBSMBCLIENT_SHARED_TARGET_SONAME)
2004         @rm -f $@
2005         @ln -s `basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)` $@
2006
2007 $(LIBSMBCLIENT_STATIC_TARGET): $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ1)
2008         @echo Linking non-shared library $@
2009         @-$(AR) -rc $@ $(LIBSMBCLIENT_OBJ1)
2010
2011 libsmbclient: $(LIBSMBCLIENT)
2012
2013 cleanlibsmbclient::
2014         -rm -f \
2015                 $(LIBSMBCLIENT_SHARED_TARGET) \
2016                 $(LIBSMBCLIENT_SHARED_TARGET_SONAME) \
2017                 $(LIBSMBCLIENT_STATIC_TARGET)
2018
2019 installlibsmbclient:: installdirs libsmbclient
2020         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2021         -$(INSTALLLIBCMD_SH) $(LIBSMBCLIENT_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
2022         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)`
2023         -if test -r $(LIBSMBCLIENT_SHARED_TARGET_SONAME) ; then \
2024                 ln -s -f `basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)` \
2025                         $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)` ; \
2026         fi
2027         -$(INSTALLLIBCMD_A) $(LIBSMBCLIENT_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
2028         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2029         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBSMBCLIENT_HEADERS) $(DESTDIR)${prefix}/include
2030
2031 installclientlib:: installlibsmbclient
2032
2033 uninstalllibsmbclient::
2034         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)`
2035         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)`
2036         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_STATIC_TARGET)`
2037         -rm -f $(DESTDIR)${prefix}/include/libsmbclient.h
2038
2039 uninstallclientlib:: uninstalllibsmbclient
2040
2041 libs:: libsmbclient
2042 installlibs:: @INSTALL_LIBSMBCLIENT@
2043 uninstalllibs:: @UNINSTALL_LIBSMBCLIENT@
2044 cleanlibs:: cleanlibsmbclient
2045 shlibs test_shlibs: @LIBSMBCLIENT_SHARED@
2046
2047 #-------------------------------------------------------------------
2048 #
2049 # libsmbsharemodes
2050 #
2051 #-------------------------------------------------------------------
2052
2053 LIBSMBSHAREMODES_OBJ0 = libsmb/smb_share_modes.o
2054
2055 LIBSMBSHAREMODES_OBJ = $(LIBSMBSHAREMODES_OBJ0) @LIBTDB_STATIC@
2056
2057 LIBSMBSHAREMODES_SHARED_TARGET=@LIBSMBSHAREMODES_SHARED_TARGET@
2058 LIBSMBSHAREMODES_SOVER=@LIBSMBSHAREMODES_SOVER@
2059 LIBSMBSHAREMODES_SHARED_TARGET_SONAME=$(LIBSMBSHAREMODES_SHARED_TARGET).$(LIBSMBSHAREMODES_SOVER)
2060 LIBSMBSHAREMODES_STATIC_TARGET=@LIBSMBSHAREMODES_STATIC_TARGET@
2061 LIBSMBSHAREMODES=$(LIBSMBSHAREMODES_STATIC_TARGET) @LIBSMBSHAREMODES_SHARED@
2062 LIBSMBSHAREMODES_SYMS=$(srcdir)/exports/libsmbsharemodes.@SYMSEXT@
2063 LIBSMBSHAREMODES_HEADERS=$(srcdir)/include/smb_share_modes.h
2064
2065 $(LIBSMBSHAREMODES_SYMS): $(LIBSMBSHAREMODES_HEADERS)
2066         @$(MKSYMS_SH) $(AWK) $@ $(LIBSMBSHAREMODES_HEADERS)
2067
2068 $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ) $(LIBSMBSHAREMODES_SYMS) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
2069         @echo Linking shared library $@
2070         @$(SHLD_DSO) $(LIBSMBSHAREMODES_OBJ) \
2071                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
2072                 $(KRB5LIBS) $(LDAP_LIBS) \
2073                 @SONAMEFLAG@`basename $@`
2074
2075 $(LIBSMBSHAREMODES_SHARED_TARGET): $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)
2076         @rm -f $@
2077         @ln -s -f `basename $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)` $@
2078
2079 $(LIBSMBSHAREMODES_STATIC_TARGET): $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ0)
2080         @echo Linking non-shared library $@
2081         @-$(AR) -rc $@ $(LIBSMBSHAREMODES_OBJ0)
2082
2083 libsmbsharemodes: $(LIBSMBSHAREMODES)
2084
2085 cleanlibsmbsharemodes::
2086         -rm -f \
2087                 $(LIBSMBSHAREMODES_SHARED_TARGET) \
2088                 $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME) \
2089                 $(LIBSMBSHAREMODES_STATIC_TARGET)
2090
2091 installlibsmbsharemodes:: installdirs libsmbsharemodes
2092         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2093         -$(INSTALLLIBCMD_SH) $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
2094         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_SHARED_TARGET)`
2095         -if test -r $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME) ; then \
2096                 ln -s -f `basename $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)` \
2097                         $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_SHARED_TARGET)` ; \
2098         fi
2099         -$(INSTALLLIBCMD_A) $(LIBSMBSHAREMODES_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
2100         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2101         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBSMBSHAREMODES_HEADERS) $(DESTDIR)${prefix}/include
2102
2103 uninstalllibsmbsharemodes::
2104         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_SHARED_TARGET)`
2105         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)`
2106         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_STATIC_TARGET)`
2107         -rm -f $(DESTDIR)${prefix}/include/smb_share_modes.h
2108
2109 libs:: libsmbsharemodes
2110 installlibs:: @INSTALL_LIBSMBSHAREMODES@
2111 uninstalllibs:: @UNINSTALL_LIBSMBSHAREMODES@
2112 cleanlibs:: cleanlibsmbsharemodes
2113 shlibs test_shlibs: @LIBSMBSHAREMODES_SHARED@
2114
2115 #-------------------------------------------------------------------
2116 #
2117 # libbigballofmud
2118 #
2119 #-------------------------------------------------------------------
2120
2121 # This is probably wrong for anything other than the GNU linker.
2122 bin/libbigballofmud.@SHLIBEXT@: $(BINARY_PREREQS) $(LIBBIGBALLOFMUD_OBJ) @LIBTALLOC_SHARED@
2123         @echo Linking shared library $@
2124         @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBBIGBALLOFMUD_OBJ) \
2125                 $(LIBS) $(LIBTALLOC_LIBS) \
2126                 $(PASSDB_LIBS) $(IDMAP_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
2127                 @SONAMEFLAG@`basename $@`.$(LIBBIGBALLOFMUD_MAJOR)
2128         ln -snf libbigballofmud.so bin/libbigballofmud.so.0
2129
2130 # It would be nice to build a static bigballofmud too, but when I try
2131 # I get linker errors about dl_open and similar things.  I'm not sure if
2132 # it can be fixed or if they just can't be called from a static
2133 # library.
2134
2135 #-------------------------------------------------------------------
2136 #
2137 # libsmblua
2138 #
2139 #-------------------------------------------------------------------
2140
2141 LIBLUA_OBJ0 = lua-5.1.4/src/lapi.o lua-5.1.4/src/lauxlib.o \
2142         lua-5.1.4/src/lbaselib.o lua-5.1.4/src/lcode.o \
2143         lua-5.1.4/src/ldblib.o lua-5.1.4/src/ldebug.o lua-5.1.4/src/ldo.o \
2144         lua-5.1.4/src/ldump.o lua-5.1.4/src/lfunc.o lua-5.1.4/src/lgc.o \
2145         lua-5.1.4/src/linit.o lua-5.1.4/src/liolib.o lua-5.1.4/src/llex.o \
2146         lua-5.1.4/src/lmathlib.o lua-5.1.4/src/lmem.o \
2147         lua-5.1.4/src/loadlib.o lua-5.1.4/src/lobject.o \
2148         lua-5.1.4/src/lopcodes.o lua-5.1.4/src/loslib.o \
2149         lua-5.1.4/src/lparser.o lua-5.1.4/src/lstate.o \
2150         lua-5.1.4/src/lstring.o lua-5.1.4/src/lstrlib.o \
2151         lua-5.1.4/src/ltable.o lua-5.1.4/src/ltablib.o lua-5.1.4/src/ltm.o \
2152         lua-5.1.4/src/lundump.o lua-5.1.4/src/lvm.o \
2153         lua-5.1.4/src/lzio.o lua-5.1.4/src/print.o
2154
2155 LIBLUA_OBJ = $(LIBLUA_OBJ0)
2156
2157 LIBLUA_SHARED_TARGET=@LIBLUA_SHARED_TARGET@
2158 LIBLUA_SOVER=@LIBLUA_SOVER@
2159 LIBLUA_SHARED_TARGET_SONAME=$(LIBLUA_SHARED_TARGET).$(LIBLUA_SOVER)
2160 LIBLUA_STATIC_TARGET=@LIBLUA_STATIC_TARGET@
2161 LIBLUA=$(LIBLUA_STATIC_TARGET) @LIBLUA_SHARED@
2162 LIBLUA_SYMS=$(srcdir)/exports/liblua.@SYMSEXT@
2163 LIBLUA_HEADERS=$(srcdir)/lua-5.1.4/src/lua.h
2164
2165 $(LIBLUA_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBLUA_OBJ) $(LIBLUA_SYMS) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
2166         @echo Linking shared library $@
2167         @$(SHLD_DSO) $(LIBLUA_OBJ) \
2168                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
2169                 $(KRB5LIBS) $(LDAP_LIBS) \
2170                 @SONAMEFLAG@`basename $@`
2171
2172 $(LIBLUA_SHARED_TARGET): $(LIBLUA_SHARED_TARGET_SONAME)
2173         @rm -f $@
2174         @ln -s -f `basename $(LIBLUA_SHARED_TARGET_SONAME)` $@
2175
2176 $(LIBLUA_STATIC_TARGET): $(BINARY_PREREQS) $(LIBLUA_OBJ0)
2177         @echo Linking non-shared library $@
2178         @-$(AR) -rc $@ $(LIBLUA_OBJ0)
2179
2180 liblua: $(LIBLUA)
2181
2182 cleanliblua::
2183         -rm -f \
2184                 $(LIBLUA_SHARED_TARGET) \
2185                 $(LIBLUA_SHARED_TARGET_SONAME) \
2186                 $(LIBLUA_STATIC_TARGET)
2187
2188 installliblua:: installdirs liblua
2189         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2190         -$(INSTALLLIBCMD_SH) $(LIBLUA_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
2191         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBLUA_SHARED_TARGET)`
2192         -if test -e $(LIBLUA_SHARED_TARGET_SONAME) ; then \
2193                 ln -s -f `basename $(LIBLUA_SHARED_TARGET_SONAME)` \
2194                         $(DESTDIR)$(LIBDIR)/`basename $(LIBLUA_SHARED_TARGET)` ; \
2195         fi
2196         -$(INSTALLLIBCMD_A) $(LIBLUA_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
2197         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2198         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBLUA_HEADERS) $(DESTDIR)${prefix}/include
2199
2200 uninstallliblua::
2201         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBLUA_SHARED_TARGET)`
2202         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBLUA_SHARED_TARGET_SONAME)`
2203         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBLUA_STATIC_TARGET)`
2204         -rm -f $(DESTDIR)${prefix}/include/smb_share_modes.h
2205
2206 libs:: liblua
2207 installlibs:: @INSTALL_LIBLUA@
2208 uninstalllibs:: @UNINSTALL_LIBLUA@
2209 cleanlibs:: cleanliblua
2210 shlibs test_shlibs: @LIBLUA_SHARED@
2211
2212
2213 #####################################################################
2214 #
2215 # shared modules
2216 #
2217 #####################################################################
2218
2219 # Linker command to link a RPC, VFS, AUTH, CHARSET or PASSDB module.
2220 SHLD_MODULE = $(SHLD) $(LDSHFLAGS) $(MODULE_EXPORTS) \
2221               -o $@ @SONAMEFLAG@`basename $@`
2222
2223 bin/librpc_lsarpc.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_LSA_OBJ)
2224         @echo "Linking $@"
2225         @$(SHLD_MODULE) $(RPC_LSA_OBJ)
2226
2227 bin/librpc_samr.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SAMR_OBJ)
2228         @echo "Linking $@"
2229         @$(SHLD_MODULE) $(RPC_SAMR_OBJ)
2230
2231 bin/librpc_srvsvc.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SVC_OBJ)
2232         @echo "Linking $@"
2233         @$(SHLD_MODULE) $(RPC_SVC_OBJ)
2234
2235 bin/librpc_svcctl.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SVCCTL_OBJ)
2236         @echo "Linking $@"
2237         @$(SHLD_MODULE) $(RPC_SVCCTL_OBJ)
2238
2239 bin/librpc_ntsvcs.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_NTSVCS_OBJ)
2240         @echo "Linking $@"
2241         @$(SHLD_MODULE) $(RPC_NTSVCS_OBJ)
2242
2243 bin/librpc_wkssvc.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_WKS_OBJ)
2244         @echo "Linking $@"
2245         @$(SHLD_MODULE) $(RPC_WKS_OBJ)
2246
2247 bin/librpc_NETLOGON.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_NETLOG_OBJ)
2248         @echo "Linking $@"
2249         @$(SHLD_MODULE) $(RPC_NETLOG_OBJ)
2250
2251 bin/librpc_winreg.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_REG_OBJ)
2252         @echo "Linking $@"
2253         @$(SHLD_MODULE) $(RPC_REG_OBJ)
2254
2255 bin/librpc_initshutdown.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_INITSHUTDOWN_OBJ)
2256         @echo "Linking $@"
2257         @$(SHLD_MODULE) $(RPC_INITSHUTDOWN_OBJ)
2258
2259 bin/librpc_dssetup.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_DSSETUP_OBJ)
2260         @echo "Linking $@"
2261         @$(SHLD_MODULE) $(RPC_DSSETUP_OBJ)
2262
2263 bin/librpc_spoolss2.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SPOOLSS_OBJ)
2264         @echo "Linking $@"
2265         @$(SHLD_MODULE) $(RPC_SPOOLSS_OBJ)
2266
2267 bin/librpc_eventlog.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_EVENTLOG_OBJ)
2268         @echo "Linking $@"
2269         @$(SHLD_MODULE) $(RPC_EVENTLOG_OBJ)
2270
2271 bin/librpc_netdfs.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_DFS_OBJ)
2272         @echo "Linking $@"
2273         @$(SHLD_MODULE) $(RPC_DFS_OBJ)
2274
2275 bin/librpc_echo.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_ECHO_OBJ)
2276         @echo "Linking $@"
2277         @$(SHLD_MODULE) $(RPC_ECHO_OBJ)
2278
2279 bin/winbindd@EXEEXT@: $(BINARY_PREREQS) $(WINBINDD_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
2280         @echo "Linking $@"
2281         @$(CC) -o $@ $(WINBINDD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
2282                 $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
2283                 $(PASSDB_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) \
2284                 $(ZLIB_LIBS)
2285
2286 bin/vlp@EXEEXT@: $(BINARY_PREREQS) $(VLP_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
2287         @echo "Linking $@"
2288         @$(CC) -o $@ $(VLP_OBJ) $(LDFLAGS) $(DYNEXP) \
2289                 $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
2290                 $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
2291                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) \
2292                 $(ZLIB_LIBS)
2293
2294 @WINBIND_NSS@: $(BINARY_PREREQS) $(WINBIND_NSS_OBJ)
2295         @echo "Linking $@"
2296         @$(SHLD) $(WINBIND_NSS_LDSHFLAGS) -o $@ $(WINBIND_NSS_OBJ) \
2297                 $(WINBIND_NSS_EXTRA_LIBS) $(WINBIND_NSS_PTHREAD) \
2298                 @SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@
2299
2300 @WINBIND_WINS_NSS@: $(BINARY_PREREQS) $(WINBIND_WINS_NSS_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
2301         @echo "Linking $@"
2302         @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_WINS_NSS_OBJ) \
2303                 $(LDAP_LIBS) $(KRB5LIBS) $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
2304                 @SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@
2305
2306 bin/winbind_krb5_locator.@SHLIBEXT@: $(BINARY_PREREQS) $(WINBIND_KRB5_LOCATOR_OBJ) @LIBWBCLIENT_SHARED@
2307         @echo "Linking $@"
2308         @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_KRB5_LOCATOR_OBJ) $(WINBIND_LIBS) \
2309                 @SONAMEFLAG@`basename $@`
2310
2311 bin/pam_winbind.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_WINBIND_OBJ) @LIBTALLOC_SHARED@ @LIBWBCLIENT_SHARED@
2312         @echo "Linking shared library $@"
2313         @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_OBJ) -lpam @INIPARSERLIBS@ \
2314                 $(PAM_WINBIND_EXTRA_LIBS) $(LIBTALLOC_LIBS) $(WINBIND_LIBS) @SONAMEFLAG@`basename $@`
2315
2316 bin/builtin.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_BUILTIN_OBJ)
2317         @echo "Building plugin $@"
2318         @$(SHLD_MODULE) $(AUTH_BUILTIN_OBJ)
2319
2320 bin/domain.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_DOMAIN_OBJ)
2321         @echo "Building plugin $@"
2322         @$(SHLD_MODULE) $(AUTH_DOMAIN_OBJ)
2323
2324 bin/script.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_SCRIPT_OBJ)
2325         @echo "Building plugin $@"
2326         @$(SHLD_MODULE) $(AUTH_SCRIPT_OBJ)
2327
2328 bin/netlogond.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_NETLOGOND_OBJ)
2329         @echo "Building plugin $@"
2330         @$(SHLD_MODULE) $(AUTH_NETLOGOND_OBJ)
2331
2332 bin/smbserver.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_SERVER_OBJ)
2333         @echo "Building plugin $@"
2334         @$(SHLD_MODULE) $(AUTH_SERVER_OBJ)
2335
2336 bin/winbind.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_WINBIND_OBJ)
2337         @echo "Building plugin $@"
2338         @$(SHLD_MODULE) $(AUTH_WINBIND_OBJ)
2339
2340 bin/unix.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_UNIX_OBJ)
2341         @echo "Building plugin $@"
2342         @$(SHLD_MODULE) $(AUTH_UNIX_OBJ)
2343
2344 bin/sam.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_SAM_OBJ)
2345         @echo "Building plugin $@"
2346         @$(SHLD_MODULE) $(AUTH_SAM_OBJ)
2347
2348 bin/ldapsam.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_ldap.o passdb/pdb_nds.o
2349         @echo "Building plugin $@"
2350         @$(SHLD_MODULE) passdb/pdb_ldap.o passdb/pdb_nds.o $(LDAP_LIBS)
2351
2352 bin/tdbsam.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_tdb.o
2353         @echo "Building plugin $@"
2354         @$(SHLD_MODULE) passdb/pdb_tdb.o
2355
2356 bin/smbpasswd.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_smbpasswd.o
2357         @echo "Building plugin $@"
2358         @$(SHLD_MODULE) passdb/pdb_smbpasswd.o
2359
2360 bin/rid.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_rid.o
2361         @echo "Building plugin $@"
2362         @$(SHLD_MODULE) winbindd/idmap_rid.o
2363
2364 bin/ad.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ad.o
2365         @echo "Building plugin $@"
2366         @$(SHLD_MODULE) winbindd/idmap_ad.o
2367
2368 bin/hash.@SHLIBEXT@: $(BINARY_PREREQS) $(IDMAP_HASH_OBJ)
2369         @echo "Building plugin $@"
2370         @$(SHLD_MODULE) $(IDMAP_HASH_OBJ)
2371
2372 bin/adex.@SHLIBEXT@: $(BINARY_PREREQS) $(IDMAP_ADEX_OBJ)
2373         @echo "Building plugin $@"
2374         @$(SHLD_MODULE) $(IDMAP_ADEX_OBJ)
2375
2376 bin/tdb2.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_tdb2.o
2377         @echo "Building plugin $@"
2378         @$(SHLD_MODULE) winbindd/idmap_tdb2.o
2379
2380 bin/ldap.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ldap.o
2381         @echo "Building plugin $@"
2382         @$(SHLD_MODULE) winbindd/idmap_ldap.o
2383
2384 bin/weird.@SHLIBEXT@: $(BINARY_PREREQS) $(DEVEL_HELP_WEIRD_OBJ)
2385         @echo "Building plugin $@"
2386         @$(SHLD_MODULE) $(DEVEL_HELP_WEIRD_OBJ)
2387
2388 bin/CP850.@SHLIBEXT@: $(BINARY_PREREQS) $(CP850_OBJ)
2389         @echo "Building plugin $@"
2390         @$(SHLD_MODULE) $(CP850_OBJ)
2391
2392 bin/CP437.@SHLIBEXT@: $(BINARY_PREREQS) $(CP437_OBJ)
2393         @echo "Building plugin $@"
2394         @$(SHLD_MODULE) $(CP437_OBJ)
2395
2396 bin/macosxfs.@SHLIBEXT@: $(BINARY_PREREQS) $(CHARSET_MACOSXFS_OBJ)
2397         @echo "Building plugin $@"
2398         @$(SHLD_MODULE) $(CHARSET_MACOSXFS_OBJ) -framework CoreFoundation
2399
2400 # NOTE, there is no build rule for a dynamic default VFS module because
2401 # this one MUST MUST MUST be built statically.
2402
2403 bin/audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AUDIT_OBJ)
2404         @echo "Building plugin $@"
2405         @$(SHLD_MODULE) $(VFS_AUDIT_OBJ)
2406
2407 bin/extd_audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_EXTD_AUDIT_OBJ)
2408         @echo "Building plugin $@"
2409         @$(SHLD_MODULE) $(VFS_EXTD_AUDIT_OBJ)
2410
2411 bin/full_audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_FULL_AUDIT_OBJ)
2412         @echo "Building plugin $@"
2413         @$(SHLD_MODULE) $(VFS_FULL_AUDIT_OBJ)
2414
2415 bin/recycle.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_RECYCLE_OBJ)
2416         @echo "Building plugin $@"
2417         @$(SHLD_MODULE) $(VFS_RECYCLE_OBJ)
2418
2419 bin/netatalk.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_NETATALK_OBJ)
2420         @echo "Building plugin $@"
2421         @$(SHLD_MODULE) $(VFS_NETATALK_OBJ)
2422
2423 bin/fake_perms.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_FAKE_PERMS_OBJ)
2424         @echo "Building plugin $@"
2425         @$(SHLD_MODULE) $(VFS_FAKE_PERMS_OBJ)
2426
2427 bin/default_quota.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_DEFAULT_QUOTA_OBJ)
2428         @echo "Building plugin $@"
2429         @$(SHLD_MODULE) $(VFS_DEFAULT_QUOTA_OBJ)
2430
2431 bin/readonly.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_READONLY_OBJ)
2432         @echo "Building plugin $@"
2433         @$(SHLD_MODULE) $(VFS_READONLY_OBJ)
2434
2435 bin/shadow_copy.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SHADOW_COPY_OBJ)
2436         @echo "Building plugin $@"
2437         @$(SHLD_MODULE) $(VFS_SHADOW_COPY_OBJ)
2438
2439 bin/shadow_copy2.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SHADOW_COPY2_OBJ)
2440         @echo "Building plugin $@"
2441         @$(SHLD_MODULE) $(VFS_SHADOW_COPY2_OBJ)
2442
2443 bin/syncops.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SYNCOPS_OBJ)
2444         @echo "Building plugin $@"
2445         @$(SHLD_MODULE) $(VFS_SYNCOPS_OBJ)
2446
2447 bin/cap.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CAP_OBJ)
2448         @echo "Building plugin $@"
2449         @$(SHLD_MODULE) $(VFS_CAP_OBJ)
2450
2451 bin/expand_msdfs.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_EXPAND_MSDFS_OBJ)
2452         @echo "Building plugin $@"
2453         @$(SHLD_MODULE) $(VFS_EXPAND_MSDFS_OBJ)
2454
2455 bin/afsacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AFSACL_OBJ)
2456         @echo "Building plugin $@"
2457         @$(SHLD_MODULE) $(VFS_AFSACL_OBJ)
2458
2459 bin/xattr_tdb.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_XATTR_TDB_OBJ)
2460         @echo "Building plugin $@"
2461         @$(SHLD_MODULE) $(VFS_XATTR_TDB_OBJ)
2462
2463 bin/posixacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_POSIXACL_OBJ)
2464         @echo "Building plugin $@"
2465         @$(SHLD_MODULE) $(VFS_POSIXACL_OBJ)
2466
2467 bin/aixacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIXACL_OBJ)
2468         @echo "Building plugin $@"
2469         @$(SHLD_MODULE) $(VFS_AIXACL_OBJ)
2470
2471 bin/aixacl2.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIXACL2_OBJ)
2472         @echo "Building plugin $@"
2473         @$(SHLD_MODULE) $(VFS_AIXACL2_OBJ)
2474
2475 bin/solarisacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SOLARISACL_OBJ)
2476         @echo "Building plugin $@"
2477         @$(SHLD_MODULE) $(VFS_SOLARISACL_OBJ)
2478
2479 bin/zfsacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ZFSACL_OBJ)
2480         @echo "Building plugin $@"
2481         @$(SHLD_MODULE) $(VFS_ZFSACL_OBJ)
2482
2483 bin/irixacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_IRIXACL_OBJ)
2484         @echo "Building plugin $@"
2485         @$(SHLD_MODULE) $(VFS_IRIXACL_OBJ)
2486
2487 bin/hpuxacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_HPUXACL_OBJ)
2488         @echo "Building plugin $@"
2489         @$(SHLD_MODULE) $(VFS_HPUXACL_OBJ)
2490
2491 bin/tru64acl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_TRU64ACL_OBJ)
2492         @echo "Building plugin $@"
2493         @$(SHLD_MODULE) $(VFS_TRU64ACL_OBJ)
2494
2495 bin/catia.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CATIA_OBJ)
2496         @echo "Building plugin $@"
2497         @$(SHLD_MODULE) $(VFS_CATIA_OBJ)
2498
2499 bin/streams_xattr.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_STREAMS_XATTR_OBJ)
2500         @echo "Building plugin $@"
2501         @$(SHLD_MODULE) $(VFS_STREAMS_XATTR_OBJ)
2502
2503 bin/streams_depot.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_STREAMS_DEPOT_OBJ)
2504         @echo "Building plugin $@"
2505         @$(SHLD_MODULE) $(VFS_STREAMS_DEPOT_OBJ)
2506
2507 bin/cacheprime.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CACHEPRIME_OBJ)
2508         @echo "Building plugin $@"
2509         @$(SHLD_MODULE) $(VFS_CACHEPRIME_OBJ)
2510
2511 bin/prealloc.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_PREALLOC_OBJ)
2512         @echo "Building plugin $@"
2513         @$(SHLD_MODULE) $(VFS_PREALLOC_OBJ)
2514
2515 bin/commit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_COMMIT_OBJ)
2516         @echo "Building plugin $@"
2517         @$(SHLD_MODULE) $(VFS_COMMIT_OBJ)
2518
2519 bin/gpfs.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_GPFS_OBJ)
2520         @echo "Building plugin $@"
2521         @$(SHLD_MODULE) $(VFS_GPFS_OBJ)
2522
2523 bin/notify_fam.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_NOTIFY_FAM_OBJ)
2524         @echo "Building plugin $@"
2525         @$(SHLD_MODULE) $(VFS_NOTIFY_FAM_OBJ) @SMB_FAM_LIBS@
2526
2527 bin/readahead.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_READAHEAD_OBJ)
2528         @echo "Building plugin $@"
2529         @$(SHLD_MODULE) $(VFS_READAHEAD_OBJ)
2530
2531 bin/tsmsm.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_TSMSM_OBJ)
2532         @echo "Building plugin $@"
2533         @$(SHLD_MODULE) $(VFS_TSMSM_OBJ)
2534
2535 bin/fileid.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_FILEID_OBJ)
2536         @echo "Building plugin $@"
2537         @$(SHLD_MODULE) $(VFS_FILEID_OBJ)
2538
2539 bin/aio_fork.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIO_FORK_OBJ)
2540         @echo "Building plugin $@"
2541         @$(SHLD_MODULE) $(VFS_AIO_FORK_OBJ)
2542
2543 bin/acl_xattr.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ACL_XATTR_OBJ)
2544         @echo "Building plugin $@"
2545         @$(SHLD_MODULE) $(VFS_ACL_XATTR_OBJ)
2546
2547 bin/smb_traffic_analyzer.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SMB_TRAFFIC_ANALYZER_OBJ)
2548         @echo "Building plugin $@"
2549         @$(SHLD_MODULE) $(VFS_SMB_TRAFFIC_ANALYZER_OBJ)
2550
2551 bin/acl_tdb.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ACL_TDB_OBJ)
2552         @echo "Building plugin $@"
2553         @$(SHLD_MODULE) $(VFS_ACL_TDB_OBJ)
2554
2555 bin/onefs.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ONEFS_OBJ)
2556         @echo "Building plugin $@"
2557         @$(SHLD_MODULE) $(VFS_ONEFS_OBJ) @ONEFS_LIBS@
2558
2559 bin/pc_onefs.@SHLIBEXT@: $(BINARY_PREREQS) $(PERFCOUNT_ONEFS_OBJ)
2560         @echo "Building plugin $@"
2561         @$(SHLD_MODULE) $(PERFCOUNT_ONEFS_OBJ)
2562
2563 bin/registry.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/registry.o
2564         @echo "Building plugin $@"
2565         @$(SHLD_MODULE) libgpo/gpext/registry.o
2566
2567 bin/scripts.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/scripts.o
2568         @echo "Building plugin $@"
2569         @$(SHLD_MODULE) libgpo/gpext/scripts.o
2570
2571 bin/security.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/security.o
2572         @echo "Building plugin $@"
2573         @$(SHLD_MODULE) libgpo/gpext/security.o
2574
2575 #########################################################
2576 ## IdMap NSS plugins
2577
2578 ## None here right now
2579 #########################################################
2580
2581 bin/wbinfo@EXEEXT@: $(BINARY_PREREQS) $(WBINFO_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
2582         @echo Linking $@
2583         @$(CC) -o $@ $(LDFLAGS) $(WBINFO_OBJ) $(DYNEXP) $(LIBS) \
2584                 $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
2585                 $(WINBIND_LIBS)
2586
2587 bin/ntlm_auth@EXEEXT@: $(BINARY_PREREQS) $(NTLM_AUTH_OBJ) $(PARAM_OBJ) \
2588         $(LIB_NONSMBD_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
2589         @echo Linking $@
2590         @$(CC) -o $@ $(LDFLAGS) $(DYNEXP) $(NTLM_AUTH_OBJ) \
2591                 $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBS) \
2592                 $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
2593                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
2594
2595 bin/pam_smbpass.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_SMBPASS_OBJ) @LIBTALLOC_SHARED@ @LIBWBCLIENT_SHARED@ @LIBTDB_SHARED@
2596         @echo "Linking shared library $@"
2597         @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_SMBPASS_OBJ) -lpam $(DYNEXP) \
2598                 $(LIBS) $(LDAP_LIBS) $(KRB5LIBS) $(NSCD_LIBS) \
2599                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
2600
2601 bin/tdbbackup@EXEEXT@: $(BINARY_PREREQS) $(TDBBACKUP_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
2602         @echo Linking $@
2603         @$(CC) -o $@ $(LDFLAGS) $(TDBBACKUP_OBJ) $(DYNEXP) \
2604                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
2605
2606 bin/tdbtool@EXEEXT@: $(BINARY_PREREQS) $(TDBTOOL_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
2607         @echo Linking $@
2608         @$(CC) -o $@ $(LDFLAGS) $(TDBTOOL_OBJ) $(DYNEXP) \
2609                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
2610
2611 bin/tdbdump@EXEEXT@: $(BINARY_PREREQS) $(TDBDUMP_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
2612         @echo Linking $@
2613         @$(CC) -o $@ $(LDFLAGS) $(TDBDUMP_OBJ) $(DYNEXP) \
2614                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
2615
2616 bin/tdbtorture@EXEEXT@: $(BINARY_PREREQS) $(TDBTORTURE_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
2617         @echo Linking $@
2618         @$(CC) -o $@ $(LDFLAGS) $(TDBTORTURE_OBJ) $(DYNEXP) \
2619                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
2620
2621 bin/t_strcmp@EXEEXT@: $(BINARY_PREREQS) @LIBTALLOC_SHARED@ bin/libbigballofmud.@SHLIBEXT@ torture/t_strcmp.o
2622         $(CC) -o $@ $(DYNEXP) $(LIBS) $(LIBTALLOC_LIBS) \
2623                 torture/t_strcmp.o -L ./bin -lbigballofmud
2624
2625 bin/t_strstr@EXEEXT@: $(BINARY_PREREQS) @LIBTALLOC_SHARED@ bin/libbigballofmud.@SHLIBEXT@ torture/t_strstr.o
2626         $(CC) -o $@ $(DYNEXP) $(LIBS) $(LIBTALLOC_LIBS) \
2627                 torture/t_strstr.o -L ./bin -lbigballofmud
2628
2629 bin/t_strappend@EXEEXT@: $(BINARY_PREREQS) @LIBTALLOC_SHARED@ bin/libbigballofmud.@SHLIBEXT@ torture/t_strappend.o
2630         $(CC) -o $@ $(DYNEXP) $(LIBS) $(LIBTALLOC_LIBS) \
2631                 torture/t_strappend.o -L ./bin -lbigballofmud
2632
2633 bin/t_stringoverflow@EXEEXT@: $(BINARY_PREREQS) bin/libbigballofmud.@SHLIBEXT@ torture/t_stringoverflow.o
2634         $(CC) -o $@ $(DYNEXP) torture/t_stringoverflow.o \
2635                 -L./bin -lbigballofmud
2636
2637 bin/timelimit@EXEEXT@: script/tests/timelimit.o
2638         @echo Linking $@
2639         @$(CC) -o $@ $(DYNEXP) script/tests/timelimit.o
2640
2641 bin/rpc_open_tcp@EXEEXT@: $(BINARY_PREREQS) $(RPC_OPEN_TCP_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
2642         @echo "Linking $@"
2643         @$(CC) -o $@ $(RPC_OPEN_TCP_OBJ) $(LDFLAGS) $(DYNEXP) \
2644                 $(LIBS) $(LIBTALLOC_LIBS) @LIBTDB_SHARED@ $(WINBIND_LIBS) \
2645                 $(LDAP_LIBS) $(KRB5LIBS) $(NSCD_LIBS)
2646
2647 bin/test_lp_load@EXEEXT@: $(BINARY_PREREQS) $(TEST_LP_LOAD_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
2648         @echo "Linking $@"
2649         @$(CC) -o $@ $(TEST_LP_LOAD_OBJ) \
2650                 $(LDFLAGS) $(DYNEEXP) $(LIBS) \
2651                 $(LDAP_LIBS) \
2652                 $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
2653
2654 install:: installservers installbin @INSTALL_CIFSMOUNT@ @INSTALL_CIFSUPCALL@ installman \
2655                 installscripts installdat installmodules @SWAT_INSTALL_TARGETS@ \
2656                 @INSTALL_PAM_MODULES@ installlibs installmo
2657
2658 install-everything:: install installmodules
2659
2660 # DESTDIR is used here to prevent packagers wasting their time
2661 # duplicating the Makefile. Remove it and you will have the privelege
2662 # of package each samba release for muliple versions of multiple
2663 # distributions and operating systems, or at least supplying patches
2664 # to all the packaging files required for this, prior to committing
2665 # the removal of DESTDIR. Do not remove it even though you think it
2666 # is not used
2667
2668 installdirs::
2669         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) \
2670                 $(DESTDIR) $(prefix) $(BINDIR) $(SBINDIR) $(LIBDIR) \
2671                 $(VARDIR) $(PRIVATEDIR) $(PIDDIR) $(LOCKDIR) $(STATEDIR) \
2672                 $(CACHEDIR) $(MANDIR) $(CODEPAGEDIR) $(MODULESDIR) $(LOCALEDIR)
2673
2674 installservers:: all installdirs
2675         @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(SBINDIR) $(SBIN_PROGS)
2676
2677 installbin:: all installdirs
2678         @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $(BIN_PROGS)
2679
2680 installcifsmount:: @CIFSMOUNT_PROGS@
2681         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(ROOTSBINDIR)
2682         @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(ROOTSBINDIR) @CIFSMOUNT_PROGS@
2683
2684 installcifsupcall:: @CIFSUPCALL_PROGS@
2685         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(SBINDIR)
2686         @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(SBINDIR) @CIFSUPCALL_PROGS@
2687
2688 # Some symlinks are required for the 'probing' of modules.
2689 # This mechanism should go at some point..
2690 installmodules:: modules installdirs
2691         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(VFSLIBDIR) $(VFS_MODULES)
2692         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PDBLIBDIR) $(PDB_MODULES)
2693         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(RPCLIBDIR) $(RPC_MODULES)
2694         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(IDMAPLIBDIR) $(IDMAP_MODULES)
2695         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(NSSINFOLIBDIR) $(NSS_INFO_MODULES)
2696         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(CHARSETLIBDIR) $(CHARSET_MODULES)
2697         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(AUTHLIBDIR) $(AUTH_MODULES)
2698         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(GPEXTLIBDIR) $(GPEXT_MODULES)
2699         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PERFCOUNTLIBDIR) $(PERFCOUNT_MODULES)
2700         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(PDBLIBDIR) ldapsam.@SHLIBEXT@ NDS_ldapsam.@SHLIBEXT@
2701         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(PDBLIBDIR) ldapsam.@SHLIBEXT@ NDS_ldapsam_compat.@SHLIBEXT@
2702         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(PDBLIBDIR) ldapsam.@SHLIBEXT@ ldapsam_compat.@SHLIBEXT@
2703         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) rhosts.@SHLIBEXT@ hostsequiv.@SHLIBEXT@
2704         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) sam.@SHLIBEXT@ sam_ignoredomain.@SHLIBEXT@
2705         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) domain.@SHLIBEXT@ trustdomain.@SHLIBEXT@ ntdomain.@SHLIBEXT@
2706         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) builtin.@SHLIBEXT@ guest.@SHLIBEXT@ fixed_challenge.@SHLIBEXT@ name_to_ntstatus.@SHLIBEXT@
2707         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(NSSINFOLIBDIR) ../idmap/ad.@SHLIBEXT@ rfc2307.@SHLIBEXT@ sfu.@SHLIBEXT@ sfu20.@SHLIBEXT@
2708         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(NSSINFOLIBDIR) ../idmap/adex.@SHLIBEXT@ adex.@SHLIBEXT@
2709         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(NSSINFOLIBDIR) ../idmap/hash.@SHLIBEXT@ hash.@SHLIBEXT@
2710
2711 installscripts:: installdirs
2712         @$(SHELL) $(srcdir)/script/installscripts.sh $(INSTALLPERMS_BIN) $(DESTDIR)$(BINDIR) $(SCRIPTS)
2713
2714 installdat:: installdirs
2715         @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR) $(CODEPAGEDIR) $(srcdir)
2716
2717 installmsg:: installdirs
2718         @$(SHELL) $(srcdir)/script/installmsg.sh $(DESTDIR) $(CODEPAGEDIR) $(srcdir)
2719
2720 installswat:: installdirs installmsg
2721         @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR) $(SWATDIR) $(srcdir)
2722
2723 installpammodules:: $(PAM_MODULES)
2724         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(PAMMODULESDIR)
2725         @for module in $(PAM_MODULES); do \
2726                 echo "Installing module $${module} as $(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@ "; \
2727                 $(INSTALLCMD) -m $(INSTALLPERMS_BIN) bin/$${module}.@SHLIBEXT@ \
2728                         "$(DESTDIR)/$(PAMMODULESDIR)"; \
2729         done
2730
2731 # revert to the previously installed version
2732 revert::
2733         @$(SHELL) $(srcdir)/script/revert.sh $(SBINDIR) $(SBIN_PROGS)
2734         @$(SHELL) $(srcdir)/script/revert.sh $(BINDIR) $(BIN_PROGS) $(SCRIPTS)
2735
2736 installman:: installdirs
2737         @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(MANDIR) $(srcdir) C "@ROFF@"
2738
2739 installmo:: all installdirs
2740         @$(SHELL) $(srcdir)/script/installmo.sh $(DESTDIR) $(LOCALEDIR) $(srcdir)
2741
2742 .PHONY: showlayout
2743
2744 showlayout::
2745         @echo "Samba will be installed into:"
2746         @echo "  prefix:      $(prefix)"
2747         @echo "  bindir:      $(BINDIR)"
2748         @echo "  sbindir:     $(SBINDIR)"
2749         @echo "  libdir:      $(LIBDIR)"
2750         @echo "  modulesdir:  $(MODULESDIR)"
2751         @echo "  vardir:      $(VARDIR)"
2752         @echo "  mandir:      $(MANDIR)"
2753         @echo "  privatedir:  $(PRIVATE_DIR)"
2754         @echo "  configdir:   $(CONFIGDIR)"
2755         @echo "  lockdir:     $(LOCKDIR)"
2756         @echo "  statedir:    $(STATEDIR)"
2757         @echo "  cachedir:    $(CACHEDIR)"
2758         @echo "  piddir:      $(PIDDIR)"
2759         @echo "  swatdir:     $(SWATDIR)"
2760         @echo "  codepagedir: $(CODEPAGEDIR)"
2761
2762
2763 uninstall:: uninstallmo uninstallman uninstallservers uninstallbin @UNINSTALL_CIFSMOUNT@ @UNINSTALL_CIFSUPCALL@ uninstallscripts uninstalldat uninstallswat uninstallmodules uninstalllibs @UNINSTALL_PAM_MODULES@
2764
2765 uninstallmo::
2766         @$(SHELL) $(srcdir)/script/uninstallmo.sh $(DESTDIR) $(LOCALEDIR) $(srcdir)
2767
2768 uninstallman::
2769         @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(MANDIR) $(srcdir) C
2770
2771 uninstallservers::
2772         @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(SBINDIR) $(SBIN_PROGS)
2773
2774 uninstallbin::
2775         @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $(BIN_PROGS)
2776
2777 uninstallcifsmount::
2778         @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(ROOTSBINDIR) @CIFSMOUNT_PROGS@
2779
2780 uninstallcifsupcall::
2781         @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(ROOTSBINDIR) @CIFSUPCALL_PROGS@
2782
2783 uninstallmodules::
2784         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(VFSLIBDIR) $(VFS_MODULES)
2785         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PDBLIBDIR) $(PDB_MODULES)
2786         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(RPCLIBDIR) $(RPC_MODULES)
2787         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(IDMAPLIBDIR) $(IDMAP_MODULES)
2788         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(CHARSETLIBDIR) $(CHARSET_MODULES)
2789         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(AUTHLIBDIR) $(AUTH_MODULES)
2790         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(GPEXTLIBDIR) $(GPEXT_MODULES)
2791         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PERFCOUNTLIBDIR) $(PERFCOUNT_MODULES)
2792
2793 uninstallscripts::
2794         @$(SHELL) $(srcdir)/script/uninstallscripts.sh $(INSTALLPERMS_BIN) $(DESTDIR)$(BINDIR) $(SCRIPTS)
2795
2796 uninstalldat::
2797         @$(SHELL) $(srcdir)/script/uninstalldat.sh $(DESTDIR) $(LIBDIR) $(srcdir)
2798
2799 uninstallmsg::
2800         @$(SHELL) $(srcdir)/script/uninstallmsg.sh $(DESTDIR) $(LIBDIR) $(srcdir)
2801
2802 uninstallswat:: uninstallmsg
2803         @$(SHELL) $(srcdir)/script/uninstallswat.sh $(DESTDIR) $(SWATDIR) $(srcdir)
2804
2805 uninstallpammodules::
2806         @for module in $(PAM_MODULES); do \
2807                 echo "Removing $(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@ "; \
2808                 rm -f "$(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@"; \
2809         done
2810
2811 # Toplevel clean files
2812 TOPFILES=dynconfig.o localedir.o
2813
2814 cleanlibs::
2815         -rm -f ../lib/*/*.o ../lib/*/*/*.o \
2816                 ../libcli/*.o ../libcli/*/*.o
2817
2818 clean:: cleanlibs
2819         -rm -f include/build_env.h
2820         -rm -f smbd/build_options.c
2821         -rm -f $(PRECOMPILED_HEADER)
2822         -rm -f core */*~ *~ \
2823                 */*.o */*/*.o */*/*/*.o \
2824                 ../testsuite/*/*.o \
2825                 */*.@SHLIBEXT@ */*/*.@SHLIBEXT@ */*/*/*.@SHLIBEXT@ \
2826                 $(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) $(ROOT_SBIN_PROGS) \
2827                 $(MODULES) $(TORTURE_PROGS) \
2828                 $(EVERYTHING_PROGS) \
2829                 bin/timelimit \
2830                 .headers.stamp */src/*.o \
2831                 ../lib/*/*.o \
2832                 ../libcli/*.o ../libcli/*/*.o \
2833                 ../librpc/*/*.o
2834         -rm -rf t_dir
2835
2836 include/build_env.h: script/build_env.sh
2837         @echo Building include/build_env.h
2838         @$(SHELL) $(srcdir)/script/build_env.sh $(srcdir) $(builddir) $(CC) \
2839           > $(builddir)/include/build_env.h
2840
2841 proto::
2842
2843 etags::
2844         etags `find $(srcdir) -name "*.[ch]"`
2845         etags --append `find $(srcdir)/../lib -name "*.[ch]"`
2846         etags --append `find $(srcdir)/../librpc -name "*.[ch]"`
2847         etags --append `find $(srcdir)/../libcli -name "*.[ch]"`
2848         etags --append `find $(srcdir)/../source4/client -name "*.[ch]"`
2849         etags --append `find $(srcdir)/../source4/auth -name "*.[ch]"`
2850         etags --append `find $(srcdir)/../source4/rpc_server -name "*.[ch]"`
2851         etags --append `find $(srcdir)/../source4/kdc -name "*.[ch]"`
2852         etags --append `find $(srcdir)/../source4/winbind -name "*.[ch]"`
2853         etags --append `find $(srcdir)/../source4/scripting -name "*.[ch]"`
2854         etags --append `find $(srcdir)/../source4/heimdal_build -name "*.[ch]"`
2855         etags --append `find $(srcdir)/../source4/libcli -name "*.[ch]"`
2856         etags --append `find $(srcdir)/../source4/ntp_signd -name "*.[ch]"`
2857         etags --append `find $(srcdir)/../source4/ldap_server -name "*.[ch]"`
2858         etags --append `find $(srcdir)/../source4/smb_server -name "*.[ch]"`
2859         etags --append `find $(srcdir)/../source4/include -name "*.[ch]"`
2860         etags --append `find $(srcdir)/../nsswitch -name "*.[ch]"`
2861         etags --append `find $(srcdir)/../source4/cldap_server -name "*.[ch]"`
2862         etags --append `find $(srcdir)/../source4/utils -name "*.[ch]"`
2863         etags --append `find $(srcdir)/../source4/librpc -name "*.[ch]"`
2864         etags --append `find $(srcdir)/../source4/libnet -name "*.[ch]"`
2865         etags --append `find $(srcdir)/../source4/web_server -name "*.[ch]"`
2866         etags --append `find $(srcdir)/../source4/heimdal -name "*.[ch]"`
2867         etags --append `find $(srcdir)/../source4/wrepl_server -name "*.[ch]"`
2868         etags --append `find $(srcdir)/../source4/dynconfig -name "*.[ch]"`
2869         etags --append `find $(srcdir)/../source4/param -name "*.[ch]"`
2870         etags --append `find $(srcdir)/../source4/lib -name "*.[ch]"`
2871         etags --append `find $(srcdir)/../source4/nbt_server -name "*.[ch]"`
2872         etags --append `find $(srcdir)/../source4/build -name "*.[ch]"`
2873         etags --append `find $(srcdir)/../source4/ntvfs -name "*.[ch]"`
2874         etags --append `find $(srcdir)/../source4/torture -name "*.[ch]"`
2875         etags --append `find $(srcdir)/../source4/cluster -name "*.[ch]"`
2876         etags --append `find $(srcdir)/../source4/ntptr -name "*.[ch]"`
2877         etags --append `find $(srcdir)/../source4/smbd -name "*.[ch]"`
2878         etags --append `find $(srcdir)/../source4/script -name "*.[ch]"`
2879         etags --append `find $(srcdir)/../source4/dsdb -name "*.[ch]"`
2880
2881 ctags::
2882         ctags `find $(srcdir)/.. -name "*.[ch]" | grep -v include/proto\.h`
2883
2884 realclean:: clean
2885         -rm -f config.log bin/.dummy script/findsmb script/gen-8bit-gap.sh
2886         -rm -f script/installbin.sh script/uninstallbin.sh
2887
2888 distclean:: realclean
2889         -rm -f smbadduser
2890         -rm -f include/config.h Makefile
2891         -rm -f config.status config.cache so_locations
2892         -rm -rf .deps TAGS
2893
2894 realdistclean:: distclean
2895         -rm -f include/config.h.in
2896         -rm -f include/version.h
2897         -rm -f configure
2898
2899 # this target is really just for my use. It only works on a limited
2900 # range of machines and is used to produce a list of potentially
2901 # dead (ie. unused) functions in the code. (tridge)
2902 finddead::
2903         nm */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt
2904         nm */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt
2905         comm -13 nmused.txt nmfns.txt
2906
2907
2908 # when configure.in is updated, reconfigure
2909 $(srcdir)/configure: $(srcdir)/configure.in
2910         @echo "WARNING: you need to rerun ./autogen.sh"
2911
2912 config.status: $(srcdir)/configure
2913         @echo "WARNING: you need to run ./configure"
2914
2915 Makefile: $(srcdir)/Makefile.in config.status
2916         @echo "WARNING: you need to run ./config.status"
2917
2918 ######################################################################
2919 # Samba Testing Framework
2920
2921 # Check shared libs for unresolved symbols
2922 test_shlibs:
2923         @echo "Testing $? "
2924         @$(LIB_PATH_VAR)=./bin && \
2925         export $(LIB_PATH_VAR) && \
2926         for module in $?; do \
2927                 ./script/tests/dlopen.sh $${module} \
2928                         || exit 1; \
2929         done
2930
2931 # Check for NSS module problems.
2932 test_nss_modules:: nss_modules
2933         @echo "Testing $(NSS_MODULES) "
2934         @$(LIB_PATH_VAR)=./bin && \
2935         export $(LIB_PATH_VAR) && \
2936         for module in $(NSS_MODULES); do \
2937                 ./script/tests/dlopen.sh $${module} \
2938                         || exit 1; \
2939         done
2940
2941 # Check for PAM module problems.  Specifically, check that every module we
2942 # built can actually be loaded by a minimal PAM-aware application.
2943 test_pam_modules:: pam_modules
2944         @echo "Testing $(PAM_MODULES) "
2945         @$(LIB_PATH_VAR)=./bin && \
2946         export $(LIB_PATH_VAR) && \
2947         for module in $(PAM_MODULES); do \
2948                 ./script/tests/dlopen.sh -lpam -ldl bin/$${module}.@SHLIBEXT@ \
2949                         || exit 1; \
2950         done
2951
2952
2953 ##
2954 ## Targets for 'make test'
2955 ##
2956
2957 TEST_EXTRA_ARGS = ${smbtorture4_option} ${selftest_shrdir} ${selftest_custom_conf}
2958
2959 test:: all torture timelimit
2960         @echo Running Test suite
2961         @LIB_PATH_VAR=$(LIB_PATH_VAR) PERL="$(PERL)" $(srcdir)/script/tests/selftest.sh ${selftest_prefix} all ${TEST_EXTRA_ARGS}
2962
2963 valgrindtest:: all torture timelimit
2964         @echo Running Test suite with valgrind
2965         @LIB_PATH_VAR=$(LIB_PATH_VAR) \
2966          NMBD_VALGRIND="xterm -n nmbd -e valgrind -q --db-attach=yes --num-callers=30" \
2967          WINBINDD_VALGRIND="xterm -n winbindd -e valgrind -q --db-attach=yes --num-callers=30" \
2968          SMBD_VALGRIND="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \
2969          VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
2970          PERL="$(PERL)" $(srcdir)/script/tests/selftest.sh ${selftest_prefix} all ${TEST_EXTRA_ARGS}
2971
2972 SELFTEST_FORMAT = plain
2973 selftestdir = ../selftest
2974
2975 S3_LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)="$(builddir)/bin"
2976
2977 selftest:: all torture timelimit
2978         @LIB_PATH_VAR=$(LIB_PATH_VAR) $(S3_LD_LIBPATH_OVERRIDE) \
2979                 SAMBA4SHAREDDIR="$(builddir)/bin/shared" SMBTORTURE4=$(smbtorture4_path) \
2980                 PERL="$(PERL)" PYTHON="$(PYTHON)" \
2981                 $(PERL) $(selftestdir)/selftest.pl \
2982                 --prefix=${selftest_prefix} --target=samba3 \
2983                 --testlist="$(srcdir)/selftest/tests.sh|" \
2984                 --expected-failures=$(srcdir)/selftest/knownfail \
2985                 --exclude=$(srcdir)/selftest/skip \
2986                 --socket-wrapper $(TESTS) --format=$(SELFTEST_FORMAT) --immediate
2987
2988 selftest-%:
2989         $(MAKE) selftest TESTS=$*
2990
2991 # Check for Winbind struct 32/64bit padding
2992 test_wbpad:
2993         @echo "Testing winbind request/response structure for 32/64bit padding"
2994         @./script/tests/wb_pad.sh || exit 1;
2995
2996 ##
2997 ## Examples:
2998 ##
2999
3000 libsmbclient_examples: libsmbclient
3001         $(MAKE) -C ../examples/libsmbclient -f Makefile.internal
3002
3003 clean_libsmbclient_examples:
3004         $(MAKE) -C ../examples/libsmbclient -f Makefile.internal clean
3005
3006 libnetapi_examples: libnetapi
3007         $(MAKE) -C lib/netapi/examples
3008
3009 clean_libnetapi_examples:
3010         $(MAKE) -C lib/netapi/examples clean