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