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