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