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