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