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