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