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