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