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