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