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