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