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