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