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