drsuapi: rerun make idl and add drsblobs generated files.
[kai/samba-autobuild/.git] / source / 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 smbtorture4_path=@smbtorture4_path@
21
22 LIBS=@LIBS@
23 CC=@CC@
24 SHLD=@SHLD@
25 LIB_PATH_VAR=@LIB_PATH_VAR@
26
27 ## Dynamic shared libraries build settings
28 DSO_EXPORTS_CMD=-Wl,--version-script,$(srcdir)/exports/`basename $@ | sed 's/@SHLIBEXT@$$/@SYMSEXT@/'`
29 DSO_EXPORTS=@DSO_EXPORTS@
30 SONAME_VER=`grep \^$@ $(builddir)/library-versions | cut -d: -f2`
31 SHLD_DSO = $(SHLD) $(LDSHFLAGS) $(DSO_EXPORTS) -o $@
32
33 # The MODULE_EXPORTS variable contains the platform-specific linker flags
34 # needed to restrict the exports for VFS, IDMAP, RPC and PASSDB modules.
35 MODULE_EXPORTS=@MODULE_EXPORTS@
36
37 # Add $(DEVELOPER_CFLAGS) to $(CFLAGS) to enable extra compiler
38 # (GCC) warnings. This is done automtically for --enable-developer
39 # and --enable-krb5developer.
40 DEVELOPER_CFLAGS=@DEVELOPER_CFLAGS@
41 CFLAGS=@CFLAGS@
42 CPPFLAGS=-DHAVE_CONFIG_H @CPPFLAGS@
43
44 EXEEXT=@EXEEXT@
45 AR=@AR@
46 LDSHFLAGS=@LDSHFLAGS@ @RELRO_LDFLAGS@ @LDFLAGS@
47 LDFLAGS=@PIE_LDFLAGS@ @RELRO_LDFLAGS@ @LDFLAGS@
48
49 WINBIND_NSS_LDSHFLAGS=@WINBIND_NSS_LDSHFLAGS@ @LDFLAGS@
50 AWK=@AWK@
51 PICFLAG=@PICFLAG@
52 DYNEXP=@DYNEXP@
53 PERL=@PERL@
54
55 PIDL_ARGS=@PIDL_ARGS@
56
57 TERMLDFLAGS=@TERMLDFLAGS@
58 TERMLIBS=@TERMLIBS@
59 PRINT_LIBS=@PRINT_LIBS@
60 AUTH_LIBS=@AUTH_LIBS@
61 ACL_LIBS=@ACL_LIBS@
62 PASSDB_LIBS=@PASSDB_LIBS@
63 IDMAP_LIBS=@IDMAP_LIBS@
64 KRB5LIBS=@KRB5_LIBS@
65 LDAP_LIBS=@LDAP_LIBS@
66 NSCD_LIBS=@NSCD_LIBS@
67 UUID_LIBS=@UUID_LIBS@
68 WINBIND_LIBS=@WINBIND_LIBS@
69 DNSSD_LIBS=@DNSSD_LIBS@
70
71 INSTALLCMD=@INSTALL@
72 INSTALLLIBCMD_SH=@INSTALLLIBCMD_SH@
73 INSTALLLIBCMD_A=@INSTALLLIBCMD_A@
74 UNINSTALLLIBCMD_SH=@UNINSTALLLIBCMD_SH@
75 UNINSTALLLIBCMD_A=@UNINSTALLLIBCMD_A@
76
77 VPATH=@srcdir@
78 srcdir=@abs_srcdir@
79 builddir=@abs_builddir@
80 SHELL=/bin/sh
81 DESTDIR=/
82
83 # XXX: Perhaps this should be @SHELL@ instead -- apparently autoconf
84 # will search for a POSIX-compliant shell, and that might not be
85 # /bin/sh on some platforms.  I guess it's not a big problem -- mbp
86
87 # See the autoconf manual "Installation Directory Variables" for a
88 # discussion of the subtle use of these variables.
89
90 BASEDIR= @prefix@
91 BINDIR = @bindir@
92 # sbindir is mapped to bindir when compiling SAMBA in 2.0.x compatibility mode.
93 SBINDIR = @sbindir@
94 ROOTSBINDIR = @rootsbindir@
95 LIBDIR = @libdir@
96 INCLUDEDIR=@includedir@
97 PAMMODULESDIR = @pammodulesdir@
98 VFSLIBDIR = $(LIBDIR)/vfs
99 PDBLIBDIR = $(LIBDIR)/pdb
100 RPCLIBDIR = $(LIBDIR)/rpc
101 IDMAPLIBDIR = $(LIBDIR)/idmap
102 NSSINFOLIBDIR = $(LIBDIR)/nss_info
103 CHARSETLIBDIR = $(LIBDIR)/charset
104 AUTHLIBDIR = $(LIBDIR)/auth
105 CONFIGLIBDIR = $(LIBDIR)/config
106 GPEXTLIBDIR = $(LIBDIR)/gpext
107 CONFIGDIR = @configdir@
108 VARDIR = @localstatedir@
109 MANDIR = @mandir@
110 DATADIR = @datadir@
111
112 # The permissions to give the executables and other data
113 INSTALLPERMS_BIN = 0755
114 INSTALLPERMS_DATA = 0644
115
116 # set these to where to find various files
117 # These can be overridden by command line switches (see smbd(8))
118 # or in smb.conf (see smb.conf(5))
119 LOGFILEBASE = @logfilebase@
120 CONFIGFILE = $(CONFIGDIR)/smb.conf
121 LMHOSTSFILE = $(CONFIGDIR)/lmhosts
122 CTDBDIR = @ctdbdir@
123
124 # This is where smbpasswd et al go
125 PRIVATEDIR = @privatedir@
126
127 SMB_PASSWD_FILE = $(PRIVATEDIR)/smbpasswd
128 PRIVATE_DIR = $(PRIVATEDIR)
129
130 # This is where SWAT images and help files go
131 SWATDIR = @swatdir@
132
133 # the directory where lock files go
134 LOCKDIR = @lockdir@
135
136 # FHS directories; equal to LOCKDIR if not using --with-fhs
137 CACHEDIR = @cachedir@
138 STATEDIR = @statedir@
139
140 # Where to look for (and install) codepage databases.
141 CODEPAGEDIR = @codepagedir@
142
143 # the directory where pid files go
144 PIDDIR = @piddir@
145
146 LIBTALLOC_SHARED_TARGET=@LIBTALLOC_SHARED_TARGET@
147 LIBTALLOC_STATIC_TARGET=@LIBTALLOC_STATIC_TARGET@
148 LIBTALLOC=$(LIBTALLOC_STATIC_TARGET) @LIBTALLOC_SHARED@
149 LIBTALLOC_SYMS=$(srcdir)/exports/libtalloc.@SYMSEXT@
150 LIBTALLOC_HEADERS=$(srcdir)/@tallocdir@/talloc.h
151
152 LIBTDB_SHARED_TARGET=@LIBTDB_SHARED_TARGET@
153 LIBTDB_STATIC_TARGET=@LIBTDB_STATIC_TARGET@
154 LIBTDB=$(LIBTDB_STATIC_TARGET) @LIBTDB_SHARED@
155 LIBTDB_SYMS=$(srcdir)/exports/libtdb.@SYMSEXT@
156 LIBTDB_HEADERS=$(srcdir)/@tdbdir@/include/tdb.h
157
158 LIBSMBCLIENT=bin/libsmbclient.a @LIBSMBCLIENT_SHARED@
159 LIBSMBSHAREMODES=bin/libsmbsharemodes.a @LIBSMBSHAREMODES_SHARED@
160 LIBADDNS=bin/libaddns.a @LIBADDNS_SHARED@
161
162 LIBWBCLIENT_SHARED_TARGET=@LIBWBCLIENT_SHARED_TARGET@
163 LIBWBCLIENT_STATIC_TARGET=@LIBWBCLIENT_STATIC_TARGET@
164 LIBWBCLIENT=@LIBWBCLIENT_STATIC@ @LIBWBCLIENT_SHARED@
165 LIBWBCLIENT_SYMS=$(srcdir)/exports/libwbclient.@SYMSEXT@
166 LIBWBCLIENT_HEADERS=$(srcdir)/nsswitch/libwbclient/wbclient.h
167
168 LIBNETAPI_SHARED_TARGET=@LIBNETAPI_SHARED_TARGET@
169 LIBNETAPI_STATIC_TARGET=@LIBNETAPI_STATIC_TARGET@
170 LIBNETAPI=$(LIBNETAPI_STATIC_TARGET) @LIBNETAPI_SHARED@
171 LIBNETAPI_SYMS=$(srcdir)/exports/libnetapi.@SYMSEXT@
172 LIBNETAPI_HEADERS=$(srcdir)/lib/netapi/netapi.h
173
174 FLAGS1 = $(CFLAGS) @FLAGS1@ @SAMBA_CPPFLAGS@ $(CPPFLAGS)
175 FLAGS2 =
176 FLAGS3 =
177 FLAGS4 = -I$(CTDBDIR)/include
178 FLAGS5 = $(FLAGS1) $(FLAGS2) $(FLAGS3) $(FLAGS4)
179 FLAGS  = $(ISA) $(FLAGS5) -I$(srcdir)/lib -D_SAMBA_BUILD_=3
180
181 PATH_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" \
182         -DPRIVATE_DIR=\"$(PRIVATE_DIR)\" \
183         -DCONFIGFILE=\"$(CONFIGFILE)\" \
184         -DSBINDIR=\"$(SBINDIR)\" \
185         -DBINDIR=\"$(BINDIR)\" \
186         -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" \
187         -DSWATDIR=\"$(SWATDIR)\" \
188         -DLOCKDIR=\"$(LOCKDIR)\" \
189         -DPIDDIR=\"$(PIDDIR)\" \
190         -DLIBDIR=\"$(LIBDIR)\" \
191         -DLOGFILEBASE=\"$(LOGFILEBASE)\" \
192         -DSHLIBEXT=\"@SHLIBEXT@\" \
193         -DCTDBDIR=\"$(CTDBDIR)\" \
194         -DCONFIGDIR=\"$(CONFIGDIR)\" \
195         -DCODEPAGEDIR=\"$(CODEPAGEDIR)\" \
196         -DCACHEDIR=\"$(CACHEDIR)\" \
197         -DSTATEDIR=\"$(STATEDIR)\"
198
199 # Note that all executable programs now provide for an optional executable suffix.
200
201 SBIN_PROGS = bin/smbd@EXEEXT@ bin/nmbd@EXEEXT@ @SWAT_SBIN_TARGETS@ @EXTRA_SBIN_PROGS@
202
203 ROOT_SBIN_PROGS = @CIFSMOUNT_PROGS@ @CIFSSPNEGO_PROGS@
204
205 BIN_PROGS1 = bin/smbclient@EXEEXT@ bin/net@EXEEXT@ bin/smbspool@EXEEXT@ \
206         bin/testparm@EXEEXT@ bin/smbstatus@EXEEXT@ bin/smbget@EXEEXT@
207 BIN_PROGS2 = bin/smbcontrol@EXEEXT@ bin/smbtree@EXEEXT@ bin/tdbbackup@EXEEXT@ \
208         bin/nmblookup@EXEEXT@ bin/pdbedit@EXEEXT@ bin/tdbdump@EXEEXT@ \
209         bin/tdbtool@EXEEXT@
210 BIN_PROGS3 = bin/smbpasswd@EXEEXT@ bin/rpcclient@EXEEXT@ bin/smbcacls@EXEEXT@ \
211         bin/profiles@EXEEXT@ bin/ntlm_auth@EXEEXT@ \
212         bin/smbcquotas@EXEEXT@ bin/eventlogadm@EXEEXT@
213 BIN_PROGS4 = bin/ldbedit@EXEEXT@ bin/ldbsearch@EXEEXT@ bin/ldbadd@EXEEXT@ \
214         bin/ldbdel@EXEEXT@ bin/ldbmodify@EXEEXT@
215
216 TORTURE_PROGS = bin/smbtorture@EXEEXT@ bin/msgtest@EXEEXT@ \
217         bin/masktest@EXEEXT@ bin/locktest@EXEEXT@ \
218         bin/locktest2@EXEEXT@ bin/nsstest@EXEEXT@ bin/vfstest@EXEEXT@ \
219         bin/pdbtest@EXEEXT@ bin/talloctort@EXEEXT@ bin/replacetort@EXEEXT@ \
220         bin/tdbtorture@EXEEXT@ \
221         bin/smbconftort@EXEEXT@
222
223 BIN_PROGS = @EXTRA_BIN_PROGS@ \
224         $(BIN_PROGS1) $(BIN_PROGS2) $(BIN_PROGS3) $(BIN_PROGS4) 
225
226 EVERYTHING_PROGS = bin/debug2html@EXEEXT@ bin/smbfilter@EXEEXT@ \
227         bin/talloctort@EXEEXT@ bin/replacetort@EXEEXT@ \
228         bin/log2pcap@EXEEXT@ bin/sharesec@EXEEXT@ bin/ndrdump@EXEEXT@ \
229         bin/vlp@EXEEXT@ bin/smbiconv@EXEEXT@
230
231 SHLIBS = libtalloc libtdb @LIBWBCLIENT@ @LIBSMBCLIENT@ @LIBSMBSHAREMODES@ @LIBADDNS@ libnetapi
232
233 PAM_MODULES = @PAM_MODULES@
234
235 NSS_MODULES = @NSS_MODULES@
236
237 SCRIPTS = $(srcdir)/script/smbtar $(builddir)/script/findsmb
238
239 VFS_MODULES = @VFS_MODULES@
240 PDB_MODULES = @PDB_MODULES@
241 RPC_MODULES = @RPC_MODULES@
242 IDMAP_MODULES = @IDMAP_MODULES@
243 CHARSET_MODULES = @CHARSET_MODULES@
244 AUTH_MODULES = @AUTH_MODULES@
245 NSS_INFO_MODULES = @NSS_INFO_MODULES@
246 GPEXT_MODULES = @GPEXT_MODULES@
247 MODULES = $(VFS_MODULES) $(PDB_MODULES) $(RPC_MODULES) $(IDMAP_MODULES) \
248           $(CHARSET_MODULES) $(AUTH_MODULES) $(NSS_INFO_MODULES) \
249           $(GPEXT_MODULES)
250
251 ######################################################################
252 # object file lists
253 ######################################################################
254
255 LIBTDB_OBJ0 = @TDB_OBJS@
256 LIBTDB_OBJ = $(LIBTDB_OBJ0) $(LIBREPLACE_OBJ)
257
258 TDB_OBJ = lib/util_tdb.o \
259           lib/dbwrap.o lib/dbwrap_tdb.o \
260           lib/dbwrap_tdb2.o lib/dbwrap_ctdb.o \
261           lib/dbwrap_rbt.o @LIBTDB_STATIC@
262
263 SMBLDAP_OBJ = @SMBLDAP@ @SMBLDAPUTIL@
264
265 VERSION_OBJ = lib/version.o
266
267 WBCOMMON_OBJ = nsswitch/wb_common.o
268
269 AFS_OBJ = lib/afs.o
270
271 AFS_SETTOKEN_OBJ = lib/afs_settoken.o
272
273 SERVER_MUTEX_OBJ = lib/server_mutex.o
274
275 PASSCHANGE_OBJ = libsmb/passchange.o
276
277 LIBNDR_DRSUAPI_OBJ = librpc/ndr/ndr_drsuapi.o \
278                      librpc/ndr/ndr_compression.o \
279                      librpc/gen_ndr/ndr_drsuapi.o \
280                      librpc/gen_ndr/ndr_drsblobs.o
281
282 COMPRESSION_OBJ = lib/compression/mszip.o
283
284 DRSUAPI_OBJ = $(LIBNDR_DRSUAPI_OBJ) \
285               $(COMPRESSION_OBJ)
286
287 LIBNDR_OBJ = librpc/ndr/ndr_basic.o \
288              librpc/ndr/ndr.o \
289              librpc/ndr/ndr_misc.o \
290              librpc/gen_ndr/ndr_misc.o \
291              librpc/gen_ndr/ndr_security.o \
292              librpc/ndr/ndr_sec_helper.o \
293              librpc/ndr/ndr_string.o \
294              librpc/ndr/sid.o \
295              librpc/ndr/uuid.o
296
297 RPCCLIENT_NDR_OBJ = rpc_client/ndr.o
298
299 LIBNDR_GEN_OBJ = librpc/gen_ndr/ndr_wkssvc.o \
300                  librpc/gen_ndr/ndr_lsa.o \
301                  librpc/gen_ndr/ndr_dfs.o \
302                  librpc/gen_ndr/ndr_echo.o \
303                  librpc/gen_ndr/ndr_winreg.o \
304                  librpc/gen_ndr/ndr_initshutdown.o \
305                  librpc/gen_ndr/ndr_srvsvc.o \
306                  librpc/gen_ndr/ndr_eventlog.o \
307                  librpc/gen_ndr/ndr_netlogon.o \
308                  librpc/gen_ndr/ndr_samr.o \
309                  librpc/gen_ndr/ndr_dssetup.o \
310                  librpc/gen_ndr/ndr_notify.o \
311                  librpc/gen_ndr/ndr_xattr.o \
312                  librpc/gen_ndr/ndr_epmapper.o \
313                  librpc/gen_ndr/ndr_ntsvcs.o
314
315 RPC_PARSE_OBJ0 = rpc_parse/parse_prs.o rpc_parse/parse_misc.o
316
317 # this includes only the low level parse code, not stuff
318 # that requires knowledge of security contexts
319 RPC_PARSE_OBJ1 = $(RPC_PARSE_OBJ0) rpc_parse/parse_sec.o
320
321 RPC_PARSE_OBJ2 = rpc_parse/parse_rpc.o \
322                  rpc_client/init_netlogon.o \
323                  rpc_client/init_lsa.o \
324                  rpc_client/init_srvsvc.o
325
326 LIBREPLACE_OBJ = @LIBREPLACE_OBJS@
327
328 SOCKET_WRAPPER_OBJ = @SOCKET_WRAPPER_OBJS@
329 NSS_WRAPPER_OBJ = @NSS_WRAPPER_OBJS@
330
331 TALLOC_OBJ = @TALLOC_OBJS@
332
333
334 LIBTALLOC_OBJ0 = $(TALLOC_OBJ)
335 LIBTALLOC_OBJ = $(LIBTALLOC_OBJ0) $(LIBREPLACE_OBJ)
336
337 LIBSAMBAUTIL_OBJ = @LIBTALLOC_STATIC@ \
338                 $(LIBREPLACE_OBJ) \
339                 $(SOCKET_WRAPPER_OBJ) \
340                 $(NSS_WRAPPER_OBJ)
341
342 LIB_OBJ = $(LIBSAMBAUTIL_OBJ) \
343           lib/messages.o librpc/gen_ndr/ndr_messaging.o lib/messages_local.o \
344           lib/messages_ctdbd.o lib/packet.o lib/ctdbd_conn.o lib/talloc_stack.o \
345           lib/interfaces.o lib/rbtree.o lib/memcache.o \
346           lib/util_transfer_file.o lib/async_req.o \
347           $(TDB_OBJ) \
348           $(VERSION_OBJ) lib/charcnv.o lib/debug.o lib/fault.o \
349           lib/interface.o lib/md4.o \
350           lib/pidfile.o \
351           lib/signal.o lib/system.o lib/sendfile.o lib/recvfile.o lib/time.o \
352           lib/ufc.o lib/genrand.o lib/username.o \
353           lib/util_pw.o lib/access.o lib/smbrun.o \
354           lib/bitmap.o lib/crc32.o lib/dprintf.o \
355           lib/xfile.o lib/wins_srv.o $(UTIL_REG_OBJ) \
356           lib/util_str.o lib/clobber.o lib/util_sid.o lib/util_uuid.o \
357           lib/util_unistr.o lib/util_file.o lib/data_blob.o \
358           lib/util.o lib/util_sock.o lib/sock_exec.o lib/util_sec.o \
359           lib/substitute.o lib/fsusage.o lib/dbwrap_util.o \
360           lib/ms_fnmatch.o lib/select.o lib/errmap_unix.o \
361           lib/tallocmsg.o lib/dmallocmsg.o libsmb/smb_signing.o \
362           lib/md5.o lib/hmacmd5.o lib/arc4.o lib/iconv.o \
363           lib/pam_errors.o intl/lang_tdb.o lib/conn_tdb.o \
364           lib/adt_tree.o lib/gencache.o \
365           lib/module.o lib/events.o lib/ldap_escape.o @CHARSET_STATIC@ \
366           lib/secdesc.o lib/util_seaccess.o lib/secace.o lib/secacl.o \
367           libads/krb5_errs.o lib/system_smbd.o lib/audit.o $(LIBNDR_OBJ) \
368           lib/file_id.o
369
370 LIB_DUMMY_OBJ = lib/dummysmbd.o lib/dummyroot.o
371 LIB_NONSMBD_OBJ = $(LIB_OBJ) $(LIB_DUMMY_OBJ)
372
373 READLINE_OBJ = lib/readline.o
374
375 # Also depends on  $(SECRETS_OBJ) $(LIBSAMBA_OBJ)
376 # Be sure to include them into your application
377 POPT_LIB_OBJ = lib/popt_common.o
378
379 PARAM_WITHOUT_REG_OBJ = dynconfig.o param/loadparm.o param/params.o param/util.o lib/sharesec.o lib/ldap_debug_handler.o
380 PARAM_REG_ADD_OBJ = $(REG_SMBCONF_OBJ) $(LIBSMBCONF_OBJ) $(PRIVILEGES_BASIC_OBJ)
381 PARAM_OBJ = $(PARAM_WITHOUT_REG_OBJ) $(PARAM_REG_ADD_OBJ)
382
383 KRBCLIENT_OBJ = libads/kerberos.o libads/ads_status.o
384
385 LIBADDNS_OBJ0 = libaddns/dnsrecord.o libaddns/dnsutils.o  libaddns/dnssock.o \
386                libaddns/dnsgss.o libaddns/dnsmarshall.o
387 LIBADDNS_OBJ = $(LIBADDNS_OBJ0) @LIBTALLOC_STATIC@
388
389 LIBWBCLIENT_OBJ0 = nsswitch/libwbclient/wbclient.o \
390                   nsswitch/libwbclient/wbc_util.o \
391                   nsswitch/libwbclient/wbc_pwd.o \
392                   nsswitch/libwbclient/wbc_idmap.o \
393                   nsswitch/libwbclient/wbc_sid.o \
394                   nsswitch/libwbclient/wbc_pam.o
395 LIBWBCLIENT_OBJ = $(LIBWBCLIENT_OBJ0) \
396                   $(WBCOMMON_OBJ) \
397                   @LIBTALLOC_STATIC@ $(LIBREPLACE_OBJ)
398
399 GPEXT_OBJ = libgpo/gpext/gpext.o @GPEXT_STATIC@
400
401 LIBGPO_OBJ0 = libgpo/gpo_ldap.o libgpo/gpo_ini.o libgpo/gpo_util.o \
402               libgpo/gpo_fetch.o libgpo/gpo_filesync.o libgpo/gpo_sec.o \
403               libgpo/gpo_reg.o \
404               $(GPEXT_OBJ)
405 LIBGPO_OBJ = $(LIBGPO_OBJ0)
406
407 LIBADS_OBJ = libads/ldap.o libads/ldap_printer.o \
408              libads/sasl.o libads/sasl_wrapping.o \
409              libads/krb5_setpw.o libads/ldap_user.o \
410              libads/ads_struct.o libads/kerberos_keytab.o \
411              libads/disp_sec.o libads/ads_utils.o libads/ldap_utils.o \
412              libads/ldap_schema.o libads/util.o libads/ndr.o
413
414 LIBADS_SERVER_OBJ = libads/kerberos_verify.o libads/authdata.o \
415                     librpc/ndr/ndr_krb5pac.o \
416                     librpc/gen_ndr/ndr_krb5pac.o
417
418 SECRETS_OBJ = passdb/secrets.o passdb/machine_sid.o
419
420 LIBNBT_OBJ = libcli/nbt/nbtname.o \
421              librpc/gen_ndr/ndr_nbt.o \
422              librpc/gen_ndr/ndr_svcctl.o
423
424 LIBNMB_OBJ = libsmb/unexpected.o libsmb/namecache.o libsmb/nmblib.o \
425              libsmb/namequery.o libsmb/conncache.o libads/dns.o
426
427 NTERR_OBJ = libsmb/nterr.o
428 DOSERR_OBJ = libsmb/doserr.o
429 ERRORMAP_OBJ = libsmb/errormap.o
430 DCE_RPC_ERR_OBJ = libsmb/dcerpc_err.o
431
432 LIBSMB_ERR_OBJ0 = $(NTERR_OBJ) $(DOSERR_OBJ) $(ERRORMAP_OBJ) $(DCE_RPC_ERR_OBJ) \
433                   libsmb/smbdes.o libsmb/smbencrypt.o libsmb/ntlmssp_parse.o
434
435 LIBSMB_ERR_OBJ = $(LIBSMB_ERR_OBJ0) \
436                  $(RPC_PARSE_OBJ1) \
437                  $(SECRETS_OBJ)
438
439 LIBSMB_OBJ0 = \
440                libsmb/ntlm_check.o \
441                libsmb/ntlmssp.o \
442                libsmb/ntlmssp_sign.o
443
444 LIBSAMBA_OBJ = $(LIBSMB_OBJ0) \
445                $(LIBSMB_ERR_OBJ)
446
447 CLDAP_OBJ = libads/cldap.o
448
449 LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \
450              libsmb/clikrb5.o libsmb/clispnego.o libsmb/asn1.o \
451              libsmb/clirap.o libsmb/clierror.o libsmb/climessage.o \
452              libsmb/clireadwrite.o libsmb/clilist.o libsmb/cliprint.o \
453              libsmb/clitrans.o libsmb/clisecdesc.o libsmb/clidgram.o \
454              libsmb/clistr.o libsmb/cliquota.o libsmb/clifsinfo.o libsmb/clidfs.o \
455              libsmb/smberr.o libsmb/credentials.o libsmb/pwd_cache.o \
456              libsmb/clioplock.o libsmb/clirap2.o \
457              libsmb/smb_seal.o libsmb/async_smb.o \
458              $(LIBSAMBA_OBJ) \
459              $(LIBNMB_OBJ) \
460              $(LIBNBT_OBJ) \
461              $(CLDAP_OBJ) \
462              $(DRSUAPI_OBJ)
463
464 RPC_CLIENT_OBJ1 = rpc_client/cli_netlogon.o
465
466 LIBMSRPC_OBJ = rpc_client/cli_lsarpc.o rpc_client/cli_samr.o \
467                $(RPC_CLIENT_OBJ1) rpc_client/cli_reg.o $(RPC_CLIENT_OBJ) \
468                rpc_client/cli_spoolss.o rpc_client/cli_spoolss_notify.o  \
469                rpc_client/cli_svcctl.o \
470                rpc_client/init_samr.o \
471                    librpc/rpc/dcerpc.o \
472                    librpc/rpc/binding.o
473
474 LIBMSRPC_GEN_OBJ = librpc/gen_ndr/cli_lsa.o \
475                    librpc/gen_ndr/cli_dfs.o \
476                    librpc/gen_ndr/cli_echo.o \
477                    librpc/gen_ndr/cli_srvsvc.o \
478                    librpc/gen_ndr/cli_svcctl.o \
479                    librpc/gen_ndr/cli_winreg.o \
480                    librpc/gen_ndr/cli_initshutdown.o \
481                    librpc/gen_ndr/cli_eventlog.o \
482                    librpc/gen_ndr/cli_wkssvc.o \
483                    librpc/gen_ndr/cli_netlogon.o \
484                    librpc/gen_ndr/cli_samr.o \
485                    librpc/gen_ndr/cli_dssetup.o \
486                    librpc/gen_ndr/cli_ntsvcs.o \
487                    librpc/gen_ndr/cli_epmapper.o \
488                    librpc/gen_ndr/cli_drsuapi.o \
489                    $(LIBNDR_GEN_OBJ) \
490                    $(RPCCLIENT_NDR_OBJ)
491
492 #
493 # registry-related objects
494 #
495 UTIL_REG_OBJ = lib/util_reg.o
496 UTIL_REG_API_OBJ = lib/util_reg_api.o
497
498 REG_INIT_BASIC_OBJ = registry/reg_init_basic.o
499 REG_INIT_SMBCONF_OBJ = registry/reg_init_smbconf.o
500 REG_INIT_FULL_OBJ = registry/reg_init_full.o
501
502 REGFIO_OBJ = registry/regfio.o
503
504 REGOBJS_OBJ = registry/reg_objects.o
505
506 REG_BACKENDS_BASE_OBJ = registry/reg_backend_db.o
507
508 REG_BACKENDS_SMBCONF_OBJ = registry/reg_backend_smbconf.o
509
510 REG_BACKENDS_EXTRA_OBJ = registry/reg_backend_printing.o \
511                          registry/reg_backend_shares.o \
512                          registry/reg_backend_netlogon_params.o \
513                          registry/reg_backend_prod_options.o \
514                          registry/reg_backend_tcpip_params.o \
515                          registry/reg_backend_hkpt_params.o \
516                          registry/reg_backend_current_version.o \
517                          registry/reg_backend_perflib.o
518
519 REG_BASE_OBJ = registry/reg_api.o \
520                registry/reg_dispatcher.o \
521                registry/reg_cachehook.o \
522                $(REGFIO_OBJ) \
523                $(REGOBJS_OBJ) \
524                registry/reg_util.o \
525                $(UTIL_REG_API_OBJ) \
526                lib/util_nttoken.o \
527                $(REG_BACKENDS_BASE_OBJ) \
528                $(REG_INIT_BASIC_OBJ)
529
530 REG_SMBCONF_OBJ = $(REG_BASE_OBJ) \
531                   $(REG_BACKENDS_SMBCONF_OBJ) \
532                   $(REG_INIT_SMBCONF_OBJ)
533
534 REG_FULL_OBJ = $(REG_SMBCONF_OBJ) \
535                $(REG_BACKENDS_EXTRA_OBJ) \
536                $(REG_INIT_FULL_OBJ) \
537                registry/reg_eventlog.o \
538                registry/reg_perfcount.o \
539                registry/reg_util_legacy.o
540
541
542 RPC_LSA_OBJ = rpc_server/srv_lsa_nt.o librpc/gen_ndr/srv_lsa.o
543
544 RPC_NETLOG_OBJ = rpc_server/srv_netlog_nt.o \
545                  librpc/gen_ndr/srv_netlogon.o
546
547 RPC_SAMR_OBJ = rpc_server/srv_samr_nt.o \
548                rpc_server/srv_samr_util.o \
549                librpc/gen_ndr/srv_samr.o
550
551 RPC_INITSHUTDOWN_OBJ =  librpc/gen_ndr/srv_initshutdown.o rpc_server/srv_initshutdown_nt.o
552
553 RPC_REG_OBJ =  rpc_server/srv_winreg_nt.o \
554                librpc/gen_ndr/srv_winreg.o
555
556 RPC_DSSETUP_OBJ =  rpc_server/srv_dssetup_nt.o librpc/gen_ndr/srv_dssetup.o
557
558 RPC_SVC_OBJ = rpc_server/srv_srvsvc_nt.o \
559               librpc/gen_ndr/srv_srvsvc.o
560
561 RPC_WKS_OBJ =  librpc/gen_ndr/srv_wkssvc.o rpc_server/srv_wkssvc_nt.o
562
563 RPC_SVCCTL_OBJ =  rpc_server/srv_svcctl.o rpc_server/srv_svcctl_nt.o \
564                   librpc/gen_ndr/srv_svcctl.o \
565                   services/svc_spoolss.o services/svc_rcinit.o services/services_db.o \
566                   services/svc_netlogon.o services/svc_winreg.o \
567                   services/svc_wins.o
568
569 RPC_NTSVCS_OBJ = rpc_server/srv_ntsvcs.o rpc_server/srv_ntsvcs_nt.o \
570                  librpc/gen_ndr/srv_ntsvcs.o
571
572 RPC_DFS_OBJ =  librpc/gen_ndr/srv_dfs.o rpc_server/srv_dfs_nt.o
573
574 RPC_SPOOLSS_OBJ = rpc_server/srv_spoolss.o rpc_server/srv_spoolss_nt.o
575
576 RPC_EVENTLOG_OBJ = rpc_server/srv_eventlog.o rpc_server/srv_eventlog_nt.o \
577                    rpc_server/srv_eventlog_lib.o librpc/gen_ndr/srv_eventlog.o
578
579 RPC_PIPE_OBJ = rpc_server/srv_pipe_hnd.o \
580                rpc_server/srv_pipe.o rpc_server/srv_lsa_hnd.o
581
582 RPC_ECHO_OBJ = rpc_server/srv_echo_nt.o librpc/gen_ndr/srv_echo.o
583
584 RPC_SERVER_OBJ = @RPC_STATIC@ $(RPC_PIPE_OBJ)
585
586 RPC_PARSE_OBJ = $(RPC_PARSE_OBJ2) \
587                 rpc_parse/parse_spoolss.o \
588                 rpc_parse/parse_eventlog.o rpc_parse/parse_buffer.o \
589                 rpc_parse/parse_ntsvcs.o rpc_parse/parse_svcctl.o
590
591 RPC_CLIENT_OBJ = rpc_client/cli_pipe.o
592
593 LOCKING_OBJ = locking/locking.o locking/brlock.o locking/posix.o
594
595 PRIVILEGES_BASIC_OBJ = lib/privileges_basic.o
596
597 PRIVILEGES_OBJ = lib/privileges.o
598
599 PASSDB_GET_SET_OBJ = passdb/pdb_get_set.o
600
601 PASSDB_OBJ = $(PASSDB_GET_SET_OBJ) passdb/passdb.o passdb/pdb_interface.o \
602                 passdb/util_wellknown.o passdb/util_builtin.o passdb/pdb_compat.o \
603                 passdb/util_unixsids.o passdb/lookup_sid.o \
604                 passdb/login_cache.o @PDB_STATIC@ \
605                 lib/account_pol.o $(PRIVILEGES_OBJ) \
606                 lib/util_nscd.o lib/winbind_util.o
607
608 DEVEL_HELP_WEIRD_OBJ = modules/weird.o
609 CP850_OBJ = modules/CP850.o
610 CP437_OBJ = modules/CP437.o
611 CHARSET_MACOSXFS_OBJ = modules/charset_macosxfs.o
612
613 GROUPDB_OBJ = groupdb/mapping.o groupdb/mapping_tdb.o groupdb/mapping_ldb.o
614
615 PROFILE_OBJ = profile/profile.o
616 PROFILES_OBJ = utils/profiles.o \
617                $(LIBSAMBA_OBJ) \
618                $(PARAM_OBJ) \
619                $(LIB_OBJ) $(LIB_DUMMY_OBJ) \
620                $(POPT_LIB_OBJ)
621
622 OPLOCK_OBJ = smbd/oplock.o smbd/oplock_irix.o smbd/oplock_linux.o
623
624 NOTIFY_OBJ = smbd/notify.o smbd/notify_inotify.o smbd/notify_internal.o
625
626 VFS_DEFAULT_OBJ = modules/vfs_default.o
627 VFS_AUDIT_OBJ = modules/vfs_audit.o
628 VFS_EXTD_AUDIT_OBJ = modules/vfs_extd_audit.o
629 VFS_FULL_AUDIT_OBJ = modules/vfs_full_audit.o
630 VFS_FAKE_PERMS_OBJ = modules/vfs_fake_perms.o
631 VFS_RECYCLE_OBJ = modules/vfs_recycle.o
632 VFS_NETATALK_OBJ = modules/vfs_netatalk.o
633 VFS_DEFAULT_QUOTA_OBJ = modules/vfs_default_quota.o
634 VFS_READONLY_OBJ = modules/vfs_readonly.o modules/getdate.o
635 VFS_CAP_OBJ = modules/vfs_cap.o
636 VFS_EXPAND_MSDFS_OBJ = modules/vfs_expand_msdfs.o
637 VFS_SHADOW_COPY_OBJ = modules/vfs_shadow_copy.o
638 VFS_SHADOW_COPY2_OBJ = modules/vfs_shadow_copy2.o
639 VFS_AFSACL_OBJ = modules/vfs_afsacl.o
640 VFS_XATTR_TDB_OBJ = modules/vfs_xattr_tdb.o
641 VFS_POSIXACL_OBJ = modules/vfs_posixacl.o
642 VFS_AIXACL_OBJ = modules/vfs_aixacl.o modules/vfs_aixacl_util.o
643 VFS_AIXACL2_OBJ = modules/vfs_aixacl2.o modules/vfs_aixacl_util.o modules/nfs4_acls.o
644 VFS_SOLARISACL_OBJ = modules/vfs_solarisacl.o
645 VFS_ZFSACL_OBJ = modules/vfs_zfsacl.o modules/nfs4_acls.o
646 VFS_HPUXACL_OBJ = modules/vfs_hpuxacl.o
647 VFS_IRIXACL_OBJ = modules/vfs_irixacl.o
648 VFS_TRU64ACL_OBJ = modules/vfs_tru64acl.o
649 VFS_CATIA_OBJ = modules/vfs_catia.o
650 VFS_STREAMS_XATTR_OBJ = modules/vfs_streams_xattr.o
651 VFS_STREAMS_DEPOT_OBJ = modules/vfs_streams_depot.o
652 VFS_CACHEPRIME_OBJ = modules/vfs_cacheprime.o
653 VFS_PREALLOC_OBJ = modules/vfs_prealloc.o
654 VFS_COMMIT_OBJ = modules/vfs_commit.o
655 VFS_GPFS_OBJ = modules/vfs_gpfs.o modules/gpfs.o modules/nfs4_acls.o
656 VFS_NOTIFY_FAM_OBJ = modules/vfs_notify_fam.o
657 VFS_READAHEAD_OBJ = modules/vfs_readahead.o
658 VFS_TSMSM_OBJ = modules/vfs_tsmsm.o
659 VFS_FILEID_OBJ = modules/vfs_fileid.o
660 VFS_AIO_FORK_OBJ = modules/vfs_aio_fork.o
661 VFS_SYNCOPS_OBJ = modules/vfs_syncops.o
662
663 PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o
664
665 SLCACHE_OBJ = libsmb/samlogon_cache.o
666
667 DCUTIL_OBJ  = libsmb/namequery_dc.o libsmb/trustdom_cache.o libsmb/trusts_util.o libsmb/dsgetdcname.o
668
669 AUTH_BUILTIN_OBJ = auth/auth_builtin.o
670 AUTH_DOMAIN_OBJ = auth/auth_domain.o
671 AUTH_SAM_OBJ = auth/auth_sam.o
672 AUTH_SERVER_OBJ = auth/auth_server.o
673 AUTH_UNIX_OBJ = auth/auth_unix.o
674 AUTH_WINBIND_OBJ = auth/auth_winbind.o
675 AUTH_SCRIPT_OBJ = auth/auth_script.o
676
677 AUTH_OBJ = auth/auth.o @AUTH_STATIC@ auth/auth_util.o auth/token_util.o \
678            auth/auth_compat.o auth/auth_ntlmssp.o \
679            $(PLAINTEXT_AUTH_OBJ) $(SLCACHE_OBJ) $(DCUTIL_OBJ)
680
681 MANGLE_OBJ = smbd/mangle.o smbd/mangle_hash.o smbd/mangle_hash2.o
682
683 SMBD_OBJ_MAIN = smbd/server.o
684
685 BUILDOPT_OBJ = smbd/build_options.o
686
687 SMBD_OBJ_SRV = smbd/files.o smbd/chgpasswd.o smbd/connection.o \
688                smbd/utmp.o smbd/session.o smbd/map_username.o \
689                smbd/dfree.o smbd/dir.o smbd/password.o smbd/conn.o \
690                smbd/share_access.o smbd/fileio.o \
691                smbd/ipc.o smbd/lanman.o smbd/negprot.o \
692                smbd/message.o smbd/nttrans.o smbd/pipes.o \
693                smbd/reply.o smbd/sesssetup.o smbd/trans2.o smbd/uid.o \
694                smbd/dosmode.o smbd/filename.o smbd/open.o smbd/close.o \
695                smbd/blocking.o smbd/sec_ctx.o smbd/srvstr.o \
696                smbd/vfs.o smbd/statcache.o smbd/seal.o \
697                smbd/posix_acls.o lib/sysacls.o $(SERVER_MUTEX_OBJ) \
698                smbd/process.o smbd/service.o smbd/error.o \
699                printing/printfsp.o lib/sysquotas.o lib/sysquotas_linux.o \
700                lib/sysquotas_xfs.o lib/sysquotas_4A.o \
701                smbd/change_trust_pw.o smbd/fake_file.o \
702                smbd/quotas.o smbd/ntquotas.o $(AFS_OBJ) smbd/msdfs.o \
703                $(AFS_SETTOKEN_OBJ) smbd/aio.o smbd/statvfs.o \
704                smbd/dmapi.o \
705                smbd/file_access.o \
706                smbd/dnsregister.o \
707                $(MANGLE_OBJ) @VFS_STATIC@
708
709 SMBD_OBJ_BASE = $(PARAM_WITHOUT_REG_OBJ) $(SMBD_OBJ_SRV) $(LIBSMB_OBJ) \
710                 $(RPC_SERVER_OBJ) $(RPC_PARSE_OBJ) \
711                 $(LOCKING_OBJ) $(PASSDB_OBJ) $(PRINTING_OBJ) $(PROFILE_OBJ) \
712                 $(LIB_OBJ) $(PRINTBACKEND_OBJ) $(OPLOCK_OBJ) \
713                 $(NOTIFY_OBJ) $(GROUPDB_OBJ) $(AUTH_OBJ) \
714                 $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
715                 $(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(LIBADS_SERVER_OBJ) \
716                 $(REG_FULL_OBJ) $(POPT_LIB_OBJ) $(BUILDOPT_OBJ) \
717                 $(SMBLDAP_OBJ) $(LDB_OBJ) $(LIBNET_OBJ) @LIBWBCLIENT_STATIC@ \
718                 $(LIBSMBCONF_OBJ) \
719                 $(PRIVILEGES_BASIC_OBJ)
720
721 PRINTING_OBJ = printing/pcap.o printing/print_svid.o printing/print_aix.o \
722                printing/print_cups.o printing/print_generic.o \
723                printing/lpq_parse.o printing/load.o \
724                printing/print_iprint.o
725
726 PRINTBASE_OBJ = printing/notify.o printing/printing_db.o
727 PRINTBACKEND_OBJ = printing/printing.o printing/nt_printing.o $(PRINTBASE_OBJ)
728
729 SMBD_OBJ = $(SMBD_OBJ_BASE) $(SMBD_OBJ_MAIN)
730
731 NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \
732             nmbd/nmbd_become_lmb.o nmbd/nmbd_browserdb.o \
733             nmbd/nmbd_browsesync.o nmbd/nmbd_elections.o \
734             nmbd/nmbd_incomingdgrams.o nmbd/nmbd_incomingrequests.o \
735             nmbd/nmbd_lmhosts.o nmbd/nmbd_logonnames.o nmbd/nmbd_mynames.o \
736             nmbd/nmbd_namelistdb.o nmbd/nmbd_namequery.o \
737             nmbd/nmbd_nameregister.o nmbd/nmbd_namerelease.o \
738             nmbd/nmbd_nodestatus.o nmbd/nmbd_packets.o \
739             nmbd/nmbd_processlogon.o nmbd/nmbd_responserecordsdb.o \
740             nmbd/nmbd_sendannounce.o nmbd/nmbd_serverlistdb.o \
741             nmbd/nmbd_subnetdb.o nmbd/nmbd_winsproxy.o nmbd/nmbd_winsserver.o \
742             nmbd/nmbd_workgroupdb.o nmbd/nmbd_synclists.o smbd/connection.o
743
744 NMBD_OBJ = $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
745            $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
746            librpc/gen_ndr/ndr_samr.o librpc/gen_ndr/ndr_lsa.o
747
748 SWAT_OBJ1 = web/cgi.o web/diagnose.o web/startstop.o web/statuspage.o \
749            web/swat.o web/neg_lang.o
750
751 SWAT_OBJ = $(SWAT_OBJ1) $(PARAM_OBJ) $(PRINTING_OBJ) $(LIBSMB_OBJ) \
752            $(LOCKING_OBJ) $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(KRBCLIENT_OBJ) \
753            $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) $(PLAINTEXT_AUTH_OBJ) \
754            $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(RPC_PARSE_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ) \
755            $(PASSCHANGE_OBJ) $(LDB_OBJ)
756
757 STATUS_OBJ = utils/status.o utils/status_profile.o \
758              $(LOCKING_OBJ) $(PARAM_OBJ) \
759              $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
760              $(LIBSAMBA_OBJ)
761
762 SMBCONTROL_OBJ = utils/smbcontrol.o $(LOCKING_OBJ) $(PARAM_OBJ) \
763         $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
764         $(LIBSAMBA_OBJ) \
765         $(PRINTBASE_OBJ)
766
767 SMBTREE_OBJ = utils/smbtree.o $(PARAM_OBJ) \
768              $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSMB_OBJ) \
769              $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
770              rpc_client/cli_pipe.o librpc/rpc/binding.o $(RPC_PARSE_OBJ2) \
771              $(RPC_CLIENT_OBJ1) \
772              $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(SMBLDAP_OBJ) $(LDB_OBJ) $(GROUPDB_OBJ) \
773              $(LIBMSRPC_GEN_OBJ)
774
775 TESTPARM_OBJ = utils/testparm.o \
776                $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
777                $(LIBSAMBA_OBJ)
778
779 PASSWD_UTIL_OBJ = utils/passwd_util.o
780
781 SMBPASSWD_OBJ = utils/smbpasswd.o $(PASSWD_UTIL_OBJ) $(PASSCHANGE_OBJ) \
782                 $(PARAM_OBJ) $(LIBSMB_OBJ) $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ \
783                 $(GROUPDB_OBJ) $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \
784                 $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(RPC_PARSE_OBJ) \
785                 $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ) $(LDB_OBJ)
786
787 PDBEDIT_OBJ = utils/pdbedit.o $(PASSWD_UTIL_OBJ) $(PARAM_OBJ) $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ \
788                 $(LIBSAMBA_OBJ) \
789                 $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) \
790                 $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) libsmb/asn1.o \
791                 $(LDB_OBJ)
792
793 SMBGET_OBJ = utils/smbget.o $(POPT_LIB_OBJ) $(LIBSMBCLIENT_OBJ0) @LIBWBCLIENT_STATIC@
794
795 DISPLAY_SEC_OBJ= lib/display_sec.o
796
797 RPCCLIENT_OBJ1 = rpcclient/rpcclient.o rpcclient/cmd_lsarpc.o \
798                  rpcclient/cmd_samr.o rpcclient/cmd_spoolss.o \
799                  rpcclient/cmd_netlogon.o rpcclient/cmd_srvsvc.o \
800                  rpcclient/cmd_dfs.o \
801                  rpcclient/cmd_dssetup.o rpcclient/cmd_echo.o \
802                  rpcclient/cmd_shutdown.o rpcclient/cmd_test.o \
803                  rpcclient/cmd_wkssvc.o rpcclient/cmd_ntsvcs.o \
804                  rpcclient/cmd_drsuapi.o \
805                  $(DISPLAY_SEC_OBJ)
806
807 RPCCLIENT_OBJ = $(RPCCLIENT_OBJ1) \
808              $(PARAM_OBJ) $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) \
809              $(RPC_PARSE_OBJ) $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ) \
810              $(READLINE_OBJ) $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) \
811              $(LIBADS_OBJ) $(POPT_LIB_OBJ) \
812              $(SMBLDAP_OBJ) $(DCUTIL_OBJ) $(LDB_OBJ) 
813
814 PAM_WINBIND_OBJ = nsswitch/pam_winbind.o $(WBCOMMON_OBJ) \
815                   $(LIBREPLACE_OBJ) @BUILD_INIPARSER@
816
817 LIBSMBCLIENT_OBJ0 = \
818                     libsmb/libsmb_cache.o \
819                     libsmb/libsmb_compat.o \
820                     libsmb/libsmb_context.o \
821                     libsmb/libsmb_dir.o \
822                     libsmb/libsmb_file.o \
823                     libsmb/libsmb_misc.o \
824                     libsmb/libsmb_path.o \
825                     libsmb/libsmb_printjob.o \
826                     libsmb/libsmb_server.o \
827                     libsmb/libsmb_stat.o \
828                     libsmb/libsmb_xattr.o \
829                     libsmb/libsmb_setget.o \
830                     $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
831                     $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
832                     $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(RPC_PARSE_OBJ) \
833                     $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) $(LDB_OBJ)
834
835 LIBSMBCLIENT_OBJ = $(LIBSMBCLIENT_OBJ0) @LIBWBCLIENT_STATIC@
836
837 LIBSMBSHAREMODES_OBJ = libsmb/smb_share_modes.o @LIBTDB_STATIC@
838
839 # This shared library is intended for linking with unit test programs
840 # to test Samba internals.  It's called libbigballofmud.so to
841 # discourage casual usage.
842
843 LIBBIGBALLOFMUD_MAJOR = 0
844
845 LIBBIGBALLOFMUD_OBJ = $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
846         $(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(RPC_PARSE_OBJ) $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ \
847         $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) $(SMBLDAP_OBJ) $(LDB_OBJ)
848
849 CLIENT_OBJ1 = client/client.o client/clitar.o rpc_client/cli_pipe.o \
850               librpc/rpc/binding.o \
851               client/dnsbrowse.o \
852               $(RPC_CLIENT_OBJ1) \
853               $(RPC_PARSE_OBJ2)
854
855 CLIENT_OBJ = $(CLIENT_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) \
856              $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) $(LIBMSRPC_GEN_OBJ) \
857              $(READLINE_OBJ) $(POPT_LIB_OBJ) \
858              $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(SMBLDAP_OBJ) $(GROUPDB_OBJ) $(LDB_OBJ) \
859              $(DISPLAY_SEC_OBJ)
860
861 LIBNETAPI_OBJ1 = lib/netapi/netapi.o \
862                  lib/netapi/cm.o \
863                  librpc/gen_ndr/ndr_libnetapi.o \
864                  lib/netapi/libnetapi.o \
865                  lib/netapi/joindomain.o \
866                  lib/netapi/serverinfo.o \
867                  lib/netapi/getdc.o \
868                  lib/netapi/user.o \
869                  lib/netapi/group.o \
870                  lib/netapi/localgroup.o \
871                  lib/netapi/samr.o
872
873 LIBNETAPI_OBJ  = $(LIBNETAPI_OBJ1) $(LIBNET_OBJ) \
874                  $(LIBSMBCONF_OBJ) \
875                  $(REG_SMBCONF_OBJ) \
876                  $(PARAM_WITHOUT_REG_OBJ) $(LIB_NONSMBD_OBJ) \
877                  $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
878                  $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(RPC_PARSE_OBJ) \
879                  $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(SMBLDAP_OBJ) $(GROUPDB_OBJ) $(LDB_OBJ) \
880                  $(DCUTIL_OBJ) $(LIBADS_OBJ) $(PRIVILEGES_BASIC_OBJ)
881
882 LIBSMBCONF_OBJ = lib/smbconf/smbconf.o lib/smbconf/smbconf_util.o \
883                  lib/smbconf/smbconf_reg.o \
884                  lib/smbconf/smbconf_txt.o \
885                  lib/smbconf/smbconf_init.o
886
887 SMBCONFTORT_OBJ0 = lib/smbconf/testsuite.o
888
889 SMBCONFTORT_OBJ = $(SMBCONFTORT_OBJ0) \
890                   $(LIB_NONSMBD_OBJ) \
891                   $(PARAM_OBJ) \
892                   $(LIBSMB_ERR_OBJ) \
893                   $(POPT_LIB_OBJ)
894
895 LIBNET_OBJ = libnet/libnet_join.o \
896              libnet/libnet_samsync.o \
897              libnet/libnet_samsync_ldif.o \
898              libnet/libnet_samsync_passdb.o \
899              libnet/libnet_samsync_display.o \
900              libnet/libnet_samsync_keytab.o \
901              libnet/libnet_dssync.o \
902              librpc/gen_ndr/ndr_libnet_join.o
903
904 NET_OBJ1 = utils/net.o utils/net_ads.o utils/net_help.o \
905            utils/net_rap.o utils/net_rpc.o utils/net_rpc_samsync.o \
906            utils/net_rpc_join.o utils/net_time.o utils/net_lookup.o \
907            utils/net_cache.o utils/net_groupmap.o utils/net_idmap.o \
908            utils/net_status.o utils/net_rpc_printer.o utils/net_rpc_rights.o \
909            utils/net_rpc_service.o utils/net_rpc_registry.o utils/net_usershare.o \
910            utils/netlookup.o utils/net_sam.o utils/net_rpc_shell.o \
911            utils/net_util.o utils/net_rpc_sh_acct.o utils/net_rpc_audit.o \
912            $(PASSWD_UTIL_OBJ) utils/net_dns.o utils/net_ads_gpo.o \
913            utils/net_conf.o utils/net_join.o utils/net_user.o \
914            utils/net_group.o utils/net_file.o utils/net_registry.o \
915            auth/token_util.o utils/net_dom.o utils/net_share.o
916
917 # these are not processed by make proto
918 NET_OBJ2 = utils/net_registry_util.o utils/net_help_common.o
919
920 NET_OBJ = $(NET_OBJ1) \
921           $(NET_OBJ2) @FAKE_KASERVER_OBJ@\
922           $(PARAM_WITHOUT_REG_OBJ) $(LIBSMB_OBJ) \
923           $(RPC_PARSE_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
924           $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(LIBADDNS_OBJ0) \
925           $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
926           $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) $(POPT_LIB_OBJ) \
927           $(SMBLDAP_OBJ) $(DCUTIL_OBJ) $(SERVER_MUTEX_OBJ) \
928           $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) $(READLINE_OBJ) \
929           $(LDB_OBJ) $(LIBGPO_OBJ) @BUILD_INIPARSER@ $(DISPLAY_SEC_OBJ) \
930           $(REG_SMBCONF_OBJ) @LIBNETAPI_STATIC@ $(LIBNET_OBJ) \
931           $(LIBSMBCONF_OBJ) \
932           @LIBWBCLIENT_STATIC@ \
933           $(PRIVILEGES_BASIC_OBJ)
934
935 CUPS_OBJ = client/smbspool.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
936           $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
937           librpc/gen_ndr/ndr_samr.o librpc/gen_ndr/ndr_lsa.o
938
939 CIFS_MOUNT_OBJ = client/mount.cifs.o
940
941 CIFS_UMOUNT_OBJ = client/umount.cifs.o
942
943 CIFS_SPNEGO_OBJ = client/cifs.spnego.o
944
945 NMBLOOKUP_OBJ = utils/nmblookup.o $(PARAM_OBJ) $(LIBNMB_OBJ) \
946                $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) $(LIBSAMBA_OBJ)
947
948 SMBTORTURE_OBJ1 = torture/torture.o torture/nbio.o torture/scanner.o torture/utable.o \
949                 torture/denytest.o torture/mangle_test.o
950
951 SMBTORTURE_OBJ = $(SMBTORTURE_OBJ1) $(PARAM_OBJ) \
952         $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) \
953         librpc/gen_ndr/ndr_samr.o librpc/gen_ndr/ndr_lsa.o
954
955 MASKTEST_OBJ = torture/masktest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
956                  $(LIB_NONSMBD_OBJ) \
957                  librpc/gen_ndr/ndr_samr.o librpc/gen_ndr/ndr_lsa.o
958
959 MSGTEST_OBJ = torture/msgtest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
960                  $(LIB_NONSMBD_OBJ) \
961                  librpc/gen_ndr/ndr_samr.o librpc/gen_ndr/ndr_lsa.o
962
963 LOCKTEST_OBJ = torture/locktest.o $(PARAM_OBJ) $(LOCKING_OBJ) $(KRBCLIENT_OBJ) \
964                $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) \
965                librpc/gen_ndr/ndr_samr.o librpc/gen_ndr/ndr_lsa.o
966
967 NSSTEST_OBJ = torture/nsstest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
968                  $(LIB_NONSMBD_OBJ) \
969                  librpc/gen_ndr/ndr_samr.o librpc/gen_ndr/ndr_lsa.o
970
971 PDBTEST_OBJ = torture/pdbtest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
972                 $(LIB_NONSMBD_OBJ) $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(GROUPDB_OBJ) \
973                 $(SMBLDAP_OBJ) $(POPT_LIB_OBJ) $(LDB_OBJ) \
974                 librpc/gen_ndr/ndr_samr.o librpc/gen_ndr/ndr_lsa.o
975
976 VFSTEST_OBJ = torture/cmd_vfs.o torture/vfstest.o $(SMBD_OBJ_BASE) $(READLINE_OBJ)
977
978 SMBICONV_OBJ = $(PARAM_OBJ) torture/smbiconv.o $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) $(LIBSAMBA_OBJ)
979
980 LOG2PCAP_OBJ = utils/log2pcaphex.o
981
982 LOCKTEST2_OBJ = torture/locktest2.o $(PARAM_OBJ) $(LOCKING_OBJ) $(LIBSMB_OBJ) \
983                 $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) \
984                 librpc/gen_ndr/ndr_samr.o librpc/gen_ndr/ndr_lsa.o
985
986 SMBCACLS_OBJ = utils/smbcacls.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
987                 $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(RPC_PARSE_OBJ) \
988                 $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(GROUPDB_OBJ) $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
989                 $(POPT_LIB_OBJ) $(DCUTIL_OBJ) $(LIBADS_OBJ) $(SMBLDAP_OBJ) $(LDB_OBJ)
990
991 SMBCQUOTAS_OBJ = utils/smbcquotas.o $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
992                 $(PARAM_OBJ) \
993                 $(LIB_NONSMBD_OBJ) $(RPC_PARSE_OBJ) \
994                 $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(POPT_LIB_OBJ) \
995                 $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(SMBLDAP_OBJ) $(GROUPDB_OBJ) $(LDB_OBJ)
996
997 EVTLOGADM_OBJ0  = utils/eventlogadm.o
998
999 EVTLOGADM_OBJ   = $(EVTLOGADM_OBJ0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1000                 $(LIBSAMBA_OBJ) \
1001                 registry/reg_eventlog.o rpc_server/srv_eventlog_lib.o
1002
1003 SHARESEC_OBJ0 = utils/sharesec.o
1004 SHARESEC_OBJ  = $(SHARESEC_OBJ0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1005                 $(LIBSAMBA_OBJ) \
1006                 $(POPT_LIB_OBJ)
1007
1008 TALLOCTORT_OBJ = @tallocdir@/testsuite.o $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1009                  $(LIBSAMBA_OBJ)
1010
1011 REPLACETORT_OBJ = lib/replace/test/testsuite.o \
1012                 lib/replace/test/getifaddrs.o \
1013                 lib/replace/test/os2_delete.o \
1014                 lib/replace/test/strptime.o \
1015                 $(LIBREPLACE_OBJ)
1016
1017 NDRDUMP_OBJ = librpc/tools/ndrdump.o \
1018               $(PARAM_OBJ) $(LIBNDR_GEN_OBJ) \
1019               $(LIBSAMBA_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
1020               librpc/gen_ndr/ndr_svcctl.o
1021
1022 DEBUG2HTML_OBJ = utils/debug2html.o utils/debugparse.o
1023
1024 SMBFILTER_OBJ = utils/smbfilter.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
1025                  $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \
1026                  librpc/gen_ndr/ndr_samr.o librpc/gen_ndr/ndr_lsa.o
1027
1028 WINBIND_WINS_NSS_OBJ = nsswitch/wins.o $(PARAM_OBJ) \
1029         $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) $(NSSWINS_OBJ) $(KRBCLIENT_OBJ) \
1030         librpc/gen_ndr/ndr_samr.o librpc/gen_ndr/ndr_lsa.o
1031
1032 PAM_SMBPASS_OBJ_0 = pam_smbpass/pam_smb_auth.o pam_smbpass/pam_smb_passwd.o \
1033                 pam_smbpass/pam_smb_acct.o pam_smbpass/support.o
1034 PAM_SMBPASS_OBJ = $(PAM_SMBPASS_OBJ_0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(GROUPDB_OBJ) \
1035                 $(SMBLDAP_OBJ) $(LIBSAMBA_OBJ) \
1036                 $(LDB_OBJ)
1037
1038 IDMAP_OBJ     = winbindd/idmap.o winbindd/idmap_cache.o winbindd/idmap_util.o @IDMAP_STATIC@
1039
1040 NSS_INFO_OBJ = winbindd/nss_info.o @NSS_INFO_STATIC@
1041
1042 WINBINDD_OBJ1 = \
1043                 winbindd/winbindd.o       \
1044                 winbindd/winbindd_user.o  \
1045                 winbindd/winbindd_group.o \
1046                 winbindd/winbindd_util.o  \
1047                 winbindd/winbindd_cache.o \
1048                 winbindd/winbindd_pam.o   \
1049                 winbindd/winbindd_sid.o   \
1050                 winbindd/winbindd_misc.o  \
1051                 winbindd/winbindd_cm.o    \
1052                 winbindd/winbindd_wins.o  \
1053                 winbindd/winbindd_rpc.o   \
1054                 winbindd/winbindd_reconnect.o \
1055                 winbindd/winbindd_ads.o   \
1056                 winbindd/winbindd_passdb.o \
1057                 winbindd/winbindd_dual.o  \
1058                 winbindd/winbindd_async.o \
1059                 winbindd/winbindd_creds.o \
1060                 winbindd/winbindd_cred_cache.o \
1061                 winbindd/winbindd_ccache_access.o \
1062                 winbindd/winbindd_domain.o \
1063                 winbindd/winbindd_idmap.o \
1064                 winbindd/winbindd_locator.o \
1065                 winbindd/winbindd_ndr.o \
1066                 auth/token_util.o \
1067                 smbd/connection.o
1068
1069 WINBINDD_OBJ = \
1070                 $(WINBINDD_OBJ1) $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(GROUPDB_OBJ) \
1071                 $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1072                 $(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(RPC_PARSE_OBJ) \
1073                 $(PROFILE_OBJ) $(SLCACHE_OBJ) $(SMBLDAP_OBJ) \
1074                 $(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
1075                 $(DCUTIL_OBJ) $(IDMAP_OBJ) $(NSS_INFO_OBJ) \
1076                 $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) \
1077                 $(LIBADS_SERVER_OBJ) $(SERVER_MUTEX_OBJ) $(LDB_OBJ) 
1078
1079 WBINFO_OBJ = nsswitch/wbinfo.o $(LIBSAMBA_OBJ) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1080                 $(POPT_LIB_OBJ) $(AFS_SETTOKEN_OBJ) \
1081                 lib/winbind_util.o $(WBCOMMON_OBJ) @LIBWBCLIENT_STATIC@
1082
1083 WINBIND_NSS_OBJ = $(WBCOMMON_OBJ) $(LIBREPLACE_OBJ) @WINBIND_NSS_EXTRA_OBJS@
1084
1085 LDB_COMMON_OBJ=lib/ldb/common/ldb.o lib/ldb/common/ldb_ldif.o \
1086           lib/ldb/common/ldb_parse.o lib/ldb/common/ldb_msg.o lib/ldb/common/ldb_utf8.o \
1087           lib/ldb/common/ldb_debug.o lib/ldb/common/ldb_modules.o \
1088           lib/ldb/common/ldb_dn.o lib/ldb/common/ldb_match.o lib/ldb/common/ldb_attributes.o \
1089           lib/ldb/common/attrib_handlers.o lib/ldb/common/ldb_controls.o lib/ldb/common/qsort.o
1090
1091 LDB_TDB_OBJ=lib/ldb/ldb_tdb/ldb_tdb.o \
1092        lib/ldb/ldb_tdb/ldb_pack.o lib/ldb/ldb_tdb/ldb_search.o lib/ldb/ldb_tdb/ldb_index.o \
1093        lib/ldb/ldb_tdb/ldb_cache.o lib/ldb/ldb_tdb/ldb_tdb_wrap.o
1094
1095 LDB_MODULES_OBJ=lib/ldb/modules/operational.o lib/ldb/modules/rdn_name.o \
1096           lib/ldb/modules/objectclass.o \
1097           lib/ldb/modules/paged_results.o lib/ldb/modules/sort.o lib/ldb/modules/asq.o
1098
1099 # enabled in configure.in
1100 LDB_LDAP_OBJ=@LDBLDAP@
1101
1102 LDB_OBJ = ${LDB_COMMON_OBJ} ${LDB_TDB_OBJ} ${LDB_LDAP_OBJ} ${LDB_MODULES_OBJ}
1103
1104 LDB_CMDLINE_OBJ = $(PARAM_OBJ) \
1105           $(POPT_LIB_OBJ) $(LIB_OBJ) $(LIB_DUMMY_OBJ) $(LIBSMB_ERR_OBJ0) \
1106           $(RPC_PARSE_OBJ1) $(SECRETS_OBJ) \
1107           $(LDB_OBJ) lib/ldb/tools/cmdline.o 
1108
1109
1110 LDBEDIT_OBJ = $(LDB_CMDLINE_OBJ) lib/ldb/tools/ldbedit.o
1111 LDBSEARCH_OBJ = $(LDB_CMDLINE_OBJ) lib/ldb/tools/ldbsearch.o
1112 LDBADD_OBJ = $(LDB_CMDLINE_OBJ) lib/ldb/tools/ldbadd.o
1113 LDBDEL_OBJ = $(LDB_CMDLINE_OBJ) lib/ldb/tools/ldbdel.o
1114 LDBMODIFY_OBJ = $(LDB_CMDLINE_OBJ) lib/ldb/tools/ldbmodify.o
1115
1116 WINBIND_KRB5_LOCATOR_OBJ1 = nsswitch/winbind_krb5_locator.o
1117 WINBIND_KRB5_LOCATOR_OBJ = $(WINBIND_KRB5_LOCATOR_OBJ1) $(WBCOMMON_OBJ) $(LIBREPLACE_OBJ)
1118
1119 POPT_OBJ=popt/findme.o popt/popt.o popt/poptconfig.o \
1120           popt/popthelp.o popt/poptparse.o
1121
1122 INIPARSER_OBJ = iniparser_build/iniparser.o iniparser_build/dictionary.o \
1123                 iniparser_build/strlib.o
1124
1125 TDBBACKUP_OBJ = @tdbdir@/tools/tdbbackup.o $(LIBREPLACE_OBJ) \
1126         @LIBTDB_STATIC@ $(SOCKET_WRAPPER_OBJ)
1127
1128 TDBTOOL_OBJ = @tdbdir@/tools/tdbtool.o @LIBTDB_STATIC@ $(LIBREPLACE_OBJ) \
1129         $(SOCKET_WRAPPER_OBJ)
1130
1131 TDBDUMP_OBJ = @tdbdir@/tools/tdbdump.o @LIBTDB_STATIC@ $(LIBREPLACE_OBJ) \
1132         $(SOCKET_WRAPPER_OBJ)
1133
1134 TDBTORTURE_OBJ = @tdbdir@/tools/tdbtorture.o @LIBTDB_STATIC@ $(LIBREPLACE_OBJ) \
1135         $(SOCKET_WRAPPER_OBJ)
1136
1137
1138 NTLM_AUTH_OBJ1 = utils/ntlm_auth.o utils/ntlm_auth_diagnostics.o
1139
1140 NTLM_AUTH_OBJ = ${NTLM_AUTH_OBJ1} $(LIBSAMBA_OBJ) $(POPT_LIB_OBJ) \
1141                 libsmb/asn1.o libsmb/spnego.o libsmb/clikrb5.o libads/kerberos.o \
1142                 $(SERVER_MUTEX_OBJ) $(LIBADS_SERVER_OBJ) \
1143                 $(PASSDB_OBJ) $(GROUPDB_OBJ) \
1144                 $(SMBLDAP_OBJ) $(LIBNMB_OBJ) \
1145                 $(LDB_OBJ) $(WBCOMMON_OBJ) @LIBWBCLIENT_STATIC@ \
1146                 librpc/gen_ndr/ndr_samr.o \
1147                 librpc/gen_ndr/ndr_lsa.o \
1148                 librpc/gen_ndr/ndr_netlogon.o
1149
1150
1151 VLP_OBJ1 = ../testsuite/printing/vlp.o $(RPC_CLIENT_OBJ1) $(RPC_PARSE_OBJ2) $(RPC_CLIENT_OBJ) librpc/rpc/binding.o
1152
1153 VLP_OBJ = $(VLP_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) \
1154           $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) $(LIBMSRPC_GEN_OBJ) \
1155           $(READLINE_OBJ) $(POPT_LIB_OBJ) \
1156           $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(SMBLDAP_OBJ) $(GROUPDB_OBJ) $(LDB_OBJ) \
1157           $(DISPLAY_SEC_OBJ)
1158
1159 RPC_OPEN_TCP_OBJ = torture/rpc_open_tcp.o \
1160                    $(LIBSMB_OBJ) \
1161                    $(PARAM_OBJ) \
1162                    $(PASSDB_OBJ) \
1163                    @LIBWBCLIENT_STATIC@ $(SMBLDAP_OBJ) $(LDB_OBJ) $(GROUPDB_OBJ) \
1164                    $(LIB_NONSMBD_OBJ) \
1165                    $(KRBCLIENT_OBJ) \
1166                    $(RPC_PARSE_OBJ2) \
1167                    $(RPC_CLIENT_OBJ1) \
1168                    rpc_client/cli_pipe.o \
1169                    librpc/rpc/binding.o \
1170                    $(LIBMSRPC_GEN_OBJ)
1171
1172
1173 ######################################################################
1174 # now the rules...
1175 ######################################################################
1176 all:: SHOWFLAGS $(SHLIBS) $(SBIN_PROGS) $(BIN_PROGS) $(ROOT_SBIN_PROGS) \
1177         $(MODULES) $(NSS_MODULES) $(PAM_MODULES) @EXTRA_ALL_TARGETS@
1178
1179 nss_modules:: $(NSS_MODULES)
1180
1181 pam_modules:: $(PAM_MODULES)
1182
1183 pam_smbpass: SHOWFLAGS bin/pam_smbpass.@SHLIBEXT@
1184
1185 pam_winbind: SHOWFLAGS bin/pam_winbind.@SHLIBEXT@
1186
1187 torture:: SHOWFLAGS $(TORTURE_PROGS)
1188
1189 smbtorture : SHOWFLAGS bin/smbtorture@EXEEXT@
1190
1191 masktest : SHOWFLAGS bin/masktest@EXEEXT@
1192
1193 msgtest : SHOWFLAGS bin/msgtest@EXEEXT@
1194
1195 locktest : SHOWFLAGS bin/locktest@EXEEXT@
1196
1197 smbcacls : SHOWFLAGS bin/smbcacls@EXEEXT@
1198
1199 smbcquotas : SHOWFLAGS bin/smbcquotas@EXEEXT@
1200
1201 locktest2 : SHOWFLAGS bin/locktest2@EXEEXT@
1202
1203 debug2html : SHOWFLAGS bin/debug2html@EXEEXT@
1204
1205 smbfilter : SHOWFLAGS bin/smbfilter@EXEEXT@
1206
1207 eventlogadm: SHOWFLAGS bin/eventlogadm@EXEEXT@
1208
1209 sharesec: SHOWFLAGS bin/sharesec@EXEEXT@
1210
1211 talloctort : SHOWFLAGS bin/talloctort@EXEEXT@
1212
1213 replacetort : SHOWFLAGS bin/replacetort@EXEEXT@
1214
1215 smbconftort : SHOWFLAGS bin/smbconftort@EXEEXT@
1216
1217 timelimit : SHOWFLAGS bin/timelimit@EXEEXT@
1218
1219 nsswitch : SHOWFLAGS bin/winbindd@EXEEXT@ bin/wbinfo@EXEEXT@ @WINBIND_NSS@ \
1220         @WINBIND_WINS_NSS@ @WINBIND_KRB5_LOCATOR@ \
1221         bin/pam_winbind.@SHLIBEXT@ bin/smbcontrol@EXEEXT@
1222
1223 wins : SHOWFLAGS @WINBIND_WINS_NSS@
1224
1225 modules:: SHOWFLAGS $(MODULES)
1226
1227 #####################################################################
1228 ## Perl IDL Compiler
1229 IDL_FILES = lsa.idl dfs.idl echo.idl winreg.idl initshutdown.idl \
1230         srvsvc.idl svcctl.idl eventlog.idl wkssvc.idl netlogon.idl notify.idl \
1231         epmapper.idl messaging.idl xattr.idl misc.idl samr.idl security.idl \
1232         dssetup.idl krb5pac.idl ntsvcs.idl libnetapi.idl drsuapi.idl drsblobs.idl \
1233         nbt.idl
1234
1235 idl::
1236         @IDL_FILES="$(IDL_FILES)" CPP="$(CPP)" PERL="$(PERL)" \
1237          srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh $(PIDL_ARGS)
1238
1239
1240 #####################################################################
1241
1242
1243 everything:: all libtalloc libsmbclient libnetapi debug2html smbfilter talloctort replacetort smbconftort modules torture \
1244         $(EVERYTHING_PROGS)
1245
1246 .SUFFIXES:
1247 .SUFFIXES: .c .o .lo
1248
1249 SHOWFLAGS::
1250         @echo "Using FLAGS      = $(FLAGS)"
1251         @echo "      PICFLAG    = $(PICFLAG)"
1252         @echo "      LIBS       = $(LIBS)"
1253         @echo "      LDFLAGS    = $(LDFLAGS)"
1254         @echo "      DYNEXP     = $(DYNEXP)"
1255         @echo "      LDSHFLAGS  = $(LDSHFLAGS)"
1256         @echo "      SHLIBEXT   = @SHLIBEXT@"
1257         @echo "      SONAMEFLAG = @SONAMEFLAG@"
1258
1259 MAKEDIR = || exec false; \
1260           if test -d "$$dir"; then :; else \
1261           echo mkdir "$$dir"; \
1262           mkdir -p "$$dir" >/dev/null 2>&1 || \
1263           test -d "$$dir" || \
1264           mkdir "$$dir" || \
1265           exec false; fi || exec false
1266
1267 # Run a static checker.
1268 CHECK_CC = $(CC_CHECKER) -I. -I$(srcdir) $(FLAGS) $(PICFLAG) -c $< -o $@
1269 # Compile a source file.
1270 COMPILE_CC = $(CC) -I. -I$(srcdir) $(FLAGS) $(PICFLAG) -c $< -o $@
1271 # Compile a source file with the installation paths defined.
1272 COMPILE_CC_PATH = $(CC) -I. -I$(srcdir) $(PATH_FLAGS) $(FLAGS) $(PICFLAG) -c $< -o $@
1273
1274 COMPILE = $(COMPILE_CC)
1275
1276 .c.o:
1277         @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
1278          dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
1279         @if test -n "$(CC_CHECKER)"; then \
1280           echo "Checking  $*.c with '$(CC_CHECKER)'";\
1281           $(CHECK_CC); \
1282          fi
1283         @echo Compiling $*.c
1284         @$(COMPILE) && exit 0;\
1285                 echo "The following command failed:" 1>&2;\
1286                 echo "$(COMPILE_CC)" 1>&2;\
1287                 $(COMPILE_CC) >/dev/null 2>&1
1288 @BROKEN_CC@     -mv `echo $@ | sed 's%^.*/%%g'` $@
1289
1290 PRECOMPILED_HEADER = $(builddir)/include/includes.h.gch
1291
1292 # this adds support for precompiled headers. To use it, install a snapshot
1293 # of gcc-3.4 and run 'make pch' before you do the main build.
1294 pch::
1295         rm -f $(PRECOMPILED_HEADER)
1296         $(MAKE) $(PRECOMPILED_HEADER)
1297
1298 $(PRECOMPILED_HEADER): $(srcdir)/include/includes.h
1299         $(COMPILE)
1300
1301 BINARY_PREREQS = bin/.dummy
1302
1303 # These dependencies are only approximately correct: we want to make
1304 # sure Samba's paths are updated if ./configure is re-run.  Really it
1305 # would be nice if "make prefix=/opt/samba all" also rebuilt things,
1306 # but since we also require "make install prefix=/opt/samba" *not* to
1307 # rebuild it's a bit hard.
1308
1309 dynconfig.o: dynconfig.c Makefile
1310         @echo Compiling $*.c
1311         @$(COMPILE_CC_PATH) && exit 0;\
1312                 echo "The following command failed:" 1>&2;\
1313                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1314                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1315
1316 lib/pidfile.o: lib/pidfile.c
1317         @echo Compiling $*.c
1318         @$(COMPILE_CC_PATH) && exit 0;\
1319                 echo "The following command failed:" 1>&2;\
1320                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1321                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1322
1323 lib/version.o: lib/version.c include/version.h
1324         @echo Compiling $*.c
1325         @$(COMPILE_CC_PATH) && exit 0;\
1326                 echo "The following command failed:" 1>&2;\
1327                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1328                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1329
1330 smbd/build_options.o: smbd/build_options.c Makefile include/config.h include/build_env.h include/proto.h
1331         @echo Compiling $*.c
1332         @$(COMPILE_CC_PATH) && exit 0;\
1333                 echo "The following command failed:" 1>&2;\
1334                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1335                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1336
1337 smbd/build_options.c: include/config.h.in script/mkbuildoptions.awk
1338         @echo Generating $@
1339         @dir=smbd $(MAKEDIR) && $(AWK) -f $(srcdir)/script/mkbuildoptions.awk > $(builddir)/smbd/build_options.c < $(srcdir)/include/config.h.in
1340
1341 bin/.dummy:
1342         @if (: >> $@ || : > $@) >/dev/null 2>&1; then :; else \
1343           dir=bin $(MAKEDIR); fi
1344         @: >> $@ || : > $@ # what a fancy emoticon!
1345
1346 bin/smbd@EXEEXT@: $(BINARY_PREREQS) $(SMBD_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @BUILD_POPT@
1347         @echo Linking $@
1348         @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LDAP_LIBS) \
1349                 $(KRB5LIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \
1350                 $(ACL_LIBS) $(PASSDB_LIBS) $(LIBS) $(DNSSD_LIBS) \
1351                 @POPTLIBS@ @SMBD_LIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ \
1352                 @WINBIND_LIBS@
1353
1354 bin/nmbd@EXEEXT@: $(BINARY_PREREQS) $(NMBD_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1355         @echo Linking $@
1356         @$(CC) $(FLAGS) -o $@ $(NMBD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1357                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @POPTLIBS@ \
1358                 $(KRB5LIBS) $(LDAP_LIBS)
1359
1360 bin/swat@EXEEXT@: $(BINARY_PREREQS) $(SWAT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1361         @echo Linking $@
1362         @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(DYNEXP) $(PRINT_LIBS) \
1363           $(AUTH_LIBS) $(LIBS) $(PASSDB_LIBS) @POPTLIBS@ $(KRB5LIBS) \
1364           $(LDAP_LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@
1365
1366 bin/rpcclient@EXEEXT@: $(BINARY_PREREQS) $(RPCCLIENT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1367         @echo Linking $@
1368         @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(PASSDB_LIBS) $(RPCCLIENT_OBJ) \
1369                 $(DYNEXP) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) @POPTLIBS@ \
1370                 $(KRB5LIBS) $(LDAP_LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ \
1371                 @WINBIND_LIBS@
1372
1373 bin/smbclient@EXEEXT@: $(BINARY_PREREQS) $(CLIENT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1374         @echo Linking $@
1375         @$(CC) $(FLAGS) -o $@ $(CLIENT_OBJ) $(LDFLAGS) $(DYNEXP) \
1376                 $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) @POPTLIBS@ \
1377                 $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(DNSSD_LIBS) \
1378                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@
1379
1380 bin/net@EXEEXT@: $(BINARY_PREREQS) $(NET_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @LIBNETAPI_SHARED@
1381         @echo Linking $@
1382         @$(CC) $(FLAGS) -o $@ $(NET_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
1383                 @POPTLIBS@ $(KRB5LIBS) $(UUID_LIBS) $(LDAP_LIBS) \
1384                 $(PASSDB_LIBS) $(TERMLDFLAGS) $(TERMLIBS) $(NSCD_LIBS) \
1385                 @INIPARSERLIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@ @LIBNETAPI_LIBS@
1386
1387 bin/profiles@EXEEXT@: $(BINARY_PREREQS) $(PROFILES_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1388         @echo Linking $@
1389         @$(CC) $(FLAGS) -o $@ $(PROFILES_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
1390                 $(LDAP_LIBS) @POPTLIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
1391
1392 bin/smbspool@EXEEXT@: $(BINARY_PREREQS) $(CUPS_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1393         @echo Linking $@
1394         @$(CC) $(FLAGS) -o $@ $(CUPS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
1395                 $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
1396
1397 bin/mount.cifs@EXEEXT@: $(BINARY_PREREQS) $(CIFS_MOUNT_OBJ) @BUILD_POPT@
1398         @echo Linking $@
1399         @$(CC) $(FLAGS) -o $@ $(CIFS_MOUNT_OBJ) $(DYNEXP) $(LDFLAGS) @POPTLIBS@
1400
1401 bin/umount.cifs@EXEEXT@: $(BINARY_PREREQS) $(CIFS_UMOUNT_OBJ) @BUILD_POPT@
1402         @echo Linking $@
1403         @$(CC) $(FLAGS) -o $@ $(CIFS_UMOUNT_OBJ) $(DYNEXP) $(LDFLAGS) @POPTLIBS@
1404
1405 bin/cifs.spnego@EXEEXT@: $(BINARY_PREREQS) $(CIFS_SPNEGO_OBJ) $(LIBSMBCLIENT_OBJ0) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1406         @echo Linking $@
1407         @$(CC) $(FLAGS) -o $@ $(CIFS_SPNEGO_OBJ) $(DYNEXP) $(LDFLAGS) \
1408                 -lkeyutils $(LIBS) $(LIBSMBCLIENT_OBJ0) $(KRB5LIBS) \
1409                 $(LDAP_LIBS) @POPTLIBS@ @LIBTALLOC_LIBS@ @LIBWBCLIENT_SHARED@ \
1410                 @LIBTDB_LIBS@
1411
1412 bin/testparm@EXEEXT@: $(BINARY_PREREQS) $(TESTPARM_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1413         @echo Linking $@
1414         @$(CC) $(FLAGS) -o $@ $(TESTPARM_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1415                 $(LDAP_LIBS) @POPTLIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
1416
1417 bin/smbstatus@EXEEXT@: $(BINARY_PREREQS) $(STATUS_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1418         @echo Linking $@
1419         @$(CC) $(FLAGS) -o $@ $(STATUS_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1420                 $(LDAP_LIBS) @POPTLIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
1421
1422 bin/smbcontrol@EXEEXT@: $(BINARY_PREREQS) $(SMBCONTROL_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1423         @echo Linking $@
1424         @$(CC) -DUSING_SMBCONTROL $(FLAGS) -o $@ \
1425                 $(SMBCONTROL_OBJ) $(DYNEXP) $(LDFLAGS) \
1426                 $(LIBS) $(LDAP_LIBS) @LIBUNWIND_PTRACE@ @POPTLIBS@ \
1427                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
1428
1429 bin/smbtree@EXEEXT@: $(BINARY_PREREQS) $(SMBTREE_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1430         @echo Linking $@
1431         @$(CC) $(FLAGS) -o $@ $(SMBTREE_OBJ) $(LDFLAGS) $(DYNEXP) \
1432                 $(LIBS) @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1433                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@
1434
1435 bin/smbpasswd@EXEEXT@: $(BINARY_PREREQS) $(SMBPASSWD_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1436         @echo Linking $@
1437         @$(CC) $(FLAGS) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(PASSDB_LIBS) \
1438                 $(DYNEXP) $(LIBS) @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) \
1439                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@
1440
1441 bin/pdbedit@EXEEXT@: $(BINARY_PREREQS) $(PDBEDIT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1442         @echo Linking $@
1443         @$(CC) $(FLAGS) -o $@ $(PDBEDIT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1444                 @POPTLIBS@ $(PASSDB_LIBS) $(LDAP_LIBS) @LIBTALLOC_LIBS@ \
1445                 @LIBTDB_LIBS@ @WINBIND_LIBS@
1446
1447 bin/smbget@EXEEXT@: $(BINARY_PREREQS) $(SMBGET_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1448         @echo Linking $@
1449         @$(CC) $(FLAGS) -o $@ $(SMBGET_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1450                 @POPTLIBS@  $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1451                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@
1452
1453 bin/nmblookup@EXEEXT@: $(BINARY_PREREQS) $(NMBLOOKUP_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1454         @echo Linking $@
1455         @$(CC) $(FLAGS) -o $@ $(NMBLOOKUP_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1456                 @POPTLIBS@ $(LDAP_LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
1457
1458 bin/smbtorture@EXEEXT@: $(BINARY_PREREQS) $(SMBTORTURE_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1459         @echo Linking $@
1460         @$(CC) $(FLAGS) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(DYNEXP) \
1461                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@ @LIBTALLOC_LIBS@ \
1462                 @LIBTDB_LIBS@
1463
1464 bin/talloctort@EXEEXT@: $(BINARY_PREREQS) $(TALLOCTORT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1465         @echo Linking $@
1466         @$(CC) $(FLAGS) -o $@ $(TALLOCTORT_OBJ) $(LDFLAGS) \
1467                 $(DYNEXP) $(LIBS) $(LDAP_LIBS) @POPTLIBS@ \
1468                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
1469
1470 bin/replacetort@EXEEXT@: $(REPLACETORT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@
1471         @echo Linking $@
1472         @$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(REPLACETORT_OBJ) $(LDFLAGS) \
1473                 $(DYNEXP) $(LIBS) @POPTLIBS@ @LIBTALLOC_LIBS@
1474
1475 bin/smbconftort@EXEEXT@: $(SMBCONFTORT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1476         @echo Linking $@
1477         @$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(SMBCONFTORT_OBJ) $(LDFLAGS) \
1478                 $(DYNEXP) $(LIBS) $(LDAP_LIBS) @POPTLIBS@ \
1479                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
1480
1481 bin/masktest@EXEEXT@: $(BINARY_PREREQS) $(MASKTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1482         @echo Linking $@
1483         @$(CC) $(FLAGS) -o $@ $(MASKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
1484                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@ \
1485                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
1486
1487 bin/msgtest@EXEEXT@: $(BINARY_PREREQS) $(MSGTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1488         @echo Linking $@
1489         @$(CC) $(FLAGS) -o $@ $(MSGTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
1490                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@ \
1491                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
1492
1493 bin/smbcacls@EXEEXT@: $(BINARY_PREREQS) $(SMBCACLS_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1494         @echo Linking $@
1495         @$(CC) $(FLAGS) -o $@ $(SMBCACLS_OBJ) $(DYNEXP) $(LDFLAGS) \
1496                 $(LIBS) @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1497                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@
1498
1499 bin/smbcquotas@EXEEXT@: $(BINARY_PREREQS) $(SMBCQUOTAS_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1500         @echo Linking $@
1501         @$(CC) $(FLAGS) -o $@ $(SMBCQUOTAS_OBJ) $(DYNEXP) $(LDFLAGS) \
1502                 $(LIBS) @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1503                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@
1504
1505 bin/eventlogadm@EXEEXT@: $(BINARY_PREREQS) $(EVTLOGADM_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1506         @echo Linking $@
1507         @$(CC) $(FLAGS) -o $@ $(EVTLOGADM_OBJ) $(DYNEXP) $(LDFLAGS) \
1508                 $(LIBS) $(LDAP_LIBS) @POPTLIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
1509
1510 bin/sharesec@EXEEXT@: $(BINARY_PREREQS) $(SHARESEC_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1511         @echo Linking $@
1512         @$(CC) $(FLAGS) -o $@ $(SHARESEC_OBJ) $(DYNEXP) $(LDFLAGS) \
1513                 $(LIBS) $(LDAP_LIBS) @POPTLIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
1514
1515 bin/locktest@EXEEXT@: $(BINARY_PREREQS) $(LOCKTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1516         @echo Linking $@
1517         @$(CC) $(FLAGS) -o $@ $(LOCKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
1518                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@ \
1519                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
1520
1521 bin/nsstest@EXEEXT@: $(BINARY_PREREQS) $(NSSTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1522         @echo Linking $@
1523         @$(CC) $(FLAGS) -o $@ $(NSSTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
1524                 $(LIBS) $(KRB5LIBS)  $(LDAP_LIBS) @POPTLIBS@ \
1525                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
1526
1527 bin/pdbtest@EXEEXT@: $(BINARY_PREREQS) $(PDBTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1528         @echo Linking $@
1529         @$(CC) $(FLAGS) -o $@ $(PDBTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
1530                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(PASSDB_LIBS) \
1531                 @POPTLIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @LIBWBCLIENT_SHARED@
1532
1533 bin/vfstest@EXEEXT@: $(BINARY_PREREQS) $(VFSTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1534         @echo Linking $@
1535         @$(CC) $(FLAGS) -o $@ $(VFSTEST_OBJ) $(LDFLAGS) $(TERMLDFLAGS) \
1536                 $(TERMLIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \
1537                 $(ACL_LIBS) $(LIBS) @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) \
1538                 @SMBD_LIBS@ $(NSCD_LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ \
1539                 @LIBWBCLIENT_SHARED@
1540
1541 bin/smbiconv@EXEEXT@: $(BINARY_PREREQS) $(SMBICONV_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1542         @echo Linking $@
1543         @$(CC) $(FLAGS) -o $@ $(SMBICONV_OBJ) $(LDFLAGS) $(TERMLDFLAGS) \
1544                 $(TERMLIBS) $(DYNEXP) $(LIBS) $(LDAP_LIBS) @POPTLIBS@ \
1545                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
1546
1547 bin/log2pcap@EXEEXT@: $(BINARY_PREREQS) $(LOG2PCAP_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@
1548         @echo Linking $@
1549         @$(CC) $(FLAGS) -o $@ $(LOG2PCAP_OBJ) $(LDFLAGS) $(DYNEXP) \
1550                 @POPTLIBS@ $(LIBS) @LIBTALLOC_LIBS@
1551
1552 bin/locktest2@EXEEXT@: $(BINARY_PREREQS) $(LOCKTEST2_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1553         @echo Linking $@
1554         @$(CC) $(FLAGS) -o $@ $(LOCKTEST2_OBJ) $(LDFLAGS) $(DYNEXP) \
1555                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@ \
1556                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
1557
1558 bin/ndrdump@EXEEXT@: $(BINARY_PREREQS) $(NDRDUMP_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1559         @echo Linking $@
1560         @$(CC) $(FLAGS) -o $@ $(NDRDUMP_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
1561                 @POPTLIBS@ @LDAP_LIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
1562
1563 bin/debug2html@EXEEXT@: $(BINARY_PREREQS) $(DEBUG2HTML_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@
1564         @echo Linking $@
1565         @$(CC) $(FLAGS) -o $@ $(DEBUG2HTML_OBJ) $(LDFLAGS) $(DYNEXP) \
1566                 $(LIBS) @LIBTALLOC_LIBS@
1567
1568 bin/smbfilter@EXEEXT@: $(BINARY_PREREQS) $(SMBFILTER_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1569         @echo Linking $@
1570         @$(CC) $(FLAGS) -o $@ $(SMBFILTER_OBJ) $(LDFLAGS) $(LIBS) \
1571                 $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@ \
1572                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
1573
1574 bin/ldbedit: $(BINARY_PREREQS) $(LDBEDIT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1575         @echo Linking $@
1576         @$(CC) $(FLAGS) -o $@ $(LDBEDIT_OBJ) $(DYNEXP) $(LDFLAGS) \
1577                 $(LIBS) @POPTLIBS@ $(LDAP_LIBS) \
1578                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@
1579
1580 bin/ldbsearch: $(BINARY_PREREQS) $(LDBSEARCH_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1581         @echo Linking $@
1582         @$(CC) $(FLAGS) -o $@ $(LDBSEARCH_OBJ) $(DYNEXP) $(LDFLAGS) \
1583                 $(LIBS) @POPTLIBS@ $(LDAP_LIBS) \
1584                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@
1585
1586 bin/ldbadd: $(BINARY_PREREQS) $(LDBADD_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1587         @echo Linking $@
1588         @$(CC) $(FLAGS) -o $@ $(LDBADD_OBJ) $(DYNEXP) $(LDFLAGS) \
1589                 $(LIBS) @POPTLIBS@ $(LDAP_LIBS) \
1590                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@
1591
1592 bin/ldbmodify: $(BINARY_PREREQS) $(LDBMODIFY_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1593         @echo Linking $@
1594         @$(CC) $(FLAGS) -o $@ $(LDBMODIFY_OBJ) $(DYNEXP) $(LDFLAGS) \
1595                 $(LIBS) @POPTLIBS@ $(LDAP_LIBS) \
1596                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@
1597
1598 bin/ldbdel: $(BINARY_PREREQS) $(LDBDEL_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1599         @echo Linking $@
1600         @$(CC) $(FLAGS) -o $@ $(LDBDEL_OBJ) $(DYNEXP) $(LDFLAGS) \
1601                 $(LIBS) @POPTLIBS@ $(LDAP_LIBS) \
1602                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@
1603
1604 MKSYMS_SH = $(srcdir)/script/mksyms.sh
1605
1606 $(LIBTALLOC_SYMS): $(LIBTALLOC_HEADERS) $(builddir)/library-versions
1607         @$(MKSYMS_SH) $(AWK) $(builddir)/library-versions $@ $(LIBTALLOC_HEADERS)
1608
1609 $(LIBTALLOC_SHARED_TARGET): $(BINARY_PREREQS) $(LIBTALLOC_OBJ) $(LIBTALLOC_SYMS)
1610         @echo Linking shared library $@
1611         @$(SHLD_DSO) $(LIBTALLOC_OBJ) \
1612                 @SONAMEFLAG@`basename $@`.$(SONAME_VER)
1613         @ln -s -f `basename $@` $@.$(SONAME_VER)
1614
1615 $(LIBTALLOC_STATIC_TARGET): $(BINARY_PREREQS) $(LIBTALLOC_OBJ0)
1616         @echo Linking non-shared library $@
1617         @-$(AR) -rc $@ $(LIBTALLOC_OBJ0)
1618
1619 $(LIBTDB_SYMS): $(LIBTDB_HEADERS) $(builddir)/library-versions
1620         @$(MKSYMS_SH) $(AWK) $(builddir)/library-versions $@ $(LIBTDB_HEADERS)
1621
1622 $(LIBTDB_SHARED_TARGET): $(BINARY_PREREQS) $(LIBTDB_OBJ) $(LIBTDB_SYMS)
1623         @echo Linking shared library $@
1624         @$(SHLD_DSO) $(LIBTDB_OBJ) \
1625                 @SONAMEFLAG@`basename $@`.$(SONAME_VER)
1626         @ln -s -f `basename $@` $@.$(SONAME_VER)
1627
1628 $(LIBTDB_STATIC_TARGET): $(BINARY_PREREQS) $(LIBTDB_OBJ0)
1629         @echo Linking non-shared library $@
1630         @-$(AR) -rc $@ $(LIBTDB_OBJ0)
1631
1632 $(LIBWBCLIENT_SYMS): $(LIBWBCLIENT_HEADERS) $(builddir)/library-versions
1633         @$(MKSYMS_SH) $(AWK) $(builddir)/library-versions $@ $(LIBWBCLIENT_HEADERS)
1634
1635 $(LIBWBCLIENT_SHARED_TARGET): $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ) $(LIBWBCLIENT_SYMS) @LIBTALLOC_SHARED@
1636         @echo Linking shared library $@
1637         @$(SHLD_DSO) @LIBTALLOC_LIBS@ $(LIBWBCLIENT_OBJ) \
1638                 @SONAMEFLAG@`basename $@`.$(SONAME_VER)
1639         @ln -s -f `basename $@` $@.$(SONAME_VER)
1640
1641 $(LIBWBCLIENT_STATIC_TARGET): $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ0) $(WBCOMMON_OBJ)
1642         @echo Linking non-shared library $@
1643         @-$(AR) -rc $@ $(LIBWBCLIENT_OBJ0) $(WBCOMMON_OBJ)
1644
1645 bin/libaddns.@SHLIBEXT@: $(BINARY_PREREQS) $(LIBADDNS_OBJ) @LIBTALLOC_SHARED@
1646         @echo Linking shared library $@
1647         @$(SHLD_DSO) $(LIBADDNS_OBJ) $(LIBS) \
1648                 $(KRB5LIBS) $(UUID_LIBS) @LIBTALLOC_LIBS@ \
1649                 @SONAMEFLAG@`basename $@`.$(SONAME_VER)
1650
1651 bin/libaddns.a: $(BINARY_PREREQS) $(LIBADDNS_OBJ)
1652         @echo Linking non-shared library $@
1653         @-$(AR) -rc $@ $(LIBADDNS_OBJ)
1654
1655 $(LIBNETAPI_SYMS): $(LIBNETAPI_HEADERS) $(builddir)/library-versions
1656         @$(MKSYMS_SH) $(AWK) $(builddir)/library-versions $@ $(LIBNETAPI_HEADERS)
1657
1658 $(LIBNETAPI_SHARED_TARGET): $(BINARY_PREREQS) $(LIBNETAPI_OBJ) $(LIBNETAPI_SYMS) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1659         @echo Linking shared library $@
1660         @$(SHLD_DSO) $(LIBNETAPI_OBJ) \
1661                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @LIBWBCLIENT_SHARED@ $(LIBS) \
1662                 $(LDAP_LIBS) $(KRB5LIBS) $(NSCD_LIBS) \
1663                 @SONAMEFLAG@`basename $@`.$(SONAME_VER)
1664         @ln -s -f `basename $@` $@.$(SONAME_VER)
1665
1666 $(LIBNETAPI_STATIC_TARGET): $(BINARY_PREREQS) $(LIBNETAPI_OBJ1)
1667         @echo Linking non-shared library $@
1668         @-$(AR) -rc $@ $(LIBNETAPI_OBJ1)
1669
1670 bin/libsmbclient.@SHLIBEXT@: $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1671         @echo Linking shared library $@
1672         @$(SHLD_DSO) $(LIBSMBCLIENT_OBJ) \
1673                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @LIBWBCLIENT_SHARED@ $(LIBS) \
1674                 $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1675                 @SONAMEFLAG@`basename $@`.$(SONAME_VER)
1676
1677 bin/libsmbclient.a: $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ0)
1678         @echo Linking non-shared library $@
1679         @-$(AR) -rc $@ $(LIBSMBCLIENT_OBJ0)
1680
1681 bin/libsmbsharemodes.@SHLIBEXT@: $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1682         @echo Linking shared library $@
1683         @$(SHLD_DSO) $(LIBSMBSHAREMODES_OBJ) \
1684                 $(LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ \
1685                 $(KRB5LIBS) $(LDAP_LIBS) \
1686                 @SONAMEFLAG@`basename $@`.$(SONAME_VER)
1687
1688 bin/libsmbsharemodes.a: $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ)
1689         @echo Linking non-shared library $@
1690         @-$(AR) -rc $@ $(LIBSMBSHAREMODES_OBJ)
1691
1692 # This is probably wrong for anything other than the GNU linker.
1693 bin/libbigballofmud.@SHLIBEXT@: $(BINARY_PREREQS) $(LIBBIGBALLOFMUD_OBJ) @LIBTALLOC_SHARED@
1694         @echo Linking shared library $@
1695         @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBBIGBALLOFMUD_OBJ) \
1696                 $(LIBS) @LIBTALLOC_LIBS@ \
1697                 $(PASSDB_LIBS) $(IDMAP_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
1698                 @SONAMEFLAG@`basename $@`.$(LIBBIGBALLOFMUD_MAJOR)
1699         ln -snf libbigballofmud.so bin/libbigballofmud.so.0
1700
1701 # It would be nice to build a static bigballofmud too, but when I try
1702 # I get linker errors about dl_open and similar things.  I'm not sure if
1703 # it can be fixed or if they just can't be called from a static
1704 # library.
1705
1706 libtalloc: $(LIBTALLOC)
1707 libtdb: $(LIBTDB)
1708 libsmbclient: $(LIBSMBCLIENT)
1709 libsmbsharemodes: $(LIBSMBSHAREMODES)
1710 libaddns: $(LIBADDNS)
1711 libwbclient: $(LIBWBCLIENT)
1712 libnetapi: $(LIBNETAPI)
1713
1714 shlibs: $(SHLIBS)
1715
1716 # Linker command to link a RPC, VFS, AUTH, CHARSET or PASSDB module.
1717 SHLD_MODULE = $(SHLD) $(LDSHFLAGS) $(MODULE_EXPORTS) \
1718               -o $@ @SONAMEFLAG@`basename $@`
1719
1720 bin/librpc_lsarpc.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_LSA_OBJ)
1721         @echo "Linking $@"
1722         @$(SHLD_MODULE) $(RPC_LSA_OBJ)
1723
1724 bin/librpc_samr.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SAMR_OBJ)
1725         @echo "Linking $@"
1726         @$(SHLD_MODULE) $(RPC_SAMR_OBJ)
1727
1728 bin/librpc_srvsvc.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SVC_OBJ)
1729         @echo "Linking $@"
1730         @$(SHLD_MODULE) $(RPC_SVC_OBJ)
1731
1732 bin/librpc_svcctl.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SVCCTL_OBJ)
1733         @echo "Linking $@"
1734         @$(SHLD_MODULE) $(RPC_SVCCTL_OBJ)
1735
1736 bin/librpc_ntsvcs.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_NTSVCS_OBJ)
1737         @echo "Linking $@"
1738         @$(SHLD_MODULE) $(RPC_NTSVCS_OBJ)
1739
1740 bin/librpc_wkssvc.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_WKS_OBJ)
1741         @echo "Linking $@"
1742         @$(SHLD_MODULE) $(RPC_WKS_OBJ)
1743
1744 bin/librpc_NETLOGON.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_NETLOG_OBJ)
1745         @echo "Linking $@"
1746         @$(SHLD_MODULE) $(RPC_NETLOG_OBJ)
1747
1748 bin/librpc_winreg.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_REG_OBJ)
1749         @echo "Linking $@"
1750         @$(SHLD_MODULE) $(RPC_REG_OBJ)
1751
1752 bin/librpc_initshutdown.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_INITSHUTDOWN_OBJ)
1753         @echo "Linking $@"
1754         @$(SHLD_MODULE) $(RPC_INITSHUTDOWN_OBJ)
1755
1756 bin/librpc_dssetup.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_DSSETUP_OBJ)
1757         @echo "Linking $@"
1758         @$(SHLD_MODULE) $(RPC_DSSETUP_OBJ)
1759
1760 bin/librpc_spoolss.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SPOOLSS_OBJ)
1761         @echo "Linking $@"
1762         @$(SHLD_MODULE) $(RPC_SPOOLSS_OBJ)
1763
1764 bin/librpc_eventlog.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_EVENTLOG_OBJ)
1765         @echo "Linking $@"
1766         @$(SHLD_MODULE) $(RPC_EVENTLOG_OBJ)
1767
1768 bin/librpc_netdfs.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_DFS_OBJ)
1769         @echo "Linking $@"
1770         @$(SHLD_MODULE) $(RPC_DFS_OBJ)
1771
1772 bin/librpc_echo.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_ECHO_OBJ)
1773         @echo "Linking $@"
1774         @$(SHLD_MODULE) $(RPC_ECHO_OBJ)
1775
1776 bin/winbindd@EXEEXT@: $(BINARY_PREREQS) $(WINBINDD_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1777         @echo "Linking $@"
1778         @$(CC) $(FLAGS) -o $@ $(WINBINDD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1779                 @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) \
1780                 $(PASSDB_LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@
1781
1782 bin/vlp@EXEEXT@: $(BINARY_PREREQS) $(VLP_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
1783         @echo "Linking $@"
1784         @$(CC) $(FLAGS) -o $@ $(VLP_OBJ) $(LDFLAGS) $(DYNEXP) \
1785                 $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) @POPTLIBS@ \
1786                 $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1787                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @LIBWBCLIENT_SHARED@
1788
1789 @WINBIND_NSS@: $(BINARY_PREREQS) $(WINBIND_NSS_OBJ)
1790         @echo "Linking $@"
1791         @$(SHLD) $(WINBIND_NSS_LDSHFLAGS) -o $@ $(WINBIND_NSS_OBJ) \
1792                 @WINBIND_NSS_EXTRA_LIBS@ @WINBIND_NSS_PTHREAD@ \
1793                 @SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@
1794
1795 @WINBIND_WINS_NSS@: $(BINARY_PREREQS) $(WINBIND_WINS_NSS_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
1796         @echo "Linking $@"
1797         @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_WINS_NSS_OBJ) \
1798                 $(LDAP_LIBS) $(KRB5LIBS) $(LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ \
1799                 @SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@
1800
1801 bin/winbind_krb5_locator.@SHLIBEXT@: $(BINARY_PREREQS) $(WINBIND_KRB5_LOCATOR_OBJ)
1802         @echo "Linking $@"
1803         @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_KRB5_LOCATOR_OBJ) \
1804                 @SONAMEFLAG@`basename $@`
1805
1806 bin/pam_winbind.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_WINBIND_OBJ)
1807         @echo "Linking shared library $@"
1808         @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_OBJ) -lpam @INIPARSERLIBS@ \
1809                 @PAM_WINBIND_EXTRA_LIBS@ @SONAMEFLAG@`basename $@`
1810
1811 bin/builtin.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_BUILTIN_OBJ)
1812         @echo "Building plugin $@"
1813         @$(SHLD_MODULE) $(AUTH_BUILTIN_OBJ)
1814
1815 bin/domain.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_DOMAIN_OBJ)
1816         @echo "Building plugin $@"
1817         @$(SHLD_MODULE) $(AUTH_DOMAIN_OBJ)
1818
1819 bin/script.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_SCRIPT_OBJ)
1820         @echo "Building plugin $@"
1821         @$(SHLD_MODULE) $(AUTH_SCRIPT_OBJ)
1822
1823 bin/smbserver.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_SERVER_OBJ)
1824         @echo "Building plugin $@"
1825         @$(SHLD_MODULE) $(AUTH_SERVER_OBJ)
1826
1827 bin/winbind.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_WINBIND_OBJ)
1828         @echo "Building plugin $@"
1829         @$(SHLD_MODULE) $(AUTH_WINBIND_OBJ)
1830
1831 bin/unix.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_UNIX_OBJ)
1832         @echo "Building plugin $@"
1833         @$(SHLD_MODULE) $(AUTH_UNIX_OBJ)
1834
1835 bin/sam.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_SAM_OBJ)
1836         @echo "Building plugin $@"
1837         @$(SHLD_MODULE) $(AUTH_SAM_OBJ)
1838
1839 bin/ldapsam.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_ldap.o passdb/pdb_nds.o
1840         @echo "Building plugin $@"
1841         @$(SHLD_MODULE) passdb/pdb_ldap.o passdb/pdb_nds.o $(LDAP_LIBS)
1842
1843 bin/tdbsam.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_tdb.o
1844         @echo "Building plugin $@"
1845         @$(SHLD_MODULE) passdb/pdb_tdb.o
1846
1847 bin/smbpasswd.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_smbpasswd.o
1848         @echo "Building plugin $@"
1849         @$(SHLD_MODULE) passdb/pdb_smbpasswd.o
1850
1851 bin/rid.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_rid.o
1852         @echo "Building plugin $@"
1853         @$(SHLD_MODULE) winbindd/idmap_rid.o
1854
1855 bin/ad.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ad.o
1856         @echo "Building plugin $@"
1857         @$(SHLD_MODULE) winbindd/idmap_ad.o
1858
1859 bin/tdb2.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_tdb2.o
1860         @echo "Building plugin $@"
1861         @$(SHLD_MODULE) winbindd/idmap_tdb2.o
1862
1863 bin/ldap.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ldap.o
1864         @echo "Building plugin $@"
1865         @$(SHLD_MODULE) winbindd/idmap_ldap.o
1866
1867 bin/weird.@SHLIBEXT@: $(BINARY_PREREQS) $(DEVEL_HELP_WEIRD_OBJ)
1868         @echo "Building plugin $@"
1869         @$(SHLD_MODULE) $(DEVEL_HELP_WEIRD_OBJ)
1870
1871 bin/CP850.@SHLIBEXT@: $(BINARY_PREREQS) $(CP850_OBJ)
1872         @echo "Building plugin $@"
1873         @$(SHLD_MODULE) $(CP850_OBJ)
1874
1875 bin/CP437.@SHLIBEXT@: $(BINARY_PREREQS) $(CP437_OBJ)
1876         @echo "Building plugin $@"
1877         @$(SHLD_MODULE) $(CP437_OBJ)
1878
1879 bin/macosxfs.@SHLIBEXT@: $(BINARY_PREREQS) $(CHARSET_MACOSXFS_OBJ)
1880         @echo "Building plugin $@"
1881         @$(SHLD_MODULE) $(CHARSET_MACOSXFS_OBJ) -framework CoreFoundation
1882
1883 # NOTE, there is no build rule for a dynamic default VFS module because
1884 # this one MUST MUST MUST be built statically.
1885
1886 bin/audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AUDIT_OBJ)
1887         @echo "Building plugin $@"
1888         @$(SHLD_MODULE) $(VFS_AUDIT_OBJ)
1889
1890 bin/extd_audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_EXTD_AUDIT_OBJ)
1891         @echo "Building plugin $@"
1892         @$(SHLD_MODULE) $(VFS_EXTD_AUDIT_OBJ)
1893
1894 bin/full_audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_FULL_AUDIT_OBJ)
1895         @echo "Building plugin $@"
1896         @$(SHLD_MODULE) $(VFS_FULL_AUDIT_OBJ)
1897
1898 bin/recycle.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_RECYCLE_OBJ)
1899         @echo "Building plugin $@"
1900         @$(SHLD_MODULE) $(VFS_RECYCLE_OBJ)
1901
1902 bin/netatalk.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_NETATALK_OBJ)
1903         @echo "Building plugin $@"
1904         @$(SHLD_MODULE) $(VFS_NETATALK_OBJ)
1905
1906 bin/fake_perms.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_FAKE_PERMS_OBJ)
1907         @echo "Building plugin $@"
1908         @$(SHLD_MODULE) $(VFS_FAKE_PERMS_OBJ)
1909
1910 bin/default_quota.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_DEFAULT_QUOTA_OBJ)
1911         @echo "Building plugin $@"
1912         @$(SHLD_MODULE) $(VFS_DEFAULT_QUOTA_OBJ)
1913
1914 bin/readonly.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_READONLY_OBJ)
1915         @echo "Building plugin $@"
1916         @$(SHLD_MODULE) $(VFS_READONLY_OBJ)
1917
1918 bin/shadow_copy.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SHADOW_COPY_OBJ)
1919         @echo "Building plugin $@"
1920         @$(SHLD_MODULE) $(VFS_SHADOW_COPY_OBJ)
1921
1922 bin/shadow_copy2.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SHADOW_COPY2_OBJ)
1923         @echo "Building plugin $@"
1924         @$(SHLD_MODULE) $(VFS_SHADOW_COPY2_OBJ)
1925
1926 bin/syncops.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SYNCOPS_OBJ)
1927         @echo "Building plugin $@"
1928         @$(SHLD_MODULE) $(VFS_SYNCOPS_OBJ)
1929
1930 bin/cap.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CAP_OBJ)
1931         @echo "Building plugin $@"
1932         @$(SHLD_MODULE) $(VFS_CAP_OBJ)
1933
1934 bin/expand_msdfs.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_EXPAND_MSDFS_OBJ)
1935         @echo "Building plugin $@"
1936         @$(SHLD_MODULE) $(VFS_EXPAND_MSDFS_OBJ)
1937
1938 bin/afsacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AFSACL_OBJ)
1939         @echo "Building plugin $@"
1940         @$(SHLD_MODULE) $(VFS_AFSACL_OBJ)
1941
1942 bin/xattr_tdb.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_XATTR_TDB_OBJ)
1943         @echo "Building plugin $@"
1944         @$(SHLD_MODULE) $(VFS_XATTR_TDB_OBJ)
1945
1946 bin/posixacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_POSIXACL_OBJ)
1947         @echo "Building plugin $@"
1948         @$(SHLD_MODULE) $(VFS_POSIXACL_OBJ)
1949
1950 bin/aixacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIXACL_OBJ)
1951         @echo "Building plugin $@"
1952         @$(SHLD_MODULE) $(VFS_AIXACL_OBJ)
1953
1954 bin/aixacl2.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIXACL2_OBJ)
1955         @echo "Building plugin $@"
1956         @$(SHLD_MODULE) $(VFS_AIXACL2_OBJ)
1957
1958 bin/solarisacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SOLARISACL_OBJ)
1959         @echo "Building plugin $@"
1960         @$(SHLD_MODULE) $(VFS_SOLARISACL_OBJ)
1961
1962 bin/zfsacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ZFSACL_OBJ)
1963         @echo "Building plugin $@"
1964         @$(SHLD_MODULE) $(VFS_ZFSACL_OBJ)
1965
1966 bin/irixacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_IRIXACL_OBJ)
1967         @echo "Building plugin $@"
1968         @$(SHLD_MODULE) $(VFS_IRIXACL_OBJ)
1969
1970 bin/hpuxacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_HPUXACL_OBJ)
1971         @echo "Building plugin $@"
1972         @$(SHLD_MODULE) $(VFS_HPUXACL_OBJ)
1973
1974 bin/tru64acl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_TRU64ACL_OBJ)
1975         @echo "Building plugin $@"
1976         @$(SHLD_MODULE) $(VFS_TRU64ACL_OBJ)
1977
1978 bin/catia.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CATIA_OBJ)
1979         @echo "Building plugin $@"
1980         @$(SHLD_MODULE) $(VFS_CATIA_OBJ)
1981
1982 bin/streams_xattr.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_STREAMS_XATTR_OBJ)
1983         @echo "Building plugin $@"
1984         @$(SHLD_MODULE) $(VFS_STREAMS_XATTR_OBJ)
1985
1986 bin/streams_depot.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_STREAMS_DEPOT_OBJ)
1987         @echo "Building plugin $@"
1988         @$(SHLD_MODULE) $(VFS_STREAMS_DEPOT_OBJ)
1989
1990 bin/cacheprime.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CACHEPRIME_OBJ)
1991         @echo "Building plugin $@"
1992         @$(SHLD_MODULE) $(VFS_CACHEPRIME_OBJ)
1993
1994 bin/prealloc.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_PREALLOC_OBJ)
1995         @echo "Building plugin $@"
1996         @$(SHLD_MODULE) $(VFS_PREALLOC_OBJ)
1997
1998 bin/commit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_COMMIT_OBJ)
1999         @echo "Building plugin $@"
2000         @$(SHLD_MODULE) $(VFS_COMMIT_OBJ)
2001
2002 bin/gpfs.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_GPFS_OBJ)
2003         @echo "Building plugin $@"
2004         @$(SHLD_MODULE) $(VFS_GPFS_OBJ)
2005
2006 bin/notify_fam.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_NOTIFY_FAM_OBJ)
2007         @echo "Building plugin $@"
2008         @$(SHLD_MODULE) $(VFS_NOTIFY_FAM_OBJ) @SMB_FAM_LIBS@
2009
2010 bin/readahead.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_READAHEAD_OBJ)
2011         @echo "Building plugin $@"
2012         @$(SHLD_MODULE) $(VFS_READAHEAD_OBJ)
2013
2014 bin/tsmsm.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_TSMSM_OBJ)
2015         @echo "Building plugin $@"
2016         @$(SHLD_MODULE) $(VFS_TSMSM_OBJ)
2017
2018 bin/fileid.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_FILEID_OBJ)
2019         @echo "Building plugin $@"
2020         @$(SHLD_MODULE) $(VFS_FILEID_OBJ)
2021
2022 bin/aio_fork.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIO_FORK_OBJ)
2023         @echo "Building plugin $@"
2024         @$(SHLD_MODULE) $(VFS_AIO_FORK_OBJ)
2025
2026 bin/registry.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/registry.o
2027         @echo "Building plugin $@"
2028         @$(SHLD_MODULE) libgpo/gpext/registry.o
2029
2030 bin/scripts.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/scripts.o
2031         @echo "Building plugin $@"
2032         @$(SHLD_MODULE) libgpo/gpext/scripts.o
2033
2034 #########################################################
2035 ## IdMap NSS plugins
2036
2037 ## None here right now
2038 #########################################################
2039
2040 bin/wbinfo@EXEEXT@: $(BINARY_PREREQS) $(WBINFO_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
2041         @echo Linking $@
2042         @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(WBINFO_OBJ) $(DYNEXP) $(LIBS) \
2043                 $(LDAP_LIBS) @POPTLIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ \
2044                 @WINBIND_LIBS@
2045
2046 bin/ntlm_auth@EXEEXT@: $(BINARY_PREREQS) $(NTLM_AUTH_OBJ) $(PARAM_OBJ) \
2047         $(LIB_NONSMBD_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
2048         @echo Linking $@
2049         @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(DYNEXP) $(NTLM_AUTH_OBJ) \
2050                 $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBS) \
2051                 @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
2052                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@
2053
2054 bin/pam_smbpass.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_SMBPASS_OBJ) @LIBTALLOC_SHARED@ @LIBWBCLIENT_SHARED@ @LIBTDB_SHARED@
2055         @echo "Linking shared library $@"
2056         @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_SMBPASS_OBJ) -lpam $(DYNEXP) \
2057                 $(LIBS) $(LDAP_LIBS) $(KRB5LIBS) $(NSCD_LIBS) \
2058                 @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@
2059
2060 bin/tdbbackup@EXEEXT@: $(BINARY_PREREQS) $(TDBBACKUP_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
2061         @echo Linking $@
2062         @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(TDBBACKUP_OBJ) $(DYNEXP) \
2063                 $(LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
2064
2065 bin/tdbtool@EXEEXT@: $(BINARY_PREREQS) $(TDBTOOL_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
2066         @echo Linking $@
2067         @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(TDBTOOL_OBJ) $(DYNEXP) \
2068                 $(LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
2069
2070 bin/tdbdump@EXEEXT@: $(BINARY_PREREQS) $(TDBDUMP_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
2071         @echo Linking $@
2072         @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(TDBDUMP_OBJ) $(DYNEXP) \
2073                 $(LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
2074
2075 bin/tdbtorture@EXEEXT@: $(BINARY_PREREQS) $(TDBTORTURE_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
2076         @echo Linking $@
2077         @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(TDBTORTURE_OBJ) $(DYNEXP) \
2078                 $(LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@
2079
2080 bin/t_strcmp@EXEEXT@: $(BINARY_PREREQS) @LIBTALLOC_SHARED@ bin/libbigballofmud.@SHLIBEXT@ torture/t_strcmp.o
2081         $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) @LIBTALLOC_LIBS@ \
2082                 torture/t_strcmp.o -L ./bin -lbigballofmud
2083
2084 bin/t_strstr@EXEEXT@: $(BINARY_PREREQS) @LIBTALLOC_SHARED@ bin/libbigballofmud.@SHLIBEXT@ torture/t_strstr.o
2085         $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) @LIBTALLOC_LIBS@ \
2086                 torture/t_strstr.o -L ./bin -lbigballofmud
2087
2088 bin/t_strappend@EXEEXT@: $(BINARY_PREREQS) @LIBTALLOC_SHARED@ bin/libbigballofmud.@SHLIBEXT@ torture/t_strappend.o
2089         $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) @LIBTALLOC_LIBS@ \
2090                 torture/t_strappend.o -L ./bin -lbigballofmud
2091
2092 bin/t_stringoverflow@EXEEXT@: $(BINARY_PREREQS) bin/libbigballofmud.@SHLIBEXT@ torture/t_stringoverflow.o
2093         $(CC) $(FLAGS) -o $@ $(DYNEXP) torture/t_stringoverflow.o \
2094                 -L./bin -lbigballofmud
2095
2096 bin/timelimit@EXEEXT@: script/tests/timelimit.o
2097         @echo Linking $@
2098         @$(CC) $(FLAGS) -o $@ $(DYNEXP) script/tests/timelimit.o
2099
2100 bin/rpc_open_tcp@EXEEXT@: $(BINARY_PREREQS) $(RPC_OPEN_TCP_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
2101         @echo "Linking $@"
2102         @$(CC) $(FLAGS) -o $@ $(RPC_OPEN_TCP_OBJ) $(LDFLAGS) $(DYNEXP) \
2103                 $(LIBS) @LIBTALLOC_LIBS@ @LIBTDB_SHARED@ @WINBIND_LIBS@ \
2104                 $(LDAP_LIBS) $(KRB5LIBS) $(NSCD_LIBS)
2105
2106 install:: installservers installbin @INSTALL_CIFSMOUNT@ @INSTALL_CIFSSPNEGO@ installman \
2107                 installscripts installdat installmodules @SWAT_INSTALL_TARGETS@ \
2108                 installlibtalloc \
2109                 installlibtdb \
2110                 @INSTALL_LIBSMBCLIENT@ @INSTALL_PAM_MODULES@ \
2111                 @INSTALL_LIBSMBSHAREMODES@ @INSTALL_LIBWBCLIENT@ installlibnetapi
2112
2113 install-everything:: install installmodules
2114
2115 # DESTDIR is used here to prevent packagers wasting their time
2116 # duplicating the Makefile. Remove it and you will have the privelege
2117 # of package each samba release for muliple versions of multiple
2118 # distributions and operating systems, or at least supplying patches
2119 # to all the packaging files required for this, prior to committing
2120 # the removal of DESTDIR. Do not remove it even though you think it
2121 # is not used
2122
2123 installdirs::
2124         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(PRIVATEDIR) $(PIDDIR) $(LOCKDIR) $(MANDIR)
2125
2126 installservers:: all installdirs
2127         @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(SBINDIR) $(SBIN_PROGS)
2128
2129 installbin:: all installdirs
2130         @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $(BIN_PROGS)
2131
2132 installcifsmount:: @CIFSMOUNT_PROGS@
2133         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(ROOTSBINDIR)
2134         @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(ROOTSBINDIR) @CIFSMOUNT_PROGS@
2135
2136 installcifsspnego:: @CIFSSPNEGO_PROGS@
2137         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(ROOTSBINDIR)
2138         @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(ROOTSBINDIR) @CIFSSPNEGO_PROGS@
2139
2140 # Some symlinks are required for the 'probing' of modules.
2141 # This mechanism should go at some point..
2142 installmodules:: modules installdirs
2143         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(VFSLIBDIR) $(VFS_MODULES)
2144         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PDBLIBDIR) $(PDB_MODULES)
2145         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(RPCLIBDIR) $(RPC_MODULES)
2146         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(IDMAPLIBDIR) $(IDMAP_MODULES)
2147         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(NSSINFOLIBDIR) $(NSS_INFO_MODULES)
2148         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(CHARSETLIBDIR) $(CHARSET_MODULES)
2149         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(AUTHLIBDIR) $(AUTH_MODULES)
2150         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(GPEXTLIBDIR) $(GPEXT_MODULES)
2151         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(PDBLIBDIR) ldapsam.@SHLIBEXT@ NDS_ldapsam.@SHLIBEXT@
2152         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(PDBLIBDIR) ldapsam.@SHLIBEXT@ NDS_ldapsam_compat.@SHLIBEXT@
2153         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(PDBLIBDIR) ldapsam.@SHLIBEXT@ ldapsam_compat.@SHLIBEXT@
2154         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) rhosts.@SHLIBEXT@ hostsequiv.@SHLIBEXT@
2155         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) sam.@SHLIBEXT@ sam_ignoredomain.@SHLIBEXT@
2156         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) domain.@SHLIBEXT@ trustdomain.@SHLIBEXT@ ntdomain.@SHLIBEXT@
2157         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) builtin.@SHLIBEXT@ guest.@SHLIBEXT@ fixed_challenge.@SHLIBEXT@ name_to_ntstatus.@SHLIBEXT@
2158         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(NSSINFOLIBDIR) ../idmap/ad.@SHLIBEXT@ rfc2307.@SHLIBEXT@ sfu.@SHLIBEXT@ sfu20.@SHLIBEXT@
2159
2160 installscripts:: installdirs
2161         @$(SHELL) $(srcdir)/script/installscripts.sh $(INSTALLPERMS_BIN) $(DESTDIR)$(BINDIR) $(SCRIPTS)
2162
2163 installdat:: installdirs
2164         @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR) $(CODEPAGEDIR) $(srcdir)
2165
2166 installmsg:: installdirs
2167         @$(SHELL) $(srcdir)/script/installmsg.sh $(DESTDIR) $(CODEPAGEDIR) $(srcdir)
2168
2169 installswat:: installdirs installmsg
2170         @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR) $(SWATDIR) $(srcdir)
2171
2172 installclientlib:: installdirs libsmbclient
2173         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2174         -$(INSTALLLIBCMD_SH) bin/libsmbclient.@SHLIBEXT@ $(DESTDIR)$(LIBDIR)
2175         -$(INSTALLLIBCMD_A) bin/libsmbclient.a $(DESTDIR)$(LIBDIR)
2176         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2177         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(srcdir)/include/libsmbclient.h $(DESTDIR)${prefix}/include
2178
2179 installlibtalloc:: installdirs libtalloc
2180         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2181         -$(INSTALLLIBCMD_SH) $(LIBTALLOC_SHARED_TARGET) $(DESTDIR)$(LIBDIR)
2182         -$(INSTALLLIBCMD_A) $(LIBTALLOC_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
2183         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2184         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBTALLOC_HEADERS) $(DESTDIR)${prefix}/include
2185
2186 installlibtdb:: installdirs libtdb
2187         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2188         -$(INSTALLLIBCMD_SH) $(LIBTDB_SHARED_TARGET) $(DESTDIR)$(LIBDIR)
2189         -$(INSTALLLIBCMD_A) $(LIBTDB_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
2190         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2191         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBTDB_HEADERS) $(DESTDIR)${prefix}/include
2192
2193 installlibsmbsharemodes:: installdirs libsmbsharemodes
2194         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2195         -$(INSTALLLIBCMD_SH) bin/libsmbsharemodes.@SHLIBEXT@ $(DESTDIR)$(LIBDIR)
2196         -$(INSTALLLIBCMD_A) bin/libsmbsharemodes.a $(DESTDIR)$(LIBDIR)
2197         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(srcdir)/include/smb_share_modes.h $(DESTDIR)${prefix}/include
2198
2199 installlibaddns:: installdirs libaddns
2200         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2201         -$(INSTALLLIBCMD_SH) bin/libaddns.@SHLIBEXT@ $(DESTDIR)$(LIBDIR)
2202         -$(INSTALLLIBCMD_A) bin/libaddns.a $(DESTDIR)$(LIBDIR)
2203
2204 installlibwbclient:: installdirs libwbclient
2205         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2206         -$(INSTALLLIBCMD_SH) bin/libwbclient.@SHLIBEXT@ $(DESTDIR)$(LIBDIR)
2207         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2208         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(srcdir)/nsswitch/libwbclient/wbclient.h $(DESTDIR)${prefix}/include
2209
2210 installlibnetapi:: installdirs libnetapi
2211         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2212         -$(INSTALLLIBCMD_SH) $(LIBNETAPI_SHARED_TARGET) $(DESTDIR)$(LIBDIR)
2213         -$(INSTALLLIBCMD_A) $(LIBNETAPI_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
2214         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(srcdir)/lib/netapi/netapi.h $(DESTDIR)${prefix}/include
2215
2216 installpammodules:: $(PAM_MODULES)
2217         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(PAMMODULESDIR)
2218         @for module in $(PAM_MODULES); do \
2219                 echo "Installing module $${module} as $(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@ "; \
2220                 $(INSTALLCMD) -m $(INSTALLPERMS_BIN) bin/$${module}.@SHLIBEXT@ \
2221                         "$(DESTDIR)/$(PAMMODULESDIR)"; \
2222         done
2223
2224 # revert to the previously installed version
2225 revert::
2226         @$(SHELL) $(srcdir)/script/revert.sh $(SBINDIR) $(SBIN_PROGS)
2227         @$(SHELL) $(srcdir)/script/revert.sh $(BINDIR) $(BIN_PROGS) $(SCRIPTS)
2228
2229 installman:: installdirs
2230         @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(MANDIR) $(srcdir) C "@ROFF@"
2231
2232 .PHONY: showlayout
2233
2234 showlayout::
2235         @echo "Samba will be installed into:"
2236         @echo "  prefix:      $(prefix)"
2237         @echo "  bindir:      $(BINDIR)"
2238         @echo "  sbindir:     $(SBINDIR)"
2239         @echo "  libdir:      $(LIBDIR)"
2240         @echo "  vardir:      $(VARDIR)"
2241         @echo "  mandir:      $(MANDIR)"
2242         @echo "  privatedir:  $(PRIVATE_DIR)"
2243         @echo "  configdir:   $(CONFIGDIR)"
2244         @echo "  lockdir:     $(LOCKDIR)"
2245         @echo "  piddir:      $(PIDDIR)"
2246         @echo "  swatdir:     $(SWATDIR)"
2247
2248
2249 uninstall:: uninstallman uninstallservers uninstallbin @UNINSTALL_CIFSMOUNT@ @UNINSTALL_CIFSSPNEGO@ uninstallscripts uninstalldat uninstallswat uninstallmodules uninstalllibtalloc uninstalllibtdb @UNINSTALL_LIBSMBCLIENT@ @UNINSTALL_PAM_MODULES@ @UNINSTALL_LIBSMBSHAREMODES@ uninstalllibnetapi
2250
2251 uninstallman::
2252         @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(MANDIR) $(srcdir) C
2253
2254 uninstallservers::
2255         @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(SBINDIR) $(SBIN_PROGS)
2256
2257 uninstallbin::
2258         @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $(BIN_PROGS)
2259
2260 uninstallcifsmount::
2261         @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(ROOTSBINDIR) @CIFSMOUNT_PROGS@
2262
2263 uninstallcifsspnego::
2264         @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(ROOTSBINDIR) @CIFSSPNEGO_PROGS@
2265
2266 uninstallmodules::
2267         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(VFSLIBDIR) $(VFS_MODULES)
2268         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PDBLIBDIR) $(PDB_MODULES)
2269         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(RPCLIBDIR) $(RPC_MODULES)
2270         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(IDMAPLIBDIR) $(IDMAP_MODULES)
2271         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(CHARSETLIBDIR) $(CHARSET_MODULES)
2272         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(AUTHLIBDIR) $(AUTH_MODULES)
2273         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(GPEXTLIBDIR) $(GPEXT_MODULES)
2274
2275 uninstallscripts::
2276         @$(SHELL) $(srcdir)/script/uninstallscripts.sh $(INSTALLPERMS_BIN) $(DESTDIR)$(BINDIR) $(SCRIPTS)
2277
2278 uninstalldat::
2279         @$(SHELL) $(srcdir)/script/uninstalldat.sh $(DESTDIR) $(LIBDIR) $(srcdir)
2280
2281 uninstallmsg::
2282         @$(SHELL) $(srcdir)/script/uninstallmsg.sh $(DESTDIR) $(LIBDIR) $(srcdir)
2283
2284 uninstallswat:: uninstallmsg
2285         @$(SHELL) $(srcdir)/script/uninstallswat.sh $(DESTDIR) $(SWATDIR) $(srcdir)
2286
2287 uninstallclientlib::
2288         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/libsmbclient.@SHLIBEXT@
2289         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/libsmbclient.a
2290         -rm -f $(DESTDIR)${prefix}/include/libsmbclient.h
2291
2292 uninstalllibsmbsharemodes::
2293         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/libsmbsharemodes.@SHLIBEXT@
2294         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/libsmbsharemodes.a
2295
2296 uninstalllibaddns::
2297         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/libaddns.@SHLIBEXT@
2298         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/libaddns.a
2299
2300 uninstalllibnetapi::
2301         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/libnetapi.@SHLIBEXT@
2302         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/libnetapi.a
2303         -rm -f $(DESTDIR)${prefix}/include/netapi.h
2304
2305 uninstallpammodules::
2306         @for module in $(PAM_MODULES); do \
2307                 echo "Removing $(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@ "; \
2308                 rm -f "$(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@"; \
2309         done
2310
2311 # Toplevel clean files
2312 TOPFILES=dynconfig.o
2313
2314 clean::
2315         -rm -f include/build_env.h
2316         -rm -f smbd/build_options.c
2317         -rm -f $(PRECOMPILED_HEADER)
2318         -rm -f core */*~ *~ \
2319                 */*.o */*/*.o */*/*/*.o \
2320                 ../testsuite/*/*.o \
2321                 */*.@SHLIBEXT@ */*/*.@SHLIBEXT@ */*/*/*.@SHLIBEXT@ \
2322                 $(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) $(ROOT_SBIN_PROGS) \
2323                 $(MODULES) $(TORTURE_PROGS) \
2324                 $(LIBTALLOC) $(LIBSMBCLIENT) $(LIBADDNS) \
2325                 $(LIBSMBSHAREMODES) $(EVERYTHING_PROGS) $(LIBNETAPI) \
2326                 bin/libwbclient.so.0 bin/timelimit \
2327                 .headers.stamp */src/*.o \
2328                 $(LIBTALLOC_SYMS) $(LIBWBCLIENT_SYMS) $(LIBTDB_SYMS) $(LIBNETAPI_SYMS)
2329         -rm -rf t_dir
2330
2331 include/build_env.h: script/build_env.sh
2332         @echo Building include/build_env.h
2333         @$(SHELL) $(srcdir)/script/build_env.sh $(srcdir) $(builddir) $(CC) \
2334           > $(builddir)/include/build_env.h
2335
2336 proto::
2337         @echo
2338         @echo "NOTE: 'proto' is no longer a valid make target as proto.h"
2339         @echo "and other prototype headers are not generated anymore."
2340         @echo
2341
2342 .PHONY: proto
2343
2344 etags:
2345         etags `find $(srcdir) -name "*.[ch]" | grep -v /.svn/`
2346
2347 ctags:
2348         ctags `find $(srcdir) -name "*.[ch]" | grep -v /.svn/`
2349
2350 realclean:: clean
2351         -rm -f config.log bin/.dummy script/findsmb script/gen-8bit-gap.sh
2352         -rm -f script/installbin.sh script/uninstallbin.sh
2353
2354 distclean:: realclean
2355         -rm -f smbadduser
2356         -rm -f include/config.h Makefile
2357         -rm -f config.status config.cache so_locations
2358         -rm -rf .deps TAGS
2359
2360 realdistclean:: distclean
2361         -rm -f include/config.h.in
2362         -rm -f include/version.h
2363         -rm -f configure
2364
2365 # this target is really just for my use. It only works on a limited
2366 # range of machines and is used to produce a list of potentially
2367 # dead (ie. unused) functions in the code. (tridge)
2368 finddead::
2369         nm */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt
2370         nm */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt
2371         comm -13 nmused.txt nmfns.txt
2372
2373
2374 # when configure.in is updated, reconfigure
2375 $(srcdir)/configure: $(srcdir)/configure.in
2376         @echo "WARNING: you need to rerun ./autogen.sh"
2377
2378 config.status: $(srcdir)/configure
2379         @echo "WARNING: you need to run ./configure"
2380
2381 Makefile: $(srcdir)/Makefile.in config.status
2382         @echo "WARNING: you need to run ./config.status"
2383
2384 ######################################################################
2385 # Samba Testing Framework
2386
2387 # Check shared libs for unresolved symbols
2388 test_shlibs:: $(SHLIBS)
2389         @echo "Testing $(SHLIBS) "
2390         @export $(LIB_PATH_VAR)=./bin && \
2391         for module in $(SHLIBS); do \
2392                 ./script/tests/dlopen.sh bin/$${module}.@SHLIBEXT@ \
2393                         || exit 1; \
2394         done
2395
2396 # Check for NSS module problems.
2397 test_nss_modules:: nss_modules
2398         @echo "Testing $(NSS_MODULES) "
2399         @export $(LIB_PATH_VAR)=./bin && \
2400         for module in $(NSS_MODULES); do \
2401                 ./script/tests/dlopen.sh $${module} \
2402                         || exit 1; \
2403         done
2404
2405 # Check for PAM module problems.  Specifically, check that every module we
2406 # built can actually be loaded by a minimal PAM-aware application.
2407 test_pam_modules:: pam_modules
2408         @echo "Testing $(PAM_MODULES) "
2409         @export $(LIB_PATH_VAR)=./bin && \
2410         for module in $(PAM_MODULES); do \
2411                 ./script/tests/dlopen.sh -lpam -ldl bin/$${module}.@SHLIBEXT@ \
2412                         || exit 1; \
2413         done
2414
2415
2416 ##
2417 ## Targets for 'make test'
2418 ##
2419 test:: all torture timelimit
2420         @echo Running Test suite
2421         @LIB_PATH_VAR=$(LIB_PATH_VAR) PERL="$(PERL)" $(srcdir)/script/tests/selftest.sh ${selftest_prefix} all "${smbtorture4_path}"
2422
2423 valgrindtest:: all torture timelimit
2424         @echo Running Test suite with valgrind
2425         @LIB_PATH_VAR=$(LIB_PATH_VAR) \
2426          NMBD_VALGRIND="xterm -n nmbd -e valgrind -q --db-attach=yes --num-callers=30" \
2427          WINBINDD_VALGRIND="xterm -n winbindd -e valgrind -q --db-attach=yes --num-callers=30" \
2428          SMBD_VALGRIND="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \
2429          VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
2430          PERL="$(PERL)" $(srcdir)/script/tests/selftest.sh ${selftest_prefix} all "${smbtorture4_path}"