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