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