67cb58a4ebea3bf50470d88742144fdd0b50fb44
[abartlet/samba.git/.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/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/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_NOTIFY_FAM_OBJ = modules/vfs_notify_fam.o
835 VFS_READAHEAD_OBJ = modules/vfs_readahead.o
836 VFS_TSMSM_OBJ = modules/vfs_tsmsm.o
837 VFS_FILEID_OBJ = modules/vfs_fileid.o
838 VFS_AIO_FORK_OBJ = modules/vfs_aio_fork.o
839 VFS_PREOPEN_OBJ = modules/vfs_preopen.o
840 VFS_SYNCOPS_OBJ = modules/vfs_syncops.o
841 VFS_ACL_XATTR_OBJ = modules/vfs_acl_xattr.o
842 VFS_ACL_TDB_OBJ = modules/vfs_acl_tdb.o
843 VFS_SMB_TRAFFIC_ANALYZER_OBJ = modules/vfs_smb_traffic_analyzer.o
844 VFS_ONEFS_OBJ = modules/vfs_onefs.o modules/onefs_acl.o modules/onefs_system.o \
845                 modules/onefs_open.o modules/onefs_streams.o modules/onefs_dir.o \
846                 modules/onefs_cbrl.o modules/onefs_notify.o modules/onefs_config.o
847 VFS_ONEFS_SHADOW_COPY_OBJ = modules/vfs_onefs_shadow_copy.o modules/onefs_shadow_copy.o
848 PERFCOUNT_ONEFS_OBJ = modules/perfcount_onefs.o
849 PERFCOUNT_TEST_OBJ = modules/perfcount_test.o
850 VFS_DIRSORT_OBJ = modules/vfs_dirsort.o
851 VFS_SCANNEDONLY_OBJ = modules/vfs_scannedonly.o
852 VFS_CROSSRENAME_OBJ = modules/vfs_crossrename.o
853 VFS_LINUX_XFS_SGID_OBJ = modules/vfs_linux_xfs_sgid.o
854 VFS_TIME_AUDIT_OBJ = modules/vfs_time_audit.o
855
856 PAM_ERRORS_OBJ = ../libcli/auth/pam_errors.o
857 PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o $(PAM_ERRORS_OBJ)
858
859 SLCACHE_OBJ = libsmb/samlogon_cache.o
860
861 DCUTIL_OBJ  = libsmb/namequery_dc.o libsmb/trustdom_cache.o libsmb/trusts_util.o libsmb/dsgetdcname.o
862
863 AUTH_BUILTIN_OBJ = auth/auth_builtin.o
864 AUTH_DOMAIN_OBJ = auth/auth_domain.o
865 AUTH_SAM_OBJ = auth/auth_sam.o auth/check_samsec.o
866 AUTH_SERVER_OBJ = auth/auth_server.o
867 AUTH_UNIX_OBJ = auth/auth_unix.o
868 AUTH_WINBIND_OBJ = auth/auth_winbind.o
869 AUTH_WBC_OBJ = auth/auth_wbc.o
870 AUTH_SCRIPT_OBJ = auth/auth_script.o
871 AUTH_NETLOGOND_OBJ = auth/auth_netlogond.o
872
873 AUTH_OBJ = auth/auth.o @AUTH_STATIC@ auth/auth_util.o auth/token_util.o \
874            auth/server_info.o \
875            auth/server_info_sam.o \
876            auth/user_info.o \
877            auth/user_util.o \
878            auth/user_krb5.o \
879            auth/auth_compat.o auth/auth_ntlmssp.o \
880            $(PLAINTEXT_AUTH_OBJ) $(SLCACHE_OBJ) $(DCUTIL_OBJ)
881
882 MANGLE_OBJ = smbd/mangle.o smbd/mangle_hash.o smbd/mangle_hash2.o
883
884 SMBD_OBJ_MAIN = smbd/server.o smbd/server_exit.o smbd/msg_idmap.o
885
886 BUILDOPT_OBJ = smbd/build_options.o
887
888 SMBD_OBJ_SRV = smbd/server_reload.o \
889                smbd/files.o smbd/connection.o \
890                smbd/utmp.o smbd/session.o \
891                smbd/dfree.o smbd/dir.o smbd/password.o smbd/conn.o \
892                smbd/share_access.o smbd/fileio.o \
893                smbd/ipc.o smbd/lanman.o smbd/negprot.o \
894                smbd/message.o smbd/nttrans.o smbd/pipes.o \
895                smbd/reply.o smbd/sesssetup.o smbd/trans2.o smbd/uid.o \
896                smbd/dosmode.o smbd/filename.o smbd/open.o smbd/close.o \
897                smbd/blocking.o smbd/sec_ctx.o smbd/srvstr.o \
898                smbd/vfs.o smbd/perfcount.o smbd/statcache.o smbd/seal.o \
899                smbd/posix_acls.o lib/sysacls.o \
900                smbd/process.o smbd/service.o smbd/error.o \
901                rpc_server/epmd.o \
902                printing/printspoolss.o printing/spoolssd.o \
903                lib/sysquotas.o lib/sysquotas_linux.o \
904                lib/sysquotas_xfs.o lib/sysquotas_4A.o \
905                lib/sysquotas_nfs.o \
906                smbd/fake_file.o \
907                smbd/quotas.o smbd/ntquotas.o $(AFS_OBJ) smbd/msdfs.o \
908                $(AFS_SETTOKEN_OBJ) smbd/aio.o smbd/statvfs.o \
909                smbd/dmapi.o smbd/signing.o \
910                smbd/file_access.o \
911                smbd/dnsregister.o smbd/globals.o \
912                smbd/smb2_server.o \
913                smbd/smb2_signing.o \
914                smbd/smb2_glue.o \
915                smbd/smb2_negprot.o \
916                smbd/smb2_sesssetup.o \
917                smbd/smb2_tcon.o \
918                smbd/smb2_create.o \
919                smbd/smb2_close.o \
920                smbd/smb2_flush.o \
921                smbd/smb2_read.o \
922                smbd/smb2_write.o \
923                smbd/smb2_lock.o \
924                smbd/smb2_ioctl.o \
925                smbd/smb2_keepalive.o \
926                smbd/smb2_find.o \
927                smbd/smb2_notify.o \
928                smbd/smb2_getinfo.o \
929                smbd/smb2_setinfo.o \
930                smbd/smb2_break.o \
931                ../libcli/smb/smb2_create_blob.o \
932                $(MANGLE_OBJ) @VFS_STATIC@
933
934 SMBD_OBJ_BASE = $(PARAM_WITHOUT_REG_OBJ) $(SMBD_OBJ_SRV) $(LIBSMB_OBJ) \
935                 $(RPC_SERVER_OBJ) \
936                 $(LOCKING_OBJ) $(PASSDB_OBJ) $(PRINTING_OBJ) $(PROFILE_OBJ) \
937                 $(LIB_OBJ) $(PRINTBACKEND_OBJ) $(OPLOCK_OBJ) \
938                 $(NOTIFY_OBJ) $(FNAME_UTIL_OBJ) $(GROUPDB_OBJ) $(AUTH_OBJ) \
939                 $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(AVAHI_OBJ) \
940                 $(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(LIBADS_SERVER_OBJ) $(LIBADS_PRINTER_OBJ) \
941                 $(REG_FULL_OBJ) $(POPT_LIB_OBJ) $(BUILDOPT_OBJ) \
942                 $(SMBLDAP_OBJ) $(LIBNET_OBJ) \
943                 $(LIBSMBCONF_OBJ) \
944                 $(PRIVILEGES_BASIC_OBJ) \
945                 $(REGFIO_OBJ) \
946                 $(REG_API_REGF_OBJ) \
947                 $(LIBNDR_XATTR_OBJ)
948
949 PRINTING_OBJ = printing/pcap.o printing/print_svid.o printing/print_aix.o \
950                printing/print_cups.o printing/print_generic.o \
951                printing/lpq_parse.o printing/load.o \
952                printing/print_iprint.o printing/print_standard.o \
953                printing/printer_list.o librpc/gen_ndr/ndr_printcap.o
954
955 PRINTBASE_OBJ = printing/notify.o printing/printing_db.o
956 PRINTBACKEND_OBJ = printing/printing.o \
957                    printing/nt_printing.o \
958                    printing/nt_printing_tdb.o \
959                    printing/nt_printing_migrate.o \
960                    printing/nt_printing_ads.o \
961                    librpc/gen_ndr/ndr_ntprinting.o \
962                     ../librpc/ndr/ndr_ntprinting.o \
963                    $(PRINTBASE_OBJ)
964
965 SMBD_OBJ = $(SMBD_OBJ_BASE) $(SMBD_OBJ_MAIN)
966
967 NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \
968             nmbd/nmbd_become_lmb.o nmbd/nmbd_browserdb.o \
969             nmbd/nmbd_browsesync.o nmbd/nmbd_elections.o \
970             nmbd/nmbd_incomingdgrams.o nmbd/nmbd_incomingrequests.o \
971             nmbd/nmbd_lmhosts.o nmbd/nmbd_logonnames.o nmbd/nmbd_mynames.o \
972             nmbd/nmbd_namelistdb.o nmbd/nmbd_namequery.o \
973             nmbd/nmbd_nameregister.o nmbd/nmbd_namerelease.o \
974             nmbd/nmbd_nodestatus.o nmbd/nmbd_packets.o \
975             nmbd/nmbd_processlogon.o nmbd/nmbd_responserecordsdb.o \
976             nmbd/nmbd_sendannounce.o nmbd/nmbd_serverlistdb.o \
977             nmbd/nmbd_subnetdb.o nmbd/nmbd_winsproxy.o nmbd/nmbd_winsserver.o \
978             nmbd/nmbd_workgroupdb.o nmbd/nmbd_synclists.o
979
980 NMBD_OBJ = $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
981            $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
982            $(LIBNDR_GEN_OBJ0)
983
984 SWAT_OBJ1 = web/cgi.o web/diagnose.o web/startstop.o web/statuspage.o \
985            web/swat.o web/neg_lang.o
986
987 SWAT_OBJ = $(SWAT_OBJ1) $(PARAM_OBJ) $(PRINTING_OBJ) $(PRINTBASE_OBJ) $(LIBSMB_OBJ) \
988            $(LOCKING_OBJ) $(PASSDB_OBJ) $(KRBCLIENT_OBJ) \
989            $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) $(PLAINTEXT_AUTH_OBJ) \
990            $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ) \
991            $(PASSCHANGE_OBJ) $(FNAME_UTIL_OBJ) \
992            $(LIBCLI_SAMR_OBJ) \
993            rpc_client/init_lsa.o
994
995 STATUS_OBJ = utils/status.o utils/status_profile.o \
996              $(LOCKING_OBJ) $(PARAM_OBJ) \
997              $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
998              $(LIBSMB_ERR_OBJ) $(FNAME_UTIL_OBJ)
999
1000 SMBCONTROL_OBJ = utils/smbcontrol.o $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1001         $(LIBSMB_ERR_OBJ) $(POPT_LIB_OBJ) $(PRINTBASE_OBJ)
1002
1003 SMBTREE_OBJ = utils/smbtree.o $(PARAM_OBJ) \
1004              $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSMB_OBJ) \
1005              $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
1006              $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
1007              $(LIBMSRPC_GEN_OBJ) \
1008              $(LIBMSRPC_OBJ) \
1009              $(LIBCLI_SRVSVC_OBJ)
1010
1011 TESTPARM_OBJ = utils/testparm.o \
1012                $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
1013                $(LIBSMB_ERR_OBJ)
1014
1015 SMBTA_UTIL_OBJ = utils/smbta-util.o $(PARAM_OBJ) $(POPT_LIB_OBJ) \
1016         $(LIB_NONSMBD_OBJ) \
1017         $(LIBSMB_ERR_OBJ) $(FNAME_UTIL_OBJ)
1018
1019 TEST_LP_LOAD_OBJ = param/test_lp_load.o \
1020                    $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1021                    $(POPT_LIB_OBJ) $(LIBSAMBA_OBJ)
1022
1023 PASSWD_UTIL_OBJ = utils/passwd_util.o
1024
1025 SMBPASSWD_OBJ = utils/smbpasswd.o $(PASSWD_UTIL_OBJ) $(PASSCHANGE_OBJ) \
1026                 $(PARAM_OBJ) $(LIBSMB_OBJ) $(PASSDB_OBJ) \
1027                 $(GROUPDB_OBJ) $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \
1028                 $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) \
1029                 $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ) \
1030                 $(LIBCLI_SAMR_OBJ) \
1031                 rpc_client/init_lsa.o
1032
1033 PDBEDIT_OBJ = utils/pdbedit.o $(PASSWD_UTIL_OBJ) $(PARAM_OBJ) $(PASSDB_OBJ) \
1034                 $(LIBSAMBA_OBJ) $(LIBTSOCKET_OBJ) \
1035                 $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) \
1036                 $(LIBCLI_LDAP_NDR_OBJ) \
1037                 $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) ../lib/util/asn1.o
1038
1039 SMBGET_OBJ = utils/smbget.o $(POPT_LIB_OBJ) $(LIBSMBCLIENT_OBJ1)
1040
1041 DISPLAY_SEC_OBJ= ../libcli/security/display_sec.o
1042
1043 RPCCLIENT_OBJ1 = rpcclient/rpcclient.o rpcclient/cmd_lsarpc.o \
1044                  rpcclient/cmd_samr.o rpcclient/cmd_spoolss.o \
1045                  rpcclient/cmd_netlogon.o rpcclient/cmd_srvsvc.o \
1046                  rpcclient/cmd_dfs.o rpcclient/cmd_epmapper.o \
1047                  rpcclient/cmd_dssetup.o rpcclient/cmd_echo.o \
1048                  rpcclient/cmd_shutdown.o rpcclient/cmd_test.o \
1049                  rpcclient/cmd_wkssvc.o rpcclient/cmd_ntsvcs.o \
1050                  rpcclient/cmd_drsuapi.o rpcclient/cmd_eventlog.o \
1051                  rpcclient/cmd_winreg.o \
1052                  $(DISPLAY_SEC_OBJ)
1053
1054 RPCCLIENT_OBJ = $(RPCCLIENT_OBJ1) \
1055              $(PARAM_OBJ) $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) \
1056              $(PASSDB_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ) \
1057              $(READLINE_OBJ) $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) \
1058              $(LIBADS_OBJ) $(POPT_LIB_OBJ) \
1059              $(SMBLDAP_OBJ) $(DCUTIL_OBJ) \
1060              $(LIBCLI_SPOOLSS_OBJ) \
1061              $(LIBCLI_EVENTLOG_OBJ) \
1062              $(LIBCLI_NTSVCS_OBJ) \
1063              $(LIBCLI_DRSUAPI_OBJ) \
1064              $(LIBCLI_DFS_OBJ) \
1065              $(LIBCLI_ECHO_OBJ) \
1066              $(LIBCLI_DSSETUP_OBJ) \
1067              $(LIBCLI_WKSSVC_OBJ) \
1068              $(LIBCLI_SRVSVC_OBJ) \
1069              $(LIBCLI_LSA_OBJ) \
1070              $(LIBCLI_SAMR_OBJ) \
1071              $(LIBCLI_WINREG_OBJ) \
1072              $(LIBCLI_NETLOGON_OBJ) \
1073              $(RPC_CLIENT_SCHANNEL_OBJ) \
1074              rpc_client/init_netlogon.o \
1075              rpc_client/init_samr.o
1076
1077 PAM_WINBIND_OBJ = ../nsswitch/pam_winbind.o $(WBCOMMON_OBJ) \
1078                   $(LIBREPLACE_OBJ) @BUILD_INIPARSER@
1079
1080 LIBSMBCLIENT_THREAD_OBJ = \
1081                         libsmb/libsmb_thread_impl.o \
1082                         libsmb/libsmb_thread_posix.o
1083
1084 LIBSMBCLIENT_OBJ0 = \
1085                     libsmb/libsmb_cache.o \
1086                     libsmb/libsmb_compat.o \
1087                     libsmb/libsmb_context.o \
1088                     libsmb/libsmb_dir.o \
1089                     libsmb/libsmb_file.o \
1090                     libsmb/libsmb_misc.o \
1091                     libsmb/libsmb_path.o \
1092                     libsmb/libsmb_printjob.o \
1093                     libsmb/libsmb_server.o \
1094                     libsmb/libsmb_stat.o \
1095                     libsmb/libsmb_xattr.o \
1096                     libsmb/libsmb_setget.o
1097
1098 LIBSMBCLIENT_OBJ1 = $(LIBSMBCLIENT_OBJ0) \
1099                     $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1100                     $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
1101                     $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
1102                     $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
1103                     $(LIBCLI_SRVSVC_OBJ) \
1104                     $(LIBCLI_LSA_OBJ)
1105
1106 LIBSMBCLIENT_OBJ = $(LIBSMBCLIENT_OBJ1)
1107
1108 # This shared library is intended for linking with unit test programs
1109 # to test Samba internals.  It's called libbigballofmud.so to
1110 # discourage casual usage.
1111
1112 LIBBIGBALLOFMUD_MAJOR = 0
1113
1114 LIBBIGBALLOFMUD_OBJ = $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1115         $(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(PASSDB_OBJ) \
1116         $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) $(SMBLDAP_OBJ)
1117
1118 CLIENT_OBJ1 = client/client.o client/clitar.o \
1119               client/dnsbrowse.o \
1120               $(LIBMSRPC_OBJ)
1121
1122 CLIENT_OBJ = $(CLIENT_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) \
1123              $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) $(LIBMSRPC_GEN_OBJ) \
1124              $(READLINE_OBJ) $(POPT_LIB_OBJ) \
1125              $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
1126              $(DISPLAY_SEC_OBJ) \
1127              $(LIBCLI_SRVSVC_OBJ)
1128
1129 LIBSMBCONF_OBJ = ../lib/smbconf/smbconf.o \
1130                  ../lib/smbconf/smbconf_util.o \
1131                  ../lib/smbconf/smbconf_txt.o \
1132                  lib/smbconf/smbconf_reg.o \
1133                  lib/smbconf/smbconf_init.o
1134
1135 SMBCONFTORT_OBJ0 = lib/smbconf/testsuite.o
1136
1137 SMBCONFTORT_OBJ = $(SMBCONFTORT_OBJ0) \
1138                   $(LIB_NONSMBD_OBJ) \
1139                   $(PARAM_OBJ) \
1140                   $(LIBSMB_ERR_OBJ) \
1141                   $(POPT_LIB_OBJ)
1142
1143 PTHREADPOOLTEST_OBJ = lib/pthreadpool/pthreadpool.o \
1144                 lib/pthreadpool/tests.o
1145
1146 LIBNET_OBJ = libnet/libnet_join.o \
1147              libnet/libnet_keytab.o \
1148              librpc/gen_ndr/ndr_libnet_join.o
1149
1150 LIBNET_DSSYNC_OBJ = libnet/libnet_dssync.o \
1151                     libnet/libnet_dssync_passdb.o \
1152                     libnet/libnet_dssync_keytab.o \
1153                     ../libcli/drsuapi/repl_decrypt.o
1154
1155 LIBNET_SAMSYNC_OBJ = libnet/libnet_samsync.o \
1156                      libnet/libnet_samsync_ldif.o \
1157                      libnet/libnet_samsync_passdb.o \
1158                      libnet/libnet_samsync_display.o \
1159                      libnet/libnet_samsync_keytab.o \
1160                      ../libcli/samsync/decrypt.o
1161
1162 NET_OBJ1 = utils/net.o utils/net_ads.o utils/net_help.o \
1163            utils/net_rap.o utils/net_rpc.o utils/net_rpc_samsync.o \
1164            utils/net_rpc_join.o utils/net_time.o utils/net_lookup.o \
1165            utils/net_cache.o utils/net_groupmap.o utils/net_idmap.o utils/net_idmap_check.o\
1166            utils/net_status.o utils/net_rpc_printer.o utils/net_rpc_rights.o \
1167            utils/net_rpc_service.o utils/net_rpc_registry.o utils/net_usershare.o \
1168            utils/netlookup.o utils/net_sam.o utils/net_rpc_shell.o \
1169            utils/net_util.o utils/net_rpc_sh_acct.o utils/net_rpc_audit.o \
1170            $(PASSWD_UTIL_OBJ) utils/net_dns.o utils/net_ads_gpo.o \
1171            utils/net_conf.o utils/net_join.o utils/net_user.o \
1172            utils/net_group.o utils/net_file.o utils/net_registry.o \
1173            auth/token_util.o utils/net_dom.o utils/net_share.o \
1174            utils/net_g_lock.o \
1175            utils/net_serverid.o \
1176            utils/net_eventlog.o \
1177            utils/net_printing.o \
1178            utils/net_rpc_trust.o \
1179            $(LIBNDR_NTPRINTING_OBJ) \
1180            $(LIBNDR_PREG_OBJ) \
1181            $(LIBCLI_SPOOLSS_OBJ) \
1182            $(LIBCLI_WINREG_OBJ) \
1183            $(LIBCLI_DRSUAPI_OBJ) \
1184            $(LIBCLI_INITSHUTDOWN_OBJ) \
1185            $(LIBCLI_DSSETUP_OBJ) \
1186            $(LIBCLI_SVCCTL_OBJ) \
1187            $(LIBCLI_WKSSVC_OBJ) \
1188            $(LIBCLI_SRVSVC_OBJ) \
1189            $(LIBCLI_LSA_OBJ) \
1190            $(LIBCLI_SAMR_OBJ) \
1191            $(LIBCLI_NETLOGON_OBJ) \
1192            $(RPC_CLIENT_SCHANNEL_OBJ) \
1193            rpc_client/init_netlogon.o \
1194            rpc_client/init_samr.o \
1195            registry/reg_parse.o registry/reg_format.o \
1196            registry/reg_parse_internal.o registry/reg_import.o \
1197            lib/cbuf.o lib/srprs.o
1198
1199 # these are not processed by make proto
1200 NET_OBJ2 = utils/net_registry_util.o utils/net_help_common.o
1201
1202 NET_OBJ = $(NET_OBJ1) \
1203           $(NET_OBJ2) @FAKE_KASERVER_OBJ@\
1204           $(PARAM_WITHOUT_REG_OBJ) $(LIBSMB_OBJ) \
1205           $(PASSDB_OBJ) $(GROUPDB_OBJ) \
1206           $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(LIBADDNS_OBJ0) \
1207           $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
1208           $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) $(LIBADS_PRINTER_OBJ) $(POPT_LIB_OBJ) \
1209           $(SMBLDAP_OBJ) $(DCUTIL_OBJ) \
1210           $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) $(READLINE_OBJ) \
1211           $(LIBGPO_OBJ) @BUILD_INIPARSER@ $(DISPLAY_SEC_OBJ) \
1212           $(REG_SMBCONF_OBJ) \
1213           $(LIBNET_OBJ) $(LIBNET_DSSYNC_OBJ) $(LIBNET_SAMSYNC_OBJ) \
1214           $(LIBSMBCONF_OBJ) \
1215           $(REGFIO_OBJ) \
1216           $(PRIVILEGES_BASIC_OBJ) \
1217           $(LIB_EVENTLOG_OBJ)
1218
1219 CUPS_OBJ = client/smbspool.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
1220           $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
1221           $(LIBNDR_GEN_OBJ0)
1222
1223 NMBLOOKUP_OBJ = utils/nmblookup.o $(PARAM_OBJ) $(LIBNMB_OBJ) \
1224                $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) $(LIBSMB_ERR_OBJ)
1225
1226 SMBTORTURE_OBJ1 = torture/torture.o torture/nbio.o torture/scanner.o torture/utable.o \
1227                 torture/denytest.o torture/mangle_test.o \
1228                 torture/nbench.o \
1229                 torture/test_async_echo.o \
1230                 torture/test_smbsock_any_connect.o \
1231                 torture/test_addrchange.o \
1232                 torture/test_case_insensitive.o \
1233                 torture/test_posix_append.o
1234
1235 SMBTORTURE_OBJ = $(SMBTORTURE_OBJ1) $(PARAM_OBJ) $(TLDAP_OBJ) \
1236         $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) \
1237         @LIBWBCLIENT_STATIC@ \
1238         torture/wbc_async.o \
1239         ../nsswitch/wb_reqtrans.o \
1240         $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBCLI_ECHO_OBJ)
1241
1242 MASKTEST_OBJ = torture/masktest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
1243                  $(LIB_NONSMBD_OBJ) \
1244                  $(LIBNDR_GEN_OBJ0)
1245
1246 MSGTEST_OBJ = torture/msgtest.o $(PARAM_OBJ) $(LIBSMB_ERR_OBJ) \
1247                  $(LIB_NONSMBD_OBJ) \
1248                  $(LIBNDR_GEN_OBJ0)
1249
1250 LOCKTEST_OBJ = torture/locktest.o $(PARAM_OBJ) $(LOCKING_OBJ) $(KRBCLIENT_OBJ) \
1251                $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) \
1252                $(LIBNDR_GEN_OBJ0) $(FNAME_UTIL_OBJ)
1253
1254 NSSTEST_OBJ = ../nsswitch/nsstest.o $(LIBSAMBAUTIL_OBJ)
1255
1256 PDBTEST_OBJ = torture/pdbtest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
1257                 $(LIB_NONSMBD_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
1258                 $(SMBLDAP_OBJ) $(POPT_LIB_OBJ) \
1259                 $(LIBNDR_GEN_OBJ0)
1260
1261 VFSTEST_OBJ = torture/cmd_vfs.o torture/vfstest.o $(SMBD_OBJ_BASE) $(READLINE_OBJ)
1262
1263 SMBICONV_OBJ = $(PARAM_OBJ) torture/smbiconv.o $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) $(LIBSMB_ERR_OBJ)
1264
1265 LOG2PCAP_OBJ = utils/log2pcaphex.o
1266
1267 LOCKTEST2_OBJ = torture/locktest2.o $(PARAM_OBJ) $(LOCKING_OBJ) $(LIBSMB_OBJ) \
1268                 $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) \
1269                 $(LIBNDR_GEN_OBJ0) $(FNAME_UTIL_OBJ)
1270
1271 SMBCACLS_OBJ = utils/smbcacls.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
1272                 $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) \
1273                 $(PASSDB_OBJ) $(GROUPDB_OBJ) $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
1274                 $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) \
1275                 $(LIBCLI_LSA_OBJ)
1276
1277 SMBCQUOTAS_OBJ = utils/smbcquotas.o $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
1278                 $(PARAM_OBJ) \
1279                 $(LIB_NONSMBD_OBJ) \
1280                 $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(POPT_LIB_OBJ) \
1281                 $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
1282                 $(LIBCLI_LSA_OBJ)
1283
1284 EVTLOGADM_OBJ0  = utils/eventlogadm.o
1285
1286 EVTLOGADM_OBJ   = $(EVTLOGADM_OBJ0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1287                 $(LIBSMB_ERR_OBJ) $(LIB_EVENTLOG_OBJ) \
1288                 librpc/gen_ndr/ndr_eventlog.o \
1289                 librpc/gen_ndr/ndr_lsa.o
1290
1291 SHARESEC_OBJ0 = utils/sharesec.o
1292 SHARESEC_OBJ  = $(SHARESEC_OBJ0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1293                 $(LIBSMB_ERR_OBJ) \
1294                 $(POPT_LIB_OBJ)
1295
1296 TALLOCTORT_OBJ = @tallocdir@/testsuite.o @tallocdir@/testsuite_main.o \
1297                 $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSMB_ERR_OBJ)
1298
1299 REPLACETORT_OBJ = @libreplacedir@/test/testsuite.o \
1300                 @libreplacedir@/test/getifaddrs.o \
1301                 @libreplacedir@/test/os2_delete.o \
1302                 @libreplacedir@/test/strptime.o \
1303                 @libreplacedir@/test/main.o \
1304                 $(LIBREPLACE_OBJ) $(SOCKET_WRAPPER_OBJ)
1305
1306 DEBUG2HTML_OBJ = utils/debug2html.o utils/debugparse.o
1307
1308 SMBFILTER_OBJ = utils/smbfilter.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
1309                  $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \
1310                  $(LIBNDR_GEN_OBJ0)
1311
1312 WINBIND_WINS_NSS_OBJ = ../nsswitch/wins.o $(PARAM_OBJ) \
1313         $(LIB_NONSMBD_OBJ) $(LIBSMB_ERR_OBJ) $(LIBNMB_OBJ)
1314
1315 PAM_SMBPASS_OBJ_0 = pam_smbpass/pam_smb_auth.o pam_smbpass/pam_smb_passwd.o \
1316                 pam_smbpass/pam_smb_acct.o pam_smbpass/support.o ../lib/util/asn1.o
1317 PAM_SMBPASS_OBJ = $(PAM_SMBPASS_OBJ_0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
1318                 $(SMBLDAP_OBJ) $(LIBSAMBA_OBJ) \
1319                 $(LIBTSOCKET_OBJ) $(PAM_ERRORS_OBJ)
1320
1321 IDMAP_RW_OBJ = winbindd/idmap_rw.o
1322
1323 IDMAP_OBJ     = winbindd/idmap.o winbindd/idmap_util.o $(IDMAP_RW_OBJ) @IDMAP_STATIC@
1324
1325 NSS_INFO_OBJ = winbindd/nss_info.o @NSS_INFO_STATIC@
1326
1327 IDMAP_HASH_OBJ = \
1328                 winbindd/idmap_hash/idmap_hash.o \
1329                 winbindd/idmap_hash/mapfile.o
1330
1331 IDMAP_ADEX_OBJ = \
1332                 winbindd/idmap_adex/idmap_adex.o \
1333                 winbindd/idmap_adex/cell_util.o \
1334                 winbindd/idmap_adex/likewise_cell.o \
1335                 winbindd/idmap_adex/provider_unified.o \
1336                 winbindd/idmap_adex/gc_util.o \
1337                 winbindd/idmap_adex/domain_util.o
1338
1339 WINBINDD_OBJ1 = \
1340                 winbindd/winbindd.o       \
1341                 winbindd/winbindd_group.o \
1342                 winbindd/winbindd_util.o  \
1343                 winbindd/winbindd_cache.o \
1344                 winbindd/winbindd_pam.o   \
1345                 winbindd/winbindd_misc.o  \
1346                 winbindd/winbindd_cm.o    \
1347                 winbindd/winbindd_wins.o  \
1348                 winbindd/winbindd_msrpc.o \
1349                 winbindd/winbindd_rpc.o   \
1350                 winbindd/winbindd_reconnect.o \
1351                 winbindd/winbindd_ads.o   \
1352                 winbindd/winbindd_samr.o \
1353                 winbindd/winbindd_dual.o  \
1354                 winbindd/winbindd_dual_ndr.o  \
1355                 winbindd/winbindd_dual_srv.o  \
1356                 librpc/gen_ndr/ndr_wbint_c.o \
1357                 librpc/gen_ndr/srv_wbint.o \
1358                 librpc/gen_ndr/ndr_wbint.o \
1359                 librpc/gen_ndr/ndr_idmap.o \
1360                 winbindd/winbindd_async.o \
1361                 winbindd/winbindd_creds.o \
1362                 winbindd/winbindd_cred_cache.o \
1363                 winbindd/winbindd_ccache_access.o \
1364                 winbindd/winbindd_domain.o \
1365                 winbindd/winbindd_idmap.o \
1366                 winbindd/winbindd_locator.o \
1367                 winbindd/winbindd_ndr.o \
1368                 winbindd/wb_ping.o \
1369                 winbindd/wb_lookupsid.o \
1370                 winbindd/wb_lookupsids.o \
1371                 winbindd/wb_lookupname.o \
1372                 winbindd/wb_sid2uid.o \
1373                 winbindd/wb_sid2gid.o \
1374                 winbindd/wb_uid2sid.o \
1375                 winbindd/wb_gid2sid.o \
1376                 winbindd/wb_queryuser.o \
1377                 winbindd/wb_lookupuseraliases.o \
1378                 winbindd/wb_lookupusergroups.o \
1379                 winbindd/wb_getpwsid.o \
1380                 winbindd/wb_gettoken.o \
1381                 winbindd/wb_seqnum.o \
1382                 winbindd/wb_seqnums.o \
1383                 winbindd/wb_group_members.o \
1384                 winbindd/wb_getgrsid.o \
1385                 winbindd/wb_query_user_list.o \
1386                 winbindd/wb_fill_pwent.o \
1387                 winbindd/wb_next_pwent.o \
1388                 winbindd/wb_next_grent.o \
1389                 winbindd/wb_dsgetdcname.o \
1390                 winbindd/winbindd_lookupsid.o \
1391                 winbindd/winbindd_lookupsids.o \
1392                 winbindd/winbindd_lookupname.o \
1393                 winbindd/winbindd_sid_to_uid.o \
1394                 winbindd/winbindd_sid_to_gid.o \
1395                 winbindd/winbindd_uid_to_sid.o \
1396                 winbindd/winbindd_gid_to_sid.o \
1397                 winbindd/winbindd_sids_to_xids.o \
1398                 winbindd/winbindd_allocate_uid.o \
1399                 winbindd/winbindd_allocate_gid.o \
1400                 winbindd/winbindd_getpwsid.o \
1401                 winbindd/winbindd_getpwnam.o \
1402                 winbindd/winbindd_getpwuid.o \
1403                 winbindd/winbindd_getsidaliases.o \
1404                 winbindd/winbindd_getuserdomgroups.o \
1405                 winbindd/winbindd_getgroups.o \
1406                 winbindd/winbindd_show_sequence.o \
1407                 winbindd/winbindd_getgrgid.o \
1408                 winbindd/winbindd_getgrnam.o \
1409                 winbindd/winbindd_getusersids.o \
1410                 winbindd/winbindd_lookuprids.o \
1411                 winbindd/winbindd_setpwent.o \
1412                 winbindd/winbindd_getpwent.o \
1413                 winbindd/winbindd_endpwent.o \
1414                 winbindd/winbindd_setgrent.o \
1415                 winbindd/winbindd_getgrent.o \
1416                 winbindd/winbindd_endgrent.o \
1417                 winbindd/winbindd_dsgetdcname.o \
1418                 winbindd/winbindd_getdcname.o \
1419                 winbindd/winbindd_list_users.o \
1420                 winbindd/winbindd_list_groups.o \
1421                 winbindd/winbindd_check_machine_acct.o \
1422                 winbindd/winbindd_change_machine_acct.o \
1423                 winbindd/winbindd_ping_dc.o \
1424                 winbindd/winbindd_pam_auth.o \
1425                 winbindd/winbindd_pam_auth_crap.o \
1426                 winbindd/winbindd_pam_chauthtok.o \
1427                 winbindd/winbindd_pam_chng_pswd_auth_crap.o \
1428                 winbindd/winbindd_pam_logoff.o \
1429                 auth/auth_util.o \
1430                 auth/token_util.o \
1431                 auth/user_util.o \
1432                 auth/check_samsec.o \
1433                 auth/server_info.o \
1434                 auth/server_info_sam.o \
1435                 auth/user_info.o \
1436                 auth/pampass.o \
1437                 ../nsswitch/wb_reqtrans.o
1438
1439 WINBINDD_OBJ = \
1440                 $(WINBINDD_OBJ1) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
1441                 $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1442                 $(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
1443                 $(PROFILE_OBJ) $(SLCACHE_OBJ) $(SMBLDAP_OBJ) \
1444                 $(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
1445                 $(DCUTIL_OBJ) $(IDMAP_OBJ) $(NSS_INFO_OBJ) \
1446                 $(RPC_NCACN_NP) $(RPC_SAMR_OBJ) $(RPC_LSARPC_OBJ) \
1447                 $(NPA_TSTREAM_OBJ) \
1448                 $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) \
1449                 $(LIBADS_SERVER_OBJ) \
1450                 $(TDB_VALIDATE_OBJ) \
1451                 $(LIBCLI_DSSETUP_OBJ) \
1452                 $(LIBCLI_LSA_OBJ) \
1453                 $(LIBCLI_SAMR_OBJ) \
1454                 $(LIBCLI_NETLOGON_OBJ) \
1455                 rpc_client/init_netlogon.o \
1456                 rpc_client/init_samr.o \
1457                 $(PAM_ERRORS_OBJ)
1458
1459 WBINFO_OBJ = ../nsswitch/wbinfo.o $(LIBSAMBA_OBJ) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1460                 $(POPT_LIB_OBJ) $(AFS_SETTOKEN_OBJ) \
1461                 lib/winbind_util.o $(WBCOMMON_OBJ)
1462
1463 WINBIND_NSS_OBJ = $(WBCOMMON_OBJ) $(LIBREPLACE_OBJ) @WINBIND_NSS_EXTRA_OBJS@
1464
1465 WINBIND_KRB5_LOCATOR_OBJ1 = ../nsswitch/winbind_krb5_locator.o
1466 WINBIND_KRB5_LOCATOR_OBJ = $(WINBIND_KRB5_LOCATOR_OBJ1) $(LIBREPLACE_OBJ)
1467
1468 POPT_OBJ=../lib/popt/findme.o ../lib/popt/popt.o ../lib/popt/poptconfig.o \
1469           ../lib/popt/popthelp.o ../lib/popt/poptparse.o
1470
1471 INIPARSER_OBJ = ../lib/iniparser_build/iniparser.o ../lib/iniparser_build/dictionary.o \
1472                 ../lib/iniparser_build/strlib.o
1473
1474 TDBBACKUP_OBJ = @tdbdir@/tools/tdbbackup.o $(LIBREPLACE_OBJ) \
1475         $(SOCKET_WRAPPER_OBJ)
1476
1477 TDBTOOL_OBJ = @tdbdir@/tools/tdbtool.o $(LIBREPLACE_OBJ) \
1478         $(SOCKET_WRAPPER_OBJ)
1479
1480 TDBDUMP_OBJ = @tdbdir@/tools/tdbdump.o $(LIBREPLACE_OBJ) \
1481         $(SOCKET_WRAPPER_OBJ)
1482
1483 TDBRESTORE_OBJ = @tdbdir@/tools/tdbrestore.o $(LIBREPLACE_OBJ) \
1484         $(SOCKET_WRAPPER_OBJ)
1485
1486 TDBTORTURE_OBJ = @tdbdir@/tools/tdbtorture.o $(LIBREPLACE_OBJ) \
1487         $(SOCKET_WRAPPER_OBJ)
1488
1489
1490 NTLM_AUTH_OBJ1 = utils/ntlm_auth.o utils/ntlm_auth_diagnostics.o
1491
1492 NTLM_AUTH_OBJ = ${NTLM_AUTH_OBJ1} $(LIBSAMBA_OBJ) $(POPT_LIB_OBJ) \
1493                 ../lib/util/asn1.o ../libcli/auth/spnego_parse.o libsmb/clikrb5.o ../libcli/auth/krb5_wrap.o libads/kerberos.o \
1494                 libsmb/samlogon_cache.o \
1495                 $(LIBADS_SERVER_OBJ) \
1496                 $(PASSDB_OBJ) $(LIBTSOCKET_OBJ) $(GROUPDB_OBJ) \
1497                 $(SMBLDAP_OBJ) $(LIBNMB_OBJ) \
1498                 $(WBCOMMON_OBJ) \
1499                 $(LIBCLI_LDAP_NDR_OBJ) \
1500                 $(LIBNDR_GEN_OBJ0) $(LIBNDR_NETLOGON_OBJ) @BUILD_INIPARSER@
1501
1502
1503 VLP_OBJ = printing/tests/vlp.o \
1504           ../lib/util/util_tdb.o \
1505           $(LIBSAMBAUTIL_OBJ) \
1506           param/util.o
1507
1508 RPC_OPEN_TCP_OBJ = torture/rpc_open_tcp.o \
1509                    $(LIBSMB_OBJ) \
1510                    $(PARAM_OBJ) \
1511                    $(PASSDB_OBJ) \
1512                    $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
1513                    $(LIB_NONSMBD_OBJ) \
1514                    $(KRBCLIENT_OBJ) \
1515                    $(LIBMSRPC_OBJ) \
1516                    $(LIBMSRPC_GEN_OBJ)
1517
1518 DBWRAP_TOOL_OBJ = utils/dbwrap_tool.o \
1519                   $(PARAM_OBJ) \
1520                   $(LIB_NONSMBD_OBJ) \
1521                   $(LIBSMB_ERR_OBJ)
1522
1523 DBWRAP_TORTURE_OBJ = utils/dbwrap_torture.o \
1524                      $(PARAM_OBJ) \
1525                      $(LIB_NONSMBD_OBJ) \
1526                      $(LIBSMB_ERR_OBJ) \
1527                      $(POPT_LIB_OBJ)
1528
1529 SPLIT_TOKENS_OBJ = utils/split_tokens.o \
1530                    $(PARAM_OBJ) \
1531                    $(LIB_NONSMBD_OBJ) \
1532                    $(POPT_LIB_OBJ) \
1533                    $(LIBSAMBA_OBJ)
1534
1535 ######################################################################
1536 # now the rules...
1537 ######################################################################
1538 all:: SHOWFLAGS basics libs $(SBIN_PROGS) $(BIN_PROGS) \
1539         $(MODULES) $(NSS_MODULES) $(PAM_MODULES) \
1540         $(EXTRA_ALL_TARGETS)
1541
1542 basics:: samba3-idl
1543
1544 nss_modules:: $(NSS_MODULES)
1545
1546 pam_modules:: $(PAM_MODULES)
1547
1548 pam_smbpass: SHOWFLAGS bin/pam_smbpass.@SHLIBEXT@
1549
1550 pam_winbind: SHOWFLAGS bin/pam_winbind.@SHLIBEXT@
1551
1552 gpext_modules:: $(GPEXT_MODULES)
1553
1554 torture:: SHOWFLAGS basics $(TORTURE_PROGS) @SMBTORTURE4@
1555
1556 smbtorture : SHOWFLAGS bin/smbtorture@EXEEXT@
1557
1558 masktest : SHOWFLAGS bin/masktest@EXEEXT@
1559
1560 msgtest : SHOWFLAGS bin/msgtest@EXEEXT@
1561
1562 locktest : SHOWFLAGS bin/locktest@EXEEXT@
1563
1564 smbcacls : SHOWFLAGS bin/smbcacls@EXEEXT@
1565
1566 smbcquotas : SHOWFLAGS bin/smbcquotas@EXEEXT@
1567
1568 locktest2 : SHOWFLAGS bin/locktest2@EXEEXT@
1569
1570 debug2html : SHOWFLAGS bin/debug2html@EXEEXT@
1571
1572 smbfilter : SHOWFLAGS bin/smbfilter@EXEEXT@
1573
1574 eventlogadm: SHOWFLAGS bin/eventlogadm@EXEEXT@
1575
1576 sharesec: SHOWFLAGS bin/sharesec@EXEEXT@
1577
1578 talloctort : SHOWFLAGS $(TALLOCTORT)
1579
1580 replacetort : SHOWFLAGS bin/replacetort@EXEEXT@
1581
1582 smbconftort : SHOWFLAGS bin/smbconftort@EXEEXT@
1583
1584 pthreadpooltest : SHOWFLAGS bin/pthreadpooltest@EXEEXT@
1585
1586 timelimit : SHOWFLAGS bin/timelimit@EXEEXT@
1587
1588 nsswitch : SHOWFLAGS bin/winbindd@EXEEXT@ bin/wbinfo@EXEEXT@ @WINBIND_NSS@ \
1589         @WINBIND_WINS_NSS@ @WINBIND_KRB5_LOCATOR@ \
1590         bin/pam_winbind.@SHLIBEXT@ bin/smbcontrol@EXEEXT@
1591
1592 wins : SHOWFLAGS @WINBIND_WINS_NSS@
1593
1594 modules:: SHOWFLAGS $(MODULES)
1595
1596
1597 #####################################################################
1598 ## Perl IDL Compiler
1599
1600 IDL_FILES = librpc/idl/messaging.idl \
1601             librpc/idl/libnetapi.idl \
1602             librpc/idl/notify.idl \
1603             librpc/idl/wbint.idl \
1604             librpc/idl/perfcount.idl \
1605             librpc/idl/secrets.idl \
1606             librpc/idl/libnet_join.idl \
1607             librpc/idl/server_id.idl
1608
1609 samba3-idl::
1610         @PIDL_OUTPUTDIR="librpc/gen_ndr" PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \
1611          srcdir="$(srcdir)" ../librpc/build_idl.sh ../librpc/idl/*.idl
1612         @PIDL_OUTPUTDIR="librpc/gen_ndr" PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \
1613          srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh $(IDL_FILES)
1614
1615 idl_full::
1616         @PIDL_OUTPUTDIR="librpc/gen_ndr" PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \
1617          srcdir="$(srcdir)" ../librpc/build_idl.sh --full ../librpc/idl/*.idl
1618         @PIDL_OUTPUTDIR="librpc/gen_ndr" PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \
1619          srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh --full $(IDL_FILES)
1620
1621 #####################################################################
1622
1623
1624 everything:: all libtalloc libsmbclient libnetapi debug2html smbfilter talloctort replacetort smbconftort modules torture \
1625         $(EVERYTHING_PROGS)
1626
1627 .SUFFIXES:
1628 .SUFFIXES: .c .o .lo
1629
1630 .PHONY: showflags SHOWFLAGS
1631
1632 showflags: SHOWFLAGS
1633
1634 SHOWFLAGS::
1635         @echo "Using CFLAGS     = $(CFLAGS)"
1636         @echo "      PICFLAG    = $(PICFLAG)"
1637         @echo "      LIBS       = $(LIBS)"
1638         @echo "      LDFLAGS    = $(LDFLAGS)"
1639         @echo "      DYNEXP     = $(DYNEXP)"
1640         @echo "      LDSHFLAGS  = $(LDSHFLAGS)"
1641         @echo "      SHLIBEXT   = @SHLIBEXT@"
1642         @echo "      SONAMEFLAG = @SONAMEFLAG@"
1643
1644 # "showcflags" target for debuggin how CFLAGS are composed:
1645
1646 .PHONY: showcflags SHOWCFLAGS
1647
1648 showcflags: SHOWCFLAGS
1649
1650 SHOWCFLAGS::
1651         @echo "CFLAGS         = $(CFLAGS)"
1652         @echo "FLAGS          = $(FLAGS)"
1653         @echo ""
1654         @echo "FLAGS1         = @FLAGS1@"
1655         @echo "SAMBA_CPPFLAGS = @SAMBA_CPPFLAGS@"
1656         @echo "CPPFLAGS       = $(CPPFLAGS)"
1657         @echo "ISA            = $(ISA)"
1658
1659 MAKEDIR = || exec false; \
1660           if test -d "$$dir"; then :; else \
1661           echo mkdir "$$dir"; \
1662           mkdir -p "$$dir" >/dev/null 2>&1 || \
1663           test -d "$$dir" || \
1664           mkdir "$$dir" || \
1665           exec false; fi || exec false
1666
1667 # Run a static checker.
1668 CHECK_CC = $(CC_CHECKER) $(CFLAGS) $(PICFLAG) -c $< -o $@
1669 # Compile a source file.
1670 COMPILE_CC = $(CC) $(CFLAGS) $(PICFLAG) -c $< -o $@
1671 # Compile a source file with the installation paths defined.
1672 COMPILE_CC_PATH = $(CC) $(PATH_FLAGS) $(CFLAGS) $(PICFLAG) -c $< -o $@
1673
1674 COMPILE = $(COMPILE_CC)
1675
1676 .c.o:
1677         @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
1678          dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
1679         @if test -n "$(CC_CHECKER)"; then \
1680           echo "Checking  $*.c with '$(CC_CHECKER)'";\
1681           $(CHECK_CC); \
1682          fi
1683         @echo Compiling $*.c
1684         @$(COMPILE) && exit 0;\
1685                 echo "The following command failed:" 1>&2;\
1686                 echo "$(subst ",\",$(COMPILE_CC))" 1>&2;\
1687                 $(COMPILE_CC) >/dev/null 2>&1
1688 @BROKEN_CC@     -mv `echo $@ | sed 's%^.*/%%g'` $@
1689
1690 PRECOMPILED_HEADER = $(builddir)/include/includes.h.gch
1691
1692 # this adds support for precompiled headers. To use it, install a snapshot
1693 # of gcc-3.4 and run 'make pch' before you do the main build.
1694 pch::
1695         rm -f $(PRECOMPILED_HEADER)
1696         $(MAKE) $(PRECOMPILED_HEADER)
1697
1698 $(PRECOMPILED_HEADER): $(srcdir)/include/includes.h
1699         $(COMPILE)
1700
1701 BINARY_PREREQS = bin/.dummy
1702
1703 # These dependencies are only approximately correct: we want to make
1704 # sure Samba's paths are updated if ./configure is re-run.  Really it
1705 # would be nice if "make prefix=/opt/samba all" also rebuilt things,
1706 # but since we also require "make install prefix=/opt/samba" *not* to
1707 # rebuild it's a bit hard.
1708
1709 ../dynconfig/dynconfig.o: ../dynconfig/dynconfig.c Makefile
1710         @echo Compiling $*.c
1711         @$(COMPILE_CC_PATH) && exit 0;\
1712                 echo "The following command failed:" 1>&2;\
1713                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1714                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1715
1716 ../nsswitch/pam_winbind.o: ../nsswitch/pam_winbind.c Makefile
1717         @echo Compiling $*.c
1718         @$(COMPILE_CC_PATH) && exit 0;\
1719                 echo "The following command failed:" 1>&2;\
1720                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1721                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1722
1723 ### Start section of object files that require PTHREAD_CFLAGS
1724 ../nsswitch/wins.o: ../nsswitch/wins.c
1725         @echo Compiling $*.c
1726         @$(COMPILE) $(PTHREAD_CFLAGS) && exit 0;\
1727                 echo "The following command failed:" 1>&2;\
1728                 echo "$(COMPILE_CC) $(PTHREAD_CFLAGS)" 1>&2;\
1729                 $(COMPILE_CC) $(PTHREAD_CFLAGS) >/dev/null 2>&1
1730
1731 ../nsswitch/winbind_nss_linux.o: ../nsswitch/winbind_nss_linux.c
1732         @echo Compiling $*.c
1733         @$(COMPILE_CC) $(PTHREAD_CFLAGS) && exit 0;\
1734                 echo "The following command failed:" 1>&2;\
1735                 echo "$(COMPILE_CC) $(PTHREAD_CFLAGS)" 1>&2;\
1736                 $(COMPILE_CC) $(PTHREAD_CFLAGS) >/dev/null 2>&1
1737
1738 libsmb/libsmb_thread_impl.o: libsmb/libsmb_thread_impl.c
1739         @echo Compiling $*.c
1740         @$(COMPILE) $(PTHREAD_CFLAGS) && exit 0;\
1741                 echo "The following command failed:" 1>&2;\
1742                 echo "$(COMPILE_CC) $(PTHREAD_CFLAGS)" 1>&2;\
1743                 $(COMPILE_CC) $(PTHREAD_CFLAGS) >/dev/null 2>&1
1744
1745 libsmb/libsmb_thread_posix.o: libsmb/libsmb_thread_posix.c
1746         @echo Compiling $*.c
1747         @$(COMPILE) $(PTHREAD_CFLAGS) && exit 0;\
1748                 echo "The following command failed:" 1>&2;\
1749                 echo "$(COMPILE_CC) $(PTHREAD_CFLAGS)" 1>&2;\
1750                 $(COMPILE_CC) $(PTHREAD_CFLAGS) >/dev/null 2>&1
1751 ### End section of object files that require PTHREAD_CFLAGS
1752
1753 lib/pidfile.o: lib/pidfile.c
1754         @echo Compiling $*.c
1755         @$(COMPILE_CC_PATH) && exit 0;\
1756                 echo "The following command failed:" 1>&2;\
1757                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1758                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1759
1760 lib/version.o: lib/version.c include/version.h
1761         @echo Compiling $*.c
1762         @$(COMPILE_CC_PATH) && exit 0;\
1763                 echo "The following command failed:" 1>&2;\
1764                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1765                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1766
1767 smbd/build_options.o: smbd/build_options.c Makefile include/config.h include/build_env.h include/proto.h
1768         @echo Compiling $*.c
1769         @$(COMPILE_CC_PATH) && exit 0;\
1770                 echo "The following command failed:" 1>&2;\
1771                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1772                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1773
1774 smbd/build_options.c: include/config.h.in script/mkbuildoptions.awk
1775         @echo Generating $@
1776         @dir=smbd $(MAKEDIR) && $(AWK) -f $(srcdir)/script/mkbuildoptions.awk > $(builddir)/smbd/build_options.c < $(srcdir)/include/config.h.in
1777
1778 bin/.dummy:
1779         @if (: >> $@ || : > $@) >/dev/null 2>&1; then :; else \
1780           dir=bin $(MAKEDIR); fi
1781         @: >> $@ || : > $@ # what a fancy emoticon!
1782
1783 bin/smbd@EXEEXT@: $(BINARY_PREREQS) $(SMBD_OBJ) $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) @BUILD_POPT@
1784         @echo Linking $@
1785         @$(CC) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LDAP_LIBS) @SMBD_FAM_LIBS@ \
1786                 $(KRB5LIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \
1787                 $(ACL_LIBS) $(PASSDB_LIBS) $(LIBS) $(DNSSD_LIBS) $(AVAHI_LIBS) \
1788                 $(POPT_LIBS) @SMBD_LIBS@ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
1789                 $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1790
1791 bin/nmbd@EXEEXT@: $(BINARY_PREREQS) $(NMBD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1792         @echo Linking $@
1793         @$(CC) -o $@ $(NMBD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1794                 @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \
1795                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(POPT_LIBS) \
1796                 $(KRB5LIBS) $(LDAP_LIBS) $(ZLIB_LIBS)
1797
1798 bin/swat@EXEEXT@: $(BINARY_PREREQS) $(SWAT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1799         @echo Linking $@
1800         @$(CC) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(DYNEXP) $(PRINT_LIBS) \
1801           $(AUTH_LIBS) $(LIBS) $(PASSDB_LIBS) $(POPT_LIBS) $(KRB5LIBS) \
1802           $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1803
1804 bin/rpcclient@EXEEXT@: $(BINARY_PREREQS) $(RPCCLIENT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1805         @echo Linking $@
1806         @$(CC) -o $@ $(LDFLAGS) $(RPCCLIENT_OBJ) \
1807                 $(DYNEXP) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
1808                 $(KRB5LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
1809                 $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) $(PASSDB_LIBS)
1810
1811 bin/smbclient@EXEEXT@: $(BINARY_PREREQS) $(CLIENT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1812         @echo Linking $@
1813         @$(CC) -o $@ $(CLIENT_OBJ) $(LDFLAGS) $(DYNEXP) \
1814                 $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
1815                 $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(DNSSD_LIBS) \
1816                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1817
1818 bin/net@EXEEXT@: $(BINARY_PREREQS) $(NET_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) $(LIBNETAPI)
1819         @echo Linking $@
1820         @$(CC) -o $@ $(NET_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
1821                 $(POPT_LIBS) $(KRB5LIBS) $(UUID_LIBS) $(LDAP_LIBS) \
1822                 $(PASSDB_LIBS) $(TERMLDFLAGS) $(TERMLIBS) $(NSCD_LIBS) \
1823                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(LIBNETAPI_LIBS) \
1824                 $(ZLIB_LIBS)
1825
1826 bin/profiles@EXEEXT@: $(BINARY_PREREQS) $(PROFILES_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1827         @echo Linking $@
1828         @$(CC) -o $@ $(PROFILES_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
1829                 $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1830
1831 bin/smbspool@EXEEXT@: $(BINARY_PREREQS) $(CUPS_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1832         @echo Linking $@
1833         @$(CC) -o $@ $(CUPS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
1834                 @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \
1835                 $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
1836
1837 bin/testparm@EXEEXT@: $(BINARY_PREREQS) $(TESTPARM_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1838         @echo Linking $@
1839         @$(CC) -o $@ $(TESTPARM_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1840                 $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1841
1842 bin/smbta-util@EXEEXT@: $(BINARY_PREREQS) $(SMBTA_UTIL_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1843         @echo Linking $@
1844         @$(CC) -o $@ $(SMBTA_UTIL_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1845                 $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1846
1847 bin/smbstatus@EXEEXT@: $(BINARY_PREREQS) $(STATUS_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1848         @echo Linking $@
1849         @$(CC) -o $@ $(STATUS_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1850                 $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1851
1852 bin/smbcontrol@EXEEXT@: $(BINARY_PREREQS) $(SMBCONTROL_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1853         @echo Linking $@
1854         @$(CC) -DUSING_SMBCONTROL -o $@ \
1855                 $(SMBCONTROL_OBJ) $(DYNEXP) $(LDFLAGS) \
1856                 $(LIBS) $(LDAP_LIBS) @LIBUNWIND_PTRACE@ $(POPT_LIBS) \
1857                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1858
1859 bin/smbtree@EXEEXT@: $(BINARY_PREREQS) $(SMBTREE_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1860         @echo Linking $@
1861         @$(CC) -o $@ $(SMBTREE_OBJ) $(LDFLAGS) $(DYNEXP) \
1862                 $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1863                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1864
1865 bin/smbpasswd@EXEEXT@: $(BINARY_PREREQS) $(SMBPASSWD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1866         @echo Linking $@
1867         @$(CC) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(PASSDB_LIBS) \
1868                 $(DYNEXP) $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
1869                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1870
1871 bin/pdbedit@EXEEXT@: $(BINARY_PREREQS) $(PDBEDIT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1872         @echo Linking $@
1873         @$(CC) -o $@ $(PDBEDIT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1874                 $(POPT_LIBS) $(PASSDB_LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) \
1875                 $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS)
1876
1877 bin/smbget@EXEEXT@: $(BINARY_PREREQS) $(SMBGET_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1878         @echo Linking $@
1879         @$(CC) -o $@ $(SMBGET_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1880                 $(POPT_LIBS)  $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1881                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1882
1883 bin/nmblookup@EXEEXT@: $(BINARY_PREREQS) $(NMBLOOKUP_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1884         @echo Linking $@
1885         @$(CC) -o $@ $(NMBLOOKUP_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1886                 $(POPT_LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1887
1888 bin/smbtorture@EXEEXT@: $(BINARY_PREREQS) $(SMBTORTURE_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1889         @echo Linking $@
1890         @$(CC) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(DYNEXP) \
1891                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) \
1892                 $(LIBTDB_LIBS) $(ZLIB_LIBS) $(LIBWBCLIENT_LIBS)
1893
1894 bin/talloctort@EXEEXT@: $(BINARY_PREREQS) $(TALLOCTORT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1895         @echo Linking $@
1896         @$(CC) -o $@ $(TALLOCTORT_OBJ) $(LDFLAGS) \
1897                 $(DYNEXP) $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1898                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1899
1900 bin/replacetort@EXEEXT@: $(REPLACETORT_OBJ) @BUILD_POPT@ $(LIBTALLOC)
1901         @echo Linking $@
1902         @$(CC) -o $@ $(REPLACETORT_OBJ) $(LDFLAGS) \
1903                 $(DYNEXP) $(LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS)
1904
1905 bin/smbconftort@EXEEXT@: $(SMBCONFTORT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1906         @echo Linking $@
1907         @$(CC) -o $@ $(SMBCONFTORT_OBJ) $(LDFLAGS) \
1908                 $(DYNEXP) $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1909                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1910
1911 bin/pthreadpooltest@EXEEXT@: $(PTHREADPOOLTEST_OBJ)
1912         @echo Linking $@
1913         @$(CC) -o $@ $(PTHREADPOOLTEST_OBJ) $(LDFLAGS) -lpthread
1914
1915 bin/masktest@EXEEXT@: $(BINARY_PREREQS) $(MASKTEST_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1916         @echo Linking $@
1917         @$(CC) -o $@ $(MASKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
1918                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1919                 @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \
1920                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
1921
1922 bin/msgtest@EXEEXT@: $(BINARY_PREREQS) $(MSGTEST_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1923         @echo Linking $@
1924         @$(CC) -o $@ $(MSGTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
1925                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1926                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
1927
1928 bin/smbcacls@EXEEXT@: $(BINARY_PREREQS) $(SMBCACLS_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1929         @echo Linking $@
1930         @$(CC) -o $@ $(SMBCACLS_OBJ) $(DYNEXP) $(LDFLAGS) \
1931                 $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1932                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1933
1934 bin/smbcquotas@EXEEXT@: $(BINARY_PREREQS) $(SMBCQUOTAS_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1935         @echo Linking $@
1936         @$(CC) -o $@ $(SMBCQUOTAS_OBJ) $(DYNEXP) $(LDFLAGS) \
1937                 $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1938                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1939
1940 bin/eventlogadm@EXEEXT@: $(BINARY_PREREQS) $(EVTLOGADM_OBJ) $(LIBTALLOC) $(LIBTDB)
1941         @echo Linking $@
1942         @$(CC) -o $@ $(EVTLOGADM_OBJ) $(DYNEXP) $(LDFLAGS) \
1943                 $(LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1944
1945 bin/sharesec@EXEEXT@: $(BINARY_PREREQS) $(SHARESEC_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1946         @echo Linking $@
1947         @$(CC) -o $@ $(SHARESEC_OBJ) $(DYNEXP) $(LDFLAGS) \
1948                 $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1949
1950 bin/locktest@EXEEXT@: $(BINARY_PREREQS) $(LOCKTEST_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1951         @echo Linking $@
1952         @$(CC) -o $@ $(LOCKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
1953                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1954                 @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \
1955                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
1956
1957 bin/nsstest@EXEEXT@: $(BINARY_PREREQS) $(NSSTEST_OBJ)
1958         @echo Linking $@
1959         @$(CC) -o $@ $(NSSTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS)
1960
1961 bin/pdbtest@EXEEXT@: $(BINARY_PREREQS) $(PDBTEST_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1962         @echo Linking $@
1963         @$(CC) -o $@ $(PDBTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
1964                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(PASSDB_LIBS) \
1965                 $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1966
1967 bin/vfstest@EXEEXT@: $(BINARY_PREREQS) $(VFSTEST_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1968         @echo Linking $@
1969         @$(CC) -o $@ $(VFSTEST_OBJ) $(LDFLAGS) $(TERMLDFLAGS) $(AVAHI_LIBS) \
1970                 $(TERMLIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) $(DNSSD_LIBS) \
1971                 $(ACL_LIBS) $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
1972                 @SMBD_LIBS@ $(NSCD_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
1973                 $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1974
1975 bin/smbiconv@EXEEXT@: $(BINARY_PREREQS) $(SMBICONV_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1976         @echo Linking $@
1977         @$(CC) -o $@ $(SMBICONV_OBJ) $(LDFLAGS) $(TERMLDFLAGS) \
1978                 $(TERMLIBS) $(DYNEXP) $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1979                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1980
1981 bin/log2pcap@EXEEXT@: $(BINARY_PREREQS) $(LOG2PCAP_OBJ) @BUILD_POPT@ $(LIBTALLOC)
1982         @echo Linking $@
1983         @$(CC) -o $@ $(LOG2PCAP_OBJ) $(LDFLAGS) $(DYNEXP) \
1984                 $(POPT_LIBS) $(LIBS) $(LIBTALLOC_LIBS)
1985
1986 bin/locktest2@EXEEXT@: $(BINARY_PREREQS) $(LOCKTEST2_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1987         @echo Linking $@
1988         @$(CC) -o $@ $(LOCKTEST2_OBJ) $(LDFLAGS) $(DYNEXP) \
1989                 @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \
1990                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1991                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
1992
1993 bin/debug2html@EXEEXT@: $(BINARY_PREREQS) $(DEBUG2HTML_OBJ) @BUILD_POPT@ $(LIBTALLOC)
1994         @echo Linking $@
1995         @$(CC) -o $@ $(DEBUG2HTML_OBJ) $(LDFLAGS) $(DYNEXP) \
1996                 $(LIBS) $(LIBTALLOC_LIBS)
1997
1998 bin/smbfilter@EXEEXT@: $(BINARY_PREREQS) $(SMBFILTER_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1999         @echo Linking $@
2000         @$(CC) -o $@ $(SMBFILTER_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
2001                 $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
2002                 @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \
2003                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
2004
2005 bin/versiontest: $(BINARY_PREREQS) lib/version_test.o $(VERSION_OBJ)
2006         @echo Linking $@
2007         @$(CC) $(FLAGS) -o $@ $(VERSION_OBJ) lib/version_test.o
2008
2009
2010 #####################################################################
2011 #
2012 # libraries
2013 #
2014 #####################################################################
2015
2016 MKSYMS_SH = $(srcdir)/script/mksyms.sh
2017
2018
2019 #-------------------------------------------------------------------
2020 #
2021 # libtalloc
2022 #
2023 #-------------------------------------------------------------------
2024
2025
2026 LIBTALLOC_OBJ0 = @LIBTALLOC_OBJ0@
2027 LIBTALLOC_OBJ = $(LIBTALLOC_OBJ0) $(LIBREPLACE_OBJ)
2028
2029 LIBTALLOC_SHARED_TARGET=@LIBTALLOC_SHARED_TARGET@
2030 LIBTALLOC_SOVER=@LIBTALLOC_SOVER@
2031 LIBTALLOC_SHARED_TARGET_SONAME=$(LIBTALLOC_SHARED_TARGET).$(LIBTALLOC_SOVER)
2032 LIBTALLOC_STATIC_TARGET=@LIBTALLOC_STATIC_TARGET@
2033 LIBTALLOC_SYMS=$(srcdir)/exports/libtalloc.@SYMSEXT@
2034 LIBTALLOC_HEADERS=$(srcdir)/@tallocdir@/talloc.h
2035
2036 $(LIBTALLOC_SYMS): $(LIBTALLOC_HEADERS)
2037         @$(MKSYMS_SH) $(AWK) $@ $(LIBTALLOC_HEADERS)
2038
2039 $(LIBTALLOC_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBTALLOC_OBJ) $(LIBTALLOC_SYMS)
2040         @echo Linking shared library $@
2041         @$(SHLD_DSO) $(LIBTALLOC_OBJ) $(LIBREPLACE_LIBS) @SONAMEFLAG@`basename $@`
2042
2043 $(LIBTALLOC_SHARED_TARGET): $(LIBTALLOC_SHARED_TARGET_SONAME)
2044         @rm -f $@
2045         @ln -f -s `basename $(LIBTALLOC_SHARED_TARGET_SONAME)` $@
2046
2047 $(LIBTALLOC_STATIC_TARGET): $(BINARY_PREREQS) $(LIBTALLOC_OBJ0)
2048         @echo Linking non-shared library $@
2049         @-$(AR) -rc $@ $(LIBTALLOC_OBJ0)
2050 libtalloc: $(LIBTALLOC)
2051
2052 cleanlibtalloc::
2053         -rm -f \
2054                 $(LIBTALLOC_SYMS) \
2055                 $(LIBTALLOC_STATIC_TARGET) \
2056                 $(LIBTALLOC_SHARED_TARGET) \
2057                 $(LIBTALLOC_SHARED_TARGET_SONAME)
2058
2059 installlibtalloc:: installdirs libtalloc
2060         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2061         -$(INSTALLLIBCMD_SH) $(LIBTALLOC_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
2062         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBTALLOC_SHARED_TARGET)`
2063         -if test -r $(LIBTALLOC_SHARED_TARGET_SONAME) ; then \
2064                 ln -f -s `basename $(LIBTALLOC_SHARED_TARGET_SONAME)` \
2065                         $(DESTDIR)$(LIBDIR)/`basename $(LIBTALLOC_SHARED_TARGET)` ; \
2066         fi
2067         -$(INSTALLLIBCMD_A) $(LIBTALLOC_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
2068         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2069         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBTALLOC_HEADERS) $(DESTDIR)${prefix}/include
2070
2071 uninstalllibtalloc::
2072         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBTALLOC_SHARED_TARGET)`
2073         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBTALLOC_SHARED_TARGET_SONAME)`
2074         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBTALLOC_STATIC_TARGET)`
2075         -rm -f $(DESTDIR)${prefix}/include/talloc.h
2076
2077 libs:: libtalloc
2078 installlibs:: @INSTALL_LIBTALLOC@
2079 uninstalllibs:: @UNINSTALL_LIBTALLOC@
2080 cleanlibs:: cleanlibtalloc
2081 shlibs test_shlibs: @LIBTALLOC_SHARED@
2082
2083 showlibtalloc:
2084         @echo  ""
2085         @echo "LIBTALLOC_SHARED               = @LIBTALLOC_SHARED@"
2086         @echo "LIBTALLOC_STATIC               = @LIBTALLOC_STATIC@"
2087         @echo "LIBTALLOC_LIBS                 = $(LIBTALLOC_LIBS)"
2088         @echo ""
2089         @echo "LIBTALLOC_SHARED_TARGET        = $(LIBTALLOC_SHARED_TARGET)"
2090         @echo "LIBTALLOC_SOVER                = $(LIBTALLOC_SOVER)"
2091         @echo "LIBTALLOC_SHARED TARGET_SONAME = $(LIBTALLOC_SHARED_TARGET_SONAME)"
2092         @echo "LIBTALLOC_STATIC_TARGET        = $(LIBTALLOC_STATIC_TARGET)"
2093         @echo "LIBTALLOC                      = $(LIBTALLOC)"
2094
2095 showlibs:: showlibtalloc
2096
2097 #-------------------------------------------------------------------
2098 #
2099 # libtdb
2100 #
2101 #-------------------------------------------------------------------
2102
2103 LIBTDB_OBJ0 = @LIBTDB_OBJ0@
2104 LIBTDB_OBJ = $(LIBTDB_OBJ0) $(LIBREPLACE_OBJ)
2105
2106 LIBTDB_SHARED_TARGET=@LIBTDB_SHARED_TARGET@
2107 LIBTDB_SOVER=@LIBTDB_SOVER@
2108 LIBTDB_SHARED_TARGET_SONAME=$(LIBTDB_SHARED_TARGET).$(LIBTDB_SOVER)
2109 LIBTDB_STATIC_TARGET=@LIBTDB_STATIC_TARGET@
2110 LIBTDB_SYMS=$(srcdir)/exports/libtdb.@SYMSEXT@
2111 LIBTDB_HEADERS=$(srcdir)/@tdbdir@/include/tdb.h
2112
2113 $(LIBTDB_SYMS): $(LIBTDB_HEADERS)
2114         @$(MKSYMS_SH) $(AWK) $@ $(LIBTDB_HEADERS)
2115
2116 $(LIBTDB_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBTDB_OBJ) $(LIBTDB_SYMS)
2117         @echo Linking shared library $@
2118         @$(SHLD_DSO) $(LIBTDB_OBJ) $(LIBREPLACE_LIBS) $(TDB_DEPS) \
2119                 @SONAMEFLAG@`basename $@`
2120
2121 $(LIBTDB_SHARED_TARGET): $(LIBTDB_SHARED_TARGET_SONAME)
2122         @rm -f $@
2123         @ln -f -s `basename $(LIBTDB_SHARED_TARGET_SONAME)` $@
2124
2125 $(LIBTDB_STATIC_TARGET): $(BINARY_PREREQS) $(LIBTDB_OBJ0)
2126         @echo Linking non-shared library $@
2127         @-$(AR) -rc $@ $(LIBTDB_OBJ0)
2128
2129 libtdb: $(LIBTDB)
2130
2131 cleanlibtdb::
2132         -rm -f \
2133                 $(LIBTDB_SYMS) \
2134                 $(LIBTDB_STATIC_TARGET) \
2135                 $(LIBTDB_SHARED_TARGET) \
2136                 $(LIBTDB_SHARED_TARGET_SONAME)
2137
2138
2139 installlibtdb:: installdirs libtdb
2140         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2141         -$(INSTALLLIBCMD_SH) $(LIBTDB_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
2142         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBTDB_SHARED_TARGET)`
2143         -if test -r $(LIBTDB_SHARED_TARGET_SONAME) ; then \
2144                 ln -f -s `basename $(LIBTDB_SHARED_TARGET_SONAME)` \
2145                         $(DESTDIR)$(LIBDIR)/`basename $(LIBTDB_SHARED_TARGET)` ; \
2146         fi
2147         -$(INSTALLLIBCMD_A) $(LIBTDB_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
2148         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2149         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBTDB_HEADERS) $(DESTDIR)${prefix}/include
2150
2151 uninstalllibtdb::
2152         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBTDB_SHARED_TARGET)`
2153         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBTDB_SHARED_TARGET_SONAME)`
2154         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBTDB_STATIC_TARGET)`
2155         -rm -f $(DESTDIR)${prefix}/include/tdb.h
2156
2157 libs:: libtdb
2158 installlibs:: @INSTALL_LIBTDB@
2159 uninstalllibs:: @UNINSTALL_LIBTDB@
2160 cleanlibs:: cleanlibtdb
2161 shlibs test_shlibs: @LIBTDB_SHARED@
2162
2163 showlibtdb:
2164         @echo  ""
2165         @echo "LIBTDB_SHARED               = @LIBTDB_SHARED@"
2166         @echo "LIBTDB_STATIC               = @LIBTDB_STATIC@"
2167         @echo "LIBTDB_LIBS                 = $(LIBTDB_LIBS)"
2168         @echo ""
2169         @echo "LIBTDB_SHARED_TARGET        = $(LIBTDB_SHARED_TARGET)"
2170         @echo "LIBTDB_SOVER                = $(LIBTDB_SOVER)"
2171         @echo "LIBTDB_SHARED TARGET_SONAME = $(LIBTDB_SHARED_TARGET_SONAME)"
2172         @echo "LIBTDB_STATIC_TARGET        = $(LIBTDB_STATIC_TARGET)"
2173         @echo "LIBTDB                      = $(LIBTDB)"
2174
2175 showlibs:: showlibtdb
2176
2177 #-------------------------------------------------------------------
2178 #
2179 # libwbclient
2180 #
2181 #-------------------------------------------------------------------
2182
2183 LIBWBCLIENT_OBJ0 = ../nsswitch/libwbclient/wbclient.o \
2184                   ../nsswitch/libwbclient/wbc_util.o \
2185                   ../nsswitch/libwbclient/wbc_pwd.o \
2186                   ../nsswitch/libwbclient/wbc_idmap.o \
2187                   ../nsswitch/libwbclient/wbc_sid.o \
2188                   ../nsswitch/libwbclient/wbc_guid.o \
2189                   ../nsswitch/libwbclient/wbc_pam.o
2190
2191 LIBWBCLIENT_OBJ = $(LIBWBCLIENT_OBJ0) \
2192                   $(WBCOMMON_OBJ) \
2193                   $(LIBREPLACE_OBJ) \
2194                   ../lib/util/blocking.o \
2195                   $(SOCKET_WRAPPER_OBJ)
2196
2197 LIBWBCLIENT_SHARED_TARGET=@LIBWBCLIENT_SHARED_TARGET@
2198 LIBWBCLIENT_SOVER=@LIBWBCLIENT_SOVER@
2199 LIBWBCLIENT_SHARED_TARGET_SONAME=$(LIBWBCLIENT_SHARED_TARGET).$(LIBWBCLIENT_SOVER)
2200 LIBWBCLIENT_STATIC_TARGET=@LIBWBCLIENT_STATIC_TARGET@
2201 LIBWBCLIENT_SYMS=$(srcdir)/exports/libwbclient.@SYMSEXT@
2202 LIBWBCLIENT_HEADERS=$(srcdir)/../nsswitch/libwbclient/wbclient.h
2203
2204 $(LIBWBCLIENT_SYMS): $(LIBWBCLIENT_HEADERS)
2205         @$(MKSYMS_SH) $(AWK) $@ $(LIBWBCLIENT_HEADERS)
2206
2207 $(LIBWBCLIENT_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ) $(LIBWBCLIENT_SYMS)
2208         @echo Linking shared library $@
2209         @$(SHLD_DSO) $(LIBWBCLIENT_OBJ) $(LIBREPLACE_LIBS) \
2210                 @SONAMEFLAG@`basename $@`
2211
2212 $(LIBWBCLIENT_SHARED_TARGET): $(LIBWBCLIENT_SHARED_TARGET_SONAME)
2213         @rm -f $@
2214         @ln -f -s `basename $(LIBWBCLIENT_SHARED_TARGET_SONAME)` $@
2215
2216 $(LIBWBCLIENT_STATIC_TARGET): $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ0) $(WBCOMMON_OBJ)
2217         @echo Linking non-shared library $@
2218         @-$(AR) -rc $@ $(LIBWBCLIENT_OBJ0) $(WBCOMMON_OBJ)
2219
2220 libwbclient: $(LIBWBCLIENT)
2221
2222 cleanlibwbclient::
2223         -rm -f \
2224                 $(LIBWBCLIENT_SYMS) \
2225                 $(LIBWBCLIENT_STATIC_TARGET) \
2226                 $(LIBWBCLIENT_SHARED_TARGET) \
2227                 $(LIBWBCLIENT_SHARED_TARGET_SONAME)
2228
2229 installlibwbclient:: installdirs libwbclient
2230         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2231         -$(INSTALLLIBCMD_SH) $(LIBWBCLIENT_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
2232         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET)`
2233         -if test -r $(LIBWBCLIENT_SHARED_TARGET_SONAME) ; then \
2234                 ln -f -s `basename $(LIBWBCLIENT_SHARED_TARGET_SONAME)` \
2235                         $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET)` ; \
2236         fi
2237         -$(INSTALLLIBCMD_A) bin/libwbclient.a $(DESTDIR)$(LIBDIR)
2238         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2239         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBWBCLIENT_HEADERS) $(DESTDIR)${prefix}/include
2240
2241 uninstalllibwbclient::
2242         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET)`
2243         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET_SONAME)`
2244         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_STATIC_TARGET)`
2245         -rm -f $(DESTDIR)${prefix}/include/wbclient.h
2246
2247 libs:: libwbclient
2248 installlibs:: @INSTALL_LIBWBCLIENT@
2249 uninstalllibs:: uninstalllibwbclient
2250 cleanlibs:: cleanlibwbclient
2251 shlibs test_shlibs: @LIBWBCLIENT_SHARED@
2252
2253 showlibwbclient:
2254         @echo  ""
2255         @echo "LIBWBCLIENT_SHARED               = @LIBWBCLIENT_SHARED@"
2256         @echo "LIBWBCLIENT_STATIC               = @LIBWBCLIENT_STATIC@"
2257         @echo "LIBWBCLIENT_LIBS                 = $(LIBWBCLIENT_LIBS)"
2258         @echo ""
2259         @echo "LIBWBCLIENT_SHARED_TARGET        = $(LIBWBCLIENT_SHARED_TARGET)"
2260         @echo "LIBWBCLIENT_SOVER                = $(LIBWBCLIENT_SOVER)"
2261         @echo "LIBWBCLIENT_SHARED TARGET_SONAME = $(LIBWBCLIENT_SHARED_TARGET_SONAME)"
2262         @echo "LIBWBCLIENT_STATIC_TARGET        = $(LIBWBCLIENT_STATIC_TARGET)"
2263         @echo "LIBWBCLIENT                      = $(LIBWBCLIENT)"
2264
2265 showlibs:: showlibwbclient
2266
2267
2268 #-------------------------------------------------------------------
2269 #
2270 # libaddns
2271 #
2272 #-------------------------------------------------------------------
2273
2274
2275 LIBADDNS_SHARED_TARGET=@LIBADDNS_SHARED_TARGET@
2276 LIBADDNS_SOVER=@LIBADDNS_SOVER@
2277 LIBADDNS_SHARED_TARGET_SONAME=$(LIBADDNS_SHARED_TARGET).$(LIBADDNS_SOVER)
2278 LIBADDNS_STATIC_TARGET=@LIBADDNS_STATIC_TARGET@
2279 LIBADDNS=@LIBADDNS_STATIC@ @LIBADDNS_SHARED@
2280 #LIBADDNS_SYMS=$(srcdir)/exports/libaddns.@SYMSEXT@
2281 LIBADDNS_HEADERS=$(srcdir)/../lib/addns/addns.h
2282
2283 $(LIBADDNS_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBADDNS_OBJ) $(LIBTALLOC)
2284         @echo Linking shared library $@
2285         @$(SHLD_DSO) $(LIBADDNS_OBJ) $(LIBS) \
2286                 $(KRB5LIBS) $(UUID_LIBS) $(LIBTALLOC_LIBS) \
2287                 @SONAMEFLAG@`basename $@`
2288
2289 $(LIBADDNS_SHARED_TARGET): $(LIBADDNS_SHARED_TARGET_SONAME)
2290         @rm -f $@
2291         @ln -f -s `basename $(LIBADDNS_SHARED_TARGET_SONAME)` $@
2292
2293 $(LIBADDNS_STATIC_TARGET): $(BINARY_PREREQS) $(LIBADDNS_OBJ0)
2294         @echo Linking non-shared library $@
2295         @-$(AR) -rc $@ $(LIBADDNS_OBJ0)
2296
2297 libaddns: $(LIBADDNS)
2298
2299 cleanlibaddns::
2300         -rm -f \
2301                 $(LIBADDNS_SHARED_TARGET) \
2302                 $(LIBADDNS_SHARED_TARGET_SONAME) \
2303                 $(LIBADDNS_STATIC_TARGET)
2304
2305 installlibaddns:: installdirs libaddns
2306         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2307         -$(INSTALLLIBCMD_SH) $(LIBADDNS_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
2308         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_SHARED_TARGET)`
2309         -if test -r $(LIBADDNS_SHARED_TARGET_SONAME) ; then \
2310                 ln -f -s `basename $(LIBADDNS_SHARED_TARGET_SONAME)` \
2311                         $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_SHARED_TARGET)` ; \
2312         fi
2313         -$(INSTALLLIBCMD_A) $(LIBADDNS_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
2314
2315 uninstalllibaddns::
2316         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_SHARED_TARGET_SONAME)`
2317         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_SHARED_TARGET)`
2318         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_STATIC_TARGET)`
2319
2320 libs:: libaddns
2321 installlibs:: @INSTALL_LIBADDNS@
2322 uninstalllibs:: @UNINSTALL_LIBADDNS@
2323 cleanlibs:: cleanlibaddns
2324 shlibs test_shlibs: @LIBADDNS_SHARED@
2325
2326 showlibaddns:
2327         @echo  ""
2328         @echo "LIBADDNS_SHARED               = @LIBADDNS_SHARED@"
2329         @echo "LIBADDNS_STATIC               = @LIBADDNS_STATIC@"
2330         @echo "LIBADDNS_LIBS                 = $(LIBADDNS_LIBS)"
2331         @echo ""
2332         @echo "LIBADDNS_SHARED_TARGET        = $(LIBADDNS_SHARED_TARGET)"
2333         @echo "LIBADDNS_SOVER                = $(LIBADDNS_SOVER)"
2334         @echo "LIBADDNS_SHARED TARGET_SONAME = $(LIBADDNS_SHARED_TARGET_SONAME)"
2335         @echo "LIBADDNS_STATIC_TARGET        = $(LIBADDNS_STATIC_TARGET)"
2336         @echo "LIBADDNS                      = $(LIBADDNS)"
2337
2338 showlibs:: showlibaddns
2339
2340 #-------------------------------------------------------------------
2341 #
2342 # libnetapi
2343 #
2344 #-------------------------------------------------------------------
2345
2346 LIBNETAPI_OBJ0 = lib/netapi/netapi.o \
2347                  lib/netapi/cm.o \
2348                  librpc/gen_ndr/ndr_libnetapi.o \
2349                  lib/netapi/libnetapi.o \
2350                  lib/netapi/joindomain.o \
2351                  lib/netapi/serverinfo.o \
2352                  lib/netapi/getdc.o \
2353                  lib/netapi/user.o \
2354                  lib/netapi/group.o \
2355                  lib/netapi/localgroup.o \
2356                  lib/netapi/samr.o \
2357                  lib/netapi/sid.o \
2358                  lib/netapi/share.o \
2359                  lib/netapi/file.o \
2360                  lib/netapi/shutdown.o \
2361                  lib/netapi/netlogon.o
2362
2363 LIBNETAPI_OBJ  = $(LIBNETAPI_OBJ0) $(LIBNET_OBJ) \
2364                  $(LIBSMBCONF_OBJ) \
2365                  $(REG_SMBCONF_OBJ) \
2366                  $(PARAM_WITHOUT_REG_OBJ) $(LIB_NONSMBD_OBJ) \
2367                  $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
2368                  $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
2369                  $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
2370                  $(DCUTIL_OBJ) $(LIBADS_OBJ) $(PRIVILEGES_BASIC_OBJ) \
2371                  auth/token_util.o \
2372                  $(LIBCLI_INITSHUTDOWN_OBJ) \
2373                  $(LIBCLI_WKSSVC_OBJ) \
2374                  $(LIBCLI_SRVSVC_OBJ) \
2375                  $(LIBCLI_LSA_OBJ) \
2376                  $(LIBCLI_SAMR_OBJ) \
2377                  $(LIBCLI_NETLOGON_OBJ) \
2378                  $(RPC_CLIENT_SCHANNEL_OBJ) \
2379                  rpc_client/init_netlogon.o \
2380                  rpc_client/init_samr.o
2381
2382 LIBNETAPI_SHARED_TARGET=@LIBNETAPI_SHARED_TARGET@
2383 LIBNETAPI_SOVER=@LIBNETAPI_SOVER@
2384 LIBNETAPI_SHARED_TARGET_SONAME=$(LIBNETAPI_SHARED_TARGET).$(LIBNETAPI_SOVER)
2385 LIBNETAPI_STATIC_TARGET=@LIBNETAPI_STATIC_TARGET@
2386 LIBNETAPI_SYMS=$(srcdir)/exports/libnetapi.@SYMSEXT@
2387 LIBNETAPI_HEADERS=$(srcdir)/lib/netapi/netapi.h
2388
2389 $(LIBNETAPI_SYMS): $(LIBNETAPI_HEADERS)
2390         @$(MKSYMS_SH) $(AWK) $@ $(LIBNETAPI_HEADERS)
2391
2392 $(LIBNETAPI_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBNETAPI_OBJ) $(LIBNETAPI_SYMS) $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2393         @echo Linking shared library $@
2394         @$(SHLD_DSO) $(LIBNETAPI_OBJ) \
2395                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(LIBS) \
2396                 $(LDAP_LIBS) $(KRB5LIBS) $(NSCD_LIBS) $(ZLIB_LIBS) \
2397                 @SONAMEFLAG@`basename $@`
2398
2399 $(LIBNETAPI_SHARED_TARGET): $(LIBNETAPI_SHARED_TARGET_SONAME)
2400         @rm -f $@
2401         @ln -f -s `basename $(LIBNETAPI_SHARED_TARGET_SONAME)` $@
2402
2403 $(LIBNETAPI_STATIC_TARGET): $(BINARY_PREREQS) $(LIBNETAPI_OBJ0)
2404         @echo Linking non-shared library $@
2405         @-$(AR) -rc $@ $(LIBNETAPI_OBJ0)
2406
2407 libnetapi: $(LIBNETAPI)
2408
2409 cleanlibnetapi::
2410         -rm -f \
2411                 $(LIBNETAPI_SYMS) \
2412                 $(LIBNETAPI_STATIC_TARGET) \
2413                 $(LIBNETAPI_SHARED_TARGET) \
2414                 $(LIBNETAPI_SHARED_TARGET_SONAME)
2415
2416 installlibnetapi:: installdirs libnetapi
2417         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2418         -$(INSTALLLIBCMD_SH) $(LIBNETAPI_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
2419         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_SHARED_TARGET)`
2420         -if test -r $(LIBNETAPI_SHARED_TARGET_SONAME) ; then \
2421                 ln -f -s `basename $(LIBNETAPI_SHARED_TARGET_SONAME)` \
2422                         $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_SHARED_TARGET)` ; \
2423         fi
2424         -$(INSTALLLIBCMD_A) $(LIBNETAPI_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
2425         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2426         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(srcdir)/lib/netapi/netapi.h $(DESTDIR)${prefix}/include
2427
2428 uninstalllibnetapi::
2429         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_SHARED_TARGET)`
2430         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_SHARED_TARGET_SONAME)`
2431         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_STATIC_TARGET)`
2432         -rm -f $(DESTDIR)${prefix}/include/netapi.h
2433
2434 libs:: libnetapi
2435 installlibs:: @INSTALL_LIBNETAPI@
2436 uninstalllibs:: @UNINSTALL_LIBNETAPI@
2437 cleanlibs:: cleanlibnetapi
2438 shlibs test_shlibs: @LIBNETAPI_SHARED@
2439
2440 showlibnetapi:
2441         @echo  ""
2442         @echo "LIBNETAPI_SHARED               = @LIBNETAPI_SHARED@"
2443         @echo "LIBNETAPI_STATIC               = @LIBNETAPI_STATIC@"
2444         @echo "LIBNETAPI_LIBS                 = $(LIBNETAPI_LIBS)"
2445         @echo ""
2446         @echo "LIBNETAPI_SHARED_TARGET        = $(LIBNETAPI_SHARED_TARGET)"
2447         @echo "LIBNETAPI_SOVER                = $(LIBNETAPI_SOVER)"
2448         @echo "LIBNETAPI_SHARED TARGET_SONAME = $(LIBNETAPI_SHARED_TARGET_SONAME)"
2449         @echo "LIBNETAPI_STATIC_TARGET        = $(LIBNETAPI_STATIC_TARGET)"
2450         @echo "LIBNETAPI                      = $(LIBNETAPI)"
2451
2452 showlibs:: showlibnetapi
2453
2454 #-------------------------------------------------------------------
2455 #
2456 # libsmbclient
2457 #
2458 #-------------------------------------------------------------------
2459
2460 LIBSMBCLIENT_SHARED_TARGET=@LIBSMBCLIENT_SHARED_TARGET@
2461 LIBSMBCLIENT_SOVER=@LIBSMBCLIENT_SOVER@
2462 LIBSMBCLIENT_SHARED_TARGET_SONAME=$(LIBSMBCLIENT_SHARED_TARGET).$(LIBSMBCLIENT_SOVER)
2463 LIBSMBCLIENT_STATIC_TARGET=@LIBSMBCLIENT_STATIC_TARGET@
2464 LIBSMBCLIENT=@LIBSMBCLIENT_STATIC@ @LIBSMBCLIENT_SHARED@
2465 LIBSMBCLIENT_SYMS=$(srcdir)/exports/libsmbclient.@SYMSEXT@
2466 LIBSMBCLIENT_HEADERS=$(srcdir)/include/libsmbclient.h
2467
2468 $(LIBSMBCLIENT_SYMS): $(LIBSMBCLIENT_HEADERS)
2469         @$(MKSYMS_SH) $(AWK) $@ $(LIBSMBCLIENT_HEADERS)
2470
2471 $(LIBSMBCLIENT_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) $(LIBSMBCLIENT_THREAD_OBJ) $(LIBSMBCLIENT_SYMS) $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2472         @echo Linking shared library $@
2473         @$(SHLD_DSO) $(LIBSMBCLIENT_OBJ) $(LIBSMBCLIENT_THREAD_OBJ) \
2474                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(LIBS) \
2475                 $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(ZLIB_LIBS) $(PTHREAD_LDFLAGS) \
2476                 @SONAMEFLAG@`basename $@`
2477
2478 $(LIBSMBCLIENT_SHARED_TARGET): $(LIBSMBCLIENT_SHARED_TARGET_SONAME)
2479         @rm -f $@
2480         @ln -s `basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)` $@
2481
2482 $(LIBSMBCLIENT_STATIC_TARGET): $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ1)
2483         @echo Linking non-shared library $@
2484         @-$(AR) -rc $@ $(LIBSMBCLIENT_OBJ1)
2485
2486 libsmbclient: $(LIBSMBCLIENT)
2487
2488 cleanlibsmbclient::
2489         -rm -f \
2490                 $(LIBSMBCLIENT_SHARED_TARGET) \
2491                 $(LIBSMBCLIENT_SHARED_TARGET_SONAME) \
2492                 $(LIBSMBCLIENT_STATIC_TARGET)
2493
2494 installlibsmbclient:: installdirs libsmbclient
2495         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2496         -$(INSTALLLIBCMD_SH) $(LIBSMBCLIENT_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
2497         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)`
2498         -if test -r $(LIBSMBCLIENT_SHARED_TARGET_SONAME) ; then \
2499                 ln -f -s `basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)` \
2500                         $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)` ; \
2501         fi
2502         -$(INSTALLLIBCMD_A) $(LIBSMBCLIENT_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
2503         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2504         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBSMBCLIENT_HEADERS) $(DESTDIR)${prefix}/include
2505
2506 installclientlib:: installlibsmbclient
2507
2508 uninstalllibsmbclient::
2509         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)`
2510         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)`
2511         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_STATIC_TARGET)`
2512         -rm -f $(DESTDIR)${prefix}/include/libsmbclient.h
2513
2514 uninstallclientlib:: uninstalllibsmbclient
2515
2516 libs:: libsmbclient
2517 installlibs:: @INSTALL_LIBSMBCLIENT@
2518 uninstalllibs:: @UNINSTALL_LIBSMBCLIENT@
2519 cleanlibs:: cleanlibsmbclient
2520 shlibs test_shlibs: @LIBSMBCLIENT_SHARED@
2521
2522 showlibsmbclient:
2523         @echo  ""
2524         @echo "LIBSMBCLIENT_SHARED               = @LIBSMBCLIENT_SHARED@"
2525         @echo "LIBSMBCLIENT_STATIC               = @LIBSMBCLIENT_STATIC@"
2526         @echo "LIBSMBCLIENT_LIBS                 = $(LIBSMBCLIENT_LIBS)"
2527         @echo ""
2528         @echo "LIBSMBCLIENT_SHARED_TARGET        = $(LIBSMBCLIENT_SHARED_TARGET)"
2529         @echo "LIBSMBCLIENT_SOVER                = $(LIBSMBCLIENT_SOVER)"
2530         @echo "LIBSMBCLIENT_SHARED TARGET_SONAME = $(LIBSMBCLIENT_SHARED_TARGET_SONAME)"
2531         @echo "LIBSMBCLIENT_STATIC_TARGET        = $(LIBSMBCLIENT_STATIC_TARGET)"
2532         @echo "LIBSMBCLIENT                      = $(LIBSMBCLIENT)"
2533
2534 showlibs:: showlibsmbclient
2535
2536 #-------------------------------------------------------------------
2537 #
2538 # libsmbsharemodes
2539 #
2540 #-------------------------------------------------------------------
2541
2542 LIBSMBSHAREMODES_OBJ0 = libsmb/smb_share_modes.o
2543
2544 LIBSMBSHAREMODES_OBJ = $(LIBSMBSHAREMODES_OBJ0)
2545
2546 LIBSMBSHAREMODES_SHARED_TARGET=@LIBSMBSHAREMODES_SHARED_TARGET@
2547 LIBSMBSHAREMODES_SOVER=@LIBSMBSHAREMODES_SOVER@
2548 LIBSMBSHAREMODES_SHARED_TARGET_SONAME=$(LIBSMBSHAREMODES_SHARED_TARGET).$(LIBSMBSHAREMODES_SOVER)
2549 LIBSMBSHAREMODES_STATIC_TARGET=@LIBSMBSHAREMODES_STATIC_TARGET@
2550 LIBSMBSHAREMODES=@LIBSMBSHAREMODES_STATIC@ @LIBSMBSHAREMODES_SHARED@
2551 LIBSMBSHAREMODES_SYMS=$(srcdir)/exports/libsmbsharemodes.@SYMSEXT@
2552 LIBSMBSHAREMODES_HEADERS=$(srcdir)/include/smb_share_modes.h
2553
2554 $(LIBSMBSHAREMODES_SYMS): $(LIBSMBSHAREMODES_HEADERS)
2555         @$(MKSYMS_SH) $(AWK) $@ $(LIBSMBSHAREMODES_HEADERS)
2556
2557 $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ) $(LIBSMBSHAREMODES_SYMS) $(LIBTALLOC) $(LIBTDB)
2558         @echo Linking shared library $@
2559         @$(SHLD_DSO) $(LIBSMBSHAREMODES_OBJ) \
2560                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
2561                 @SONAMEFLAG@`basename $@`
2562
2563 $(LIBSMBSHAREMODES_SHARED_TARGET): $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)
2564         @rm -f $@
2565         @ln -f -s `basename $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)` $@
2566
2567 $(LIBSMBSHAREMODES_STATIC_TARGET): $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ0)
2568         @echo Linking non-shared library $@
2569         @-$(AR) -rc $@ $(LIBSMBSHAREMODES_OBJ0)
2570
2571 libsmbsharemodes: $(LIBSMBSHAREMODES)
2572
2573 cleanlibsmbsharemodes::
2574         -rm -f \
2575                 $(LIBSMBSHAREMODES_SHARED_TARGET) \
2576                 $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME) \
2577                 $(LIBSMBSHAREMODES_STATIC_TARGET)
2578
2579 installlibsmbsharemodes:: installdirs libsmbsharemodes
2580         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2581         -$(INSTALLLIBCMD_SH) $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
2582         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_SHARED_TARGET)`
2583         -if test -r $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME) ; then \
2584                 ln -f -s `basename $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)` \
2585                         $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_SHARED_TARGET)` ; \
2586         fi
2587         -$(INSTALLLIBCMD_A) $(LIBSMBSHAREMODES_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
2588         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2589         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBSMBSHAREMODES_HEADERS) $(DESTDIR)${prefix}/include
2590
2591 uninstalllibsmbsharemodes::
2592         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_SHARED_TARGET)`
2593         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)`
2594         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_STATIC_TARGET)`
2595         -rm -f $(DESTDIR)${prefix}/include/smb_share_modes.h
2596
2597 libs:: libsmbsharemodes
2598 installlibs:: @INSTALL_LIBSMBSHAREMODES@
2599 uninstalllibs:: @UNINSTALL_LIBSMBSHAREMODES@
2600 cleanlibs:: cleanlibsmbsharemodes
2601 shlibs test_shlibs: @LIBSMBSHAREMODES_SHARED@
2602
2603 showlibsmbsharemodes:
2604         @echo  ""
2605         @echo "LIBSMBSHAREMODES_SHARED               = @LIBSMBSHAREMODES_SHARED@"
2606         @echo "LIBSMBSHAREMODES_STATIC               = @LIBSMBSHAREMODES_STATIC@"
2607         @echo "LIBSMBSHAREMODES_TARGET               = @LIBSMBSHAREMODES_TARGET@"
2608         @echo "LIBSMBSHAREMODES_LIBS                 = $(LIBSMBSHAREMODES_LIBS)"
2609         @echo ""
2610         @echo "LIBSMBSHAREMODES_SHARED_TARGET        = $(LIBSMBSHAREMODES_SHARED_TARGET)"
2611         @echo "LIBSMBSHAREMODES_SOVER                = $(LIBSMBSHAREMODES_SOVER)"
2612         @echo "LIBSMBSHAREMODES_SHARED TARGET_SONAME = $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)"
2613         @echo "LIBSMBSHAREMODES_STATIC_TARGET        = $(LIBSMBSHAREMODES_STATIC_TARGET)"
2614         @echo "LIBSMBSHAREMODES                      = $(LIBSMBSHAREMODES)"
2615
2616 showlibs:: showlibsmbsharemodes
2617
2618 #-------------------------------------------------------------------
2619 #
2620 # libbigballofmud
2621 #
2622 #-------------------------------------------------------------------
2623
2624 # This is probably wrong for anything other than the GNU linker.
2625 bin/libbigballofmud.@SHLIBEXT@: $(BINARY_PREREQS) $(LIBBIGBALLOFMUD_OBJ) $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2626         @echo Linking shared library $@
2627         @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBBIGBALLOFMUD_OBJ) \
2628                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) \
2629                 $(PASSDB_LIBS) $(IDMAP_LIBS) $(KRB5LIBS) $(LDAP_LIBS) -lz \
2630                 @SONAMEFLAG@`basename $@`.$(LIBBIGBALLOFMUD_MAJOR)
2631         ln -snf libbigballofmud.so bin/libbigballofmud.so.0
2632
2633 # It would be nice to build a static bigballofmud too, but when I try
2634 # I get linker errors about dl_open and similar things.  I'm not sure if
2635 # it can be fixed or if they just can't be called from a static
2636 # library.
2637
2638 #####################################################################
2639 #
2640 # shared modules
2641 #
2642 #####################################################################
2643
2644 # Linker command to link our shared libraries:
2645 SHLD_LIBRARY = $(SHLD) $(LDSHFLAGS) $(MODULE_EXPORTS) \
2646               -o $@ @SONAMEFLAG@`basename $@`
2647 # Linker command to link samba internal plugin modules:
2648 SHLD_MODULE = $(SHLD) $(LDSHFLAGS_MODULES) $(MODULE_EXPORTS) \
2649         -o $@ @SONAMEFLAG@`basename $@`
2650
2651 bin/librpc_lsarpc.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_LSARPC_OBJ)
2652         @echo "Linking $@"
2653         @$(SHLD_LIBRARY) $(RPC_LSARPC_OBJ)
2654
2655 bin/librpc_samr.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SAMR_OBJ)
2656         @echo "Linking $@"
2657         @$(SHLD_LIBRARY) $(RPC_SAMR_OBJ)
2658
2659 bin/librpc_srvsvc.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SRVSVC_OBJ)
2660         @echo "Linking $@"
2661         @$(SHLD_LIBRARY) $(RPC_SRVSVC_OBJ)
2662
2663 bin/librpc_svcctl.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SVCCTL_OBJ)
2664         @echo "Linking $@"
2665         @$(SHLD_LIBRARY) $(RPC_SVCCTL_OBJ)
2666
2667 bin/librpc_ntsvcs.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_NTSVCS_OBJ)
2668         @echo "Linking $@"
2669         @$(SHLD_LIBRARY) $(RPC_NTSVCS_OBJ)
2670
2671 bin/librpc_wkssvc.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_WKSSVC_OBJ)
2672         @echo "Linking $@"
2673         @$(SHLD_LIBRARY) $(RPC_WKSSVC_OBJ)
2674
2675 bin/librpc_NETLOGON.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_NETLOGON_OBJ)
2676         @echo "Linking $@"
2677         @$(SHLD_LIBRARY) $(RPC_NETLOGON_OBJ)
2678
2679 bin/librpc_winreg.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_WINREG_OBJ)
2680         @echo "Linking $@"
2681         @$(SHLD_LIBRARY) $(RPC_WINREG_OBJ)
2682
2683 bin/librpc_initshutdown.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_INITSHUTDOWN_OBJ)
2684         @echo "Linking $@"
2685         @$(SHLD_LIBRARY) $(RPC_INITSHUTDOWN_OBJ)
2686
2687 bin/librpc_dssetup.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_DSSETUP_OBJ)
2688         @echo "Linking $@"
2689         @$(SHLD_LIBRARY) $(RPC_DSSETUP_OBJ)
2690
2691 bin/librpc_spoolss.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SPOOLSS_OBJ)
2692         @echo "Linking $@"
2693         @$(SHLD_LIBRARY) $(RPC_SPOOLSS_OBJ)
2694
2695 bin/librpc_eventlog.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_EVENTLOG_OBJ)
2696         @echo "Linking $@"
2697         @$(SHLD_LIBRARY) $(RPC_EVENTLOG_OBJ)
2698
2699 bin/librpc_netdfs.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_NETDFS_OBJ)
2700         @echo "Linking $@"
2701         @$(SHLD_LIBRARY) $(RPC_NETDFS_OBJ)
2702
2703 bin/librpc_rpcecho.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_RPCECHO_OBJ)
2704         @echo "Linking $@"
2705         @$(SHLD_LIBRARY) $(RPC_RPCECHO_OBJ)
2706
2707 bin/winbindd@EXEEXT@: $(BINARY_PREREQS) $(WINBINDD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2708         @echo "Linking $@"
2709         @$(CC) -o $@ $(WINBINDD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
2710                 $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(AUTH_LIBS) \
2711                 $(PASSDB_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) \
2712                 $(ZLIB_LIBS)
2713
2714 bin/vlp@EXEEXT@: $(BINARY_PREREQS) $(VLP_OBJ) $(LIBTDB)
2715         @echo "Linking $@"
2716         @$(CC) -o $@ $(VLP_OBJ) $(LDFLAGS) $(DYNEXP) \
2717                 $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
2718                 $(LIBTDB_LIBS)
2719
2720 @WINBIND_NSS@: $(BINARY_PREREQS) $(WINBIND_NSS_OBJ)
2721         @echo "Linking $@"
2722         @$(SHLD) $(WINBIND_NSS_LDSHFLAGS) -o $@ $(WINBIND_NSS_OBJ) \
2723                 $(LIBREPLACE_LIBS) $(PTHREAD_LDFLAGS) \
2724                 @SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@
2725
2726 @WINBIND_WINS_NSS@: $(BINARY_PREREQS) $(WINBIND_WINS_NSS_OBJ) $(LIBTALLOC) $(LIBTDB)
2727         @echo "Linking $@"
2728         @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_WINS_NSS_OBJ) \
2729                 $(LDAP_LIBS) $(KRB5LIBS) $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS) \
2730                 @SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@
2731
2732 bin/winbind_krb5_locator.@SHLIBEXT@: $(BINARY_PREREQS) $(WINBIND_KRB5_LOCATOR_OBJ) $(LIBWBCLIENT)
2733         @echo "Linking $@"
2734         @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_KRB5_LOCATOR_OBJ) $(LIBWBCLIENT_LIBS) $(KRB5LIBS) \
2735                 @SONAMEFLAG@`basename $@`
2736
2737 bin/pam_winbind.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_WINBIND_OBJ) $(LIBTALLOC) $(LIBWBCLIENT)
2738         @echo "Linking shared library $@"
2739         @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_OBJ) -lpam @INIPARSERLIBS@ \
2740                 $(LIBREPLACE_LIBS) $(LIBTALLOC_LIBS) $(LIBWBCLIENT_LIBS) @SONAMEFLAG@`basename $@`
2741
2742 ##########
2743 # Plugins:
2744 ##########
2745
2746 bin/builtin.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_BUILTIN_OBJ)
2747         @echo "Building plugin $@"
2748         @$(SHLD_MODULE) $(AUTH_BUILTIN_OBJ)
2749
2750 bin/domain.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_DOMAIN_OBJ)
2751         @echo "Building plugin $@"
2752         @$(SHLD_MODULE) $(AUTH_DOMAIN_OBJ)
2753
2754 bin/script.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_SCRIPT_OBJ)
2755         @echo "Building plugin $@"
2756         @$(SHLD_MODULE) $(AUTH_SCRIPT_OBJ)
2757
2758 bin/netlogond.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_NETLOGOND_OBJ)
2759         @echo "Building plugin $@"
2760         @$(SHLD_MODULE) $(AUTH_NETLOGOND_OBJ)
2761
2762 bin/smbserver.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_SERVER_OBJ)
2763         @echo "Building plugin $@"
2764         @$(SHLD_MODULE) $(AUTH_SERVER_OBJ)
2765
2766 bin/winbind.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_WINBIND_OBJ)
2767         @echo "Building plugin $@"
2768         @$(SHLD_MODULE) $(AUTH_WINBIND_OBJ)
2769
2770 bin/wbc.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_WBC_OBJ)
2771         @echo "Building plugin $@"
2772         @$(SHLD_MODULE) $(AUTH_WBC_OBJ)
2773
2774 bin/unix.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_UNIX_OBJ)
2775         @echo "Building plugin $@"
2776         @$(SHLD_MODULE) $(AUTH_UNIX_OBJ)
2777
2778 bin/sam.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_SAM_OBJ)
2779         @echo "Building plugin $@"
2780         @$(SHLD_MODULE) $(AUTH_SAM_OBJ)
2781
2782 bin/ldapsam.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_ldap.o passdb/pdb_nds.o \
2783                         passdb/pdb_ipa.o
2784         @echo "Building plugin $@"
2785         @$(SHLD_MODULE) passdb/pdb_ldap.o passdb/pdb_nds.o passdb/pdb_ipa.o \
2786                         $(LDAP_LIBS)
2787
2788 bin/ads.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_ads.o
2789         @echo "Building plugin $@"
2790         @$(SHLD_MODULE) passdb/pdb_ads.o
2791
2792 bin/tdbsam.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_tdb.o
2793         @echo "Building plugin $@"
2794         @$(SHLD_MODULE) passdb/pdb_tdb.o
2795
2796 bin/wbc_sam.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_wbc_sam.o
2797         @echo "Building plugin $@"
2798         @$(SHLD_MODULE) passdb/pdb_wbc_sam.o
2799
2800 bin/smbpasswd.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_smbpasswd.o
2801         @echo "Building plugin $@"
2802         @$(SHLD_MODULE) passdb/pdb_smbpasswd.o
2803
2804 bin/rid.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_rid.o
2805         @echo "Building plugin $@"
2806         @$(SHLD_MODULE) winbindd/idmap_rid.o
2807
2808 bin/passdb.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_passdb.o
2809         @echo "Building plugin $@"
2810         @$(SHLD_MODULE) winbindd/idmap_passdb.o
2811
2812 bin/autorid.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_autorid.o
2813         @echo "Building plugin $@"
2814         @$(SHLD_MODULE) winbindd/idmap_autorid.o
2815
2816 bin/ad.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ad.o
2817         @echo "Building plugin $@"
2818         @$(SHLD_MODULE) winbindd/idmap_ad.o
2819
2820 bin/hash.@SHLIBEXT@: $(BINARY_PREREQS) $(IDMAP_HASH_OBJ)
2821         @echo "Building plugin $@"
2822         @$(SHLD_MODULE) $(IDMAP_HASH_OBJ)
2823
2824 bin/adex.@SHLIBEXT@: $(BINARY_PREREQS) $(IDMAP_ADEX_OBJ)
2825         @echo "Building plugin $@"
2826         @$(SHLD_MODULE) $(IDMAP_ADEX_OBJ)
2827
2828 bin/tdb2.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_tdb2.o $(IDMAP_RW_OBJ)
2829         @echo "Building plugin $@"
2830         @$(SHLD_MODULE) winbindd/idmap_tdb2.o $(IDMAP_RW_OBJ)
2831
2832 bin/ldap.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ldap.o $(IDMAP_RW_OBJ)
2833         @echo "Building plugin $@"
2834         @$(SHLD_MODULE) winbindd/idmap_ldap.o $(IDMAP_RW_OBJ)
2835
2836 bin/weird.@SHLIBEXT@: $(BINARY_PREREQS) $(DEVEL_HELP_WEIRD_OBJ)
2837         @echo "Building plugin $@"
2838         @$(SHLD_MODULE) $(DEVEL_HELP_WEIRD_OBJ)
2839
2840 bin/CP850.@SHLIBEXT@: $(BINARY_PREREQS) $(CP850_OBJ)
2841         @echo "Building plugin $@"
2842         @$(SHLD_MODULE) $(CP850_OBJ)
2843
2844 bin/CP437.@SHLIBEXT@: $(BINARY_PREREQS) $(CP437_OBJ)
2845         @echo "Building plugin $@"
2846         @$(SHLD_MODULE) $(CP437_OBJ)
2847
2848 bin/macosxfs.@SHLIBEXT@: $(BINARY_PREREQS) $(CHARSET_MACOSXFS_OBJ)
2849         @echo "Building plugin $@"
2850         @$(SHLD_MODULE) $(CHARSET_MACOSXFS_OBJ) -framework CoreFoundation
2851
2852 # NOTE, there is no build rule for a dynamic default VFS module because
2853 # this one MUST MUST MUST be built statically.
2854
2855 bin/audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AUDIT_OBJ)
2856         @echo "Building plugin $@"
2857         @$(SHLD_MODULE) $(VFS_AUDIT_OBJ)
2858
2859 bin/extd_audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_EXTD_AUDIT_OBJ)
2860         @echo "Building plugin $@"
2861         @$(SHLD_MODULE) $(VFS_EXTD_AUDIT_OBJ)
2862
2863 bin/full_audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_FULL_AUDIT_OBJ)
2864         @echo "Building plugin $@"
2865         @$(SHLD_MODULE) $(VFS_FULL_AUDIT_OBJ)
2866
2867 bin/recycle.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_RECYCLE_OBJ)
2868         @echo "Building plugin $@"
2869         @$(SHLD_MODULE) $(VFS_RECYCLE_OBJ)
2870
2871 bin/netatalk.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_NETATALK_OBJ)
2872         @echo "Building plugin $@"
2873         @$(SHLD_MODULE) $(VFS_NETATALK_OBJ)
2874
2875 bin/fake_perms.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_FAKE_PERMS_OBJ)
2876         @echo "Building plugin $@"
2877         @$(SHLD_MODULE) $(VFS_FAKE_PERMS_OBJ)
2878
2879 bin/default_quota.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_DEFAULT_QUOTA_OBJ)
2880         @echo "Building plugin $@"
2881         @$(SHLD_MODULE) $(VFS_DEFAULT_QUOTA_OBJ)
2882
2883 bin/readonly.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_READONLY_OBJ)
2884         @echo "Building plugin $@"
2885         @$(SHLD_MODULE) $(VFS_READONLY_OBJ)
2886
2887 bin/shadow_copy.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SHADOW_COPY_OBJ)
2888         @echo "Building plugin $@"
2889         @$(SHLD_MODULE) $(VFS_SHADOW_COPY_OBJ)
2890
2891 bin/shadow_copy2.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SHADOW_COPY2_OBJ)
2892         @echo "Building plugin $@"
2893         @$(SHLD_MODULE) $(VFS_SHADOW_COPY2_OBJ)
2894
2895 bin/syncops.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SYNCOPS_OBJ)
2896         @echo "Building plugin $@"
2897         @$(SHLD_MODULE) $(VFS_SYNCOPS_OBJ)
2898
2899 bin/cap.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CAP_OBJ)
2900         @echo "Building plugin $@"
2901         @$(SHLD_MODULE) $(VFS_CAP_OBJ)
2902
2903 bin/expand_msdfs.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_EXPAND_MSDFS_OBJ)
2904         @echo "Building plugin $@"
2905         @$(SHLD_MODULE) $(VFS_EXPAND_MSDFS_OBJ)
2906
2907 bin/afsacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AFSACL_OBJ)
2908         @echo "Building plugin $@"
2909         @$(SHLD_MODULE) $(VFS_AFSACL_OBJ)
2910
2911 bin/xattr_tdb.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_XATTR_TDB_OBJ)
2912         @echo "Building plugin $@"
2913         @$(SHLD_MODULE) $(VFS_XATTR_TDB_OBJ)
2914
2915 bin/posixacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_POSIXACL_OBJ)
2916         @echo "Building plugin $@"
2917         @$(SHLD_MODULE) $(VFS_POSIXACL_OBJ)
2918
2919 bin/aixacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIXACL_OBJ)
2920         @echo "Building plugin $@"
2921         @$(SHLD_MODULE) $(VFS_AIXACL_OBJ)
2922
2923 bin/aixacl2.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIXACL2_OBJ)
2924         @echo "Building plugin $@"
2925         @$(SHLD_MODULE) $(VFS_AIXACL2_OBJ)
2926
2927 bin/solarisacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SOLARISACL_OBJ)
2928         @echo "Building plugin $@"
2929         @$(SHLD_MODULE) $(VFS_SOLARISACL_OBJ)
2930
2931 bin/zfsacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ZFSACL_OBJ)
2932         @echo "Building plugin $@"
2933         @$(SHLD_MODULE) $(VFS_ZFSACL_OBJ) @ZFSACL_LIBS@
2934
2935 bin/irixacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_IRIXACL_OBJ)
2936         @echo "Building plugin $@"
2937         @$(SHLD_MODULE) $(VFS_IRIXACL_OBJ)
2938
2939 bin/hpuxacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_HPUXACL_OBJ)
2940         @echo "Building plugin $@"
2941         @$(SHLD_MODULE) $(VFS_HPUXACL_OBJ)
2942
2943 bin/tru64acl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_TRU64ACL_OBJ)
2944         @echo "Building plugin $@"
2945         @$(SHLD_MODULE) $(VFS_TRU64ACL_OBJ)
2946
2947 bin/catia.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CATIA_OBJ)
2948         @echo "Building plugin $@"
2949         @$(SHLD_MODULE) $(VFS_CATIA_OBJ)
2950
2951 bin/streams_xattr.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_STREAMS_XATTR_OBJ)
2952         @echo "Building plugin $@"
2953         @$(SHLD_MODULE) $(VFS_STREAMS_XATTR_OBJ)
2954
2955 bin/streams_depot.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_STREAMS_DEPOT_OBJ)
2956         @echo "Building plugin $@"
2957         @$(SHLD_MODULE) $(VFS_STREAMS_DEPOT_OBJ)
2958
2959 bin/cacheprime.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CACHEPRIME_OBJ)
2960         @echo "Building plugin $@"
2961         @$(SHLD_MODULE) $(VFS_CACHEPRIME_OBJ)
2962
2963 bin/prealloc.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_PREALLOC_OBJ)
2964         @echo "Building plugin $@"
2965         @$(SHLD_MODULE) $(VFS_PREALLOC_OBJ)
2966
2967 bin/commit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_COMMIT_OBJ)
2968         @echo "Building plugin $@"
2969         @$(SHLD_MODULE) $(VFS_COMMIT_OBJ)
2970
2971 bin/gpfs.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_GPFS_OBJ)
2972         @echo "Building plugin $@"
2973         @$(SHLD_MODULE) $(VFS_GPFS_OBJ)
2974
2975 bin/notify_fam.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_NOTIFY_FAM_OBJ)
2976         @echo "Building plugin $@"
2977         @$(SHLD_MODULE) $(VFS_NOTIFY_FAM_OBJ) @SMB_FAM_LIBS@
2978
2979 bin/readahead.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_READAHEAD_OBJ)
2980         @echo "Building plugin $@"
2981         @$(SHLD_MODULE) $(VFS_READAHEAD_OBJ)
2982
2983 bin/tsmsm.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_TSMSM_OBJ)
2984         @echo "Building plugin $@"
2985         @$(SHLD_MODULE) $(VFS_TSMSM_OBJ)
2986
2987 bin/fileid.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_FILEID_OBJ)
2988         @echo "Building plugin $@"
2989         @$(SHLD_MODULE) $(VFS_FILEID_OBJ)
2990
2991 bin/aio_fork.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIO_FORK_OBJ)
2992         @echo "Building plugin $@"
2993         @$(SHLD_MODULE) $(VFS_AIO_FORK_OBJ)
2994
2995 bin/preopen.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_PREOPEN_OBJ)
2996         @echo "Building plugin $@"
2997         @$(SHLD_MODULE) $(VFS_PREOPEN_OBJ)
2998
2999 bin/acl_xattr.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ACL_XATTR_OBJ)
3000         @echo "Building plugin $@"
3001         @$(SHLD_MODULE) $(VFS_ACL_XATTR_OBJ)
3002
3003 bin/smb_traffic_analyzer.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SMB_TRAFFIC_ANALYZER_OBJ)
3004         @echo "Building plugin $@"
3005         @$(SHLD_MODULE) $(VFS_SMB_TRAFFIC_ANALYZER_OBJ)
3006
3007 bin/acl_tdb.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ACL_TDB_OBJ)
3008         @echo "Building plugin $@"
3009         @$(SHLD_MODULE) $(VFS_ACL_TDB_OBJ)
3010
3011 bin/onefs.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ONEFS_OBJ)
3012         @echo "Building plugin $@"
3013         @$(SHLD_MODULE) $(VFS_ONEFS_OBJ) @ONEFS_LIBS@
3014
3015 bin/onefs_shadow_copy.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ONEFS_SHADOW_COPY_OBJ)
3016         @echo "Building plugin $@"
3017         @$(SHLD_MODULE) $(VFS_ONEFS_SHADOW_COPY_OBJ)
3018
3019 bin/pc_onefs.@SHLIBEXT@: $(BINARY_PREREQS) $(PERFCOUNT_ONEFS_OBJ)
3020         @echo "Building plugin $@"
3021         @$(SHLD_MODULE) $(PERFCOUNT_ONEFS_OBJ)
3022
3023 bin/pc_test.@SHLIBEXT@: $(BINARY_PREREQS) $(PERFCOUNT_TEST_OBJ)
3024         @echo "Building plugin $@"
3025         @$(SHLD_MODULE) $(PERFCOUNT_TEST_OBJ)
3026
3027 bin/registry.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/registry.o
3028         @echo "Building plugin $@"
3029         @$(SHLD_MODULE) libgpo/gpext/registry.o
3030
3031 bin/scripts.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/scripts.o
3032         @echo "Building plugin $@"
3033         @$(SHLD_MODULE) libgpo/gpext/scripts.o
3034
3035 bin/security.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/security.o
3036         @echo "Building plugin $@"
3037         @$(SHLD_MODULE) libgpo/gpext/security.o
3038
3039 bin/dirsort.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_DIRSORT_OBJ)
3040         @echo "Building plugin $@"
3041         @$(SHLD_MODULE) $(VFS_DIRSORT_OBJ)
3042
3043 bin/scannedonly.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SCANNEDONLY_OBJ)
3044         @echo "Building plugin $@"
3045         @$(SHLD_MODULE) $(VFS_SCANNEDONLY_OBJ)
3046
3047 bin/crossrename.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CROSSRENAME_OBJ)
3048         @echo "Building plugin $@"
3049         @$(SHLD_MODULE) $(VFS_CROSSRENAME_OBJ)
3050
3051 bin/linux_xfs_sgid.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_LINUX_XFS_SGID_OBJ)
3052         @echo "Building plugin $@"
3053         @$(SHLD_MODULE) $(VFS_LINUX_XFS_SGID_OBJ)
3054
3055 bin/time_audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_TIME_AUDIT_OBJ)
3056         @echo "Building plugin $@"
3057         @$(SHLD_MODULE) $(VFS_TIME_AUDIT_OBJ)
3058
3059 #########################################################
3060 ## IdMap NSS plugins
3061
3062 ## None here right now
3063 #########################################################
3064
3065 bin/wbinfo@EXEEXT@: $(BINARY_PREREQS) $(WBINFO_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
3066         @echo Linking $@
3067         @$(CC) -o $@ $(LDFLAGS) $(WBINFO_OBJ) $(DYNEXP) $(LIBS) \
3068                 $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
3069                 $(LIBWBCLIENT_LIBS)
3070
3071 bin/ntlm_auth@EXEEXT@: $(BINARY_PREREQS) $(NTLM_AUTH_OBJ) $(PARAM_OBJ) \
3072         $(LIB_NONSMBD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
3073         @echo Linking $@
3074         @$(CC) -o $@ $(LDFLAGS) $(DYNEXP) $(NTLM_AUTH_OBJ) \
3075                 $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBS) \
3076                 $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
3077                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) @INIPARSERLIBS@
3078
3079 bin/pam_smbpass.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_SMBPASS_OBJ) $(LIBCLI_LDAP_NDR_OBJ) $(LIBTALLOC) $(LIBWBCLIENT) $(LIBTDB)
3080         @echo "Linking shared library $@"
3081         @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_SMBPASS_OBJ) $(LIBCLI_LDAP_NDR_OBJ) -lpam $(DYNEXP) \
3082                 $(LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
3083                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS)
3084
3085 bin/tdbbackup@EXEEXT@: $(BINARY_PREREQS) $(TDBBACKUP_OBJ) $(LIBTALLOC) $(LIBTDB)
3086         @echo Linking $@
3087         @$(CC) -o $@ $(LDFLAGS) $(TDBBACKUP_OBJ) $(DYNEXP) \
3088                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
3089
3090 bin/tdbtool@EXEEXT@: $(BINARY_PREREQS) $(TDBTOOL_OBJ) $(LIBTALLOC) $(LIBTDB)
3091         @echo Linking $@
3092         @$(CC) -o $@ $(LDFLAGS) $(TDBTOOL_OBJ) $(DYNEXP) \
3093                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
3094
3095 bin/tdbdump@EXEEXT@: $(BINARY_PREREQS) $(TDBDUMP_OBJ) $(LIBTDB)
3096         @echo Linking $@
3097         @$(CC) -o $@ $(LDFLAGS) $(TDBDUMP_OBJ) $(DYNEXP) $(LIBTDB_LIBS) $(LIBREPLACE_LIBS)
3098
3099 bin/tdbrestore@EXEEXT@: $(BINARY_PREREQS) $(TDBRESTORE_OBJ) $(LIBTDB)
3100         @echo Linking $@
3101         @$(CC) -o $@ $(LDFLAGS) $(TDBRESTORE_OBJ) $(DYNEXP) $(LIBTDB_LIBS) $(LIBREPLACE_LIBS)
3102
3103 bin/tdbtorture@EXEEXT@: $(BINARY_PREREQS) $(TDBTORTURE_OBJ) $(LIBTALLOC) $(LIBTDB)
3104         @echo Linking $@
3105         @$(CC) -o $@ $(LDFLAGS) $(TDBTORTURE_OBJ) $(DYNEXP) \
3106                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
3107
3108 bin/t_strcmp@EXEEXT@: $(BINARY_PREREQS) $(LIBTALLOC) bin/libbigballofmud.@SHLIBEXT@ torture/t_strcmp.o
3109         $(CC) -o $@ $(DYNEXP) $(LIBS) $(LIBTALLOC_LIBS) \
3110                 torture/t_strcmp.o -L ./bin -lbigballofmud $(LIBWBCLIENT_LIBS)
3111
3112 bin/t_strstr@EXEEXT@: $(BINARY_PREREQS) $(LIBTALLOC) bin/libbigballofmud.@SHLIBEXT@ torture/t_strstr.o
3113         $(CC) -o $@ $(DYNEXP) $(LIBS) $(LIBTALLOC_LIBS) \
3114                 torture/t_strstr.o -L ./bin -lbigballofmud $(LIBWBCLIENT_LIBS)
3115
3116 bin/t_strappend@EXEEXT@: $(BINARY_PREREQS) $(LIBTALLOC) bin/libbigballofmud.@SHLIBEXT@ torture/t_strappend.o
3117         $(CC) -o $@ $(DYNEXP) $(LIBS) $(LIBTALLOC_LIBS) \
3118                 torture/t_strappend.o -L ./bin -lbigballofmud $(LIBWBCLIENT_LIBS)
3119
3120 bin/t_stringoverflow@EXEEXT@: $(BINARY_PREREQS) bin/libbigballofmud.@SHLIBEXT@ torture/t_stringoverflow.o
3121         $(CC) -o $@ $(DYNEXP) torture/t_stringoverflow.o \
3122                 -L./bin -lbigballofmud $(LIBWBCLIENT_LIBS)
3123
3124 bin/timelimit@EXEEXT@: script/tests/timelimit.o
3125         @echo Linking $@
3126         @$(CC) -o $@ $(DYNEXP) script/tests/timelimit.o
3127
3128 bin/rpc_open_tcp@EXEEXT@: $(BINARY_PREREQS) $(RPC_OPEN_TCP_OBJ) $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
3129         @echo "Linking $@"
3130         @$(CC) -o $@ $(RPC_OPEN_TCP_OBJ) $(LDFLAGS) $(DYNEXP) \
3131                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBWBCLIENT_LIBS) \
3132                 $(LDAP_LIBS) $(KRB5LIBS) $(NSCD_LIBS)
3133
3134 bin/test_lp_load@EXEEXT@: $(BINARY_PREREQS) $(TEST_LP_LOAD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
3135         @echo "Linking $@"
3136         @$(CC) -o $@ $(TEST_LP_LOAD_OBJ) \
3137                 $(LDFLAGS) $(DYNEXP) $(LIBS) \
3138                 $(LDAP_LIBS) $(LIBWBCLIENT_LIBS) \
3139                 $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
3140
3141 bin/dbwrap_tool@EXEEXT@: $(DBWRAP_TOOL_OBJ) $(LIBTALLOC) $(LIBTDB)
3142         @echo "Linking $@"
3143         @$(CC) -o $@ $(DBWRAP_TOOL_OBJ)\
3144                 $(LDFLAGS) $(DYNEXP) $(LIBS) \
3145                 $(LDAP_LIBS) \
3146                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
3147
3148 install-dbwrap_tool:: bin/dbwrap_tool@EXEEXT@
3149         @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $<
3150
3151 bin/dbwrap_torture@EXEEXT@: $(DBWRAP_TORTURE_OBJ) $(LIBTALLOC) $(LIBTDB)
3152         @echo "Linking $@"
3153         @$(CC) -o $@ $(DBWRAP_TORTURE_OBJ)\
3154                 $(LDFLAGS) $(DYNEXP) $(LIBS) \
3155                 $(LDAP_LIBS) \
3156                 $(POPT_LIBS) \
3157                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
3158
3159 install-dbwrap_torture:: bin/dbwrap_torture@EXEEXT@
3160         @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $<
3161
3162 bin/split_tokens@EXEEXT@: $(BINARY_PREREQS) $(SPLIT_TOKENS_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
3163         @echo "Linking $@"
3164         @$(CC) -o $@ $(SPLIT_TOKENS_OBJ) \
3165                 $(LDFLAGS) $(DYNEXP) \
3166                 $(LIBS) $(POPT_LIBS) \
3167                 $(LDAP_LIBS) $(LIBWBCLIENT_LIBS) \
3168                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
3169
3170 install:: installservers installbin installman \
3171                 installscripts installdat installmodules @SWAT_INSTALL_TARGETS@ \
3172                 @INSTALL_PAM_MODULES@ installlibs installmo
3173
3174 install-everything:: install installmodules
3175
3176 # DESTDIR is used here to prevent packagers wasting their time
3177 # duplicating the Makefile. Remove it and you will have the privelege
3178 # of package each samba release for muliple versions of multiple
3179 # distributions and operating systems, or at least supplying patches
3180 # to all the packaging files required for this, prior to committing
3181 # the removal of DESTDIR. Do not remove it even though you think it
3182 # is not used
3183
3184 installdirs::
3185         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) \
3186                 $(DESTDIR) $(prefix) $(BINDIR) $(SBINDIR) $(LIBDIR) \
3187                 $(VARDIR) $(PRIVATEDIR) $(PIDDIR) $(LOCKDIR) $(STATEDIR) \
3188                 $(NMBDSOCKETDIR) \
3189                 $(CACHEDIR) $(MANDIR) $(CODEPAGEDIR) $(MODULESDIR) $(LOCALEDIR)
3190
3191 installservers:: all installdirs
3192         @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(SBINDIR) $(SBIN_PROGS)
3193
3194 installbin:: all installdirs
3195         @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $(BIN_PROGS)
3196
3197 # Some symlinks are required for the 'probing' of modules.
3198 # This mechanism should go at some point..
3199 installmodules:: modules installdirs
3200         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(VFSLIBDIR) $(VFS_MODULES)
3201         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PDBLIBDIR) $(PDB_MODULES)
3202         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(IDMAPLIBDIR) $(IDMAP_MODULES)
3203         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(NSSINFOLIBDIR) $(NSS_INFO_MODULES)
3204         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(CHARSETLIBDIR) $(CHARSET_MODULES)
3205         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(AUTHLIBDIR) $(AUTH_MODULES)
3206         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(GPEXTLIBDIR) $(GPEXT_MODULES)
3207         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PERFCOUNTLIBDIR) $(PERFCOUNT_MODULES)
3208         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(PDBLIBDIR) ldapsam.@SHLIBEXT@ NDS_ldapsam.@SHLIBEXT@
3209         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(PDBLIBDIR) ldapsam.@SHLIBEXT@ NDS_ldapsam_compat.@SHLIBEXT@
3210         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(PDBLIBDIR) ldapsam.@SHLIBEXT@ ldapsam_compat.@SHLIBEXT@
3211         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) rhosts.@SHLIBEXT@ hostsequiv.@SHLIBEXT@
3212         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) sam.@SHLIBEXT@ sam_ignoredomain.@SHLIBEXT@
3213         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) domain.@SHLIBEXT@ trustdomain.@SHLIBEXT@ ntdomain.@SHLIBEXT@
3214         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) builtin.@SHLIBEXT@ guest.@SHLIBEXT@ fixed_challenge.@SHLIBEXT@ name_to_ntstatus.@SHLIBEXT@
3215         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(NSSINFOLIBDIR) ../idmap/ad.@SHLIBEXT@ rfc2307.@SHLIBEXT@ sfu.@SHLIBEXT@ sfu20.@SHLIBEXT@
3216         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(NSSINFOLIBDIR) ../idmap/adex.@SHLIBEXT@ adex.@SHLIBEXT@
3217         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(NSSINFOLIBDIR) ../idmap/hash.@SHLIBEXT@ hash.@SHLIBEXT@
3218
3219 installscripts:: installdirs
3220         @$(SHELL) $(srcdir)/script/installscripts.sh $(INSTALLPERMS_BIN) $(DESTDIR)$(BINDIR) $(SCRIPTS)
3221
3222 installdat:: installdirs
3223         @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR) $(CODEPAGEDIR) $(srcdir)
3224
3225 installmsg:: installdirs
3226         @$(SHELL) $(srcdir)/script/installmsg.sh $(DESTDIR) $(CODEPAGEDIR) $(srcdir)
3227
3228 installswat:: installdirs installmsg
3229         @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR) $(SWATDIR) $(srcdir)
3230
3231 installpammodules:: $(PAM_MODULES)
3232         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(PAMMODULESDIR)
3233         @for module in $(PAM_MODULES); do \
3234                 echo "Installing module $${module} as $(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@ "; \
3235                 $(INSTALLCMD) -m $(INSTALLPERMS_BIN) bin/$${module}.@SHLIBEXT@ \
3236                         "$(DESTDIR)/$(PAMMODULESDIR)"; \
3237         done
3238
3239 # revert to the previously installed version
3240 revert::
3241         @$(SHELL) $(srcdir)/script/revert.sh $(SBINDIR) $(SBIN_PROGS)
3242         @$(SHELL) $(srcdir)/script/revert.sh $(BINDIR) $(BIN_PROGS) $(SCRIPTS)
3243
3244 installman:: installdirs
3245         @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(MANDIR) $(srcdir) C "@ROFF@"
3246
3247 installmo:: all installdirs
3248         @$(SHELL) $(srcdir)/script/installmo.sh $(DESTDIR) $(LOCALEDIR) $(srcdir)
3249
3250 .PHONY: showlayout
3251
3252 showlayout::
3253         @echo "Samba will be installed into:"
3254         @echo "  prefix:      $(prefix)"
3255         @echo "  bindir:      $(BINDIR)"
3256         @echo "  sbindir:     $(SBINDIR)"
3257         @echo "  libdir:      $(LIBDIR)"
3258         @echo "  modulesdir:  $(MODULESDIR)"
3259         @echo "  vardir:      $(VARDIR)"
3260         @echo "  mandir:      $(MANDIR)"
3261         @echo "  privatedir:  $(PRIVATE_DIR)"
3262         @echo "  configdir:   $(CONFIGDIR)"
3263         @echo "  lockdir:     $(LOCKDIR)"
3264         @echo "  statedir:    $(STATEDIR)"
3265         @echo "  cachedir:    $(CACHEDIR)"
3266         @echo "  piddir:      $(PIDDIR)"
3267         @echo "  nmbdsocketdir: $(NMBSOCKETDIR)"
3268         @echo "  swatdir:     $(SWATDIR)"
3269         @echo "  datadir:     ${DATADIR}"
3270         @echo "  codepagedir: $(CODEPAGEDIR)"
3271
3272
3273 uninstall:: uninstallmo uninstallman uninstallservers uninstallbin uninstallscripts uninstalldat uninstallswat uninstallmodules uninstalllibs @UNINSTALL_PAM_MODULES@
3274
3275 uninstallmo::
3276         @$(SHELL) $(srcdir)/script/uninstallmo.sh $(DESTDIR) $(LOCALEDIR) $(srcdir)
3277
3278 uninstallman::
3279         @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(MANDIR) $(srcdir) C
3280
3281 uninstallservers::
3282         @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(SBINDIR) $(SBIN_PROGS)
3283
3284 uninstallbin::
3285         @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $(BIN_PROGS)
3286
3287 uninstallmodules::
3288         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(VFSLIBDIR) $(VFS_MODULES)
3289         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PDBLIBDIR) $(PDB_MODULES)
3290         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(IDMAPLIBDIR) $(IDMAP_MODULES)
3291         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(CHARSETLIBDIR) $(CHARSET_MODULES)
3292         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(AUTHLIBDIR) $(AUTH_MODULES)
3293         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(GPEXTLIBDIR) $(GPEXT_MODULES)
3294         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PERFCOUNTLIBDIR) $(PERFCOUNT_MODULES)
3295
3296 uninstallscripts::
3297         @$(SHELL) $(srcdir)/script/uninstallscripts.sh $(INSTALLPERMS_BIN) $(DESTDIR)$(BINDIR) $(SCRIPTS)
3298
3299 uninstalldat::
3300         @$(SHELL) $(srcdir)/script/uninstalldat.sh $(DESTDIR) $(LIBDIR) $(srcdir)
3301
3302 uninstallmsg::
3303         @$(SHELL) $(srcdir)/script/uninstallmsg.sh $(DESTDIR) $(LIBDIR) $(srcdir)
3304
3305 uninstallswat:: uninstallmsg
3306         @$(SHELL) $(srcdir)/script/uninstallswat.sh $(DESTDIR) $(SWATDIR) $(srcdir)
3307
3308 uninstallpammodules::
3309         @for module in $(PAM_MODULES); do \
3310                 echo "Removing $(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@ "; \
3311                 rm -f "$(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@"; \
3312         done
3313
3314 cleanlibs::
3315         -rm -f ../lib/*/*.o ../lib/*/*/*.o \
3316                 ../lib/*/*.ho \
3317                 ../libcli/*.o ../libcli/*/*.o ../libcli/*/*/*.o \
3318                 ../librpc/*/*.o \
3319                 ../libgpo/*.o ../libgpo/*/*.o \
3320                 ../libds/*.o ../libds/*/*.o ../dynconfig/*.o
3321
3322 clean:: cleanlibs
3323         -rm -f include/build_env.h
3324         -rm -f smbd/build_options.c
3325         -rm -f $(PRECOMPILED_HEADER)
3326         -rm -f core */*~ *~ \
3327                 */*.o */*/*.o */*/*/*.o */*/*/*/*.o \
3328                 ../testsuite/*/*.o \
3329                 ../nsswitch/*.o ../nsswitch/*/*.o ../nsswitch/*/*/*.o ../nsswitch/*.@SHLIBEXT@ \
3330                 ../client/*.o \
3331                 */*.@SHLIBEXT@ */*/*.@SHLIBEXT@ */*/*/*.@SHLIBEXT@ \
3332                 $(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) \
3333                 $(MODULES) $(TORTURE_PROGS) \
3334                 $(EVERYTHING_PROGS) \
3335                 bin/timelimit \
3336                 .headers.stamp */src/*.o
3337         -rm -rf t_dir
3338
3339 include/build_env.h: script/build_env.sh
3340         @echo Building include/build_env.h
3341         @$(SHELL) $(srcdir)/script/build_env.sh $(srcdir) $(builddir) $(CC) \
3342           > $(builddir)/include/build_env.h
3343
3344 proto::
3345
3346 etags::
3347         rm -f TAGS
3348         find $(srcdir)/.. -name "*.[ch]" | xargs -n 100 etags --append $(ETAGS_OPTIONS)
3349
3350 ctags::
3351         ctags $(CTAGS_OPTIONS) `find $(srcdir)/.. -name "*.[ch]" | grep -v proto\.h`
3352
3353 realclean:: clean
3354         -rm -f config.log bin/.dummy script/findsmb script/gen-8bit-gap.sh
3355         -rm -f script/installbin.sh script/uninstallbin.sh
3356
3357 distclean:: realclean
3358         -rm -f smbadduser
3359         -rm -f include/config.h Makefile
3360         -rm -f config.status config.cache so_locations
3361         -rm -rf .deps TAGS
3362
3363 realdistclean:: distclean
3364         -rm -f include/config.h.in
3365         -rm -f include/version.h
3366         -rm -f configure
3367
3368 # this target is really just for my use. It only works on a limited
3369 # range of machines and is used to produce a list of potentially
3370 # dead (ie. unused) functions in the code. (tridge)
3371 finddead::
3372         nm */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt
3373         nm */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt
3374         comm -13 nmused.txt nmfns.txt
3375
3376
3377 # when configure.in is updated, reconfigure
3378 $(srcdir)/configure: $(srcdir)/configure.in
3379         @echo "WARNING: you need to rerun ./autogen.sh"
3380
3381 config.status: $(srcdir)/configure
3382         @echo "WARNING: you need to run ./configure"
3383
3384 Makefile: $(srcdir)/Makefile.in config.status
3385         @echo "WARNING: you need to run ./config.status"
3386
3387 ######################################################################
3388 # Samba Testing Framework
3389
3390 # Check shared libs for unresolved symbols
3391 test_shlibs:
3392         @echo "Testing $? "
3393         @$(LIB_PATH_VAR)=./bin && \
3394         export $(LIB_PATH_VAR) && \
3395         for module in $?; do \
3396                 ./script/tests/dlopen.sh $(LIBDL) $${module} \
3397                         || exit 1; \
3398         done
3399
3400 # Check for NSS module problems.
3401 test_nss_modules:: nss_modules
3402         @echo "Testing $(NSS_MODULES) "
3403         @$(LIB_PATH_VAR)=./bin && \
3404         export $(LIB_PATH_VAR) && \
3405         for module in $(NSS_MODULES); do \
3406                 ./script/tests/dlopen.sh $(LIBDL) $${module} \
3407                         || exit 1; \
3408         done
3409
3410 # Check for PAM module problems.  Specifically, check that every module we
3411 # built can actually be loaded by a minimal PAM-aware application.
3412 test_pam_modules:: pam_modules
3413         @echo "Testing $(PAM_MODULES) "
3414         @$(LIB_PATH_VAR)=./bin && \
3415         export $(LIB_PATH_VAR) && \
3416         for module in $(PAM_MODULES); do \
3417                 ./script/tests/dlopen.sh -lpam $(LIBDL) bin/$${module}.@SHLIBEXT@ \
3418                         || exit 1; \
3419         done
3420
3421
3422 ##
3423 ## Targets for 'make test'
3424 ##
3425
3426 TEST_EXTRA_ARGS = ${smbtorture4_option} ${selftest_shrdir} ${selftest_custom_conf}
3427
3428 valgrindtest:: all torture timelimit
3429         @echo Running Test suite with valgrind
3430         @$(MAKE) test \
3431          NMBD_VALGRIND="xterm -n nmbd -e valgrind -q --db-attach=yes --num-callers=30" \
3432          WINBINDD_VALGRIND="xterm -n winbindd -e valgrind -q --db-attach=yes --num-callers=30" \
3433          SMBD_VALGRIND="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \
3434          VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log"
3435
3436 selftestdir = ../selftest
3437
3438 S3_LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)="$(builddir)/bin:$$$(LIB_PATH_VAR)"
3439
3440 test:: all torture timelimit
3441         @LIB_PATH_VAR=$(LIB_PATH_VAR) $(S3_LD_LIBPATH_OVERRIDE) \
3442                 SAMBA4SHAREDDIR="$(builddir)/bin/shared" SMBTORTURE4=$(smbtorture4_path) \
3443                 NSS_WRAPPER_WINBIND_SO_PATH="$(srcdir)/../nsswitch/libnss_winbind.so" \
3444                 SELFTESTDIR="$(selftestdir)" SELFTESTPREFIX="$(selftest_prefix)" \
3445                 SOURCEDIR="$(srcdir)" \
3446                 VFSLIBDIR="$(builddir)/bin" \
3447                 RUN_FROM_BUILD_FARM="$(RUN_FROM_BUILD_FARM)" \
3448                 SUBUNIT_FORMATTER="$(SUBUNIT_FORMATTER)" \
3449                 PERL="$(PERL)" PYTHON="$(PYTHON)" \
3450                 $(srcdir)/selftest/s3-selftest.sh
3451
3452 test-%:
3453         $(MAKE) test TESTS=$*
3454
3455 buildfarm-test:
3456         $(MAKE) test RUN_FROM_BUILD_FARM=yes
3457
3458 subunit-test:
3459         $(MAKE) test SUBUNIT_FORMATTER=cat
3460
3461 SELFTEST_TESTENV = s3dc
3462
3463 testenv:
3464         $(MAKE) test SELFTEST_TESTENV=$(SELFTEST_TESTENV) TESTS="--testenv"
3465
3466 gdbtestenv:
3467         $(MAKE) test SELFTEST_TESTENV=$(SELFTEST_TESTENV) \
3468                 NMBD_VALGRIND="xterm -n nmbd -title nmbd -e $(selftestdir)/gdb_run $(S3_LD_LIBPATH_OVERRIDE)" \
3469                 WINBINDD_VALGRIND="xterm -n winbindd -title winbindd -e $(selftestdir)/gdb_run $(S3_LD_LIBPATH_OVERRIDE)" \
3470                 SMBD_VALGRIND="xterm -n smbd -title smbd -e $(selftestdir)/gdb_run $(S3_LD_LIBPATH_OVERRIDE)" \
3471                 TESTS="--testenv"
3472
3473 valgrindtestenv:
3474         $(MAKE) test SELFTEST_TESTENV=$(SELFTEST_TESTENV) \
3475                 NMBD_VALGRIND="xterm -n nmbd -title nmbd -e valgrind -q --db-attach=yes --num-callers=30" \
3476                 WINBINDD_VALGRIND="xterm -n winbindd -title winbindd -e valgrind -q --db-attach=yes --num-callers=30" \
3477                 SMBD_VALGRIND="xterm -n smbd -title smbd -e valgrind -q --db-attach=yes --num-callers=30" \
3478                 TESTS="--testenv"
3479
3480
3481 # Check for Winbind struct 32/64bit padding
3482 test_wbpad:
3483         @echo "Testing winbind request/response structure for 32/64bit padding"
3484         @./script/tests/wb_pad.sh || exit 1;
3485
3486 ##
3487 ## Examples:
3488 ##
3489
3490 libsmbclient_examples: libsmbclient
3491         $(MAKE) -C ../examples/libsmbclient -f Makefile.internal
3492
3493 clean_libsmbclient_examples:
3494         $(MAKE) -C ../examples/libsmbclient -f Makefile.internal clean
3495
3496 libnetapi_examples: libnetapi
3497         $(MAKE) -C lib/netapi/examples
3498
3499 clean_libnetapi_examples:
3500         $(MAKE) -C lib/netapi/examples clean
3501
3502 .PHONY: bin/smbtorture4 bin/ndrdump4
3503
3504 bin/smbtorture4: $(BINARY_PREREQS)
3505         $(MAKE) -f Makefile-smbtorture4 bin/smbtorture4
3506
3507 bin/ndrdump4: $(BINARY_PREREQS)
3508         $(MAKE) -f Makefile-smbtorture4 bin/ndrdump4