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