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