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