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