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