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