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