source: branches/samba-3.3.x/source/Makefile.in @ 372

Last change on this file since 372 was 372, checked in by Silvan Scherrer, 11 years ago

remove hardcoded path, remove some files

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