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