Ticket #16023: Makefile.in

File Makefile.in, 92.3 KB (added by pierre.augeard@…, 16 years ago)

wrong Makefile

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