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