2d56e943b55b3e3aa50773d38b3ddb947d209319
[ira/wip.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_pam_auth.o \
1306                 winbindd/winbindd_pam_auth_crap.o \
1307                 winbindd/winbindd_pam_chauthtok.o \
1308                 winbindd/winbindd_pam_chng_pswd_auth_crap.o \
1309                 winbindd/winbindd_pam_logoff.o \
1310                 auth/auth_util.o \
1311                 auth/token_util.o \
1312                 auth/user_util.o \
1313                 auth/check_samsec.o \
1314                 auth/server_info.o \
1315                 auth/server_info_sam.o \
1316                 auth/user_info.o \
1317                 auth/pampass.o \
1318                 ../nsswitch/libwbclient/wb_reqtrans.o
1319
1320 WINBINDD_OBJ = \
1321                 $(WINBINDD_OBJ1) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
1322                 $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1323                 $(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(RPC_PARSE_OBJ) \
1324                 $(PROFILE_OBJ) $(SLCACHE_OBJ) $(SMBLDAP_OBJ) \
1325                 $(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
1326                 $(DCUTIL_OBJ) $(IDMAP_OBJ) $(NSS_INFO_OBJ) \
1327                 $(RPC_NCACN_NP_INTERNAL) $(RPC_SAMR_OBJ) $(RPC_LSA_OBJ) \
1328                 $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) \
1329                 $(LIBADS_SERVER_OBJ) \
1330                 $(TDB_VALIDATE_OBJ)
1331
1332 WBINFO_OBJ = ../nsswitch/wbinfo.o $(LIBSAMBA_OBJ) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1333                 $(POPT_LIB_OBJ) $(AFS_SETTOKEN_OBJ) \
1334                 lib/winbind_util.o $(WBCOMMON_OBJ)
1335
1336 WINBIND_NSS_OBJ = $(WBCOMMON_OBJ) $(LIBREPLACE_OBJ) @WINBIND_NSS_EXTRA_OBJS@
1337
1338 WINBIND_KRB5_LOCATOR_OBJ1 = ../nsswitch/winbind_krb5_locator.o
1339 WINBIND_KRB5_LOCATOR_OBJ = $(WINBIND_KRB5_LOCATOR_OBJ1) $(LIBREPLACE_OBJ)
1340
1341 POPT_OBJ=../lib/popt/findme.o ../lib/popt/popt.o ../lib/popt/poptconfig.o \
1342           ../lib/popt/popthelp.o ../lib/popt/poptparse.o
1343
1344 INIPARSER_OBJ = ../lib/iniparser_build/iniparser.o ../lib/iniparser_build/dictionary.o \
1345                 ../lib/iniparser_build/strlib.o
1346
1347 TDBBACKUP_OBJ = @tdbdir@/tools/tdbbackup.o $(LIBREPLACE_OBJ) \
1348         $(SOCKET_WRAPPER_OBJ)
1349
1350 TDBTOOL_OBJ = @tdbdir@/tools/tdbtool.o $(LIBREPLACE_OBJ) \
1351         $(SOCKET_WRAPPER_OBJ)
1352
1353 TDBDUMP_OBJ = @tdbdir@/tools/tdbdump.o $(LIBREPLACE_OBJ) \
1354         $(SOCKET_WRAPPER_OBJ)
1355
1356 TDBTORTURE_OBJ = @tdbdir@/tools/tdbtorture.o $(LIBREPLACE_OBJ) \
1357         $(SOCKET_WRAPPER_OBJ)
1358
1359
1360 NTLM_AUTH_OBJ1 = utils/ntlm_auth.o utils/ntlm_auth_diagnostics.o
1361
1362 NTLM_AUTH_OBJ = ${NTLM_AUTH_OBJ1} $(LIBSAMBA_OBJ) $(POPT_LIB_OBJ) \
1363                 ../lib/util/asn1.o ../libcli/auth/spnego_parse.o libsmb/clikrb5.o libads/kerberos.o \
1364                 $(LIBADS_SERVER_OBJ) \
1365                 $(PASSDB_OBJ) $(LIBTSOCKET_OBJ) $(GROUPDB_OBJ) \
1366                 $(SMBLDAP_OBJ) $(LIBNMB_OBJ) \
1367                 $(WBCOMMON_OBJ) \
1368                 $(LIBNDR_GEN_OBJ0) $(LIBNDR_NETLOGON_OBJ) @BUILD_INIPARSER@
1369
1370
1371 VLP_OBJ = printing/tests/vlp.o \
1372           ../lib/util/util_tdb.o \
1373           $(LIBSAMBAUTIL_OBJ) \
1374           param/util.o
1375
1376 RPC_OPEN_TCP_OBJ = torture/rpc_open_tcp.o \
1377                    $(LIBSMB_OBJ) \
1378                    $(PARAM_OBJ) \
1379                    $(PASSDB_OBJ) \
1380                    $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
1381                    $(LIB_NONSMBD_OBJ) \
1382                    $(KRBCLIENT_OBJ) \
1383                    $(RPC_PARSE_OBJ) \
1384                    $(RPC_CLIENT_OBJ1) \
1385                    librpc/rpc/rpc_common.o \
1386                    rpc_client/cli_pipe.o \
1387                    librpc/rpc/dcerpc_gssapi.o \
1388                    librpc/rpc/dcerpc_spnego.o \
1389                    ../librpc/rpc/binding.o \
1390                    $(LIBMSRPC_GEN_OBJ)
1391
1392 DBWRAP_TOOL_OBJ = utils/dbwrap_tool.o \
1393                   $(PARAM_OBJ) \
1394                   $(LIB_NONSMBD_OBJ) \
1395                   $(LIBSMB_ERR_OBJ)
1396
1397 DBWRAP_TORTURE_OBJ = utils/dbwrap_torture.o \
1398                      $(PARAM_OBJ) \
1399                      $(LIB_NONSMBD_OBJ) \
1400                      $(LIBSMB_ERR_OBJ) \
1401                      $(POPT_LIB_OBJ)
1402
1403 SPLIT_TOKENS_OBJ = utils/split_tokens.o \
1404                    $(PARAM_OBJ) \
1405                    $(LIB_NONSMBD_OBJ) \
1406                    $(POPT_LIB_OBJ) \
1407                    $(LIBSAMBA_OBJ)
1408
1409 ######################################################################
1410 # now the rules...
1411 ######################################################################
1412 all:: SHOWFLAGS basics libs $(SBIN_PROGS) $(BIN_PROGS) \
1413         $(MODULES) $(NSS_MODULES) $(PAM_MODULES) \
1414         $(EXTRA_ALL_TARGETS)
1415
1416 basics:: samba3-idl
1417
1418 nss_modules:: $(NSS_MODULES)
1419
1420 pam_modules:: $(PAM_MODULES)
1421
1422 pam_smbpass: SHOWFLAGS bin/pam_smbpass.@SHLIBEXT@
1423
1424 pam_winbind: SHOWFLAGS bin/pam_winbind.@SHLIBEXT@
1425
1426 gpext_modules:: $(GPEXT_MODULES)
1427
1428 torture:: SHOWFLAGS basics $(TORTURE_PROGS) @SMBTORTURE4@
1429
1430 smbtorture : SHOWFLAGS bin/smbtorture@EXEEXT@
1431
1432 masktest : SHOWFLAGS bin/masktest@EXEEXT@
1433
1434 msgtest : SHOWFLAGS bin/msgtest@EXEEXT@
1435
1436 locktest : SHOWFLAGS bin/locktest@EXEEXT@
1437
1438 smbcacls : SHOWFLAGS bin/smbcacls@EXEEXT@
1439
1440 smbcquotas : SHOWFLAGS bin/smbcquotas@EXEEXT@
1441
1442 locktest2 : SHOWFLAGS bin/locktest2@EXEEXT@
1443
1444 debug2html : SHOWFLAGS bin/debug2html@EXEEXT@
1445
1446 smbfilter : SHOWFLAGS bin/smbfilter@EXEEXT@
1447
1448 eventlogadm: SHOWFLAGS bin/eventlogadm@EXEEXT@
1449
1450 sharesec: SHOWFLAGS bin/sharesec@EXEEXT@
1451
1452 talloctort : SHOWFLAGS $(TALLOCTORT)
1453
1454 replacetort : SHOWFLAGS bin/replacetort@EXEEXT@
1455
1456 smbconftort : SHOWFLAGS bin/smbconftort@EXEEXT@
1457
1458 timelimit : SHOWFLAGS bin/timelimit@EXEEXT@
1459
1460 nsswitch : SHOWFLAGS bin/winbindd@EXEEXT@ bin/wbinfo@EXEEXT@ @WINBIND_NSS@ \
1461         @WINBIND_WINS_NSS@ @WINBIND_KRB5_LOCATOR@ \
1462         bin/pam_winbind.@SHLIBEXT@ bin/smbcontrol@EXEEXT@
1463
1464 wins : SHOWFLAGS @WINBIND_WINS_NSS@
1465
1466 modules:: SHOWFLAGS $(MODULES)
1467
1468
1469 #####################################################################
1470 ## Perl IDL Compiler
1471
1472 IDL_FILES = librpc/idl/messaging.idl \
1473             librpc/idl/libnetapi.idl \
1474             librpc/idl/notify.idl \
1475             librpc/idl/wbint.idl \
1476             librpc/idl/perfcount.idl \
1477             librpc/idl/secrets.idl \
1478             librpc/idl/libnet_join.idl \
1479             librpc/idl/preg.idl
1480
1481 samba3-idl::
1482         @PIDL_OUTPUTDIR="librpc/gen_ndr" PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \
1483          srcdir="$(srcdir)" ../librpc/build_idl.sh ../librpc/idl/*.idl
1484         @PIDL_OUTPUTDIR="librpc/gen_ndr" PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \
1485          srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh $(IDL_FILES)
1486
1487 idl_full::
1488         @PIDL_OUTPUTDIR="librpc/gen_ndr" PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \
1489          srcdir="$(srcdir)" ../librpc/build_idl.sh --full ../librpc/idl/*.idl
1490         @PIDL_OUTPUTDIR="librpc/gen_ndr" PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \
1491          srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh --full $(IDL_FILES)
1492
1493 #####################################################################
1494
1495
1496 everything:: all libtalloc libsmbclient libnetapi debug2html smbfilter talloctort replacetort smbconftort modules torture \
1497         $(EVERYTHING_PROGS)
1498
1499 .SUFFIXES:
1500 .SUFFIXES: .c .o .lo
1501
1502 .PHONY: showflags SHOWFLAGS
1503
1504 showflags: SHOWFLAGS
1505
1506 SHOWFLAGS::
1507         @echo "Using CFLAGS     = $(CFLAGS)"
1508         @echo "      PICFLAG    = $(PICFLAG)"
1509         @echo "      LIBS       = $(LIBS)"
1510         @echo "      LDFLAGS    = $(LDFLAGS)"
1511         @echo "      DYNEXP     = $(DYNEXP)"
1512         @echo "      LDSHFLAGS  = $(LDSHFLAGS)"
1513         @echo "      SHLIBEXT   = @SHLIBEXT@"
1514         @echo "      SONAMEFLAG = @SONAMEFLAG@"
1515
1516 # "showcflags" target for debuggin how CFLAGS are composed:
1517
1518 .PHONY: showcflags SHOWCFLAGS
1519
1520 showcflags: SHOWCFLAGS
1521
1522 SHOWCFLAGS::
1523         @echo "CFLAGS         = $(CFLAGS)"
1524         @echo "FLAGS          = $(FLAGS)"
1525         @echo ""
1526         @echo "FLAGS1         = @FLAGS1@"
1527         @echo "SAMBA_CPPFLAGS = @SAMBA_CPPFLAGS@"
1528         @echo "CPPFLAGS       = $(CPPFLAGS)"
1529         @echo "ISA            = $(ISA)"
1530
1531 MAKEDIR = || exec false; \
1532           if test -d "$$dir"; then :; else \
1533           echo mkdir "$$dir"; \
1534           mkdir -p "$$dir" >/dev/null 2>&1 || \
1535           test -d "$$dir" || \
1536           mkdir "$$dir" || \
1537           exec false; fi || exec false
1538
1539 # Run a static checker.
1540 CHECK_CC = $(CC_CHECKER) $(CFLAGS) $(PICFLAG) -c $< -o $@
1541 # Compile a source file.
1542 COMPILE_CC = $(CC) $(CFLAGS) $(PICFLAG) -c $< -o $@
1543 # Compile a source file with the installation paths defined.
1544 COMPILE_CC_PATH = $(CC) $(PATH_FLAGS) $(CFLAGS) $(PICFLAG) -c $< -o $@
1545
1546 COMPILE = $(COMPILE_CC)
1547
1548 .c.o:
1549         @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
1550          dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
1551         @if test -n "$(CC_CHECKER)"; then \
1552           echo "Checking  $*.c with '$(CC_CHECKER)'";\
1553           $(CHECK_CC); \
1554          fi
1555         @echo Compiling $*.c
1556         @$(COMPILE) && exit 0;\
1557                 echo "The following command failed:" 1>&2;\
1558                 echo "$(subst ",\",$(COMPILE_CC))" 1>&2;\
1559                 $(COMPILE_CC) >/dev/null 2>&1
1560 @BROKEN_CC@     -mv `echo $@ | sed 's%^.*/%%g'` $@
1561
1562 PRECOMPILED_HEADER = $(builddir)/include/includes.h.gch
1563
1564 # this adds support for precompiled headers. To use it, install a snapshot
1565 # of gcc-3.4 and run 'make pch' before you do the main build.
1566 pch::
1567         rm -f $(PRECOMPILED_HEADER)
1568         $(MAKE) $(PRECOMPILED_HEADER)
1569
1570 $(PRECOMPILED_HEADER): $(srcdir)/include/includes.h
1571         $(COMPILE)
1572
1573 BINARY_PREREQS = bin/.dummy
1574
1575 # These dependencies are only approximately correct: we want to make
1576 # sure Samba's paths are updated if ./configure is re-run.  Really it
1577 # would be nice if "make prefix=/opt/samba all" also rebuilt things,
1578 # but since we also require "make install prefix=/opt/samba" *not* to
1579 # rebuild it's a bit hard.
1580
1581 dynconfig.o: dynconfig.c Makefile
1582         @echo Compiling $*.c
1583         @$(COMPILE_CC_PATH) && exit 0;\
1584                 echo "The following command failed:" 1>&2;\
1585                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1586                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1587
1588 ../nsswitch/pam_winbind.o: ../nsswitch/pam_winbind.c Makefile
1589         @echo Compiling $*.c
1590         @$(COMPILE_CC_PATH) && exit 0;\
1591                 echo "The following command failed:" 1>&2;\
1592                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1593                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1594
1595 ### Start section of object files that require PTHREAD_CFLAGS
1596 ../nsswitch/wins.o: ../nsswitch/wins.c
1597         @echo Compiling $*.c
1598         @$(COMPILE) $(PTHREAD_CFLAGS) && exit 0;\
1599                 echo "The following command failed:" 1>&2;\
1600                 echo "$(COMPILE_CC) $(PTHREAD_CFLAGS)" 1>&2;\
1601                 $(COMPILE_CC) $(PTHREAD_CFLAGS) >/dev/null 2>&1
1602
1603 ../nsswitch/winbind_nss_linux.o: ../nsswitch/winbind_nss_linux.c
1604         @echo Compiling $*.c
1605         @$(COMPILE_CC) $(PTHREAD_CFLAGS) && exit 0;\
1606                 echo "The following command failed:" 1>&2;\
1607                 echo "$(COMPILE_CC) $(PTHREAD_CFLAGS)" 1>&2;\
1608                 $(COMPILE_CC) $(PTHREAD_CFLAGS) >/dev/null 2>&1
1609
1610 libsmb/libsmb_thread_impl.o: libsmb/libsmb_thread_impl.c
1611         @echo Compiling $*.c
1612         @$(COMPILE) $(PTHREAD_CFLAGS) && exit 0;\
1613                 echo "The following command failed:" 1>&2;\
1614                 echo "$(COMPILE_CC) $(PTHREAD_CFLAGS)" 1>&2;\
1615                 $(COMPILE_CC) $(PTHREAD_CFLAGS) >/dev/null 2>&1
1616
1617 libsmb/libsmb_thread_posix.o: libsmb/libsmb_thread_posix.c
1618         @echo Compiling $*.c
1619         @$(COMPILE) $(PTHREAD_CFLAGS) && exit 0;\
1620                 echo "The following command failed:" 1>&2;\
1621                 echo "$(COMPILE_CC) $(PTHREAD_CFLAGS)" 1>&2;\
1622                 $(COMPILE_CC) $(PTHREAD_CFLAGS) >/dev/null 2>&1
1623 ### End section of object files that require PTHREAD_CFLAGS
1624
1625 localedir.o: localedir.c Makefile
1626         @echo Compiling $*.c
1627         @$(COMPILE_CC_PATH) && exit 0;\
1628                 echo "The following command failed:" 1>&2;\
1629                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1630                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1631
1632 lib/pidfile.o: lib/pidfile.c
1633         @echo Compiling $*.c
1634         @$(COMPILE_CC_PATH) && exit 0;\
1635                 echo "The following command failed:" 1>&2;\
1636                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1637                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1638
1639 lib/version.o: lib/version.c include/version.h
1640         @echo Compiling $*.c
1641         @$(COMPILE_CC_PATH) && exit 0;\
1642                 echo "The following command failed:" 1>&2;\
1643                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1644                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1645
1646 smbd/build_options.o: smbd/build_options.c Makefile include/config.h include/build_env.h include/proto.h
1647         @echo Compiling $*.c
1648         @$(COMPILE_CC_PATH) && exit 0;\
1649                 echo "The following command failed:" 1>&2;\
1650                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1651                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1652
1653 smbd/build_options.c: include/config.h.in script/mkbuildoptions.awk
1654         @echo Generating $@
1655         @dir=smbd $(MAKEDIR) && $(AWK) -f $(srcdir)/script/mkbuildoptions.awk > $(builddir)/smbd/build_options.c < $(srcdir)/include/config.h.in
1656
1657 bin/.dummy:
1658         @if (: >> $@ || : > $@) >/dev/null 2>&1; then :; else \
1659           dir=bin $(MAKEDIR); fi
1660         @: >> $@ || : > $@ # what a fancy emoticon!
1661
1662 bin/smbd@EXEEXT@: $(BINARY_PREREQS) $(SMBD_OBJ) $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) @BUILD_POPT@
1663         @echo Linking $@
1664         @$(CC) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LDAP_LIBS) @SMBD_FAM_LIBS@ \
1665                 $(KRB5LIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \
1666                 $(ACL_LIBS) $(PASSDB_LIBS) $(LIBS) $(DNSSD_LIBS) $(AVAHI_LIBS) \
1667                 $(POPT_LIBS) @SMBD_LIBS@ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
1668                 $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1669
1670 bin/nmbd@EXEEXT@: $(BINARY_PREREQS) $(NMBD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1671         @echo Linking $@
1672         @$(CC) -o $@ $(NMBD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1673                 @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \
1674                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(POPT_LIBS) \
1675                 $(KRB5LIBS) $(LDAP_LIBS) $(ZLIB_LIBS)
1676
1677 bin/swat@EXEEXT@: $(BINARY_PREREQS) $(SWAT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1678         @echo Linking $@
1679         @$(CC) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(DYNEXP) $(PRINT_LIBS) \
1680           $(AUTH_LIBS) $(LIBS) $(PASSDB_LIBS) $(POPT_LIBS) $(KRB5LIBS) \
1681           $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1682
1683 bin/rpcclient@EXEEXT@: $(BINARY_PREREQS) $(RPCCLIENT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1684         @echo Linking $@
1685         @$(CC) -o $@ $(LDFLAGS) $(RPCCLIENT_OBJ) \
1686                 $(DYNEXP) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
1687                 $(KRB5LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
1688                 $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) $(PASSDB_LIBS)
1689
1690 bin/smbclient@EXEEXT@: $(BINARY_PREREQS) $(CLIENT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1691         @echo Linking $@
1692         @$(CC) -o $@ $(CLIENT_OBJ) $(LDFLAGS) $(DYNEXP) \
1693                 $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
1694                 $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(DNSSD_LIBS) \
1695                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1696
1697 bin/net@EXEEXT@: $(BINARY_PREREQS) $(NET_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) $(LIBNETAPI)
1698         @echo Linking $@
1699         @$(CC) -o $@ $(NET_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
1700                 $(POPT_LIBS) $(KRB5LIBS) $(UUID_LIBS) $(LDAP_LIBS) \
1701                 $(PASSDB_LIBS) $(TERMLDFLAGS) $(TERMLIBS) $(NSCD_LIBS) \
1702                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(LIBNETAPI_LIBS) \
1703                 $(ZLIB_LIBS)
1704
1705 bin/profiles@EXEEXT@: $(BINARY_PREREQS) $(PROFILES_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1706         @echo Linking $@
1707         @$(CC) -o $@ $(PROFILES_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
1708                 $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1709
1710 bin/smbspool@EXEEXT@: $(BINARY_PREREQS) $(CUPS_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1711         @echo Linking $@
1712         @$(CC) -o $@ $(CUPS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
1713                 @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \
1714                 $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
1715
1716 bin/testparm@EXEEXT@: $(BINARY_PREREQS) $(TESTPARM_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1717         @echo Linking $@
1718         @$(CC) -o $@ $(TESTPARM_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1719                 $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1720
1721 bin/smbta-util@EXEEXT@: $(BINARY_PREREQS) $(SMBTA_UTIL_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1722         @echo Linking $@
1723         @$(CC) -o $@ $(SMBTA_UTIL_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1724                 $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1725
1726 bin/smbstatus@EXEEXT@: $(BINARY_PREREQS) $(STATUS_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1727         @echo Linking $@
1728         @$(CC) -o $@ $(STATUS_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1729                 $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1730
1731 bin/smbcontrol@EXEEXT@: $(BINARY_PREREQS) $(SMBCONTROL_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1732         @echo Linking $@
1733         @$(CC) -DUSING_SMBCONTROL -o $@ \
1734                 $(SMBCONTROL_OBJ) $(DYNEXP) $(LDFLAGS) \
1735                 $(LIBS) $(LDAP_LIBS) @LIBUNWIND_PTRACE@ $(POPT_LIBS) \
1736                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1737
1738 bin/smbtree@EXEEXT@: $(BINARY_PREREQS) $(SMBTREE_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1739         @echo Linking $@
1740         @$(CC) -o $@ $(SMBTREE_OBJ) $(LDFLAGS) $(DYNEXP) \
1741                 $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1742                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1743
1744 bin/smbpasswd@EXEEXT@: $(BINARY_PREREQS) $(SMBPASSWD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1745         @echo Linking $@
1746         @$(CC) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(PASSDB_LIBS) \
1747                 $(DYNEXP) $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
1748                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1749
1750 bin/pdbedit@EXEEXT@: $(BINARY_PREREQS) $(PDBEDIT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1751         @echo Linking $@
1752         @$(CC) -o $@ $(PDBEDIT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1753                 $(POPT_LIBS) $(PASSDB_LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) \
1754                 $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS)
1755
1756 bin/smbget@EXEEXT@: $(BINARY_PREREQS) $(SMBGET_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1757         @echo Linking $@
1758         @$(CC) -o $@ $(SMBGET_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1759                 $(POPT_LIBS)  $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1760                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1761
1762 bin/nmblookup@EXEEXT@: $(BINARY_PREREQS) $(NMBLOOKUP_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1763         @echo Linking $@
1764         @$(CC) -o $@ $(NMBLOOKUP_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1765                 $(POPT_LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1766
1767 bin/smbtorture@EXEEXT@: $(BINARY_PREREQS) $(SMBTORTURE_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1768         @echo Linking $@
1769         @$(CC) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(DYNEXP) \
1770                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) \
1771                 $(LIBTDB_LIBS) $(ZLIB_LIBS) $(LIBWBCLIENT_LIBS)
1772
1773 bin/talloctort@EXEEXT@: $(BINARY_PREREQS) $(TALLOCTORT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1774         @echo Linking $@
1775         @$(CC) -o $@ $(TALLOCTORT_OBJ) $(LDFLAGS) \
1776                 $(DYNEXP) $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1777                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1778
1779 bin/replacetort@EXEEXT@: $(REPLACETORT_OBJ) @BUILD_POPT@ $(LIBTALLOC)
1780         @echo Linking $@
1781         @$(CC) -o $@ $(REPLACETORT_OBJ) $(LDFLAGS) \
1782                 $(DYNEXP) $(LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS)
1783
1784 bin/smbconftort@EXEEXT@: $(SMBCONFTORT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1785         @echo Linking $@
1786         @$(CC) -o $@ $(SMBCONFTORT_OBJ) $(LDFLAGS) \
1787                 $(DYNEXP) $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1788                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1789
1790 bin/masktest@EXEEXT@: $(BINARY_PREREQS) $(MASKTEST_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1791         @echo Linking $@
1792         @$(CC) -o $@ $(MASKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
1793                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1794                 @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \
1795                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
1796
1797 bin/msgtest@EXEEXT@: $(BINARY_PREREQS) $(MSGTEST_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1798         @echo Linking $@
1799         @$(CC) -o $@ $(MSGTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
1800                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1801                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
1802
1803 bin/smbcacls@EXEEXT@: $(BINARY_PREREQS) $(SMBCACLS_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1804         @echo Linking $@
1805         @$(CC) -o $@ $(SMBCACLS_OBJ) $(DYNEXP) $(LDFLAGS) \
1806                 $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1807                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1808
1809 bin/smbcquotas@EXEEXT@: $(BINARY_PREREQS) $(SMBCQUOTAS_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1810         @echo Linking $@
1811         @$(CC) -o $@ $(SMBCQUOTAS_OBJ) $(DYNEXP) $(LDFLAGS) \
1812                 $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1813                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1814
1815 bin/eventlogadm@EXEEXT@: $(BINARY_PREREQS) $(EVTLOGADM_OBJ) $(LIBTALLOC) $(LIBTDB)
1816         @echo Linking $@
1817         @$(CC) -o $@ $(EVTLOGADM_OBJ) $(DYNEXP) $(LDFLAGS) \
1818                 $(LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1819
1820 bin/sharesec@EXEEXT@: $(BINARY_PREREQS) $(SHARESEC_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1821         @echo Linking $@
1822         @$(CC) -o $@ $(SHARESEC_OBJ) $(DYNEXP) $(LDFLAGS) \
1823                 $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1824
1825 bin/locktest@EXEEXT@: $(BINARY_PREREQS) $(LOCKTEST_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1826         @echo Linking $@
1827         @$(CC) -o $@ $(LOCKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
1828                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1829                 @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \
1830                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
1831
1832 bin/nsstest@EXEEXT@: $(BINARY_PREREQS) $(NSSTEST_OBJ)
1833         @echo Linking $@
1834         @$(CC) -o $@ $(NSSTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS)
1835
1836 bin/pdbtest@EXEEXT@: $(BINARY_PREREQS) $(PDBTEST_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1837         @echo Linking $@
1838         @$(CC) -o $@ $(PDBTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
1839                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(PASSDB_LIBS) \
1840                 $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1841
1842 bin/vfstest@EXEEXT@: $(BINARY_PREREQS) $(VFSTEST_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1843         @echo Linking $@
1844         @$(CC) -o $@ $(VFSTEST_OBJ) $(LDFLAGS) $(TERMLDFLAGS) $(AVAHI_LIBS) \
1845                 $(TERMLIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) $(DNSSD_LIBS) \
1846                 $(ACL_LIBS) $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
1847                 @SMBD_LIBS@ $(NSCD_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
1848                 $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1849
1850 bin/smbiconv@EXEEXT@: $(BINARY_PREREQS) $(SMBICONV_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1851         @echo Linking $@
1852         @$(CC) -o $@ $(SMBICONV_OBJ) $(LDFLAGS) $(TERMLDFLAGS) \
1853                 $(TERMLIBS) $(DYNEXP) $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1854                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1855
1856 bin/log2pcap@EXEEXT@: $(BINARY_PREREQS) $(LOG2PCAP_OBJ) @BUILD_POPT@ $(LIBTALLOC)
1857         @echo Linking $@
1858         @$(CC) -o $@ $(LOG2PCAP_OBJ) $(LDFLAGS) $(DYNEXP) \
1859                 $(POPT_LIBS) $(LIBS) $(LIBTALLOC_LIBS)
1860
1861 bin/locktest2@EXEEXT@: $(BINARY_PREREQS) $(LOCKTEST2_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1862         @echo Linking $@
1863         @$(CC) -o $@ $(LOCKTEST2_OBJ) $(LDFLAGS) $(DYNEXP) \
1864                 @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \
1865                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1866                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
1867
1868 bin/debug2html@EXEEXT@: $(BINARY_PREREQS) $(DEBUG2HTML_OBJ) @BUILD_POPT@ $(LIBTALLOC)
1869         @echo Linking $@
1870         @$(CC) -o $@ $(DEBUG2HTML_OBJ) $(LDFLAGS) $(DYNEXP) \
1871                 $(LIBS) $(LIBTALLOC_LIBS)
1872
1873 bin/smbfilter@EXEEXT@: $(BINARY_PREREQS) $(SMBFILTER_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1874         @echo Linking $@
1875         @$(CC) -o $@ $(SMBFILTER_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1876                 $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1877                 @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \
1878                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
1879
1880 bin/versiontest: $(BINARY_PREREQS) lib/version_test.o $(VERSION_OBJ)
1881         @echo Linking $@
1882         @$(CC) $(FLAGS) -o $@ $(VERSION_OBJ) lib/version_test.o
1883
1884
1885 #####################################################################
1886 #
1887 # libraries
1888 #
1889 #####################################################################
1890
1891 MKSYMS_SH = $(srcdir)/script/mksyms.sh
1892
1893
1894 #-------------------------------------------------------------------
1895 #
1896 # libtalloc
1897 #
1898 #-------------------------------------------------------------------
1899
1900
1901 LIBTALLOC_OBJ0 = @LIBTALLOC_OBJ0@
1902 LIBTALLOC_OBJ = $(LIBTALLOC_OBJ0) $(LIBREPLACE_OBJ)
1903
1904 LIBTALLOC_SHARED_TARGET=@LIBTALLOC_SHARED_TARGET@
1905 LIBTALLOC_SOVER=@LIBTALLOC_SOVER@
1906 LIBTALLOC_SHARED_TARGET_SONAME=$(LIBTALLOC_SHARED_TARGET).$(LIBTALLOC_SOVER)
1907 LIBTALLOC_STATIC_TARGET=@LIBTALLOC_STATIC_TARGET@
1908 LIBTALLOC_SYMS=$(srcdir)/exports/libtalloc.@SYMSEXT@
1909 LIBTALLOC_HEADERS=$(srcdir)/@tallocdir@/talloc.h
1910
1911 $(LIBTALLOC_SYMS): $(LIBTALLOC_HEADERS)
1912         @$(MKSYMS_SH) $(AWK) $@ $(LIBTALLOC_HEADERS)
1913
1914 $(LIBTALLOC_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBTALLOC_OBJ) $(LIBTALLOC_SYMS)
1915         @echo Linking shared library $@
1916         @$(SHLD_DSO) $(LIBTALLOC_OBJ) $(LIBREPLACE_LIBS) @SONAMEFLAG@`basename $@`
1917
1918 $(LIBTALLOC_SHARED_TARGET): $(LIBTALLOC_SHARED_TARGET_SONAME)
1919         @rm -f $@
1920         @ln -f -s `basename $(LIBTALLOC_SHARED_TARGET_SONAME)` $@
1921
1922 $(LIBTALLOC_STATIC_TARGET): $(BINARY_PREREQS) $(LIBTALLOC_OBJ0)
1923         @echo Linking non-shared library $@
1924         @-$(AR) -rc $@ $(LIBTALLOC_OBJ0)
1925 libtalloc: $(LIBTALLOC)
1926
1927 cleanlibtalloc::
1928         -rm -f \
1929                 $(LIBTALLOC_SYMS) \
1930                 $(LIBTALLOC_STATIC_TARGET) \
1931                 $(LIBTALLOC_SHARED_TARGET) \
1932                 $(LIBTALLOC_SHARED_TARGET_SONAME)
1933
1934 installlibtalloc:: installdirs libtalloc
1935         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
1936         -$(INSTALLLIBCMD_SH) $(LIBTALLOC_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
1937         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBTALLOC_SHARED_TARGET)`
1938         -if test -r $(LIBTALLOC_SHARED_TARGET_SONAME) ; then \
1939                 ln -f -s `basename $(LIBTALLOC_SHARED_TARGET_SONAME)` \
1940                         $(DESTDIR)$(LIBDIR)/`basename $(LIBTALLOC_SHARED_TARGET)` ; \
1941         fi
1942         -$(INSTALLLIBCMD_A) $(LIBTALLOC_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
1943         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
1944         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBTALLOC_HEADERS) $(DESTDIR)${prefix}/include
1945
1946 uninstalllibtalloc::
1947         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBTALLOC_SHARED_TARGET)`
1948         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBTALLOC_SHARED_TARGET_SONAME)`
1949         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBTALLOC_STATIC_TARGET)`
1950         -rm -f $(DESTDIR)${prefix}/include/talloc.h
1951
1952 libs:: libtalloc
1953 installlibs:: @INSTALL_LIBTALLOC@
1954 uninstalllibs:: @UNINSTALL_LIBTALLOC@
1955 cleanlibs:: cleanlibtalloc
1956 shlibs test_shlibs: @LIBTALLOC_SHARED@
1957
1958 showlibtalloc:
1959         @echo  ""
1960         @echo "LIBTALLOC_SHARED               = @LIBTALLOC_SHARED@"
1961         @echo "LIBTALLOC_STATIC               = @LIBTALLOC_STATIC@"
1962         @echo "LIBTALLOC_LIBS                 = $(LIBTALLOC_LIBS)"
1963         @echo ""
1964         @echo "LIBTALLOC_SHARED_TARGET        = $(LIBTALLOC_SHARED_TARGET)"
1965         @echo "LIBTALLOC_SOVER                = $(LIBTALLOC_SOVER)"
1966         @echo "LIBTALLOC_SHARED TARGET_SONAME = $(LIBTALLOC_SHARED_TARGET_SONAME)"
1967         @echo "LIBTALLOC_STATIC_TARGET        = $(LIBTALLOC_STATIC_TARGET)"
1968         @echo "LIBTALLOC                      = $(LIBTALLOC)"
1969
1970 showlibs:: showlibtalloc
1971
1972 #-------------------------------------------------------------------
1973 #
1974 # libtdb
1975 #
1976 #-------------------------------------------------------------------
1977
1978 LIBTDB_OBJ0 = @LIBTDB_OBJ0@
1979 LIBTDB_OBJ = $(LIBTDB_OBJ0) $(LIBREPLACE_OBJ)
1980
1981 LIBTDB_SHARED_TARGET=@LIBTDB_SHARED_TARGET@
1982 LIBTDB_SOVER=@LIBTDB_SOVER@
1983 LIBTDB_SHARED_TARGET_SONAME=$(LIBTDB_SHARED_TARGET).$(LIBTDB_SOVER)
1984 LIBTDB_STATIC_TARGET=@LIBTDB_STATIC_TARGET@
1985 LIBTDB_SYMS=$(srcdir)/exports/libtdb.@SYMSEXT@
1986 LIBTDB_HEADERS=$(srcdir)/@tdbdir@/include/tdb.h
1987
1988 $(LIBTDB_SYMS): $(LIBTDB_HEADERS)
1989         @$(MKSYMS_SH) $(AWK) $@ $(LIBTDB_HEADERS)
1990
1991 $(LIBTDB_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBTDB_OBJ) $(LIBTDB_SYMS)
1992         @echo Linking shared library $@
1993         @$(SHLD_DSO) $(LIBTDB_OBJ) $(LIBREPLACE_LIBS) $(TDB_DEPS) \
1994                 @SONAMEFLAG@`basename $@`
1995
1996 $(LIBTDB_SHARED_TARGET): $(LIBTDB_SHARED_TARGET_SONAME)
1997         @rm -f $@
1998         @ln -f -s `basename $(LIBTDB_SHARED_TARGET_SONAME)` $@
1999
2000 $(LIBTDB_STATIC_TARGET): $(BINARY_PREREQS) $(LIBTDB_OBJ0)
2001         @echo Linking non-shared library $@
2002         @-$(AR) -rc $@ $(LIBTDB_OBJ0)
2003
2004 libtdb: $(LIBTDB)
2005
2006 cleanlibtdb::
2007         -rm -f \
2008                 $(LIBTDB_SYMS) \
2009                 $(LIBTDB_STATIC_TARGET) \
2010                 $(LIBTDB_SHARED_TARGET) \
2011                 $(LIBTDB_SHARED_TARGET_SONAME)
2012
2013
2014 installlibtdb:: installdirs libtdb
2015         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2016         -$(INSTALLLIBCMD_SH) $(LIBTDB_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
2017         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBTDB_SHARED_TARGET)`
2018         -if test -r $(LIBTDB_SHARED_TARGET_SONAME) ; then \
2019                 ln -f -s `basename $(LIBTDB_SHARED_TARGET_SONAME)` \
2020                         $(DESTDIR)$(LIBDIR)/`basename $(LIBTDB_SHARED_TARGET)` ; \
2021         fi
2022         -$(INSTALLLIBCMD_A) $(LIBTDB_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
2023         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2024         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBTDB_HEADERS) $(DESTDIR)${prefix}/include
2025
2026 uninstalllibtdb::
2027         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBTDB_SHARED_TARGET)`
2028         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBTDB_SHARED_TARGET_SONAME)`
2029         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBTDB_STATIC_TARGET)`
2030         -rm -f $(DESTDIR)${prefix}/include/tdb.h
2031
2032 libs:: libtdb
2033 installlibs:: @INSTALL_LIBTDB@
2034 uninstalllibs:: @UNINSTALL_LIBTDB@
2035 cleanlibs:: cleanlibtdb
2036 shlibs test_shlibs: @LIBTDB_SHARED@
2037
2038 showlibtdb:
2039         @echo  ""
2040         @echo "LIBTDB_SHARED               = @LIBTDB_SHARED@"
2041         @echo "LIBTDB_STATIC               = @LIBTDB_STATIC@"
2042         @echo "LIBTDB_LIBS                 = $(LIBTDB_LIBS)"
2043         @echo ""
2044         @echo "LIBTDB_SHARED_TARGET        = $(LIBTDB_SHARED_TARGET)"
2045         @echo "LIBTDB_SOVER                = $(LIBTDB_SOVER)"
2046         @echo "LIBTDB_SHARED TARGET_SONAME = $(LIBTDB_SHARED_TARGET_SONAME)"
2047         @echo "LIBTDB_STATIC_TARGET        = $(LIBTDB_STATIC_TARGET)"
2048         @echo "LIBTDB                      = $(LIBTDB)"
2049
2050 showlibs:: showlibtdb
2051
2052 #-------------------------------------------------------------------
2053 #
2054 # libwbclient
2055 #
2056 #-------------------------------------------------------------------
2057
2058 LIBWBCLIENT_OBJ0 = ../nsswitch/libwbclient/wbclient.o \
2059                   ../nsswitch/libwbclient/wbc_util.o \
2060                   ../nsswitch/libwbclient/wbc_pwd.o \
2061                   ../nsswitch/libwbclient/wbc_idmap.o \
2062                   ../nsswitch/libwbclient/wbc_sid.o \
2063                   ../nsswitch/libwbclient/wbc_guid.o \
2064                   ../nsswitch/libwbclient/wbc_pam.o
2065
2066 LIBWBCLIENT_OBJ = $(LIBWBCLIENT_OBJ0) \
2067                   $(WBCOMMON_OBJ) \
2068                   $(LIBREPLACE_OBJ) \
2069                   ../lib/util/blocking.o \
2070                   $(SOCKET_WRAPPER_OBJ)
2071
2072 LIBWBCLIENT_SHARED_TARGET=@LIBWBCLIENT_SHARED_TARGET@
2073 LIBWBCLIENT_SOVER=@LIBWBCLIENT_SOVER@
2074 LIBWBCLIENT_SHARED_TARGET_SONAME=$(LIBWBCLIENT_SHARED_TARGET).$(LIBWBCLIENT_SOVER)
2075 LIBWBCLIENT_STATIC_TARGET=@LIBWBCLIENT_STATIC_TARGET@
2076 LIBWBCLIENT_SYMS=$(srcdir)/exports/libwbclient.@SYMSEXT@
2077 LIBWBCLIENT_HEADERS=$(srcdir)/../nsswitch/libwbclient/wbclient.h
2078
2079 $(LIBWBCLIENT_SYMS): $(LIBWBCLIENT_HEADERS)
2080         @$(MKSYMS_SH) $(AWK) $@ $(LIBWBCLIENT_HEADERS)
2081
2082 $(LIBWBCLIENT_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ) $(LIBWBCLIENT_SYMS)
2083         @echo Linking shared library $@
2084         @$(SHLD_DSO) $(LIBWBCLIENT_OBJ) $(LIBREPLACE_LIBS) \
2085                 @SONAMEFLAG@`basename $@`
2086
2087 $(LIBWBCLIENT_SHARED_TARGET): $(LIBWBCLIENT_SHARED_TARGET_SONAME)
2088         @rm -f $@
2089         @ln -f -s `basename $(LIBWBCLIENT_SHARED_TARGET_SONAME)` $@
2090
2091 $(LIBWBCLIENT_STATIC_TARGET): $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ0) $(WBCOMMON_OBJ)
2092         @echo Linking non-shared library $@
2093         @-$(AR) -rc $@ $(LIBWBCLIENT_OBJ0) $(WBCOMMON_OBJ)
2094
2095 libwbclient: $(LIBWBCLIENT)
2096
2097 cleanlibwbclient::
2098         -rm -f \
2099                 $(LIBWBCLIENT_SYMS) \
2100                 $(LIBWBCLIENT_STATIC_TARGET) \
2101                 $(LIBWBCLIENT_SHARED_TARGET) \
2102                 $(LIBWBCLIENT_SHARED_TARGET_SONAME)
2103
2104 installlibwbclient:: installdirs libwbclient
2105         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2106         -$(INSTALLLIBCMD_SH) $(LIBWBCLIENT_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
2107         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET)`
2108         -if test -r $(LIBWBCLIENT_SHARED_TARGET_SONAME) ; then \
2109                 ln -f -s `basename $(LIBWBCLIENT_SHARED_TARGET_SONAME)` \
2110                         $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET)` ; \
2111         fi
2112         -$(INSTALLLIBCMD_A) bin/libwbclient.a $(DESTDIR)$(LIBDIR)
2113         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2114         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBWBCLIENT_HEADERS) $(DESTDIR)${prefix}/include
2115
2116 uninstalllibwbclient::
2117         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET)`
2118         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET_SONAME)`
2119         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_STATIC_TARGET)`
2120         -rm -f $(DESTDIR)${prefix}/include/wbclient.h
2121
2122 libs:: libwbclient
2123 installlibs:: @INSTALL_LIBWBCLIENT@
2124 uninstalllibs:: uninstalllibwbclient
2125 cleanlibs:: cleanlibwbclient
2126 shlibs test_shlibs: @LIBWBCLIENT_SHARED@
2127
2128 showlibwbclient:
2129         @echo  ""
2130         @echo "LIBWBCLIENT_SHARED               = @LIBWBCLIENT_SHARED@"
2131         @echo "LIBWBCLIENT_STATIC               = @LIBWBCLIENT_STATIC@"
2132         @echo "LIBWBCLIENT_LIBS                 = $(LIBWBCLIENT_LIBS)"
2133         @echo ""
2134         @echo "LIBWBCLIENT_SHARED_TARGET        = $(LIBWBCLIENT_SHARED_TARGET)"
2135         @echo "LIBWBCLIENT_SOVER                = $(LIBWBCLIENT_SOVER)"
2136         @echo "LIBWBCLIENT_SHARED TARGET_SONAME = $(LIBWBCLIENT_SHARED_TARGET_SONAME)"
2137         @echo "LIBWBCLIENT_STATIC_TARGET        = $(LIBWBCLIENT_STATIC_TARGET)"
2138         @echo "LIBWBCLIENT                      = $(LIBWBCLIENT)"
2139
2140 showlibs:: showlibwbclient
2141
2142
2143 #-------------------------------------------------------------------
2144 #
2145 # libaddns
2146 #
2147 #-------------------------------------------------------------------
2148
2149
2150 LIBADDNS_SHARED_TARGET=@LIBADDNS_SHARED_TARGET@
2151 LIBADDNS_SOVER=@LIBADDNS_SOVER@
2152 LIBADDNS_SHARED_TARGET_SONAME=$(LIBADDNS_SHARED_TARGET).$(LIBADDNS_SOVER)
2153 LIBADDNS_STATIC_TARGET=@LIBADDNS_STATIC_TARGET@
2154 LIBADDNS=@LIBADDNS_STATIC@ @LIBADDNS_SHARED@
2155 #LIBADDNS_SYMS=$(srcdir)/exports/libaddns.@SYMSEXT@
2156 LIBADDNS_HEADERS=$(srcdir)/libaddns/addns.h
2157
2158 $(LIBADDNS_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBADDNS_OBJ) $(LIBTALLOC)
2159         @echo Linking shared library $@
2160         @$(SHLD_DSO) $(LIBADDNS_OBJ) $(LIBS) \
2161                 $(KRB5LIBS) $(UUID_LIBS) $(LIBTALLOC_LIBS) \
2162                 @SONAMEFLAG@`basename $@`
2163
2164 $(LIBADDNS_SHARED_TARGET): $(LIBADDNS_SHARED_TARGET_SONAME)
2165         @rm -f $@
2166         @ln -f -s `basename $(LIBADDNS_SHARED_TARGET_SONAME)` $@
2167
2168 $(LIBADDNS_STATIC_TARGET): $(BINARY_PREREQS) $(LIBADDNS_OBJ0)
2169         @echo Linking non-shared library $@
2170         @-$(AR) -rc $@ $(LIBADDNS_OBJ0)
2171
2172 libaddns: $(LIBADDNS)
2173
2174 cleanlibaddns::
2175         -rm -f \
2176                 $(LIBADDNS_SHARED_TARGET) \
2177                 $(LIBADDNS_SHARED_TARGET_SONAME) \
2178                 $(LIBADDNS_STATIC_TARGET)
2179
2180 installlibaddns:: installdirs libaddns
2181         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2182         -$(INSTALLLIBCMD_SH) $(LIBADDNS_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
2183         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_SHARED_TARGET)`
2184         -if test -r $(LIBADDNS_SHARED_TARGET_SONAME) ; then \
2185                 ln -f -s `basename $(LIBADDNS_SHARED_TARGET_SONAME)` \
2186                         $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_SHARED_TARGET)` ; \
2187         fi
2188         -$(INSTALLLIBCMD_A) $(LIBADDNS_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
2189
2190 uninstalllibaddns::
2191         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_SHARED_TARGET_SONAME)`
2192         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_SHARED_TARGET)`
2193         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBADDNS_STATIC_TARGET)`
2194
2195 libs:: libaddns
2196 installlibs:: @INSTALL_LIBADDNS@
2197 uninstalllibs:: @UNINSTALL_LIBADDNS@
2198 cleanlibs:: cleanlibaddns
2199 shlibs test_shlibs: @LIBADDNS_SHARED@
2200
2201 showlibaddns:
2202         @echo  ""
2203         @echo "LIBADDNS_SHARED               = @LIBADDNS_SHARED@"
2204         @echo "LIBADDNS_STATIC               = @LIBADDNS_STATIC@"
2205         @echo "LIBADDNS_LIBS                 = $(LIBADDNS_LIBS)"
2206         @echo ""
2207         @echo "LIBADDNS_SHARED_TARGET        = $(LIBADDNS_SHARED_TARGET)"
2208         @echo "LIBADDNS_SOVER                = $(LIBADDNS_SOVER)"
2209         @echo "LIBADDNS_SHARED TARGET_SONAME = $(LIBADDNS_SHARED_TARGET_SONAME)"
2210         @echo "LIBADDNS_STATIC_TARGET        = $(LIBADDNS_STATIC_TARGET)"
2211         @echo "LIBADDNS                      = $(LIBADDNS)"
2212
2213 showlibs:: showlibaddns
2214
2215 #-------------------------------------------------------------------
2216 #
2217 # libnetapi
2218 #
2219 #-------------------------------------------------------------------
2220
2221 LIBNETAPI_OBJ0 = lib/netapi/netapi.o \
2222                  lib/netapi/cm.o \
2223                  librpc/gen_ndr/ndr_libnetapi.o \
2224                  lib/netapi/libnetapi.o \
2225                  lib/netapi/joindomain.o \
2226                  lib/netapi/serverinfo.o \
2227                  lib/netapi/getdc.o \
2228                  lib/netapi/user.o \
2229                  lib/netapi/group.o \
2230                  lib/netapi/localgroup.o \
2231                  lib/netapi/samr.o \
2232                  lib/netapi/sid.o \
2233                  lib/netapi/share.o \
2234                  lib/netapi/file.o \
2235                  lib/netapi/shutdown.o \
2236                  lib/netapi/netlogon.o
2237
2238 LIBNETAPI_OBJ  = $(LIBNETAPI_OBJ0) $(LIBNET_OBJ) \
2239                  $(LIBSMBCONF_OBJ) \
2240                  $(REG_SMBCONF_OBJ) \
2241                  $(PARAM_WITHOUT_REG_OBJ) $(LIB_NONSMBD_OBJ) \
2242                  $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
2243                  $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(RPC_PARSE_OBJ) \
2244                  $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
2245                  $(DCUTIL_OBJ) $(LIBADS_OBJ) $(PRIVILEGES_BASIC_OBJ) \
2246                  auth/token_util.o
2247
2248 LIBNETAPI_SHARED_TARGET=@LIBNETAPI_SHARED_TARGET@
2249 LIBNETAPI_SOVER=@LIBNETAPI_SOVER@
2250 LIBNETAPI_SHARED_TARGET_SONAME=$(LIBNETAPI_SHARED_TARGET).$(LIBNETAPI_SOVER)
2251 LIBNETAPI_STATIC_TARGET=@LIBNETAPI_STATIC_TARGET@
2252 LIBNETAPI_SYMS=$(srcdir)/exports/libnetapi.@SYMSEXT@
2253 LIBNETAPI_HEADERS=$(srcdir)/lib/netapi/netapi.h
2254
2255 $(LIBNETAPI_SYMS): $(LIBNETAPI_HEADERS)
2256         @$(MKSYMS_SH) $(AWK) $@ $(LIBNETAPI_HEADERS)
2257
2258 $(LIBNETAPI_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBNETAPI_OBJ) $(LIBNETAPI_SYMS) $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2259         @echo Linking shared library $@
2260         @$(SHLD_DSO) $(LIBNETAPI_OBJ) \
2261                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(LIBS) \
2262                 $(LDAP_LIBS) $(KRB5LIBS) $(NSCD_LIBS) $(ZLIB_LIBS) \
2263                 @SONAMEFLAG@`basename $@`
2264
2265 $(LIBNETAPI_SHARED_TARGET): $(LIBNETAPI_SHARED_TARGET_SONAME)
2266         @rm -f $@
2267         @ln -f -s `basename $(LIBNETAPI_SHARED_TARGET_SONAME)` $@
2268
2269 $(LIBNETAPI_STATIC_TARGET): $(BINARY_PREREQS) $(LIBNETAPI_OBJ0)
2270         @echo Linking non-shared library $@
2271         @-$(AR) -rc $@ $(LIBNETAPI_OBJ0)
2272
2273 libnetapi: $(LIBNETAPI)
2274
2275 cleanlibnetapi::
2276         -rm -f \
2277                 $(LIBNETAPI_SYMS) \
2278                 $(LIBNETAPI_STATIC_TARGET) \
2279                 $(LIBNETAPI_SHARED_TARGET) \
2280                 $(LIBNETAPI_SHARED_TARGET_SONAME)
2281
2282 installlibnetapi:: installdirs libnetapi
2283         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2284         -$(INSTALLLIBCMD_SH) $(LIBNETAPI_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
2285         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_SHARED_TARGET)`
2286         -if test -r $(LIBNETAPI_SHARED_TARGET_SONAME) ; then \
2287                 ln -f -s `basename $(LIBNETAPI_SHARED_TARGET_SONAME)` \
2288                         $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_SHARED_TARGET)` ; \
2289         fi
2290         -$(INSTALLLIBCMD_A) $(LIBNETAPI_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
2291         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2292         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(srcdir)/lib/netapi/netapi.h $(DESTDIR)${prefix}/include
2293
2294 uninstalllibnetapi::
2295         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_SHARED_TARGET)`
2296         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_SHARED_TARGET_SONAME)`
2297         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_STATIC_TARGET)`
2298         -rm -f $(DESTDIR)${prefix}/include/netapi.h
2299
2300 libs:: libnetapi
2301 installlibs:: @INSTALL_LIBNETAPI@
2302 uninstalllibs:: @UNINSTALL_LIBNETAPI@
2303 cleanlibs:: cleanlibnetapi
2304 shlibs test_shlibs: @LIBNETAPI_SHARED@
2305
2306 showlibnetapi:
2307         @echo  ""
2308         @echo "LIBNETAPI_SHARED               = @LIBNETAPI_SHARED@"
2309         @echo "LIBNETAPI_STATIC               = @LIBNETAPI_STATIC@"
2310         @echo "LIBNETAPI_LIBS                 = $(LIBNETAPI_LIBS)"
2311         @echo ""
2312         @echo "LIBNETAPI_SHARED_TARGET        = $(LIBNETAPI_SHARED_TARGET)"
2313         @echo "LIBNETAPI_SOVER                = $(LIBNETAPI_SOVER)"
2314         @echo "LIBNETAPI_SHARED TARGET_SONAME = $(LIBNETAPI_SHARED_TARGET_SONAME)"
2315         @echo "LIBNETAPI_STATIC_TARGET        = $(LIBNETAPI_STATIC_TARGET)"
2316         @echo "LIBNETAPI                      = $(LIBNETAPI)"
2317
2318 showlibs:: showlibnetapi
2319
2320 #-------------------------------------------------------------------
2321 #
2322 # libsmbclient
2323 #
2324 #-------------------------------------------------------------------
2325
2326 LIBSMBCLIENT_SHARED_TARGET=@LIBSMBCLIENT_SHARED_TARGET@
2327 LIBSMBCLIENT_SOVER=@LIBSMBCLIENT_SOVER@
2328 LIBSMBCLIENT_SHARED_TARGET_SONAME=$(LIBSMBCLIENT_SHARED_TARGET).$(LIBSMBCLIENT_SOVER)
2329 LIBSMBCLIENT_STATIC_TARGET=@LIBSMBCLIENT_STATIC_TARGET@
2330 LIBSMBCLIENT=@LIBSMBCLIENT_STATIC@ @LIBSMBCLIENT_SHARED@
2331 LIBSMBCLIENT_SYMS=$(srcdir)/exports/libsmbclient.@SYMSEXT@
2332 LIBSMBCLIENT_HEADERS=$(srcdir)/include/libsmbclient.h
2333
2334 $(LIBSMBCLIENT_SYMS): $(LIBSMBCLIENT_HEADERS)
2335         @$(MKSYMS_SH) $(AWK) $@ $(LIBSMBCLIENT_HEADERS)
2336
2337 $(LIBSMBCLIENT_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) $(LIBSMBCLIENT_THREAD_OBJ) $(LIBSMBCLIENT_SYMS) $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2338         @echo Linking shared library $@
2339         @$(SHLD_DSO) $(LIBSMBCLIENT_OBJ) $(LIBSMBCLIENT_THREAD_OBJ) \
2340                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(LIBS) \
2341                 $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(ZLIB_LIBS) $(PTHREAD_LDFLAGS) \
2342                 @SONAMEFLAG@`basename $@`
2343
2344 $(LIBSMBCLIENT_SHARED_TARGET): $(LIBSMBCLIENT_SHARED_TARGET_SONAME)
2345         @rm -f $@
2346         @ln -s `basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)` $@
2347
2348 $(LIBSMBCLIENT_STATIC_TARGET): $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ1)
2349         @echo Linking non-shared library $@
2350         @-$(AR) -rc $@ $(LIBSMBCLIENT_OBJ1)
2351
2352 libsmbclient: $(LIBSMBCLIENT)
2353
2354 cleanlibsmbclient::
2355         -rm -f \
2356                 $(LIBSMBCLIENT_SHARED_TARGET) \
2357                 $(LIBSMBCLIENT_SHARED_TARGET_SONAME) \
2358                 $(LIBSMBCLIENT_STATIC_TARGET)
2359
2360 installlibsmbclient:: installdirs libsmbclient
2361         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2362         -$(INSTALLLIBCMD_SH) $(LIBSMBCLIENT_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
2363         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)`
2364         -if test -r $(LIBSMBCLIENT_SHARED_TARGET_SONAME) ; then \
2365                 ln -f -s `basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)` \
2366                         $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)` ; \
2367         fi
2368         -$(INSTALLLIBCMD_A) $(LIBSMBCLIENT_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
2369         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2370         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBSMBCLIENT_HEADERS) $(DESTDIR)${prefix}/include
2371
2372 installclientlib:: installlibsmbclient
2373
2374 uninstalllibsmbclient::
2375         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)`
2376         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)`
2377         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_STATIC_TARGET)`
2378         -rm -f $(DESTDIR)${prefix}/include/libsmbclient.h
2379
2380 uninstallclientlib:: uninstalllibsmbclient
2381
2382 libs:: libsmbclient
2383 installlibs:: @INSTALL_LIBSMBCLIENT@
2384 uninstalllibs:: @UNINSTALL_LIBSMBCLIENT@
2385 cleanlibs:: cleanlibsmbclient
2386 shlibs test_shlibs: @LIBSMBCLIENT_SHARED@
2387
2388 showlibsmbclient:
2389         @echo  ""
2390         @echo "LIBSMBCLIENT_SHARED               = @LIBSMBCLIENT_SHARED@"
2391         @echo "LIBSMBCLIENT_STATIC               = @LIBSMBCLIENT_STATIC@"
2392         @echo "LIBSMBCLIENT_LIBS                 = $(LIBSMBCLIENT_LIBS)"
2393         @echo ""
2394         @echo "LIBSMBCLIENT_SHARED_TARGET        = $(LIBSMBCLIENT_SHARED_TARGET)"
2395         @echo "LIBSMBCLIENT_SOVER                = $(LIBSMBCLIENT_SOVER)"
2396         @echo "LIBSMBCLIENT_SHARED TARGET_SONAME = $(LIBSMBCLIENT_SHARED_TARGET_SONAME)"
2397         @echo "LIBSMBCLIENT_STATIC_TARGET        = $(LIBSMBCLIENT_STATIC_TARGET)"
2398         @echo "LIBSMBCLIENT                      = $(LIBSMBCLIENT)"
2399
2400 showlibs:: showlibsmbclient
2401
2402 #-------------------------------------------------------------------
2403 #
2404 # libsmbsharemodes
2405 #
2406 #-------------------------------------------------------------------
2407
2408 LIBSMBSHAREMODES_OBJ0 = libsmb/smb_share_modes.o
2409
2410 LIBSMBSHAREMODES_OBJ = $(LIBSMBSHAREMODES_OBJ0)
2411
2412 LIBSMBSHAREMODES_SHARED_TARGET=@LIBSMBSHAREMODES_SHARED_TARGET@
2413 LIBSMBSHAREMODES_SOVER=@LIBSMBSHAREMODES_SOVER@
2414 LIBSMBSHAREMODES_SHARED_TARGET_SONAME=$(LIBSMBSHAREMODES_SHARED_TARGET).$(LIBSMBSHAREMODES_SOVER)
2415 LIBSMBSHAREMODES_STATIC_TARGET=@LIBSMBSHAREMODES_STATIC_TARGET@
2416 LIBSMBSHAREMODES=@LIBSMBSHAREMODES_STATIC@ @LIBSMBSHAREMODES_SHARED@
2417 LIBSMBSHAREMODES_SYMS=$(srcdir)/exports/libsmbsharemodes.@SYMSEXT@
2418 LIBSMBSHAREMODES_HEADERS=$(srcdir)/include/smb_share_modes.h
2419
2420 $(LIBSMBSHAREMODES_SYMS): $(LIBSMBSHAREMODES_HEADERS)
2421         @$(MKSYMS_SH) $(AWK) $@ $(LIBSMBSHAREMODES_HEADERS)
2422
2423 $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ) $(LIBSMBSHAREMODES_SYMS) $(LIBTALLOC) $(LIBTDB)
2424         @echo Linking shared library $@
2425         @$(SHLD_DSO) $(LIBSMBSHAREMODES_OBJ) \
2426                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
2427                 @SONAMEFLAG@`basename $@`
2428
2429 $(LIBSMBSHAREMODES_SHARED_TARGET): $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)
2430         @rm -f $@
2431         @ln -f -s `basename $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)` $@
2432
2433 $(LIBSMBSHAREMODES_STATIC_TARGET): $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ0)
2434         @echo Linking non-shared library $@
2435         @-$(AR) -rc $@ $(LIBSMBSHAREMODES_OBJ0)
2436
2437 libsmbsharemodes: $(LIBSMBSHAREMODES)
2438
2439 cleanlibsmbsharemodes::
2440         -rm -f \
2441                 $(LIBSMBSHAREMODES_SHARED_TARGET) \
2442                 $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME) \
2443                 $(LIBSMBSHAREMODES_STATIC_TARGET)
2444
2445 installlibsmbsharemodes:: installdirs libsmbsharemodes
2446         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2447         -$(INSTALLLIBCMD_SH) $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
2448         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_SHARED_TARGET)`
2449         -if test -r $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME) ; then \
2450                 ln -f -s `basename $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)` \
2451                         $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_SHARED_TARGET)` ; \
2452         fi
2453         -$(INSTALLLIBCMD_A) $(LIBSMBSHAREMODES_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
2454         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2455         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBSMBSHAREMODES_HEADERS) $(DESTDIR)${prefix}/include
2456
2457 uninstalllibsmbsharemodes::
2458         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_SHARED_TARGET)`
2459         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)`
2460         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_STATIC_TARGET)`
2461         -rm -f $(DESTDIR)${prefix}/include/smb_share_modes.h
2462
2463 libs:: libsmbsharemodes
2464 installlibs:: @INSTALL_LIBSMBSHAREMODES@
2465 uninstalllibs:: @UNINSTALL_LIBSMBSHAREMODES@
2466 cleanlibs:: cleanlibsmbsharemodes
2467 shlibs test_shlibs: @LIBSMBSHAREMODES_SHARED@
2468
2469 showlibsmbsharemodes:
2470         @echo  ""
2471         @echo "LIBSMBSHAREMODES_SHARED               = @LIBSMBSHAREMODES_SHARED@"
2472         @echo "LIBSMBSHAREMODES_STATIC               = @LIBSMBSHAREMODES_STATIC@"
2473         @echo "LIBSMBSHAREMODES_TARGET               = @LIBSMBSHAREMODES_TARGET@"
2474         @echo "LIBSMBSHAREMODES_LIBS                 = $(LIBSMBSHAREMODES_LIBS)"
2475         @echo ""
2476         @echo "LIBSMBSHAREMODES_SHARED_TARGET        = $(LIBSMBSHAREMODES_SHARED_TARGET)"
2477         @echo "LIBSMBSHAREMODES_SOVER                = $(LIBSMBSHAREMODES_SOVER)"
2478         @echo "LIBSMBSHAREMODES_SHARED TARGET_SONAME = $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)"
2479         @echo "LIBSMBSHAREMODES_STATIC_TARGET        = $(LIBSMBSHAREMODES_STATIC_TARGET)"
2480         @echo "LIBSMBSHAREMODES                      = $(LIBSMBSHAREMODES)"
2481
2482 showlibs:: showlibsmbsharemodes
2483
2484 #-------------------------------------------------------------------
2485 #
2486 # libbigballofmud
2487 #
2488 #-------------------------------------------------------------------
2489
2490 # This is probably wrong for anything other than the GNU linker.
2491 bin/libbigballofmud.@SHLIBEXT@: $(BINARY_PREREQS) $(LIBBIGBALLOFMUD_OBJ) $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2492         @echo Linking shared library $@
2493         @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBBIGBALLOFMUD_OBJ) \
2494                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) \
2495                 $(PASSDB_LIBS) $(IDMAP_LIBS) $(KRB5LIBS) $(LDAP_LIBS) -lz \
2496                 @SONAMEFLAG@`basename $@`.$(LIBBIGBALLOFMUD_MAJOR)
2497         ln -snf libbigballofmud.so bin/libbigballofmud.so.0
2498
2499 # It would be nice to build a static bigballofmud too, but when I try
2500 # I get linker errors about dl_open and similar things.  I'm not sure if
2501 # it can be fixed or if they just can't be called from a static
2502 # library.
2503
2504 #####################################################################
2505 #
2506 # shared modules
2507 #
2508 #####################################################################
2509
2510 # Linker command to link our shared libraries:
2511 SHLD_LIBRARY = $(SHLD) $(LDSHFLAGS) $(MODULE_EXPORTS) \
2512               -o $@ @SONAMEFLAG@`basename $@`
2513 # Linker command to link samba internal plugin modules:
2514 SHLD_MODULE = $(SHLD) $(LDSHFLAGS_MODULES) $(MODULE_EXPORTS) \
2515         -o $@ @SONAMEFLAG@`basename $@`
2516
2517 bin/librpc_lsarpc.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_LSA_OBJ)
2518         @echo "Linking $@"
2519         @$(SHLD_LIBRARY) $(RPC_LSA_OBJ)
2520
2521 bin/librpc_samr.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SAMR_OBJ)
2522         @echo "Linking $@"
2523         @$(SHLD_LIBRARY) $(RPC_SAMR_OBJ)
2524
2525 bin/librpc_srvsvc.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SVC_OBJ)
2526         @echo "Linking $@"
2527         @$(SHLD_LIBRARY) $(RPC_SVC_OBJ)
2528
2529 bin/librpc_svcctl.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SVCCTL_OBJ)
2530         @echo "Linking $@"
2531         @$(SHLD_LIBRARY) $(RPC_SVCCTL_OBJ)
2532
2533 bin/librpc_ntsvcs.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_NTSVCS_OBJ)
2534         @echo "Linking $@"
2535         @$(SHLD_LIBRARY) $(RPC_NTSVCS_OBJ)
2536
2537 bin/librpc_wkssvc.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_WKS_OBJ)
2538         @echo "Linking $@"
2539         @$(SHLD_LIBRARY) $(RPC_WKS_OBJ)
2540
2541 bin/librpc_NETLOGON.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_NETLOG_OBJ)
2542         @echo "Linking $@"
2543         @$(SHLD_LIBRARY) $(RPC_NETLOG_OBJ)
2544
2545 bin/librpc_winreg.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_REG_OBJ)
2546         @echo "Linking $@"
2547         @$(SHLD_LIBRARY) $(RPC_REG_OBJ)
2548
2549 bin/librpc_initshutdown.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_INITSHUTDOWN_OBJ)
2550         @echo "Linking $@"
2551         @$(SHLD_LIBRARY) $(RPC_INITSHUTDOWN_OBJ)
2552
2553 bin/librpc_dssetup.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_DSSETUP_OBJ)
2554         @echo "Linking $@"
2555         @$(SHLD_LIBRARY) $(RPC_DSSETUP_OBJ)
2556
2557 bin/librpc_spoolss.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SPOOLSS_OBJ)
2558         @echo "Linking $@"
2559         @$(SHLD_LIBRARY) $(RPC_SPOOLSS_OBJ)
2560
2561 bin/librpc_eventlog.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_EVENTLOG_OBJ)
2562         @echo "Linking $@"
2563         @$(SHLD_LIBRARY) $(RPC_EVENTLOG_OBJ)
2564
2565 bin/librpc_netdfs.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_DFS_OBJ)
2566         @echo "Linking $@"
2567         @$(SHLD_LIBRARY) $(RPC_DFS_OBJ)
2568
2569 bin/librpc_echo.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_ECHO_OBJ)
2570         @echo "Linking $@"
2571         @$(SHLD_LIBRARY) $(RPC_ECHO_OBJ)
2572
2573 bin/winbindd@EXEEXT@: $(BINARY_PREREQS) $(WINBINDD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2574         @echo "Linking $@"
2575         @$(CC) -o $@ $(WINBINDD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
2576                 $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(AUTH_LIBS) \
2577                 $(PASSDB_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) \
2578                 $(ZLIB_LIBS)
2579
2580 bin/vlp@EXEEXT@: $(BINARY_PREREQS) $(VLP_OBJ) $(LIBTDB)
2581         @echo "Linking $@"
2582         @$(CC) -o $@ $(VLP_OBJ) $(LDFLAGS) $(DYNEXP) \
2583                 $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
2584                 $(LIBTDB_LIBS)
2585
2586 @WINBIND_NSS@: $(BINARY_PREREQS) $(WINBIND_NSS_OBJ)
2587         @echo "Linking $@"
2588         @$(SHLD) $(WINBIND_NSS_LDSHFLAGS) -o $@ $(WINBIND_NSS_OBJ) \
2589                 $(LIBREPLACE_LIBS) $(PTHREAD_LDFLAGS) \
2590                 @SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@
2591
2592 @WINBIND_WINS_NSS@: $(BINARY_PREREQS) $(WINBIND_WINS_NSS_OBJ) $(LIBTALLOC) $(LIBTDB)
2593         @echo "Linking $@"
2594         @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_WINS_NSS_OBJ) \
2595                 $(LDAP_LIBS) $(KRB5LIBS) $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS) \
2596                 @SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@
2597
2598 bin/winbind_krb5_locator.@SHLIBEXT@: $(BINARY_PREREQS) $(WINBIND_KRB5_LOCATOR_OBJ) $(LIBWBCLIENT)
2599         @echo "Linking $@"
2600         @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_KRB5_LOCATOR_OBJ) $(LIBWBCLIENT_LIBS) $(KRB5LIBS) \
2601                 @SONAMEFLAG@`basename $@`
2602
2603 bin/pam_winbind.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_WINBIND_OBJ) $(LIBTALLOC) $(LIBWBCLIENT)
2604         @echo "Linking shared library $@"
2605         @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_OBJ) -lpam @INIPARSERLIBS@ \
2606                 $(LIBREPLACE_LIBS) $(LIBTALLOC_LIBS) $(LIBWBCLIENT_LIBS) @SONAMEFLAG@`basename $@`
2607
2608 ##########
2609 # Plugins:
2610 ##########
2611
2612 bin/builtin.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_BUILTIN_OBJ)
2613         @echo "Building plugin $@"
2614         @$(SHLD_MODULE) $(AUTH_BUILTIN_OBJ)
2615
2616 bin/domain.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_DOMAIN_OBJ)
2617         @echo "Building plugin $@"
2618         @$(SHLD_MODULE) $(AUTH_DOMAIN_OBJ)
2619
2620 bin/script.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_SCRIPT_OBJ)
2621         @echo "Building plugin $@"
2622         @$(SHLD_MODULE) $(AUTH_SCRIPT_OBJ)
2623
2624 bin/netlogond.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_NETLOGOND_OBJ)
2625         @echo "Building plugin $@"
2626         @$(SHLD_MODULE) $(AUTH_NETLOGOND_OBJ)
2627
2628 bin/smbserver.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_SERVER_OBJ)
2629         @echo "Building plugin $@"
2630         @$(SHLD_MODULE) $(AUTH_SERVER_OBJ)
2631
2632 bin/winbind.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_WINBIND_OBJ)
2633         @echo "Building plugin $@"
2634         @$(SHLD_MODULE) $(AUTH_WINBIND_OBJ)
2635
2636 bin/wbc.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_WBC_OBJ)
2637         @echo "Building plugin $@"
2638         @$(SHLD_MODULE) $(AUTH_WBC_OBJ)
2639
2640 bin/unix.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_UNIX_OBJ)
2641         @echo "Building plugin $@"
2642         @$(SHLD_MODULE) $(AUTH_UNIX_OBJ)
2643
2644 bin/sam.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_SAM_OBJ)
2645         @echo "Building plugin $@"
2646         @$(SHLD_MODULE) $(AUTH_SAM_OBJ)
2647
2648 bin/ldapsam.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_ldap.o passdb/pdb_nds.o
2649         @echo "Building plugin $@"
2650         @$(SHLD_MODULE) passdb/pdb_ldap.o passdb/pdb_nds.o $(LDAP_LIBS)
2651
2652 bin/ads.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_ads.o
2653         @echo "Building plugin $@"
2654         @$(SHLD_MODULE) passdb/pdb_ads.o
2655
2656 bin/tdbsam.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_tdb.o
2657         @echo "Building plugin $@"
2658         @$(SHLD_MODULE) passdb/pdb_tdb.o
2659
2660 bin/wbc_sam.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_wbc_sam.o
2661         @echo "Building plugin $@"
2662         @$(SHLD_MODULE) passdb/pdb_wbc_sam.o
2663
2664 bin/smbpasswd.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_smbpasswd.o
2665         @echo "Building plugin $@"
2666         @$(SHLD_MODULE) passdb/pdb_smbpasswd.o
2667
2668 bin/rid.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_rid.o
2669         @echo "Building plugin $@"
2670         @$(SHLD_MODULE) winbindd/idmap_rid.o
2671
2672 bin/passdb.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_passdb.o
2673         @echo "Building plugin $@"
2674         @$(SHLD_MODULE) winbindd/idmap_passdb.o
2675
2676 bin/ad.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ad.o
2677         @echo "Building plugin $@"
2678         @$(SHLD_MODULE) winbindd/idmap_ad.o
2679
2680 bin/hash.@SHLIBEXT@: $(BINARY_PREREQS) $(IDMAP_HASH_OBJ)
2681         @echo "Building plugin $@"
2682         @$(SHLD_MODULE) $(IDMAP_HASH_OBJ)
2683
2684 bin/adex.@SHLIBEXT@: $(BINARY_PREREQS) $(IDMAP_ADEX_OBJ)
2685         @echo "Building plugin $@"
2686         @$(SHLD_MODULE) $(IDMAP_ADEX_OBJ)
2687
2688 bin/tdb2.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_tdb2.o
2689         @echo "Building plugin $@"
2690         @$(SHLD_MODULE) winbindd/idmap_tdb2.o
2691
2692 bin/ldap.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ldap.o
2693         @echo "Building plugin $@"
2694         @$(SHLD_MODULE) winbindd/idmap_ldap.o
2695
2696 bin/weird.@SHLIBEXT@: $(BINARY_PREREQS) $(DEVEL_HELP_WEIRD_OBJ)
2697         @echo "Building plugin $@"
2698         @$(SHLD_MODULE) $(DEVEL_HELP_WEIRD_OBJ)
2699
2700 bin/CP850.@SHLIBEXT@: $(BINARY_PREREQS) $(CP850_OBJ)
2701         @echo "Building plugin $@"
2702         @$(SHLD_MODULE) $(CP850_OBJ)
2703
2704 bin/CP437.@SHLIBEXT@: $(BINARY_PREREQS) $(CP437_OBJ)
2705         @echo "Building plugin $@"
2706         @$(SHLD_MODULE) $(CP437_OBJ)
2707
2708 bin/macosxfs.@SHLIBEXT@: $(BINARY_PREREQS) $(CHARSET_MACOSXFS_OBJ)
2709         @echo "Building plugin $@"
2710         @$(SHLD_MODULE) $(CHARSET_MACOSXFS_OBJ) -framework CoreFoundation
2711
2712 # NOTE, there is no build rule for a dynamic default VFS module because
2713 # this one MUST MUST MUST be built statically.
2714
2715 bin/audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AUDIT_OBJ)
2716         @echo "Building plugin $@"
2717         @$(SHLD_MODULE) $(VFS_AUDIT_OBJ)
2718
2719 bin/extd_audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_EXTD_AUDIT_OBJ)
2720         @echo "Building plugin $@"
2721         @$(SHLD_MODULE) $(VFS_EXTD_AUDIT_OBJ)
2722
2723 bin/full_audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_FULL_AUDIT_OBJ)
2724         @echo "Building plugin $@"
2725         @$(SHLD_MODULE) $(VFS_FULL_AUDIT_OBJ)
2726
2727 bin/recycle.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_RECYCLE_OBJ)
2728         @echo "Building plugin $@"
2729         @$(SHLD_MODULE) $(VFS_RECYCLE_OBJ)
2730
2731 bin/netatalk.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_NETATALK_OBJ)
2732         @echo "Building plugin $@"
2733         @$(SHLD_MODULE) $(VFS_NETATALK_OBJ)
2734
2735 bin/fake_perms.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_FAKE_PERMS_OBJ)
2736         @echo "Building plugin $@"
2737         @$(SHLD_MODULE) $(VFS_FAKE_PERMS_OBJ)
2738
2739 bin/default_quota.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_DEFAULT_QUOTA_OBJ)
2740         @echo "Building plugin $@"
2741         @$(SHLD_MODULE) $(VFS_DEFAULT_QUOTA_OBJ)
2742
2743 bin/readonly.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_READONLY_OBJ)
2744         @echo "Building plugin $@"
2745         @$(SHLD_MODULE) $(VFS_READONLY_OBJ)
2746
2747 bin/shadow_copy.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SHADOW_COPY_OBJ)
2748         @echo "Building plugin $@"
2749         @$(SHLD_MODULE) $(VFS_SHADOW_COPY_OBJ)
2750
2751 bin/shadow_copy2.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SHADOW_COPY2_OBJ)
2752         @echo "Building plugin $@"
2753         @$(SHLD_MODULE) $(VFS_SHADOW_COPY2_OBJ)
2754
2755 bin/syncops.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SYNCOPS_OBJ)
2756         @echo "Building plugin $@"
2757         @$(SHLD_MODULE) $(VFS_SYNCOPS_OBJ)
2758
2759 bin/cap.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CAP_OBJ)
2760         @echo "Building plugin $@"
2761         @$(SHLD_MODULE) $(VFS_CAP_OBJ)
2762
2763 bin/expand_msdfs.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_EXPAND_MSDFS_OBJ)
2764         @echo "Building plugin $@"
2765         @$(SHLD_MODULE) $(VFS_EXPAND_MSDFS_OBJ)
2766
2767 bin/afsacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AFSACL_OBJ)
2768         @echo "Building plugin $@"
2769         @$(SHLD_MODULE) $(VFS_AFSACL_OBJ)
2770
2771 bin/xattr_tdb.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_XATTR_TDB_OBJ)
2772         @echo "Building plugin $@"
2773         @$(SHLD_MODULE) $(VFS_XATTR_TDB_OBJ)
2774
2775 bin/posixacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_POSIXACL_OBJ)
2776         @echo "Building plugin $@"
2777         @$(SHLD_MODULE) $(VFS_POSIXACL_OBJ)
2778
2779 bin/aixacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIXACL_OBJ)
2780         @echo "Building plugin $@"
2781         @$(SHLD_MODULE) $(VFS_AIXACL_OBJ)
2782
2783 bin/aixacl2.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIXACL2_OBJ)
2784         @echo "Building plugin $@"
2785         @$(SHLD_MODULE) $(VFS_AIXACL2_OBJ)
2786
2787 bin/solarisacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SOLARISACL_OBJ)
2788         @echo "Building plugin $@"
2789         @$(SHLD_MODULE) $(VFS_SOLARISACL_OBJ)
2790
2791 bin/zfsacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ZFSACL_OBJ)
2792         @echo "Building plugin $@"
2793         @$(SHLD_MODULE) $(VFS_ZFSACL_OBJ)
2794
2795 bin/irixacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_IRIXACL_OBJ)
2796         @echo "Building plugin $@"
2797         @$(SHLD_MODULE) $(VFS_IRIXACL_OBJ)
2798
2799 bin/hpuxacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_HPUXACL_OBJ)
2800         @echo "Building plugin $@"
2801         @$(SHLD_MODULE) $(VFS_HPUXACL_OBJ)
2802
2803 bin/tru64acl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_TRU64ACL_OBJ)
2804         @echo "Building plugin $@"
2805         @$(SHLD_MODULE) $(VFS_TRU64ACL_OBJ)
2806
2807 bin/catia.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CATIA_OBJ)
2808         @echo "Building plugin $@"
2809         @$(SHLD_MODULE) $(VFS_CATIA_OBJ)
2810
2811 bin/streams_xattr.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_STREAMS_XATTR_OBJ)
2812         @echo "Building plugin $@"
2813         @$(SHLD_MODULE) $(VFS_STREAMS_XATTR_OBJ)
2814
2815 bin/streams_depot.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_STREAMS_DEPOT_OBJ)
2816         @echo "Building plugin $@"
2817         @$(SHLD_MODULE) $(VFS_STREAMS_DEPOT_OBJ)
2818
2819 bin/cacheprime.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CACHEPRIME_OBJ)
2820         @echo "Building plugin $@"
2821         @$(SHLD_MODULE) $(VFS_CACHEPRIME_OBJ)
2822
2823 bin/prealloc.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_PREALLOC_OBJ)
2824         @echo "Building plugin $@"
2825         @$(SHLD_MODULE) $(VFS_PREALLOC_OBJ)
2826
2827 bin/commit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_COMMIT_OBJ)
2828         @echo "Building plugin $@"
2829         @$(SHLD_MODULE) $(VFS_COMMIT_OBJ)
2830
2831 bin/gpfs.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_GPFS_OBJ)
2832         @echo "Building plugin $@"
2833         @$(SHLD_MODULE) $(VFS_GPFS_OBJ)
2834
2835 bin/notify_fam.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_NOTIFY_FAM_OBJ)
2836         @echo "Building plugin $@"
2837         @$(SHLD_MODULE) $(VFS_NOTIFY_FAM_OBJ) @SMB_FAM_LIBS@
2838
2839 bin/readahead.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_READAHEAD_OBJ)
2840         @echo "Building plugin $@"
2841         @$(SHLD_MODULE) $(VFS_READAHEAD_OBJ)
2842
2843 bin/tsmsm.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_TSMSM_OBJ)
2844         @echo "Building plugin $@"
2845         @$(SHLD_MODULE) $(VFS_TSMSM_OBJ)
2846
2847 bin/fileid.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_FILEID_OBJ)
2848         @echo "Building plugin $@"
2849         @$(SHLD_MODULE) $(VFS_FILEID_OBJ)
2850
2851 bin/aio_fork.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIO_FORK_OBJ)
2852         @echo "Building plugin $@"
2853         @$(SHLD_MODULE) $(VFS_AIO_FORK_OBJ)
2854
2855 bin/preopen.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_PREOPEN_OBJ)
2856         @echo "Building plugin $@"
2857         @$(SHLD_MODULE) $(VFS_PREOPEN_OBJ)
2858
2859 bin/acl_xattr.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ACL_XATTR_OBJ)
2860         @echo "Building plugin $@"
2861         @$(SHLD_MODULE) $(VFS_ACL_XATTR_OBJ)
2862
2863 bin/smb_traffic_analyzer.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SMB_TRAFFIC_ANALYZER_OBJ)
2864         @echo "Building plugin $@"
2865         @$(SHLD_MODULE) $(VFS_SMB_TRAFFIC_ANALYZER_OBJ)
2866
2867 bin/acl_tdb.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ACL_TDB_OBJ)
2868         @echo "Building plugin $@"
2869         @$(SHLD_MODULE) $(VFS_ACL_TDB_OBJ)
2870
2871 bin/onefs.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ONEFS_OBJ)
2872         @echo "Building plugin $@"
2873         @$(SHLD_MODULE) $(VFS_ONEFS_OBJ) @ONEFS_LIBS@
2874
2875 bin/onefs_shadow_copy.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ONEFS_SHADOW_COPY_OBJ)
2876         @echo "Building plugin $@"
2877         @$(SHLD_MODULE) $(VFS_ONEFS_SHADOW_COPY_OBJ)
2878
2879 bin/pc_onefs.@SHLIBEXT@: $(BINARY_PREREQS) $(PERFCOUNT_ONEFS_OBJ)
2880         @echo "Building plugin $@"
2881         @$(SHLD_MODULE) $(PERFCOUNT_ONEFS_OBJ)
2882
2883 bin/pc_test.@SHLIBEXT@: $(BINARY_PREREQS) $(PERFCOUNT_TEST_OBJ)
2884         @echo "Building plugin $@"
2885         @$(SHLD_MODULE) $(PERFCOUNT_TEST_OBJ)
2886
2887 bin/registry.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/registry.o
2888         @echo "Building plugin $@"
2889         @$(SHLD_MODULE) libgpo/gpext/registry.o
2890
2891 bin/scripts.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/scripts.o
2892         @echo "Building plugin $@"
2893         @$(SHLD_MODULE) libgpo/gpext/scripts.o
2894
2895 bin/security.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/security.o
2896         @echo "Building plugin $@"
2897         @$(SHLD_MODULE) libgpo/gpext/security.o
2898
2899 bin/dirsort.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_DIRSORT_OBJ)
2900         @echo "Building plugin $@"
2901         @$(SHLD_MODULE) $(VFS_DIRSORT_OBJ)
2902
2903 bin/scannedonly.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SCANNEDONLY_OBJ)
2904         @echo "Building plugin $@"
2905         @$(SHLD_MODULE) $(VFS_SCANNEDONLY_OBJ)
2906
2907 bin/crossrename.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CROSSRENAME_OBJ)
2908         @echo "Building plugin $@"
2909         @$(SHLD_MODULE) $(VFS_CROSSRENAME_OBJ)
2910
2911 bin/linux_xfs_sgid.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_LINUX_XFS_SGID_OBJ)
2912         @echo "Building plugin $@"
2913         @$(SHLD_MODULE) $(VFS_LINUX_XFS_SGID_OBJ)
2914
2915 #########################################################
2916 ## IdMap NSS plugins
2917
2918 ## None here right now
2919 #########################################################
2920
2921 bin/wbinfo@EXEEXT@: $(BINARY_PREREQS) $(WBINFO_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2922         @echo Linking $@
2923         @$(CC) -o $@ $(LDFLAGS) $(WBINFO_OBJ) $(DYNEXP) $(LIBS) \
2924                 $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
2925                 $(LIBWBCLIENT_LIBS)
2926
2927 bin/ntlm_auth@EXEEXT@: $(BINARY_PREREQS) $(NTLM_AUTH_OBJ) $(PARAM_OBJ) \
2928         $(LIB_NONSMBD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2929         @echo Linking $@
2930         @$(CC) -o $@ $(LDFLAGS) $(DYNEXP) $(NTLM_AUTH_OBJ) \
2931                 $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBS) \
2932                 $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
2933                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) @INIPARSERLIBS@
2934
2935 bin/pam_smbpass.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_SMBPASS_OBJ) $(LIBTALLOC) $(LIBWBCLIENT) $(LIBTDB)
2936         @echo "Linking shared library $@"
2937         @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_SMBPASS_OBJ) -lpam $(DYNEXP) \
2938                 $(LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
2939                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS)
2940
2941 bin/tdbbackup@EXEEXT@: $(BINARY_PREREQS) $(TDBBACKUP_OBJ) $(LIBTALLOC) $(LIBTDB)
2942         @echo Linking $@
2943         @$(CC) -o $@ $(LDFLAGS) $(TDBBACKUP_OBJ) $(DYNEXP) \
2944                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
2945
2946 bin/tdbtool@EXEEXT@: $(BINARY_PREREQS) $(TDBTOOL_OBJ) $(LIBTALLOC) $(LIBTDB)
2947         @echo Linking $@
2948         @$(CC) -o $@ $(LDFLAGS) $(TDBTOOL_OBJ) $(DYNEXP) \
2949                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
2950
2951 bin/tdbdump@EXEEXT@: $(BINARY_PREREQS) $(TDBDUMP_OBJ) $(LIBTALLOC) $(LIBTDB)
2952         @echo Linking $@
2953         @$(CC) -o $@ $(LDFLAGS) $(TDBDUMP_OBJ) $(DYNEXP) \
2954                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
2955
2956 bin/tdbtorture@EXEEXT@: $(BINARY_PREREQS) $(TDBTORTURE_OBJ) $(LIBTALLOC) $(LIBTDB)
2957         @echo Linking $@
2958         @$(CC) -o $@ $(LDFLAGS) $(TDBTORTURE_OBJ) $(DYNEXP) \
2959                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
2960
2961 bin/t_strcmp@EXEEXT@: $(BINARY_PREREQS) $(LIBTALLOC) bin/libbigballofmud.@SHLIBEXT@ torture/t_strcmp.o
2962         $(CC) -o $@ $(DYNEXP) $(LIBS) $(LIBTALLOC_LIBS) \
2963                 torture/t_strcmp.o -L ./bin -lbigballofmud $(LIBWBCLIENT_LIBS)
2964
2965 bin/t_strstr@EXEEXT@: $(BINARY_PREREQS) $(LIBTALLOC) bin/libbigballofmud.@SHLIBEXT@ torture/t_strstr.o
2966         $(CC) -o $@ $(DYNEXP) $(LIBS) $(LIBTALLOC_LIBS) \
2967                 torture/t_strstr.o -L ./bin -lbigballofmud $(LIBWBCLIENT_LIBS)
2968
2969 bin/t_strappend@EXEEXT@: $(BINARY_PREREQS) $(LIBTALLOC) bin/libbigballofmud.@SHLIBEXT@ torture/t_strappend.o
2970         $(CC) -o $@ $(DYNEXP) $(LIBS) $(LIBTALLOC_LIBS) \
2971                 torture/t_strappend.o -L ./bin -lbigballofmud $(LIBWBCLIENT_LIBS)
2972
2973 bin/t_stringoverflow@EXEEXT@: $(BINARY_PREREQS) bin/libbigballofmud.@SHLIBEXT@ torture/t_stringoverflow.o
2974         $(CC) -o $@ $(DYNEXP) torture/t_stringoverflow.o \
2975                 -L./bin -lbigballofmud $(LIBWBCLIENT_LIBS)
2976
2977 bin/timelimit@EXEEXT@: script/tests/timelimit.o
2978         @echo Linking $@
2979         @$(CC) -o $@ $(DYNEXP) script/tests/timelimit.o
2980
2981 bin/rpc_open_tcp@EXEEXT@: $(BINARY_PREREQS) $(RPC_OPEN_TCP_OBJ) $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2982         @echo "Linking $@"
2983         @$(CC) -o $@ $(RPC_OPEN_TCP_OBJ) $(LDFLAGS) $(DYNEXP) \
2984                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBWBCLIENT_LIBS) \
2985                 $(LDAP_LIBS) $(KRB5LIBS) $(NSCD_LIBS)
2986
2987 bin/test_lp_load@EXEEXT@: $(BINARY_PREREQS) $(TEST_LP_LOAD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
2988         @echo "Linking $@"
2989         @$(CC) -o $@ $(TEST_LP_LOAD_OBJ) \
2990                 $(LDFLAGS) $(DYNEXP) $(LIBS) \
2991                 $(LDAP_LIBS) \
2992                 $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
2993
2994 bin/dbwrap_tool@EXEEXT@: $(DBWRAP_TOOL_OBJ) $(LIBTALLOC) $(LIBTDB)
2995         @echo "Linking $@"
2996         @$(CC) -o $@ $(DBWRAP_TOOL_OBJ)\
2997                 $(LDFLAGS) $(DYNEXP) $(LIBS) \
2998                 $(LDAP_LIBS) \
2999                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
3000
3001 install-dbwrap_tool:: bin/dbwrap_tool@EXEEXT@
3002         @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $<
3003
3004 bin/dbwrap_torture@EXEEXT@: $(DBWRAP_TORTURE_OBJ) $(LIBTALLOC) $(LIBTDB)
3005         @echo "Linking $@"
3006         @$(CC) -o $@ $(DBWRAP_TORTURE_OBJ)\
3007                 $(LDFLAGS) $(DYNEXP) $(LIBS) \
3008                 $(LDAP_LIBS) \
3009                 $(POPT_LIBS) \
3010                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
3011
3012 install-dbwrap_torture:: bin/dbwrap_torture@EXEEXT@
3013         @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $<
3014
3015 bin/split_tokens@EXEEXT@: $(BINARY_PREREQS) $(SPLIT_TOKENS_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
3016         @echo "Linking $@"
3017         @$(CC) -o $@ $(SPLIT_TOKENS_OBJ) \
3018                 $(LDFLAGS) $(DYNEXP) \
3019                 $(LIBS) $(POPT_LIBS) \
3020                 $(LDAP_LIBS) \
3021                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
3022
3023 install:: installservers installbin installman \
3024                 installscripts installdat installmodules @SWAT_INSTALL_TARGETS@ \
3025                 @INSTALL_PAM_MODULES@ installlibs installmo
3026
3027 install-everything:: install installmodules
3028
3029 # DESTDIR is used here to prevent packagers wasting their time
3030 # duplicating the Makefile. Remove it and you will have the privelege
3031 # of package each samba release for muliple versions of multiple
3032 # distributions and operating systems, or at least supplying patches
3033 # to all the packaging files required for this, prior to committing
3034 # the removal of DESTDIR. Do not remove it even though you think it
3035 # is not used
3036
3037 installdirs::
3038         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) \
3039                 $(DESTDIR) $(prefix) $(BINDIR) $(SBINDIR) $(LIBDIR) \
3040                 $(VARDIR) $(PRIVATEDIR) $(PIDDIR) $(LOCKDIR) $(STATEDIR) \
3041                 $(CACHEDIR) $(MANDIR) $(CODEPAGEDIR) $(MODULESDIR) $(LOCALEDIR)
3042
3043 installservers:: all installdirs
3044         @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(SBINDIR) $(SBIN_PROGS)
3045
3046 installbin:: all installdirs
3047         @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $(BIN_PROGS)
3048
3049 # Some symlinks are required for the 'probing' of modules.
3050 # This mechanism should go at some point..
3051 installmodules:: modules installdirs
3052         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(VFSLIBDIR) $(VFS_MODULES)
3053         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PDBLIBDIR) $(PDB_MODULES)
3054         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(RPCLIBDIR) $(RPC_MODULES)
3055         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(IDMAPLIBDIR) $(IDMAP_MODULES)
3056         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(NSSINFOLIBDIR) $(NSS_INFO_MODULES)
3057         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(CHARSETLIBDIR) $(CHARSET_MODULES)
3058         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(AUTHLIBDIR) $(AUTH_MODULES)
3059         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(GPEXTLIBDIR) $(GPEXT_MODULES)
3060         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PERFCOUNTLIBDIR) $(PERFCOUNT_MODULES)
3061         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(PDBLIBDIR) ldapsam.@SHLIBEXT@ NDS_ldapsam.@SHLIBEXT@
3062         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(PDBLIBDIR) ldapsam.@SHLIBEXT@ NDS_ldapsam_compat.@SHLIBEXT@
3063         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(PDBLIBDIR) ldapsam.@SHLIBEXT@ ldapsam_compat.@SHLIBEXT@
3064         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) rhosts.@SHLIBEXT@ hostsequiv.@SHLIBEXT@
3065         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) sam.@SHLIBEXT@ sam_ignoredomain.@SHLIBEXT@
3066         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) domain.@SHLIBEXT@ trustdomain.@SHLIBEXT@ ntdomain.@SHLIBEXT@
3067         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) builtin.@SHLIBEXT@ guest.@SHLIBEXT@ fixed_challenge.@SHLIBEXT@ name_to_ntstatus.@SHLIBEXT@
3068         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(NSSINFOLIBDIR) ../idmap/ad.@SHLIBEXT@ rfc2307.@SHLIBEXT@ sfu.@SHLIBEXT@ sfu20.@SHLIBEXT@
3069         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(NSSINFOLIBDIR) ../idmap/adex.@SHLIBEXT@ adex.@SHLIBEXT@
3070         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(NSSINFOLIBDIR) ../idmap/hash.@SHLIBEXT@ hash.@SHLIBEXT@
3071
3072 installscripts:: installdirs
3073         @$(SHELL) $(srcdir)/script/installscripts.sh $(INSTALLPERMS_BIN) $(DESTDIR)$(BINDIR) $(SCRIPTS)
3074
3075 installdat:: installdirs
3076         @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR) $(CODEPAGEDIR) $(srcdir)
3077
3078 installmsg:: installdirs
3079         @$(SHELL) $(srcdir)/script/installmsg.sh $(DESTDIR) $(CODEPAGEDIR) $(srcdir)
3080
3081 installswat:: installdirs installmsg
3082         @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR) $(SWATDIR) $(srcdir)
3083
3084 installpammodules:: $(PAM_MODULES)
3085         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(PAMMODULESDIR)
3086         @for module in $(PAM_MODULES); do \
3087                 echo "Installing module $${module} as $(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@ "; \
3088                 $(INSTALLCMD) -m $(INSTALLPERMS_BIN) bin/$${module}.@SHLIBEXT@ \
3089                         "$(DESTDIR)/$(PAMMODULESDIR)"; \
3090         done
3091
3092 # revert to the previously installed version
3093 revert::
3094         @$(SHELL) $(srcdir)/script/revert.sh $(SBINDIR) $(SBIN_PROGS)
3095         @$(SHELL) $(srcdir)/script/revert.sh $(BINDIR) $(BIN_PROGS) $(SCRIPTS)
3096
3097 installman:: installdirs
3098         @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(MANDIR) $(srcdir) C "@ROFF@"
3099
3100 installmo:: all installdirs
3101         @$(SHELL) $(srcdir)/script/installmo.sh $(DESTDIR) $(LOCALEDIR) $(srcdir)
3102
3103 .PHONY: showlayout
3104
3105 showlayout::
3106         @echo "Samba will be installed into:"
3107         @echo "  prefix:      $(prefix)"
3108         @echo "  bindir:      $(BINDIR)"
3109         @echo "  sbindir:     $(SBINDIR)"
3110         @echo "  libdir:      $(LIBDIR)"
3111         @echo "  modulesdir:  $(MODULESDIR)"
3112         @echo "  vardir:      $(VARDIR)"
3113         @echo "  mandir:      $(MANDIR)"
3114         @echo "  privatedir:  $(PRIVATE_DIR)"
3115         @echo "  configdir:   $(CONFIGDIR)"
3116         @echo "  lockdir:     $(LOCKDIR)"
3117         @echo "  statedir:    $(STATEDIR)"
3118         @echo "  cachedir:    $(CACHEDIR)"
3119         @echo "  piddir:      $(PIDDIR)"
3120         @echo "  swatdir:     $(SWATDIR)"
3121         @echo "  datadir:     ${DATADIR}"
3122         @echo "  codepagedir: $(CODEPAGEDIR)"
3123
3124
3125 uninstall:: uninstallmo uninstallman uninstallservers uninstallbin uninstallscripts uninstalldat uninstallswat uninstallmodules uninstalllibs @UNINSTALL_PAM_MODULES@
3126
3127 uninstallmo::
3128         @$(SHELL) $(srcdir)/script/uninstallmo.sh $(DESTDIR) $(LOCALEDIR) $(srcdir)
3129
3130 uninstallman::
3131         @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(MANDIR) $(srcdir) C
3132
3133 uninstallservers::
3134         @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(SBINDIR) $(SBIN_PROGS)
3135
3136 uninstallbin::
3137         @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $(BIN_PROGS)
3138
3139 uninstallmodules::
3140         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(VFSLIBDIR) $(VFS_MODULES)
3141         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PDBLIBDIR) $(PDB_MODULES)
3142         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(RPCLIBDIR) $(RPC_MODULES)
3143         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(IDMAPLIBDIR) $(IDMAP_MODULES)
3144         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(CHARSETLIBDIR) $(CHARSET_MODULES)
3145         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(AUTHLIBDIR) $(AUTH_MODULES)
3146         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(GPEXTLIBDIR) $(GPEXT_MODULES)
3147         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PERFCOUNTLIBDIR) $(PERFCOUNT_MODULES)
3148
3149 uninstallscripts::
3150         @$(SHELL) $(srcdir)/script/uninstallscripts.sh $(INSTALLPERMS_BIN) $(DESTDIR)$(BINDIR) $(SCRIPTS)
3151
3152 uninstalldat::
3153         @$(SHELL) $(srcdir)/script/uninstalldat.sh $(DESTDIR) $(LIBDIR) $(srcdir)
3154
3155 uninstallmsg::
3156         @$(SHELL) $(srcdir)/script/uninstallmsg.sh $(DESTDIR) $(LIBDIR) $(srcdir)
3157
3158 uninstallswat:: uninstallmsg
3159         @$(SHELL) $(srcdir)/script/uninstallswat.sh $(DESTDIR) $(SWATDIR) $(srcdir)
3160
3161 uninstallpammodules::
3162         @for module in $(PAM_MODULES); do \
3163                 echo "Removing $(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@ "; \
3164                 rm -f "$(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@"; \
3165         done
3166
3167 # Toplevel clean files
3168 TOPFILES=dynconfig.o localedir.o
3169
3170 cleanlibs::
3171         -rm -f ../lib/*/*.o ../lib/*/*/*.o \
3172                 ../lib/*/*.ho \
3173                 ../libcli/*.o ../libcli/*/*.o ../libcli/*/*/*.o \
3174                 ../librpc/*/*.o \
3175                 ../libgpo/*.o ../libgpo/*/*.o \
3176                 ../libds/*.o ../libds/*/*.o
3177
3178 clean:: cleanlibs
3179         -rm -f include/build_env.h
3180         -rm -f smbd/build_options.c
3181         -rm -f $(PRECOMPILED_HEADER)
3182         -rm -f core */*~ *~ \
3183                 */*.o */*/*.o */*/*/*.o */*/*/*/*.o \
3184                 ../testsuite/*/*.o \
3185                 ../nsswitch/*.o ../nsswitch/*/*.o ../nsswitch/*/*/*.o ../nsswitch/*.@SHLIBEXT@ \
3186                 ../client/*.o \
3187                 */*.@SHLIBEXT@ */*/*.@SHLIBEXT@ */*/*/*.@SHLIBEXT@ \
3188                 $(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) \
3189                 $(MODULES) $(TORTURE_PROGS) \
3190                 $(EVERYTHING_PROGS) \
3191                 bin/timelimit \
3192                 .headers.stamp */src/*.o
3193         -rm -rf t_dir
3194
3195 include/build_env.h: script/build_env.sh
3196         @echo Building include/build_env.h
3197         @$(SHELL) $(srcdir)/script/build_env.sh $(srcdir) $(builddir) $(CC) \
3198           > $(builddir)/include/build_env.h
3199
3200 proto::
3201
3202 etags::
3203         find $(srcdir)/.. -name "*.[ch]" | xargs -n 100 etags --append $(ETAGS_OPTIONS)
3204
3205 ctags::
3206         ctags $(CTAGS_OPTIONS) `find $(srcdir)/.. -name "*.[ch]" | grep -v proto\.h`
3207
3208 realclean:: clean
3209         -rm -f config.log bin/.dummy script/findsmb script/gen-8bit-gap.sh
3210         -rm -f script/installbin.sh script/uninstallbin.sh
3211
3212 distclean:: realclean
3213         -rm -f smbadduser
3214         -rm -f include/config.h Makefile
3215         -rm -f config.status config.cache so_locations
3216         -rm -rf .deps TAGS
3217
3218 realdistclean:: distclean
3219         -rm -f include/config.h.in
3220         -rm -f include/version.h
3221         -rm -f configure
3222
3223 # this target is really just for my use. It only works on a limited
3224 # range of machines and is used to produce a list of potentially
3225 # dead (ie. unused) functions in the code. (tridge)
3226 finddead::
3227         nm */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt
3228         nm */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt
3229         comm -13 nmused.txt nmfns.txt
3230
3231
3232 # when configure.in is updated, reconfigure
3233 $(srcdir)/configure: $(srcdir)/configure.in
3234         @echo "WARNING: you need to rerun ./autogen.sh"
3235
3236 config.status: $(srcdir)/configure
3237         @echo "WARNING: you need to run ./configure"
3238
3239 Makefile: $(srcdir)/Makefile.in config.status
3240         @echo "WARNING: you need to run ./config.status"
3241
3242 ######################################################################
3243 # Samba Testing Framework
3244
3245 # Check shared libs for unresolved symbols
3246 test_shlibs:
3247         @echo "Testing $? "
3248         @$(LIB_PATH_VAR)=./bin && \
3249         export $(LIB_PATH_VAR) && \
3250         for module in $?; do \
3251                 ./script/tests/dlopen.sh $(LIBDL) $${module} \
3252                         || exit 1; \
3253         done
3254
3255 # Check for NSS module problems.
3256 test_nss_modules:: nss_modules
3257         @echo "Testing $(NSS_MODULES) "
3258         @$(LIB_PATH_VAR)=./bin && \
3259         export $(LIB_PATH_VAR) && \
3260         for module in $(NSS_MODULES); do \
3261                 ./script/tests/dlopen.sh $(LIBDL) $${module} \
3262                         || exit 1; \
3263         done
3264
3265 # Check for PAM module problems.  Specifically, check that every module we
3266 # built can actually be loaded by a minimal PAM-aware application.
3267 test_pam_modules:: pam_modules
3268         @echo "Testing $(PAM_MODULES) "
3269         @$(LIB_PATH_VAR)=./bin && \
3270         export $(LIB_PATH_VAR) && \
3271         for module in $(PAM_MODULES); do \
3272                 ./script/tests/dlopen.sh -lpam $(LIBDL) bin/$${module}.@SHLIBEXT@ \
3273                         || exit 1; \
3274         done
3275
3276
3277 ##
3278 ## Targets for 'make test'
3279 ##
3280
3281 TEST_EXTRA_ARGS = ${smbtorture4_option} ${selftest_shrdir} ${selftest_custom_conf}
3282
3283 oldtest:: all torture timelimit
3284         @echo Running Test suite
3285         @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}
3286
3287 valgrindtest:: all torture timelimit
3288         @echo Running Test suite with valgrind
3289         @LIB_PATH_VAR=$(LIB_PATH_VAR) \
3290          NMBD_VALGRIND="xterm -n nmbd -e valgrind -q --db-attach=yes --num-callers=30" \
3291          WINBINDD_VALGRIND="xterm -n winbindd -e valgrind -q --db-attach=yes --num-callers=30" \
3292          SMBD_VALGRIND="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \
3293          VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
3294          PERL="$(PERL)" $(srcdir)/script/tests/selftest.sh ${selftest_prefix} all ${TEST_EXTRA_ARGS}
3295
3296 selftestdir = ../selftest
3297
3298 S3_LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)="$(builddir)/bin:$$$(LIB_PATH_VAR)"
3299
3300 SUBUNIT_FORMATTER = $(PYTHON) $(selftestdir)/format-subunit --immediate
3301
3302 test:: all torture timelimit
3303         @LIB_PATH_VAR=$(LIB_PATH_VAR) $(S3_LD_LIBPATH_OVERRIDE) \
3304                 SAMBA4SHAREDDIR="$(builddir)/bin/shared" SMBTORTURE4=$(smbtorture4_path) \
3305                 PERL="$(PERL)" PYTHON="$(PYTHON)" \
3306                 NSS_WRAPPER_WINBIND_SO_PATH="$(srcdir)/@WINBIND_NSS@" \
3307                 $(PERL) $(selftestdir)/selftest.pl \
3308                 --prefix=${selftest_prefix} --target=samba3 \
3309                 --testlist="$(srcdir)/selftest/tests.sh|" \
3310                 --exclude=$(srcdir)/selftest/skip \
3311                 --socket-wrapper $(TESTS) | \
3312                 $(PYTHON) $(selftestdir)/filter-subunit \
3313                 --expected-failures=$(srcdir)/selftest/knownfail | \
3314                 $(SUBUNIT_FORMATTER)
3315
3316 test-%:
3317         $(MAKE) test TESTS=$*
3318
3319 SELFTEST_TESTENV = dc
3320
3321 testenv:
3322         $(MAKE) test SELFTEST_TESTENV=$(SELFTEST_TESTENV) TESTS="--testenv"
3323
3324 gdbtestenv:
3325         $(MAKE) test SELFTEST_TESTENV=$(SELFTEST_TESTENV) \
3326                 NMBD_VALGRIND="xterm -n nmbd -title nmbd -e $(selftestdir)/gdb_run $(S3_LD_LIBPATH_OVERRIDE)" \
3327                 WINBINDD_VALGRIND="xterm -n winbindd -title winbindd -e $(selftestdir)/gdb_run $(S3_LD_LIBPATH_OVERRIDE)" \
3328                 SMBD_VALGRIND="xterm -n smbd -title smbd -e $(selftestdir)/gdb_run $(S3_LD_LIBPATH_OVERRIDE)" \
3329                 TESTS="--testenv"
3330
3331 valgrindtestenv:
3332         $(MAKE) test SELFTEST_TESTENV=$(SELFTEST_TESTENV) \
3333                 NMBD_VALGRIND="xterm -n nmbd -title nmbd -e valgrind -q --db-attach=yes --num-callers=30" \
3334                 WINBINDD_VALGRIND="xterm -n winbindd -title winbindd -e valgrind -q --db-attach=yes --num-callers=30" \
3335                 SMBD_VALGRIND="xterm -n smbd -title smbd -e valgrind -q --db-attach=yes --num-callers=30" \
3336                 TESTS="--testenv"
3337
3338
3339 # Check for Winbind struct 32/64bit padding
3340 test_wbpad:
3341         @echo "Testing winbind request/response structure for 32/64bit padding"
3342         @./script/tests/wb_pad.sh || exit 1;
3343
3344 ##
3345 ## Examples:
3346 ##
3347
3348 libsmbclient_examples: libsmbclient
3349         $(MAKE) -C ../examples/libsmbclient -f Makefile.internal
3350
3351 clean_libsmbclient_examples:
3352         $(MAKE) -C ../examples/libsmbclient -f Makefile.internal clean
3353
3354 libnetapi_examples: libnetapi
3355         $(MAKE) -C lib/netapi/examples
3356
3357 clean_libnetapi_examples:
3358         $(MAKE) -C lib/netapi/examples clean
3359
3360 ../source4/configure: ../buildtools/scripts/configure.waf
3361         cd ../source4 && ./autogen.sh
3362
3363 samba4-configure: ../source4/configure
3364         @$(MAKE) -C ../source4 reconfigure || ( cd ../source4 && \
3365                 ./configure.developer --nonshared-binary=smbtorture --enable-auto-reconfigure )
3366
3367 .PHONY: samba4-configure
3368
3369 bin/smbtorture4: $(BINARY_PREREQS) samba4-configure
3370         cd ../source4 && ../buildtools/bin/waf build --targets=smbtorture
3371         cp ../source4/bin/smbtorture bin/smbtorture4
3372
3373 bin/ndrdump4: $(BINARY_PREREQS) samba4-configure
3374         cd ../source4 && ../buildtools/bin/waf build --targets=ndrdump
3375         cp ../source4/bin/ndrdump bin/ndrdump4
3376
3377 .PHONY: bin/smbtorture4