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