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