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