s3: temporary hack to make the waf build work withouth autotools being required
[kai/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 # the following vars come from ../dynconfig/config.m4
20 BINDIR=@BINDIR@
21 SBINDIR=@SBINDIR@
22 LIBDIR=@LIBDIR@
23 #LIBEXECDIR=@LIBEXECDIR@
24 MANDIR=@MANDIR@
25 DATADIR=@DATADIR@
26 LOCALEDIR=@LOCALEDIR@
27 #SCRIPTSBINDIR=@SCRIPTSBINDIR@
28 #PYTHONDIR=@PYTHONDIR@
29 #PYTHONARCHDIR=@PYTHONARCHDIR@
30 MODULESDIR=@MODULESDIR@
31 INCLUDEDIR=@INCLUDEDIR@
32 SETUPDIR=@SETUPDIR@
33 #PKGCONFIGDIR=@PKGCONFIGDIR@
34 SWATDIR=@SWATDIR@
35 CODEPAGEDIR=@CODEPAGEDIR@
36 PAMMODULESDIR=@PAMMODULESDIR@
37 CONFIGDIR=@CONFIGDIR@
38 PRIVATE_DIR=@PRIVATE_DIR@
39 LOCKDIR=@LOCKDIR@
40 PIDDIR=@PIDDIR@
41 STATEDIR=@STATEDIR@
42 CACHEDIR=@CACHEDIR@
43 LOGFILEBASE=@LOGFILEBASE@
44 SOCKET_DIR=@SOCKET_DIR@
45 PRIVILEGED_SOCKET_DIR=@PRIVILEGED_SOCKET_DIR@
46 WINBINDD_SOCKET_DIR=@WINBINDD_SOCKET_DIR@
47 WINBINDD_PRIVILEGED_SOCKET_DIR=@WINBINDD_PRIVILEGED_SOCKET_DIR@
48 NMBDSOCKETDIR=@NMBDSOCKETDIR@
49 #NTP_SIGND_SOCKET_DIR=@NTP_SIGND_SOCKET_DIR@
50 NCALRPCDIR=@NCALRPCDIR@
51 CONFIGFILE=@CONFIGFILE@
52 LMHOSTSFILE=@LMHOSTSFILE@
53 SMB_PASSWD_FILE=@SMB_PASSWD_FILE@
54
55 selftest_prefix=@selftest_prefix@
56
57 LIBS=@LIBS@
58 CC=@CC@
59 SHLD=@SHLD@
60 LIB_PATH_VAR=@LIB_PATH_VAR@
61
62 ## Dynamic shared libraries build settings
63 DSO_EXPORTS_CMD=-Wl,--version-script,$(srcdir)/exports/`basename $@ | sed 's:\.@SHLIBEXT@[\.0-9]*$$:.@SYMSEXT@:'`
64 DSO_EXPORTS=@DSO_EXPORTS@
65 SHLD_DSO = $(SHLD) $(LDSHFLAGS) $(DSO_EXPORTS) -o $@
66
67 # The MODULE_EXPORTS variable contains the platform-specific linker flags
68 # needed to restrict the exports for VFS, IDMAP, RPC and PASSDB modules.
69 MODULE_EXPORTS=@MODULE_EXPORTS@
70
71 # Add $(DEVELOPER_CFLAGS) to $(CFLAGS) to enable extra compiler
72 # (GCC) warnings. This is done automatically for --enable-developer,
73 # --enable-picky-developer and --enable-krb5developer.
74 DEVELOPER_CFLAGS=@DEVELOPER_CFLAGS@
75 CFLAGS=@CFLAGS@
76 CPP=@CPP@
77 CPPFLAGS=-DHAVE_CONFIG_H @CPPFLAGS@
78 PICFLAG=@PICFLAG@
79
80 AR=@AR@
81 LDSHFLAGS=$(PICFLAG) @LDSHFLAGS@ @RELRO_LDFLAGS@ @LDFLAGS@ -lc @LDSHFLAGS_Z_DEFS@
82 LDSHFLAGS_MODULES=$(PICFLAG) @LDSHFLAGS@ @RELRO_LDFLAGS@ @LDFLAGS@ @LDSHFLAGS_Z_NODEFS@
83 LDFLAGS=@PIE_LDFLAGS@ @RELRO_LDFLAGS@ @LDFLAGS@
84
85 WINBIND_NSS_LDSHFLAGS=$(PICFLAG) @WINBIND_NSS_LDSHFLAGS@ @LDFLAGS@ -lc @LDSHFLAGS_Z_DEFS@
86 AWK=@AWK@
87 DYNEXP=@DYNEXP@
88 PERL=@PERL@
89 PYTHON=@PYTHON@
90 LIBDL=@LIBDL@
91
92 PIDL_ARGS=@PIDL_ARGS@
93
94 TERMLDFLAGS=@TERMLDFLAGS@
95 TERMLIBS=@TERMLIBS@
96 PRINT_LIBS=@PRINT_LIBS@
97 ZLIB_LIBS=@ZLIB_LIBS@
98 AUTH_LIBS=@AUTH_LIBS@
99 ACL_LIBS=@ACL_LIBS@
100 PASSDB_LIBS=@PASSDB_LIBS@
101 IDMAP_LIBS=@IDMAP_LIBS@
102 KRB5LIBS=@KRB5_LIBS@
103 LDAP_LIBS=@LDAP_LIBS@
104 NSCD_LIBS=@NSCD_LIBS@
105 LIBWBCLIENT=@LIBWBCLIENT_STATIC@ @LIBWBCLIENT_SHARED@
106 LIBWBCLIENT_LIBS=@LIBWBCLIENT_LIBS@
107 PTHREAD_LDFLAGS=@PTHREAD_LDFLAGS@
108 PTHREAD_CFLAGS=@PTHREAD_CFLAGS@
109 DNSSD_LIBS=@DNSSD_LIBS@
110 AVAHI_LIBS=@AVAHI_LIBS@
111 POPT_LIBS=@POPTLIBS@
112 LIBTALLOC=@LIBTALLOC_STATIC@
113 LIBTALLOC_LIBS=@LIBTALLOC_LIBS@
114 LIBREPLACE_LIBS=@LIBREPLACE_LIBS@
115 LIBTDB=@LIBTDB_STATIC@
116 LIBTDB_LIBS=@LIBTDB_LIBS@
117 TDB_DEPS=@TDB_DEPS@
118 LIBNETAPI=@LIBNETAPI_STATIC@ @LIBNETAPI_SHARED@
119 LIBNETAPI_LIBS=@LIBNETAPI_LIBS@
120 LIBSMBCLIENT_LIBS=@LIBSMBCLIENT_LIBS@
121 LIBSMBSHAREMODES_LIBS=@LIBSMBSHAREMODES_LIBS@
122
123 TALLOCTORT = @TALLOCTORT@
124
125 TDBBACKUP = @TDBBACKUP@
126 TDBTOOL = @TDBTOOL@
127 TDBDUMP = @TDBDUMP@
128 TDBRESTORE = @TDBRESTORE@
129 TDBTORTURE = @TDBTORTURE@
130 PTHREADPOOLTEST = @PTHREADPOOLTEST@
131
132 INSTALLCMD=@INSTALL@
133 INSTALLLIBCMD_SH=@INSTALLLIBCMD_SH@
134 INSTALLLIBCMD_A=@INSTALLLIBCMD_A@
135 UNINSTALLLIBCMD_SH=@UNINSTALLLIBCMD_SH@
136 UNINSTALLLIBCMD_A=@UNINSTALLLIBCMD_A@
137
138 VPATH=@srcdir@
139 srcdir=@abs_srcdir@
140 builddir=@abs_builddir@
141 # XXX: Perhaps this should be @SHELL@ instead -- apparently autoconf
142 # will search for a POSIX-compliant shell, and that might not be
143 # /bin/sh on some platforms.  I guess it's not a big problem -- mbp
144 SHELL=/bin/sh
145 DESTDIR=/
146
147 # See the autoconf manual "Installation Directory Variables" for a
148 # discussion of the subtle use of these variables.
149
150 VFSLIBDIR = $(MODULESDIR)/vfs
151 PERFCOUNTLIBDIR = $(MODULESDIR)/perfcount
152 PDBLIBDIR = $(MODULESDIR)/pdb
153 RPCLIBDIR = $(MODULESDIR)/rpc
154 IDMAPLIBDIR = $(MODULESDIR)/idmap
155 NSSINFOLIBDIR = $(MODULESDIR)/nss_info
156 AUTHLIBDIR = $(MODULESDIR)/auth
157 CONFIGLIBDIR = $(MODULESDIR)/config
158 GPEXTLIBDIR = $(MODULESDIR)/gpext
159 VARDIR = @localstatedir@
160
161 # The permissions to give the executables and other data
162 INSTALLPERMS_BIN = 0755
163 INSTALLPERMS_DATA = 0644
164
165 FLAGS = -I. \
166         -I$(srcdir) \
167         @FLAGS1@ \
168         @SAMBA_CPPFLAGS@ \
169         $(CPPFLAGS) \
170         $(ISA) \
171         -I$(srcdir)/lib \
172         -I.. \
173         -Iautoconf \
174         -Iautoconf/librpc \
175         -I./../lib/ldb/include \
176         -D_SAMBA_BUILD_=3
177
178 PATH_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" \
179         -DPRIVATE_DIR=\"$(PRIVATE_DIR)\" \
180         -DCONFIGFILE=\"$(CONFIGFILE)\" \
181         -DSBINDIR=\"$(SBINDIR)\" \
182         -DBINDIR=\"$(BINDIR)\" \
183         -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" \
184         -DSWATDIR=\"$(SWATDIR)\" \
185         -DLOCKDIR=\"$(LOCKDIR)\" \
186         -DPIDDIR=\"$(PIDDIR)\" \
187         -DLIBDIR=\"$(LIBDIR)\" \
188         -DMODULESDIR=\"$(MODULESDIR)\" \
189         -DLOGFILEBASE=\"$(LOGFILEBASE)\" \
190         -DSHLIBEXT=\"@SHLIBEXT@\" \
191         -DNCALRPCDIR=\"$(NCALRPCDIR)\" \
192         -DCONFIGDIR=\"$(CONFIGDIR)\" \
193         -DCODEPAGEDIR=\"$(CODEPAGEDIR)\" \
194         -DCACHEDIR=\"$(CACHEDIR)\" \
195         -DSTATEDIR=\"$(STATEDIR)\" \
196         -DNMBDSOCKETDIR=\"$(NMBDSOCKETDIR)\" \
197         -DWINBINDD_SOCKET_DIR=\"$(WINBINDD_SOCKET_DIR)\" \
198         -DWINBINDD_PRIVILEGED_SOCKET_DIR=\"$(WINBINDD_PRIVILEGED_SOCKET_DIR)\" \
199         -DLOCALEDIR=\"$(LOCALEDIR)\" \
200         -DDATADIR=\"$(DATADIR)\" \
201         -DSETUPDIR=\"$(SETUPDIR)\"
202
203 # Note that all executable programs now provide for an optional executable suffix.
204
205 SBIN_PROGS = bin/smbd bin/nmbd @SWAT_SBIN_TARGETS@ @EXTRA_SBIN_PROGS@
206
207 BIN_PROGS1 = bin/smbclient bin/net bin/smbspool \
208         bin/testparm bin/smbstatus bin/smbget \
209         bin/smbta-util
210 BIN_PROGS2 = bin/smbcontrol bin/smbtree $(TDBBACKUP) \
211         bin/nmblookup bin/pdbedit $(TDBDUMP) \
212         $(TDBRESTORE) $(TDBTOOL) bin/dbwrap_tool
213 BIN_PROGS3 = bin/smbpasswd bin/rpcclient bin/smbcacls \
214         bin/profiles bin/ntlm_auth bin/sharesec \
215         bin/smbcquotas bin/eventlogadm 
216
217 TORTURE_PROGS = bin/smbtorture bin/msgtest \
218         bin/masktest bin/locktest \
219         bin/locktest2 bin/nsstest bin/vfstest \
220         bin/pdbtest $(TALLOCTORT) bin/replacetort \
221         $(TDBTORTURE) $(PTHREADPOOLTEST) \
222         bin/smbconftort bin/vlp
223
224 BIN_PROGS = @EXTRA_BIN_PROGS@ \
225         $(BIN_PROGS1) $(BIN_PROGS2) $(BIN_PROGS3)
226
227 EVERYTHING_PROGS = bin/debug2html bin/smbfilter \
228         $(TALLOCTORT) bin/replacetort \
229         bin/log2pcap \
230         bin/vlp \
231         bin/dbwrap_tool \
232         bin/dbwrap_torture
233
234 PAM_MODULES = @PAM_MODULES@
235
236 NSS_MODULES = @NSS_MODULES@
237
238 SCRIPTS = $(srcdir)/script/smbtar $(builddir)/script/findsmb
239
240 VFS_MODULES = @VFS_MODULES@
241 PERFCOUNT_MODULES = @PERFCOUNT_MODULES@
242 PDB_MODULES = @PDB_MODULES@
243 IDMAP_MODULES = @IDMAP_MODULES@
244 AUTH_MODULES = @AUTH_MODULES@
245 NSS_INFO_MODULES = @NSS_INFO_MODULES@
246 GPEXT_MODULES = @GPEXT_MODULES@
247 MODULES = $(VFS_MODULES) $(PDB_MODULES) $(IDMAP_MODULES) \
248           $(AUTH_MODULES) $(NSS_INFO_MODULES) \
249           $(GPEXT_MODULES) $(PERFCOUNT_MODULES)
250
251 EXTRA_ALL_TARGETS = @EXTRA_ALL_TARGETS@
252
253 ######################################################################
254 # object file lists
255 ######################################################################
256
257 TDB_LIB_OBJ = lib/util_tdb.o ../lib/util/util_tdb.o \
258           ../lib/tdb_wrap/tdb_wrap.o \
259           ../lib/dbwrap/dbwrap.o \
260           lib/dbwrap/dbwrap_open.o \
261           ../lib/dbwrap/dbwrap_tdb.o \
262           lib/dbwrap/dbwrap_ctdb.o \
263           lib/g_lock.o \
264           ../lib/dbwrap/dbwrap_cache.o \
265           lib/dbwrap/dbwrap_watch.o \
266           ../lib/dbwrap/dbwrap_rbt.o \
267           ../lib/dbwrap/dbwrap_util.o
268
269 TDB_VALIDATE_OBJ = lib/tdb_validate.o
270
271 SMBLDAP_OBJ = @SMBLDAP@
272
273 VERSION_OBJ = lib/version.o
274
275 WBCOMMON_OBJ = ../nsswitch/wb_common.o
276
277 AFS_OBJ = lib/afs.o
278
279 AFS_SETTOKEN_OBJ = lib/afs_settoken.o
280
281 AVAHI_OBJ = @AVAHI_OBJ@
282
283 SERVER_MUTEX_OBJ = lib/server_mutex.o
284
285 PASSCHANGE_OBJ = libsmb/passchange.o
286
287 LIBNDR_DRSUAPI_OBJ = ../librpc/ndr/ndr_drsuapi.o \
288                      ../librpc/ndr/ndr_compression.o \
289                      autoconf/librpc/gen_ndr/ndr_drsuapi.o \
290                      ../librpc/ndr/ndr_drsblobs.o \
291                      autoconf/librpc/gen_ndr/ndr_drsblobs.o
292
293 ZLIB_OBJ = @ZLIB_OBJS@
294
295 COMPRESSION_OBJ = ../lib/compression/lzxpress.o \
296                   $(ZLIB_OBJ)
297
298 DRSUAPI_OBJ = $(LIBNDR_DRSUAPI_OBJ) \
299               $(COMPRESSION_OBJ)
300
301 LIBNDR_NTLMSSP_OBJ = autoconf/librpc/gen_ndr/ndr_ntlmssp.o \
302                      ../librpc/ndr/ndr_ntlmssp.o
303
304 LIBNDR_OBJ = ../librpc/ndr/ndr_basic.o \
305              ../librpc/ndr/ndr.o \
306              ../librpc/ndr/ndr_misc.o \
307              autoconf/librpc/gen_ndr/ndr_misc.o \
308              autoconf/librpc/gen_ndr/ndr_security.o \
309              ../librpc/ndr/ndr_sec_helper.o \
310              ../librpc/ndr/ndr_string.o \
311              ../librpc/ndr/uuid.o \
312              ../librpc/ndr/util.o \
313              autoconf/librpc/gen_ndr/ndr_server_id.o \
314              autoconf/librpc/gen_ndr/ndr_file_id.o \
315              autoconf/librpc/gen_ndr/ndr_dcerpc.o
316
317 LIBNDR_GEN_OBJ0 = autoconf/librpc/gen_ndr/ndr_samr.o \
318                   autoconf/librpc/gen_ndr/ndr_lsa.o
319
320 LIBNDR_NETLOGON_OBJ = autoconf/librpc/gen_ndr/ndr_netlogon.o \
321                   ../librpc/ndr/ndr_netlogon.o
322
323 LIBNDR_SCHANNEL_OBJ = autoconf/librpc/gen_ndr/ndr_schannel.o \
324                       ../librpc/ndr/ndr_schannel.o
325
326 LIBNDR_SPOOLSS_OBJ = autoconf/librpc/gen_ndr/ndr_spoolss.o \
327                   ../librpc/ndr/ndr_spoolss_buf.o
328
329 LIBNDR_NTPRINTING_OBJ = autoconf/librpc/gen_ndr/ndr_ntprinting.o \
330                         ../librpc/ndr/ndr_ntprinting.o \
331
332 LIBNDR_PREG_OBJ = autoconf/librpc/gen_ndr/ndr_preg.o \
333                   ../librpc/ndr/ndr_preg.o
334
335 LIBNDR_XATTR_OBJ = autoconf/librpc/gen_ndr/ndr_xattr.o \
336                    ../librpc/ndr/ndr_xattr.o
337
338 LIBCLI_SPOOLSS_OBJ = autoconf/librpc/gen_ndr/ndr_spoolss_c.o \
339                      rpc_client/cli_spoolss.o \
340                      rpc_client/init_spoolss.o \
341                      rpc_client/cli_winreg_spoolss.o \
342                      printing/nt_printing_os2.o
343
344 LIBCLI_EVENTLOG_OBJ = autoconf/librpc/gen_ndr/ndr_eventlog_c.o
345
346 LIBCLI_WINREG_OBJ = autoconf/librpc/gen_ndr/ndr_winreg_c.o \
347                     rpc_client/cli_winreg.o
348
349 LIBCLI_WINREG_INT_OBJ = $(LIBCLI_WINREG_OBJ) \
350                         rpc_client/cli_winreg_int.o
351
352 LIBCLI_NTSVCS_OBJ = autoconf/librpc/gen_ndr/ndr_ntsvcs_c.o
353
354 LIBCLI_DRSUAPI_OBJ = autoconf/librpc/gen_ndr/ndr_drsuapi_c.o
355
356 LIBCLI_DFS_OBJ = autoconf/librpc/gen_ndr/ndr_dfs_c.o
357
358 LIBCLI_ECHO_OBJ = autoconf/librpc/gen_ndr/ndr_echo_c.o
359
360 LIBCLI_INITSHUTDOWN_OBJ = autoconf/librpc/gen_ndr/ndr_initshutdown_c.o
361
362 LIBCLI_DSSETUP_OBJ = autoconf/librpc/gen_ndr/ndr_dssetup_c.o
363
364 LIBCLI_SVCCTL_OBJ = autoconf/librpc/gen_ndr/ndr_svcctl_c.o
365
366 LIBCLI_WKSSVC_OBJ = autoconf/librpc/gen_ndr/ndr_wkssvc_c.o
367
368 LIBCLI_SRVSVC_OBJ = autoconf/librpc/gen_ndr/ndr_srvsvc_c.o
369
370 LIBCLI_LSA_OBJ = autoconf/librpc/gen_ndr/ndr_lsa_c.o \
371                  rpc_client/cli_lsarpc.o \
372                  rpc_client/init_lsa.o
373
374 LIBCLI_SAMR_OBJ = autoconf/librpc/gen_ndr/ndr_samr_c.o \
375                   rpc_client/cli_samr.o
376
377 LIBCLI_NETLOGON_OBJ = autoconf/librpc/gen_ndr/ndr_netlogon_c.o \
378                       rpc_client/cli_netlogon.o \
379                       rpc_client/util_netlogon.o
380
381 LIBCLI_EPMAPPER_OBJ = autoconf/librpc/gen_ndr/ndr_epmapper_c.o
382
383 LIBNDR_GEN_OBJ = autoconf/librpc/gen_ndr/ndr_wkssvc.o \
384                  $(LIBNDR_GEN_OBJ0) \
385                  autoconf/librpc/gen_ndr/ndr_dfs.o \
386                  autoconf/librpc/gen_ndr/ndr_dfsblobs.o \
387                  autoconf/librpc/gen_ndr/ndr_echo.o \
388                  autoconf/librpc/gen_ndr/ndr_winreg.o \
389                  autoconf/librpc/gen_ndr/ndr_initshutdown.o \
390                  autoconf/librpc/gen_ndr/ndr_srvsvc.o \
391                  autoconf/librpc/gen_ndr/ndr_eventlog.o \
392                  $(LIBNDR_NETLOGON_OBJ) \
393                  autoconf/librpc/gen_ndr/ndr_dssetup.o \
394                  autoconf/librpc/gen_ndr/ndr_epmapper.o \
395                  autoconf/librpc/gen_ndr/ndr_ntsvcs.o \
396                  $(LIBNDR_SPOOLSS_OBJ)
397
398 # this includes only the low level parse code, not stuff
399 # that requires knowledge of security contexts
400 REG_PARSE_PRS_OBJ = registry/reg_parse_prs.o
401
402 LIBREPLACE_OBJ = @LIBREPLACE_OBJS@
403
404 SOCKET_WRAPPER_OBJ = @SOCKET_WRAPPER_OBJS@
405 NSS_WRAPPER_OBJ = @NSS_WRAPPER_OBJS@
406 UID_WRAPPER_OBJ = @UID_WRAPPER_OBJS@
407
408 LIBSAMBAUTIL_OBJ = \
409                 $(LIBREPLACE_OBJ) \
410                 $(SOCKET_WRAPPER_OBJ) \
411                 $(UID_WRAPPER_OBJ) \
412                 $(NSS_WRAPPER_OBJ)
413
414 UTIL_OBJ = ../lib/util/rbtree.o ../lib/util/signal.o ../lib/util/time.o \
415                    ../lib/util/xfile.o ../lib/util/util_strlist.o  \
416                    ../lib/util/util_file.o ../lib/util/data_blob.o \
417                    ../lib/util/util.o ../lib/util/util_paths.o ../lib/util/fsusage.o \
418                    ../lib/util/params.o ../lib/util/talloc_stack.o \
419                    ../lib/util/genrand.o ../lib/util/util_net.o \
420                    ../lib/util/become_daemon.o ../lib/util/system.o \
421                    ../lib/util/tevent_unix.o ../lib/util/tevent_ntstatus.o \
422                    ../lib/util/tevent_werror.o \
423                    lib/tevent_barrier.o \
424                    ../lib/util/smb_threads.o ../lib/util/util_id.o \
425                    ../lib/util/blocking.o ../lib/util/rfc1738.o \
426                    ../lib/util/select.o ../lib/util/util_pw.o ../lib/util/server_id.o
427
428 CRYPTO_OBJ = ../lib/crypto/crc32.o @CRYPTO_MD5_OBJ@ \
429                          ../lib/crypto/hmacmd5.o ../lib/crypto/arcfour.o \
430                          ../lib/crypto/md4.o \
431                          ../lib/crypto/sha256.o ../lib/crypto/hmacsha256.o \
432                          ../lib/crypto/aes.o ../lib/crypto/rijndael-alg-fst.o \
433                          ../lib/crypto/aes_cmac_128.o
434
435 LIB_OBJ = $(LIBSAMBAUTIL_OBJ) $(UTIL_OBJ) $(CRYPTO_OBJ) $(LIBTSOCKET_OBJ) \
436           lib/messages.o autoconf/librpc/gen_ndr/ndr_messaging.o lib/messages_local.o \
437           lib/messages_ctdbd.o lib/ctdb_packet.o lib/ctdbd_conn.o \
438           lib/ctdb_conn.o \
439           lib/msg_channel.o \
440           lib/id_cache.o \
441           ../lib/socket/interfaces.o lib/memcache.o \
442           lib/talloc_dict.o \
443           lib/serverid.o \
444           lib/util_transfer_file.o ../lib/async_req/async_sock.o \
445           lib/addrchange.o \
446           $(TDB_LIB_OBJ) \
447           $(VERSION_OBJ) lib/charcnv.o ../lib/util/charset/convert_string.o \
448           ../lib/util/charset/pull_push.o \
449           lib/fstring.o ../lib/util/debug.o ../lib/util/debug_s3.o ../lib/util/fault.o \
450           lib/interface.o lib/pidfile.o lib/dumpcore.o \
451           lib/system.o lib/sendfile.o lib/recvfile.o lib/time.o \
452           lib/username.o \
453           ../libds/common/flag_mapping.o \
454           lib/access.o lib/smbrun.o \
455           ../lib/util/bitmap.o ../lib/util/dprintf.o $(UTIL_REG_OBJ) \
456           lib/wins_srv.o lib/string_init.o \
457           lib/util_str.o ../lib/util/util_str_common.o \
458           ../lib/util/util_str.o \
459           ../lib/util/base64.o lib/util_sid.o \
460           ../lib/util/charset/util_unistr.o \
461           ../lib/util/charset/util_unistr_w.o ../lib/util/charset/codepoints.o ../lib/util/charset/util_str.o lib/util_file.o \
462           lib/util.o lib/util_malloc.o lib/namearray.o lib/util_cmdline.o lib/util_names.o \
463           lib/util_sock.o lib/sock_exec.o lib/util_sec.o \
464           lib/substitute.o lib/substitute_generic.o ../lib/util/substitute.o \
465           lib/ms_fnmatch.o ../lib/util/ms_fnmatch.o lib/errmap_unix.o ../libcli/util/errmap_unix.o \
466           lib/tallocmsg.o lib/dmallocmsg.o \
467           ../libcli/smb/smb_signing.o \
468           ../lib/util/charset/iconv.o ../lib/util/charset/weird.o \
469           ../lib/util/charset/charset_macosxfs.o intl/lang_tdb.o \
470           lib/conn_tdb.o lib/adt_tree.o lib/gencache.o \
471           lib/sessionid_tdb.o \
472           ../lib/util/modules.o lib/events.o @LIBTEVENT_OBJ0@ \
473           @CCAN_OBJ@ \
474           lib/server_contexts.o \
475           lib/server_prefork.o \
476           lib/server_prefork_util.o \
477           lib/ldap_escape.o \
478           ../libcli/security/secdesc.o ../libcli/security/access_check.o \
479           ../libcli/security/secace.o ../libcli/security/object_tree.o \
480           ../libcli/security/sddl.o ../libcli/security/session.o \
481           ../libcli/security/secacl.o @PTHREADPOOL_OBJ@ \
482           lib/fncall.o \
483           libads/krb5_errs.o lib/system_smbd.o lib/audit.o $(LIBNDR_OBJ) \
484           lib/file_id.o lib/idmap_cache.o \
485           ../libcli/security/dom_sid.o ../libcli/security/security_descriptor.o \
486           ../libcli/security/security_token.o ../libcli/security/util_sid.o \
487           ../libcli/smb/util.o ../lib/util/idtree.o
488
489 LIB_DUMMY_OBJ = lib/smbd_shim.o lib/dummyparam.o
490 LIB_NONSMBD_OBJ = $(LIB_OBJ) $(LIB_DUMMY_OBJ)
491
492 READLINE_OBJ = ../libcli/smbreadline/smbreadline.o
493
494 # Also depends on  $(SECRETS_OBJ) $(LIBSAMBA_OBJ)
495 # Be sure to include them into your application
496 POPT_LIB_OBJ = lib/popt_common.o
497
498 PARAM_WITHOUT_REG_OBJ = ../dynconfig/dynconfig.o param/loadparm.o param/loadparm_ctx.o ../lib/param/loadparm_server_role.o param/util.o lib/sharesec.o lib/ldap_debug_handler.o ../lib/param/loadparm.o ../lib/param/util.o
499 PARAM_REG_ADD_OBJ = $(REG_SMBCONF_OBJ) $(LIBSMBCONF_OBJ) $(PRIVILEGES_BASIC_OBJ)
500 PARAM_OBJ = $(PARAM_WITHOUT_REG_OBJ) $(PARAM_REG_ADD_OBJ)
501
502 KRBCLIENT_OBJ = libads/kerberos.o libads/ads_status.o
503
504 LIBADDNS_OBJ0 = ../lib/addns/dnsrecord.o ../lib/addns/dnsutils.o  ../lib/addns/dnssock.o \
505                ../lib/addns/dnsgss.o ../lib/addns/dnsmarshall.o ../lib/addns/error.o
506 LIBADDNS_OBJ = $(LIBADDNS_OBJ0) $(SOCKET_WRAPPER_OBJ)
507
508 GPEXT_OBJ = ../libgpo/gpext/gpext.o @GPEXT_STATIC@
509
510 LIBGPO_OBJ0 = ../libgpo/gpo_ldap.o ../libgpo/gpo_ini.o ../libgpo/gpo_util.o \
511               ../libgpo/gpo_fetch.o libgpo/gpo_filesync.o ../libgpo/gpo_sec.o \
512               libgpo/gpo_reg.o \
513               $(GPEXT_OBJ)
514 LIBGPO_OBJ = $(LIBGPO_OBJ0)
515
516 LIBADS_OBJ = libads/ldap.o \
517              libads/sasl.o libads/sasl_wrapping.o \
518              libads/krb5_setpw.o \
519              libads/kerberos_util.o \
520              libads/ldap_user.o \
521              libads/ads_struct.o libads/kerberos_keytab.o \
522              libads/disp_sec.o libads/ldap_utils.o \
523              libads/ldap_schema.o libads/util.o libads/ndr.o
524
525 LIBADS_SERVER_OBJ = libads/authdata.o ../auth/kerberos/kerberos_pac.o \
526                     ../librpc/ndr/ndr_krb5pac.o \
527                     autoconf/librpc/gen_ndr/ndr_krb5pac.o
528
529 LIBADS_PRINTER_OBJ = libads/ldap_printer.o
530
531 SECRETS_OBJ = passdb/secrets.o passdb/machine_account_secrets.o passdb/machine_sid.o \
532               autoconf/librpc/gen_ndr/ndr_secrets.o \
533               passdb/secrets_lsa.o
534
535 LIBNBT_OBJ = ../libcli/nbt/nbtname.o \
536              ../libcli/netlogon/netlogon.o \
537              autoconf/librpc/gen_ndr/ndr_nbt.o \
538              ../librpc/ndr/ndr_nbt.o \
539              autoconf/librpc/gen_ndr/ndr_svcctl.o \
540              ../librpc/ndr/ndr_svcctl.o
541
542 LIBNMB_OBJ = libsmb/unexpected.o libsmb/namecache.o libsmb/nmblib.o \
543              libsmb/namequery.o ../libcli/nbt/lmhosts.o ../libcli/dns/dns_hosts_file.o libsmb/conncache.o \
544              ../lib/addns/dnsquery.o libads/sitename_cache.o
545
546 NTERR_OBJ = ../libcli/util/nterr.o libsmb/smberr.o
547 DOSERR_OBJ = ../libcli/util/doserr.o
548 ERRORMAP_OBJ = ../libcli/util/errormap.o libsmb/errormap.o
549 DCE_RPC_ERR_OBJ = ../librpc/rpc/dcerpc_error.o
550
551 LIBSMB_ERR_OBJ0 = $(NTERR_OBJ) $(DOSERR_OBJ) $(ERRORMAP_OBJ) $(DCE_RPC_ERR_OBJ)
552
553 LIBSMB_ERR_OBJ1 = ../libcli/auth/smbdes.o ../libcli/auth/smbencrypt.o ../libcli/auth/msrpc_parse.o ../libcli/auth/session.o
554
555 LIBSMB_ERR_OBJ = $(LIBSMB_ERR_OBJ0) $(LIBSMB_ERR_OBJ1) \
556                  $(SECRETS_OBJ)
557
558 LIBSMB_OBJ0 = \
559                ../lib/util/asn1.o \
560                ../libcli/auth/spnego_parse.o \
561                ../libcli/auth/ntlm_check.o \
562                libsmb/ntlmssp.o \
563                libsmb/ntlmssp_wrap.o \
564                libsmb/auth_generic.o \
565                ../lib/krb5_wrap/krb5_samba.o \
566                libsmb/clispnego.o \
567                ../auth/gensec/gensec.o \
568                ../auth/gensec/gensec_start.o \
569                ../auth/gensec/gensec_util.o \
570                ../auth/gensec/spnego.o \
571                ../auth/credentials/credentials.o \
572                ../auth/credentials/credentials_ntlm.o \
573                ../auth/credentials/credentials_samba3.o \
574                ../auth/ntlmssp/ntlmssp.o \
575                ../auth/ntlmssp/ntlmssp_util.o \
576                ../auth/ntlmssp/ntlmssp_sign.o \
577                ../auth/ntlmssp/ntlmssp_client.o \
578                ../auth/ntlmssp/gensec_ntlmssp.o \
579                ../auth/ntlmssp/gensec_ntlmssp_server.o \
580                $(LIBNDR_NTLMSSP_OBJ) \
581                ../auth/ntlmssp/ntlmssp_ndr.o \
582                ../auth/ntlmssp/ntlmssp_server.o
583
584 LIBSAMBA_OBJ = $(LIBSMB_OBJ0) \
585                $(LIBSMB_ERR_OBJ)
586
587 LIBCLI_LDAP_MESSAGE_OBJ = ../libcli/ldap/ldap_message.o
588 LIBCLI_LDAP_NDR_OBJ = ../libcli/ldap/ldap_ndr.o ../lib/ldb/common/ldb_parse.o
589
590 LIBTSOCKET_OBJ = ../lib/tsocket/tsocket.o \
591                 ../lib/tsocket/tsocket_helpers.o \
592                 ../lib/tsocket/tsocket_bsd.o
593
594 CLDAP_OBJ = libads/cldap.o \
595         ../libcli/cldap/cldap.o \
596         $(LIBCLI_LDAP_MESSAGE_OBJ) $(LIBCLI_LDAP_NDR_OBJ)
597
598 TLDAP_OBJ = lib/tldap.o lib/tldap_util.o lib/util_tsock.o
599
600 SCHANNEL_OBJ = ../libcli/auth/credentials.o \
601                ../libcli/auth/schannel_sign.o \
602                ../libcli/auth/schannel_state_tdb.o \
603                $(LIBNDR_SCHANNEL_OBJ)
604
605 LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \
606              libsmb/reparse_symlink.o \
607              libsmb/clisymlink.o \
608              libsmb/clirap.o libsmb/clierror.o libsmb/climessage.o \
609              libsmb/clireadwrite.o libsmb/clilist.o libsmb/cliprint.o \
610              libsmb/clitrans.o libsmb/clisecdesc.o libsmb/clidgram.o \
611              libsmb/clistr.o libsmb/cliquota.o libsmb/clifsinfo.o libsmb/clidfs.o \
612              libsmb/clioplock.o libsmb/clirap2.o \
613              libsmb/async_smb.o \
614              ../libcli/smb/smb_seal.o \
615              ../libcli/smb/read_smb.o \
616              ../libcli/smb/smbXcli_base.o \
617              ../libcli/smb/smb1cli_trans.o \
618              ../libcli/smb/smb2cli_session.o \
619              libsmb/smb2cli_tcon.o \
620              ../libcli/smb/smb2cli_create.o \
621              ../libcli/smb/smb2_create_blob.o \
622              ../libcli/smb/smb2_signing.o \
623              ../libcli/smb/smb2cli_close.o \
624              ../libcli/smb/smb2cli_flush.o \
625              ../libcli/smb/smb2cli_read.o \
626              ../libcli/smb/smb2cli_write.o \
627              ../libcli/smb/smb2cli_query_directory.o \
628              ../libcli/smb/smb2cli_ioctl.o \
629              ../libcli/smb/smb2cli_query_info.o \
630              ../libcli/smb/smb2cli_set_info.o \
631              libsmb/cli_np_tstream.o \
632              libsmb/smbsock_connect.o \
633              $(LIBSAMBA_OBJ) \
634              $(LIBNMB_OBJ) \
635              $(LIBNBT_OBJ) \
636              $(CLDAP_OBJ) \
637              $(DRSUAPI_OBJ)
638
639 LIBMSRPC_OBJ = $(SCHANNEL_OBJ) \
640                rpc_client/cli_pipe.o \
641                librpc/crypto/gse_krb5.o \
642                librpc/crypto/gse.o \
643                ../auth/kerberos/gssapi_pac.o \
644                ../lib/krb5_wrap/gss_samba.o \
645                librpc/rpc/rpc_common.o \
646                rpc_client/rpc_transport_np.o \
647                rpc_client/rpc_transport_sock.o \
648                rpc_client/rpc_transport_tstream.o \
649                ../librpc/rpc/binding.o \
650                ../librpc/rpc/dcerpc_util.o \
651                ../librpc/rpc/binding_handle.o \
652                librpc/rpc/dcerpc_helpers.o \
653                $(LIBCLI_EPMAPPER_OBJ)
654
655 LIBMSRPC_GEN_OBJ = $(LIBNDR_GEN_OBJ)
656
657 #
658 # registry-related objects
659 #
660 UTIL_REG_OBJ = ../libcli/registry/util_reg.o
661
662 REG_INIT_BASIC_OBJ = registry/reg_init_basic.o
663 REG_INIT_SMBCONF_OBJ = registry/reg_init_smbconf.o
664 REG_INIT_FULL_OBJ = registry/reg_init_full.o
665
666 REGFIO_OBJ = registry/regfio.o \
667              $(REG_PARSE_PRS_OBJ)
668
669 REG_API_REGF_OBJ = registry/reg_api_regf.o
670
671 REGOBJS_OBJ = registry/reg_objects.o
672
673 REG_BACKENDS_BASE_OBJ = registry/reg_backend_db.o
674
675 REG_BACKENDS_SMBCONF_OBJ = registry/reg_backend_smbconf.o
676
677 REG_BACKENDS_EXTRA_OBJ = registry/reg_backend_printing.o \
678                          registry/reg_backend_shares.o \
679                          registry/reg_backend_netlogon_params.o \
680                          registry/reg_backend_prod_options.o \
681                          registry/reg_backend_tcpip_params.o \
682                          registry/reg_backend_hkpt_params.o \
683                          registry/reg_backend_current_version.o \
684                          registry/reg_backend_perflib.o
685
686 REG_BASE_OBJ = registry/reg_api.o \
687                registry/reg_dispatcher.o \
688                registry/reg_cachehook.o \
689                $(REGOBJS_OBJ) \
690                registry/reg_util_internal.o \
691                lib/util_nttoken.o \
692                $(REG_BACKENDS_BASE_OBJ) \
693                registry/reg_parse_internal.o \
694                lib/cbuf.o lib/srprs.o \
695                $(REG_INIT_BASIC_OBJ)
696
697 REG_SMBCONF_OBJ = $(REG_BASE_OBJ) \
698                   registry/reg_util_token.o \
699                   registry/reg_api_util.o \
700                   $(REG_BACKENDS_SMBCONF_OBJ) \
701                   $(REG_INIT_SMBCONF_OBJ)
702
703 REG_FULL_OBJ = $(REG_SMBCONF_OBJ) \
704                $(REG_BACKENDS_EXTRA_OBJ) \
705                $(REG_INIT_FULL_OBJ) \
706                registry/reg_perfcount.o \
707                autoconf/librpc/gen_ndr/ndr_perfcount.o
708
709 LIB_EVENTLOG_OBJ = lib/eventlog/eventlog.o
710
711 DCE_RPC_EP_OBJ = librpc/rpc/dcerpc_ep.o
712
713 RPC_LSARPC_OBJ = rpc_server/lsa/srv_lsa_nt.o \
714                  autoconf/librpc/gen_ndr/srv_lsa.o \
715                  ../libcli/lsarpc/util_lsarpc.o
716
717 RPC_NETLOGON_OBJ = rpc_server/netlogon/srv_netlog_nt.o \
718                    autoconf/librpc/gen_ndr/srv_netlogon.o
719
720 RPC_SAMR_OBJ = rpc_server/samr/srv_samr_nt.o \
721                rpc_server/samr/srv_samr_util.o \
722                rpc_server/samr/srv_samr_chgpasswd.o \
723                autoconf/librpc/gen_ndr/srv_samr.o
724
725 RPC_INITSHUTDOWN_OBJ =  autoconf/librpc/gen_ndr/srv_initshutdown.o rpc_server/initshutdown/srv_initshutdown_nt.o
726
727 RPC_WINREG_OBJ =  rpc_server/winreg/srv_winreg_nt.o \
728                   autoconf/librpc/gen_ndr/srv_winreg.o
729
730 RPC_DSSETUP_OBJ =  rpc_server/dssetup/srv_dssetup_nt.o autoconf/librpc/gen_ndr/srv_dssetup.o
731
732 RPC_SRVSVC_OBJ = rpc_server/srvsvc/srv_srvsvc_nt.o \
733                  autoconf/librpc/gen_ndr/srv_srvsvc.o
734
735 RPC_WKSSVC_OBJ =  autoconf/librpc/gen_ndr/srv_wkssvc.o \
736                   rpc_server/wkssvc/srv_wkssvc_nt.o
737
738 RPC_SVCCTL_OBJ =  rpc_server/svcctl/srv_svcctl_nt.o \
739                   rpc_server/svcctl/srv_svcctl_reg.o \
740                   autoconf/librpc/gen_ndr/srv_svcctl.o \
741                   services/svc_winreg_glue.o \
742                   services/svc_spoolss.o services/svc_rcinit.o  \
743                   services/svc_netlogon.o services/svc_winreg.o \
744                   services/svc_wins.o
745
746 RPC_NTSVCS_OBJ = rpc_server/ntsvcs/srv_ntsvcs_nt.o \
747                  autoconf/librpc/gen_ndr/srv_ntsvcs.o
748
749 RPC_NETDFS_OBJ =  autoconf/librpc/gen_ndr/srv_dfs.o \
750                   rpc_server/dfs/srv_dfs_nt.o
751
752 RPC_SPOOLSS_OBJ = rpc_server/spoolss/srv_spoolss_nt.o \
753                   rpc_server/spoolss/srv_spoolss_util.o \
754                   autoconf/librpc/gen_ndr/srv_spoolss.o
755
756 RPC_EVENTLOG_OBJ = rpc_server/eventlog/srv_eventlog_nt.o \
757                    rpc_server/eventlog/srv_eventlog_reg.o \
758                    $(LIB_EVENTLOG_OBJ) autoconf/librpc/gen_ndr/srv_eventlog.o
759
760 NPA_TSTREAM_OBJ = ../libcli/named_pipe_auth/npa_tstream.o \
761                   autoconf/librpc/gen_ndr/ndr_named_pipe_auth.o \
762                   ../auth/auth_sam_reply.o autoconf/librpc/gen_ndr/ndr_auth.o ../librpc/ndr/ndr_auth.o
763
764 RPC_NCACN_NP = rpc_server/srv_pipe_register.o rpc_server/rpc_ncacn_np.o \
765                rpc_server/rpc_handles.o rpc_server/rpc_contexts.o \
766                rpc_server/srv_access_check.o
767
768 RPC_CONFIG = rpc_server/rpc_config.o
769
770 RPC_SERVICE = rpc_server/rpc_server.o
771
772 RPC_CRYPTO = rpc_server/dcesrv_auth_generic.o
773
774 RPC_PIPE_OBJ = rpc_server/srv_pipe.o rpc_server/srv_pipe_hnd.o \
775                $(RPC_CONFIG) $(RPC_NCACN_NP) $(RPC_SERVICE) $(RPC_CRYPTO)
776
777 RPC_RPCECHO_OBJ = rpc_server/echo/srv_echo_nt.o autoconf/librpc/gen_ndr/srv_echo.o
778
779 RPC_EPMAPPER_OBJ = rpc_server/epmapper/srv_epmapper.o autoconf/librpc/gen_ndr/srv_epmapper.o
780
781 RPC_SERVER_REGISTER_OBJ = rpc_server/rpc_ep_register.o $(DCE_RPC_EP_OBJ)
782
783 RPC_SERVER_OBJ = $(RPC_LSARPC_OBJ) $(RPC_WINREG_OBJ) $(RPC_INITSHUTDOWN_OBJ) \
784                  $(RPC_DSSETUP_OBJ) $(RPC_WKSSVC_OBJ) $(RPC_SVCCTL_OBJ) \
785                  $(RPC_NTSVCS_OBJ) $(RPC_NETLOGON_OBJ) $(RPC_NETDFS_OBJ) \
786                  $(RPC_SRVSVC_OBJ) $(RPC_SPOOLSS_OBJ) $(RPC_EVENTLOG_OBJ) \
787                  $(RPC_SAMR_OBJ) $(RPC_RPCECHO_OBJ) $(RPC_EPMAPPER_OBJ) \
788                  $(RPC_PIPE_OBJ) $(NPA_TSTREAM_OBJ) \
789                  $(LIBCLI_SPOOLSS_OBJ) \
790                  $(LIBCLI_WINREG_INT_OBJ) \
791                  $(LIBCLI_SRVSVC_OBJ) \
792                  $(LIBCLI_LSA_OBJ) \
793                  $(LIBCLI_SAMR_OBJ) \
794                  $(LIBCLI_NETLOGON_OBJ) \
795                  $(RPC_SERVER_REGISTER_OBJ) \
796                  $(RPC_CLIENT_SCHANNEL_OBJ) \
797                  rpc_server/rpc_sock_helper.o \
798                  rpc_server/rpc_service_setup.o \
799                  rpc_client/init_netlogon.o \
800                  rpc_client/init_samr.o
801
802 RPC_CLIENT_SCHANNEL_OBJ = rpc_client/cli_pipe_schannel.o
803
804 LOCKING_OBJ = locking/locking.o locking/brlock.o locking/posix.o \
805                 autoconf/librpc/gen_ndr/ndr_open_files.o locking/share_mode_lock.o
806
807 PRIVILEGES_BASIC_OBJ = ../libcli/security/privileges.o
808
809 PRIVILEGES_OBJ = lib/privileges.o
810
811 PASSDB_GET_SET_OBJ = passdb/pdb_get_set.o
812
813 PASSDB_OBJ = $(PASSDB_GET_SET_OBJ) passdb/passdb.o passdb/pdb_interface.o \
814                 lib/util_wellknown.o lib/util_builtin.o passdb/pdb_compat.o \
815                 lib/util_unixsids.o passdb/lookup_sid.o \
816                 passdb/login_cache.o @PDB_STATIC@ \
817                 passdb/account_pol.o $(PRIVILEGES_OBJ) \
818                 lib/util_nscd.o lib/winbind_util.o $(SERVER_MUTEX_OBJ) \
819                 passdb/pdb_util.o passdb/pdb_ldap_schema.o \
820                 passdb/pdb_secrets.o
821
822 DEVEL_HELP_WEIRD_OBJ = ../lib/util/charset/weird.o
823 CHARSET_MACOSXFS_OBJ = ../lib/util/charset/charset_macosxfs.o
824
825 GROUPDB_OBJ = groupdb/mapping.o groupdb/mapping_tdb.o
826
827 PROFILE_OBJ = profile/profile.o
828 PROFILES_OBJ = utils/profiles.o \
829                $(LIBSMB_ERR_OBJ) \
830                $(PARAM_OBJ) \
831                $(LIB_OBJ) $(LIB_DUMMY_OBJ) \
832                $(POPT_LIB_OBJ) \
833                $(REGFIO_OBJ)
834
835 OPLOCK_OBJ = smbd/oplock.o smbd/oplock_irix.o smbd/oplock_linux.o
836
837 NOTIFY_OBJ = smbd/notify.o smbd/notify_inotify.o smbd/notify_internal.o \
838              autoconf/librpc/gen_ndr/ndr_notify.o
839
840 FNAME_UTIL_OBJ = lib/filename_util.o
841
842 VFS_DEFAULT_OBJ = modules/vfs_default.o
843 VFS_AUDIT_OBJ = modules/vfs_audit.o
844 VFS_EXTD_AUDIT_OBJ = modules/vfs_extd_audit.o
845 VFS_FULL_AUDIT_OBJ = modules/vfs_full_audit.o
846 VFS_FAKE_PERMS_OBJ = modules/vfs_fake_perms.o
847 VFS_RECYCLE_OBJ = modules/vfs_recycle.o
848 VFS_NETATALK_OBJ = modules/vfs_netatalk.o
849 VFS_DEFAULT_QUOTA_OBJ = modules/vfs_default_quota.o
850 VFS_READONLY_OBJ = modules/vfs_readonly.o modules/getdate.o
851 VFS_CAP_OBJ = modules/vfs_cap.o
852 VFS_EXPAND_MSDFS_OBJ = modules/vfs_expand_msdfs.o
853 VFS_SHADOW_COPY_OBJ = modules/vfs_shadow_copy.o
854 VFS_SHADOW_COPY2_OBJ = modules/vfs_shadow_copy2.o
855 VFS_AFSACL_OBJ = modules/vfs_afsacl.o
856 VFS_XATTR_TDB_OBJ = modules/vfs_xattr_tdb.o lib/xattr_tdb.o
857 VFS_POSIXACL_OBJ = modules/vfs_posixacl.o
858 VFS_AIXACL_OBJ = modules/vfs_aixacl.o modules/vfs_aixacl_util.o
859 VFS_AIXACL2_OBJ = modules/vfs_aixacl2.o modules/vfs_aixacl_util.o modules/nfs4_acls.o
860 VFS_SOLARISACL_OBJ = modules/vfs_solarisacl.o
861 VFS_ZFSACL_OBJ = modules/vfs_zfsacl.o modules/nfs4_acls.o
862 VFS_HPUXACL_OBJ = modules/vfs_hpuxacl.o
863 VFS_IRIXACL_OBJ = modules/vfs_irixacl.o
864 VFS_TRU64ACL_OBJ = modules/vfs_tru64acl.o
865 VFS_CATIA_OBJ = modules/vfs_catia.o
866 VFS_STREAMS_XATTR_OBJ = modules/vfs_streams_xattr.o
867 VFS_STREAMS_DEPOT_OBJ = modules/vfs_streams_depot.o
868 VFS_CACHEPRIME_OBJ = modules/vfs_cacheprime.o
869 VFS_PREALLOC_OBJ = modules/vfs_prealloc.o
870 VFS_COMMIT_OBJ = modules/vfs_commit.o
871 VFS_GPFS_OBJ = modules/vfs_gpfs.o modules/gpfs.o modules/nfs4_acls.o
872 VFS_GPFS_HSM_NOTIFY_OBJ = modules/vfs_gpfs_hsm_notify.o
873 VFS_NOTIFY_FAM_OBJ = modules/vfs_notify_fam.o
874 VFS_READAHEAD_OBJ = modules/vfs_readahead.o
875 VFS_TSMSM_OBJ = modules/vfs_tsmsm.o
876 VFS_FILEID_OBJ = modules/vfs_fileid.o
877 VFS_AIO_FORK_OBJ = modules/vfs_aio_fork.o
878 VFS_AIO_PTHREAD_OBJ = modules/vfs_aio_pthread.o
879 VFS_AIO_LINUX_OBJ = modules/vfs_aio_linux.o
880 VFS_PREOPEN_OBJ = modules/vfs_preopen.o
881 VFS_SYNCOPS_OBJ = modules/vfs_syncops.o
882 VFS_ACL_XATTR_OBJ = modules/vfs_acl_xattr.o
883 VFS_ACL_TDB_OBJ = modules/vfs_acl_tdb.o
884 VFS_SMB_TRAFFIC_ANALYZER_OBJ = modules/vfs_smb_traffic_analyzer.o
885 PERFCOUNT_TEST_OBJ = modules/perfcount_test.o
886 VFS_DIRSORT_OBJ = modules/vfs_dirsort.o
887 VFS_SCANNEDONLY_OBJ = modules/vfs_scannedonly.o
888 VFS_CROSSRENAME_OBJ = modules/vfs_crossrename.o
889 VFS_LINUX_XFS_SGID_OBJ = modules/vfs_linux_xfs_sgid.o
890 VFS_TIME_AUDIT_OBJ = modules/vfs_time_audit.o
891
892 PAM_ERRORS_OBJ = ../libcli/auth/pam_errors.o
893 PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o $(PAM_ERRORS_OBJ)
894
895 SLCACHE_OBJ = libsmb/samlogon_cache.o
896
897 DCUTIL_OBJ  = libsmb/namequery_dc.o libsmb/trustdom_cache.o libsmb/trusts_util.o libsmb/dsgetdcname.o
898
899 AUTH_BUILTIN_OBJ = auth/auth_builtin.o
900 AUTH_DOMAIN_OBJ = auth/auth_domain.o
901 AUTH_SAM_OBJ = auth/auth_sam.o auth/check_samsec.o
902 AUTH_UNIX_OBJ = auth/auth_unix.o
903 AUTH_WINBIND_OBJ = auth/auth_winbind.o
904 AUTH_WBC_OBJ = auth/auth_wbc.o
905 AUTH_SCRIPT_OBJ = auth/auth_script.o
906 AUTH_NETLOGOND_OBJ = auth/auth_netlogond.o
907
908 AUTH_OBJ = auth/auth.o @AUTH_STATIC@ auth/auth_util.o auth/token_util.o \
909            auth/server_info.o \
910            auth/server_info_sam.o \
911            auth/user_info.o \
912            auth/user_util.o \
913            auth/user_krb5.o \
914            auth/auth_ntlmssp.o auth/auth_generic.o \
915            $(PLAINTEXT_AUTH_OBJ) $(SLCACHE_OBJ) $(DCUTIL_OBJ)
916
917 MANGLE_OBJ = smbd/mangle.o smbd/mangle_hash.o smbd/mangle_hash2.o
918
919 SMBD_OBJ_MAIN = smbd/server.o smbd/server_exit.o
920
921 BUILDOPT_OBJ = smbd/build_options.o
922
923 SMBD_OBJ_SRV = smbd/server_reload.o \
924                smbd/files.o smbd/connection.o \
925                smbd/utmp.o smbd/session.o \
926                smbd/dfree.o smbd/dir.o smbd/password.o smbd/conn.o smbd/conn_idle.o smbd/conn_msg.o \
927                smbd/share_access.o smbd/fileio.o \
928                smbd/ipc.o smbd/lanman.o smbd/negprot.o \
929                smbd/message.o smbd/nttrans.o smbd/pipes.o \
930                smbd/reply.o smbd/sesssetup.o smbd/trans2.o smbd/uid.o \
931                smbd/dosmode.o smbd/filename.o smbd/open.o smbd/close.o \
932                smbd/blocking.o smbd/sec_ctx.o smbd/srvstr.o \
933                smbd/vfs.o smbd/perfcount.o smbd/statcache.o smbd/seal.o \
934                smbd/posix_acls.o lib/sysacls.o \
935                smbd/process.o smbd/service.o param/service.o smbd/error.o \
936                rpc_server/epmd.o \
937                rpc_server/lsasd.o \
938                printing/printspoolss.o printing/spoolssd.o \
939                lib/sysquotas.o lib/sysquotas_linux.o \
940                lib/sysquotas_xfs.o lib/sysquotas_4A.o \
941                lib/sysquotas_nfs.o \
942                lib/smbd_shim.o \
943                lib/background.o \
944                smbd/fake_file.o \
945                smbd/quotas.o smbd/ntquotas.o $(AFS_OBJ) smbd/msdfs.o \
946                $(AFS_SETTOKEN_OBJ) smbd/aio.o smbd/statvfs.o \
947                smbd/dmapi.o smbd/signing.o \
948                smbd/file_access.o \
949                smbd/dnsregister.o smbd/globals.o \
950                smbd/smb2_server.o \
951                smbd/smb2_glue.o \
952                smbd/smb2_negprot.o \
953                smbd/smb2_sesssetup.o \
954                smbd/smb2_tcon.o \
955                smbd/smb2_create.o \
956                smbd/smb2_close.o \
957                smbd/smb2_flush.o \
958                smbd/smb2_read.o \
959                smbd/smb2_write.o \
960                smbd/smb2_lock.o \
961                smbd/smb2_ioctl.o \
962                smbd/smb2_keepalive.o \
963                smbd/smb2_find.o \
964                smbd/smb2_notify.o \
965                smbd/smb2_getinfo.o \
966                smbd/smb2_setinfo.o \
967                smbd/smb2_break.o \
968                $(MANGLE_OBJ) @VFS_STATIC@
969
970 SMBD_OBJ_BASE = $(PARAM_WITHOUT_REG_OBJ) $(SMBD_OBJ_SRV) $(LIBSMB_OBJ) \
971                 $(RPC_SERVER_OBJ) \
972                 $(LOCKING_OBJ) $(PASSDB_OBJ) $(PRINTING_OBJ) $(PROFILE_OBJ) \
973                 $(LIB_OBJ) $(PRINTBACKEND_OBJ) $(OPLOCK_OBJ) \
974                 $(NOTIFY_OBJ) $(FNAME_UTIL_OBJ) $(GROUPDB_OBJ) $(AUTH_OBJ) \
975                 $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(AVAHI_OBJ) \
976                 $(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(LIBADS_SERVER_OBJ) $(LIBADS_PRINTER_OBJ) \
977                 $(REG_FULL_OBJ) $(POPT_LIB_OBJ) $(BUILDOPT_OBJ) \
978                 $(SMBLDAP_OBJ) $(LIBNET_OBJ) \
979                 $(LIBSMBCONF_OBJ) \
980                 $(PRIVILEGES_BASIC_OBJ) \
981                 $(REGFIO_OBJ) \
982                 $(REG_API_REGF_OBJ) \
983                 $(LIBNDR_XATTR_OBJ)
984
985 PRINTING_OBJ = printing/pcap.o printing/print_svid.o printing/print_aix.o \
986                printing/print_cups.o printing/print_generic.o \
987                printing/lpq_parse.o printing/load.o \
988                printing/print_iprint.o printing/print_standard.o \
989                printing/printer_list.o autoconf/librpc/gen_ndr/ndr_printcap.o
990
991 PRINTBASE_OBJ = printing/notify.o printing/printing_db.o
992 PRINTBACKEND_OBJ = printing/printing.o \
993                    printing/nt_printing.o \
994                    printing/nt_printing_tdb.o \
995                    printing/nt_printing_migrate.o \
996                    printing/nt_printing_migrate_internal.o \
997                    printing/nt_printing_ads.o \
998                    autoconf/librpc/gen_ndr/ndr_ntprinting.o \
999                     ../librpc/ndr/ndr_ntprinting.o \
1000                    printing/queue_process.o \
1001                    $(PRINTBASE_OBJ)
1002
1003 SMBD_OBJ = $(SMBD_OBJ_BASE) $(SMBD_OBJ_MAIN)
1004
1005 NMBD_OBJ1 = nmbd/asyncdns.o nmbd/nmbd.o nmbd/nmbd_become_dmb.o \
1006             nmbd/nmbd_become_lmb.o nmbd/nmbd_browserdb.o \
1007             nmbd/nmbd_browsesync.o nmbd/nmbd_elections.o \
1008             nmbd/nmbd_incomingdgrams.o nmbd/nmbd_incomingrequests.o \
1009             nmbd/nmbd_lmhosts.o nmbd/nmbd_logonnames.o nmbd/nmbd_mynames.o \
1010             nmbd/nmbd_namelistdb.o nmbd/nmbd_namequery.o \
1011             nmbd/nmbd_nameregister.o nmbd/nmbd_namerelease.o \
1012             nmbd/nmbd_nodestatus.o nmbd/nmbd_packets.o \
1013             nmbd/nmbd_processlogon.o nmbd/nmbd_responserecordsdb.o \
1014             nmbd/nmbd_sendannounce.o nmbd/nmbd_serverlistdb.o \
1015             nmbd/nmbd_subnetdb.o nmbd/nmbd_winsproxy.o nmbd/nmbd_winsserver.o \
1016             nmbd/nmbd_workgroupdb.o nmbd/nmbd_synclists.o
1017
1018 NMBD_OBJ = $(NMBD_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
1019            $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
1020            $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ)
1021
1022 SWAT_OBJ1 = web/cgi.o web/diagnose.o web/startstop.o web/statuspage.o \
1023            web/swat.o web/neg_lang.o
1024
1025 SWAT_OBJ = $(SWAT_OBJ1) $(PARAM_OBJ) $(PRINTING_OBJ) $(PRINTBASE_OBJ) $(LIBSMB_OBJ) \
1026            $(LOCKING_OBJ) $(PASSDB_OBJ) $(KRBCLIENT_OBJ) \
1027            $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) $(PLAINTEXT_AUTH_OBJ) \
1028            $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ) \
1029            $(PASSCHANGE_OBJ) $(FNAME_UTIL_OBJ) \
1030            $(LIBCLI_SAMR_OBJ) \
1031            rpc_client/init_lsa.o
1032
1033 STATUS_OBJ = utils/status.o utils/status_profile.o \
1034              $(LOCKING_OBJ) $(PARAM_OBJ) \
1035              smbd/notify_internal.o autoconf/librpc/gen_ndr/ndr_notify.o \
1036              $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
1037              $(LIBSMB_ERR_OBJ) $(FNAME_UTIL_OBJ)
1038
1039 SMBCONTROL_OBJ = utils/smbcontrol.o $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1040         $(LIBSMB_ERR_OBJ) $(POPT_LIB_OBJ) $(PRINTBASE_OBJ)
1041
1042 SMBTREE_OBJ = utils/smbtree.o $(PARAM_OBJ) \
1043              $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSMB_OBJ) \
1044              $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
1045              $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
1046              $(LIBMSRPC_GEN_OBJ) \
1047              $(LIBMSRPC_OBJ) \
1048              $(LIBCLI_SRVSVC_OBJ)
1049
1050 TESTPARM_OBJ = utils/testparm.o \
1051                $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
1052                $(LIBSMB_ERR_OBJ)
1053
1054 SMBTA_UTIL_OBJ = utils/smbta-util.o $(PARAM_OBJ) $(POPT_LIB_OBJ) \
1055         $(LIB_NONSMBD_OBJ) \
1056         $(LIBSMB_ERR_OBJ) $(FNAME_UTIL_OBJ)
1057
1058 TEST_LP_LOAD_OBJ = param/test_lp_load.o \
1059                    $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1060                    $(POPT_LIB_OBJ) $(LIBSAMBA_OBJ)
1061
1062 PASSWD_UTIL_OBJ = utils/passwd_util.o
1063
1064 SMBPASSWD_OBJ = utils/smbpasswd.o $(PASSWD_UTIL_OBJ) $(PASSCHANGE_OBJ) \
1065                 $(PARAM_OBJ) $(LIBSMB_OBJ) $(PASSDB_OBJ) \
1066                 $(GROUPDB_OBJ) $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \
1067                 $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) \
1068                 $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ) \
1069                 $(LIBCLI_SAMR_OBJ) \
1070                 rpc_client/init_lsa.o
1071
1072 PDBEDIT_OBJ = utils/pdbedit.o $(PASSWD_UTIL_OBJ) $(PARAM_OBJ) $(PASSDB_OBJ) \
1073                 $(AFS_SETTOKEN_OBJ) \
1074                 $(LIB_NONSMBD_OBJ) $(GROUPDB_OBJ) \
1075                 $(LIBSMB_ERR_OBJ0) $(LIBSMB_ERR_OBJ1) $(SECRETS_OBJ) \
1076                 $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) \
1077                 ../lib/util/asn1.o $(LIBCLI_LDAP_NDR_OBJ) \
1078                 $(LIBNDR_DRSUAPI_OBJ) $(LIBNDR_GEN_OBJ0) $(COMPRESSION_OBJ)
1079
1080 SMBGET_OBJ = utils/smbget.o $(POPT_LIB_OBJ) $(LIBSMBCLIENT_OBJ1)
1081
1082 DISPLAY_SEC_OBJ= ../libcli/security/display_sec.o
1083
1084 RPCCLIENT_OBJ1 = rpcclient/rpcclient.o rpcclient/cmd_lsarpc.o \
1085                  rpcclient/cmd_samr.o rpcclient/cmd_spoolss.o \
1086                  rpcclient/cmd_netlogon.o rpcclient/cmd_srvsvc.o \
1087                  rpcclient/cmd_dfs.o rpcclient/cmd_epmapper.o \
1088                  rpcclient/cmd_dssetup.o rpcclient/cmd_echo.o \
1089                  rpcclient/cmd_shutdown.o rpcclient/cmd_test.o \
1090                  rpcclient/cmd_wkssvc.o rpcclient/cmd_ntsvcs.o \
1091                  rpcclient/cmd_drsuapi.o rpcclient/cmd_eventlog.o \
1092                  rpcclient/cmd_winreg.o \
1093                  $(DISPLAY_SEC_OBJ)
1094
1095 RPCCLIENT_OBJ = $(RPCCLIENT_OBJ1) \
1096              $(PARAM_OBJ) $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) \
1097              $(PASSDB_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBMSRPC_OBJ) \
1098              $(READLINE_OBJ) $(GROUPDB_OBJ) $(KRBCLIENT_OBJ) \
1099              $(LIBADS_OBJ) $(POPT_LIB_OBJ) \
1100              $(SMBLDAP_OBJ) $(DCUTIL_OBJ) \
1101              $(LIBCLI_SPOOLSS_OBJ) \
1102              $(LIBCLI_EVENTLOG_OBJ) \
1103              $(LIBCLI_NTSVCS_OBJ) \
1104              $(LIBCLI_DRSUAPI_OBJ) \
1105              $(LIBCLI_DFS_OBJ) \
1106              $(LIBCLI_ECHO_OBJ) \
1107              $(LIBCLI_DSSETUP_OBJ) \
1108              $(LIBCLI_WKSSVC_OBJ) \
1109              $(LIBCLI_SRVSVC_OBJ) \
1110              $(LIBCLI_LSA_OBJ) \
1111              $(LIBCLI_SAMR_OBJ) \
1112              $(LIBCLI_WINREG_OBJ) \
1113              $(LIBCLI_NETLOGON_OBJ) \
1114              $(RPC_CLIENT_SCHANNEL_OBJ) \
1115              rpc_client/init_netlogon.o \
1116              rpc_client/init_samr.o
1117
1118 PAM_WINBIND_OBJ = ../nsswitch/pam_winbind.o $(WBCOMMON_OBJ) \
1119                   $(LIBREPLACE_OBJ) @BUILD_INIPARSER@
1120
1121 LIBSMBCLIENT_THREAD_OBJ = \
1122                         libsmb/libsmb_thread_impl.o \
1123                         libsmb/libsmb_thread_posix.o
1124
1125 LIBSMBCLIENT_OBJ0 = \
1126                     libsmb/libsmb_cache.o \
1127                     libsmb/libsmb_compat.o \
1128                     libsmb/libsmb_context.o \
1129                     libsmb/libsmb_dir.o \
1130                     libsmb/libsmb_file.o \
1131                     libsmb/libsmb_misc.o \
1132                     libsmb/libsmb_path.o \
1133                     libsmb/libsmb_printjob.o \
1134                     libsmb/libsmb_server.o \
1135                     libsmb/libsmb_stat.o \
1136                     libsmb/libsmb_xattr.o \
1137                     libsmb/libsmb_setget.o
1138
1139 LIBSMBCLIENT_OBJ1 = $(LIBSMBCLIENT_OBJ0) \
1140                     $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1141                     $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
1142                     $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
1143                     $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
1144                     $(LIBCLI_SRVSVC_OBJ) \
1145                     $(LIBCLI_LSA_OBJ)
1146
1147 LIBSMBCLIENT_OBJ = $(LIBSMBCLIENT_OBJ1)
1148
1149 CLIENT_OBJ1 = client/client.o client/clitar.o \
1150               client/dnsbrowse.o \
1151               $(LIBMSRPC_OBJ)
1152
1153 CLIENT_OBJ = $(CLIENT_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) \
1154              $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) $(LIBMSRPC_GEN_OBJ) \
1155              $(READLINE_OBJ) $(POPT_LIB_OBJ) \
1156              $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
1157              $(DISPLAY_SEC_OBJ) \
1158              $(LIBCLI_SRVSVC_OBJ)
1159
1160 LIBSMBCONF_OBJ = ../lib/smbconf/smbconf.o \
1161                  ../lib/smbconf/smbconf_util.o \
1162                  ../lib/smbconf/smbconf_txt.o \
1163                  lib/smbconf/smbconf_reg.o \
1164                  lib/smbconf/smbconf_init.o
1165
1166 SMBCONFTORT_OBJ0 = lib/smbconf/testsuite.o
1167
1168 SMBCONFTORT_OBJ = $(SMBCONFTORT_OBJ0) \
1169                   $(LIB_NONSMBD_OBJ) \
1170                   $(PARAM_OBJ) \
1171                   $(LIBSMB_ERR_OBJ) \
1172                   $(POPT_LIB_OBJ)
1173
1174 PTHREADPOOLTEST_OBJ = lib/pthreadpool/pthreadpool.o \
1175                 lib/pthreadpool/tests.o
1176
1177 LIBNET_OBJ = libnet/libnet_join.o \
1178              libnet/libnet_keytab.o \
1179              autoconf/librpc/gen_ndr/ndr_libnet_join.o
1180
1181 LIBNET_DSSYNC_OBJ = libnet/libnet_dssync.o \
1182                     libnet/libnet_dssync_passdb.o \
1183                     libnet/libnet_dssync_keytab.o \
1184                     ../libcli/drsuapi/repl_decrypt.o
1185
1186 LIBNET_SAMSYNC_OBJ = libnet/libnet_samsync.o \
1187                      libnet/libnet_samsync_ldif.o \
1188                      libnet/libnet_samsync_passdb.o \
1189                      libnet/libnet_samsync_display.o \
1190                      libnet/libnet_samsync_keytab.o \
1191                      ../libcli/samsync/decrypt.o
1192
1193 NET_OBJ1 = utils/net.o utils/net_ads.o utils/net_help.o \
1194            utils/net_rap.o utils/net_rpc.o utils/net_rpc_samsync.o \
1195            utils/net_rpc_join.o utils/net_time.o utils/net_lookup.o \
1196            utils/net_cache.o utils/net_groupmap.o utils/net_idmap.o \
1197            utils/net_idmap_check.o utils/interact.o \
1198            utils/net_status.o utils/net_rpc_printer.o utils/net_rpc_rights.o \
1199            utils/net_rpc_service.o utils/net_rpc_registry.o utils/net_usershare.o \
1200            utils/netlookup.o utils/net_sam.o utils/net_rpc_shell.o \
1201            utils/net_util.o utils/net_rpc_sh_acct.o utils/net_rpc_audit.o \
1202            $(PASSWD_UTIL_OBJ) utils/net_dns.o utils/net_ads_gpo.o \
1203            utils/net_conf.o utils/net_join.o utils/net_user.o \
1204            utils/net_group.o utils/net_file.o utils/net_registry.o utils/net_registry_check.o\
1205            auth/token_util.o utils/net_dom.o utils/net_share.o \
1206            utils/net_g_lock.o \
1207            utils/net_serverid.o \
1208            utils/net_eventlog.o \
1209            utils/net_printing.o \
1210            utils/net_rpc_trust.o \
1211            utils/net_rpc_conf.o\
1212            $(LIBNDR_NTPRINTING_OBJ) \
1213            $(LIBNDR_PREG_OBJ) \
1214            $(LIBCLI_SPOOLSS_OBJ) \
1215            $(LIBCLI_WINREG_OBJ) \
1216            $(LIBCLI_DRSUAPI_OBJ) \
1217            $(LIBCLI_INITSHUTDOWN_OBJ) \
1218            $(LIBCLI_DSSETUP_OBJ) \
1219            $(LIBCLI_SVCCTL_OBJ) \
1220            $(LIBCLI_WKSSVC_OBJ) \
1221            $(LIBCLI_SRVSVC_OBJ) \
1222            $(LIBCLI_LSA_OBJ) \
1223            $(LIBCLI_SAMR_OBJ) \
1224            $(LIBCLI_NETLOGON_OBJ) \
1225            $(RPC_CLIENT_SCHANNEL_OBJ) \
1226            rpc_client/init_netlogon.o \
1227            rpc_client/init_samr.o \
1228            registry/reg_parse.o registry/reg_format.o \
1229            registry/reg_import.o \
1230            printing/nt_printing_migrate.o
1231
1232 # these are not processed by make proto
1233 NET_OBJ2 = utils/net_registry_util.o utils/net_help_common.o
1234
1235 NET_OBJ = $(NET_OBJ1) \
1236           $(NET_OBJ2) @FAKE_KASERVER_OBJ@\
1237           $(PARAM_WITHOUT_REG_OBJ) $(LIBSMB_OBJ) \
1238           $(PASSDB_OBJ) $(GROUPDB_OBJ) \
1239           $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(LIBADDNS_OBJ0) \
1240           $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
1241           $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) $(LIBADS_PRINTER_OBJ) $(POPT_LIB_OBJ) \
1242           $(SMBLDAP_OBJ) $(DCUTIL_OBJ) \
1243           $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) $(READLINE_OBJ) \
1244           $(LIBGPO_OBJ) @BUILD_INIPARSER@ $(DISPLAY_SEC_OBJ) \
1245           $(REG_SMBCONF_OBJ) \
1246           $(LIBNET_OBJ) $(LIBNET_DSSYNC_OBJ) $(LIBNET_SAMSYNC_OBJ) \
1247           $(LIBSMBCONF_OBJ) \
1248           $(REGFIO_OBJ) \
1249           $(PRIVILEGES_BASIC_OBJ) \
1250           $(LIB_EVENTLOG_OBJ)
1251
1252 CUPS_OBJ = client/smbspool.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
1253                 $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
1254                 $(AFS_SETTOKEN_OBJ) $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ)
1255
1256 NMBLOOKUP_OBJ = utils/nmblookup.o $(PARAM_OBJ) $(LIBNMB_OBJ) \
1257                $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) $(LIBSMB_ERR_OBJ)
1258
1259 SMBTORTURE_OBJ1 = torture/torture.o torture/nbio.o torture/scanner.o torture/utable.o \
1260                 torture/denytest.o torture/mangle_test.o \
1261                 torture/nbench.o \
1262                 torture/test_async_echo.o \
1263                 torture/test_smbsock_any_connect.o \
1264                 torture/test_nttrans_create.o \
1265                 torture/test_nttrans_fsctl.o \
1266                 torture/test_notify_online.o \
1267                 torture/test_addrchange.o \
1268                 torture/test_case_insensitive.o \
1269                 torture/test_posix_append.o \
1270                 torture/test_smb2.o \
1271                 torture/test_chain3.o \
1272                 torture/test_authinfo_structs.o \
1273                 torture/test_cleanup.o \
1274                 torture/test_ctdbconn.o \
1275                 torture/test_msg.o \
1276                 torture/test_notify.o \
1277                 torture/test_dbwrap_watch.o \
1278                 torture/test_idmap_tdb_common.o \
1279                 torture/t_strappend.o
1280
1281 SMBTORTURE_OBJ = $(SMBTORTURE_OBJ1) $(PARAM_OBJ) $(TLDAP_OBJ) \
1282         $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(LOCKING_OBJ) \
1283         @LIBWBCLIENT_STATIC@ \
1284         torture/wbc_async.o \
1285         ../nsswitch/wb_reqtrans.o \
1286         ../libcli/lsarpc/util_lsarpc.o \
1287         lib/filename_util.o \
1288         $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(LIBCLI_ECHO_OBJ)
1289
1290 MASKTEST_OBJ = torture/masktest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
1291                 $(LIB_NONSMBD_OBJ) \
1292                 $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ)
1293
1294 MSGTEST_OBJ = torture/msgtest.o $(PARAM_OBJ) $(LIBSMB_ERR_OBJ) \
1295                  $(LIB_NONSMBD_OBJ) \
1296                  $(LIBNDR_GEN_OBJ0)
1297
1298 LOCKTEST_OBJ = torture/locktest.o $(PARAM_OBJ) $(LOCKING_OBJ) $(KRBCLIENT_OBJ) \
1299                 $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) \
1300                 $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(FNAME_UTIL_OBJ)
1301
1302 NSSTEST_OBJ = ../nsswitch/nsstest.o $(LIBSAMBAUTIL_OBJ)
1303
1304 PDBTEST_OBJ = torture/pdbtest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
1305                 $(LIB_NONSMBD_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
1306                 $(SMBLDAP_OBJ) $(POPT_LIB_OBJ) \
1307                 $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ)
1308
1309 VFSTEST_OBJ = torture/cmd_vfs.o torture/vfstest.o $(SMBD_OBJ_BASE) $(READLINE_OBJ) \
1310                 torture/vfstest_chain.o
1311
1312 LOG2PCAP_OBJ = utils/log2pcaphex.o
1313
1314 LOCKTEST2_OBJ = torture/locktest2.o $(PARAM_OBJ) $(LOCKING_OBJ) $(LIBSMB_OBJ) \
1315                 $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) \
1316                 $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(FNAME_UTIL_OBJ)
1317
1318 SMBCACLS_OBJ = utils/smbcacls.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
1319                 $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) \
1320                 $(PASSDB_OBJ) $(GROUPDB_OBJ) $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
1321                 $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) \
1322                 $(LIBCLI_LSA_OBJ)
1323
1324 SMBCQUOTAS_OBJ = utils/smbcquotas.o $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
1325                 $(PARAM_OBJ) \
1326                 $(LIB_NONSMBD_OBJ) \
1327                 $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) $(POPT_LIB_OBJ) \
1328                 $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
1329                 $(LIBCLI_LSA_OBJ)
1330
1331 EVTLOGADM_OBJ0  = utils/eventlogadm.o
1332
1333 EVTLOGADM_OBJ   = $(EVTLOGADM_OBJ0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1334                 $(LIBSMB_ERR_OBJ) $(LIB_EVENTLOG_OBJ) \
1335                 autoconf/librpc/gen_ndr/ndr_eventlog.o \
1336                 autoconf/librpc/gen_ndr/ndr_lsa.o
1337
1338 SHARESEC_OBJ0 = utils/sharesec.o
1339 SHARESEC_OBJ  = $(SHARESEC_OBJ0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1340                 $(LIBSMB_ERR_OBJ) \
1341                 $(POPT_LIB_OBJ)
1342
1343 TALLOCTORT_OBJ = @tallocdir@/testsuite.o @tallocdir@/testsuite_main.o \
1344                 $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBSMB_ERR_OBJ)
1345
1346 REPLACETORT_OBJ = @libreplacedir@/test/testsuite.o \
1347                 @libreplacedir@/test/getifaddrs.o \
1348                 @libreplacedir@/test/os2_delete.o \
1349                 @libreplacedir@/test/strptime.o \
1350                 @libreplacedir@/test/main.o \
1351                 $(LIBREPLACE_OBJ) $(SOCKET_WRAPPER_OBJ)
1352
1353 DEBUG2HTML_OBJ = utils/debug2html.o utils/debugparse.o
1354
1355 SMBFILTER_OBJ = utils/smbfilter.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
1356                 $(LIB_NONSMBD_OBJ) $(KRBCLIENT_OBJ) \
1357                 $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ)
1358
1359 WINBIND_WINS_NSS_OBJ = ../nsswitch/wins.o $(PARAM_OBJ) \
1360         $(LIB_NONSMBD_OBJ) $(LIBSMB_ERR_OBJ) $(LIBNMB_OBJ)
1361
1362 PAM_SMBPASS_OBJ_0 = pam_smbpass/pam_smb_auth.o pam_smbpass/pam_smb_passwd.o \
1363                 pam_smbpass/pam_smb_acct.o pam_smbpass/support.o
1364 PAM_SMBPASS_OBJ = $(PAM_SMBPASS_OBJ_0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
1365                 $(SMBLDAP_OBJ) \
1366                 $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
1367                 $(AFS_SETTOKEN_OBJ) \
1368                 $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
1369                 $(PAM_ERRORS_OBJ)
1370
1371 IDMAP_RW_OBJ = winbindd/idmap_rw.o
1372
1373 IDMAP_TDB_COMMON_OBJ = winbindd/idmap_tdb_common.o
1374
1375 IDMAP_UTIL_OBJ = winbindd/idmap_util.o $(IDMAP_RW_OBJ) \
1376                  $(IDMAP_TDB_COMMON_OBJ)
1377
1378 IDMAP_OBJ     =  winbindd/idmap.o $(IDMAP_UTIL_OBJ) @IDMAP_STATIC@
1379
1380 NSS_INFO_OBJ = winbindd/nss_info.o @NSS_INFO_STATIC@
1381
1382 IDMAP_HASH_OBJ = \
1383                 winbindd/idmap_hash/idmap_hash.o \
1384                 winbindd/idmap_hash/mapfile.o
1385
1386 IDMAP_ADEX_OBJ = \
1387                 winbindd/idmap_adex/idmap_adex.o \
1388                 winbindd/idmap_adex/cell_util.o \
1389                 winbindd/idmap_adex/likewise_cell.o \
1390                 winbindd/idmap_adex/provider_unified.o \
1391                 winbindd/idmap_adex/gc_util.o \
1392                 winbindd/idmap_adex/domain_util.o
1393
1394 WINBINDD_OBJ1 = \
1395                 winbindd/winbindd.o       \
1396                 winbindd/winbindd_group.o \
1397                 winbindd/winbindd_util.o  \
1398                 winbindd/winbindd_cache.o \
1399                 winbindd/winbindd_pam.o   \
1400                 winbindd/winbindd_misc.o  \
1401                 winbindd/winbindd_cm.o    \
1402                 winbindd/winbindd_wins_byip.o  \
1403                 winbindd/winbindd_wins_byname.o  \
1404                 winbindd/winbindd_msrpc.o \
1405                 winbindd/winbindd_rpc.o   \
1406                 winbindd/winbindd_reconnect.o \
1407                 winbindd/winbindd_ads.o   \
1408                 winbindd/winbindd_samr.o \
1409                 winbindd/winbindd_dual.o  \
1410                 winbindd/winbindd_dual_ndr.o  \
1411                 winbindd/winbindd_dual_srv.o  \
1412                 autoconf/librpc/gen_ndr/ndr_wbint_c.o \
1413                 autoconf/librpc/gen_ndr/srv_wbint.o \
1414                 autoconf/librpc/gen_ndr/ndr_wbint.o \
1415                 autoconf/librpc/gen_ndr/ndr_idmap.o \
1416                 winbindd/winbindd_async.o \
1417                 winbindd/winbindd_creds.o \
1418                 winbindd/winbindd_cred_cache.o \
1419                 winbindd/winbindd_ccache_access.o \
1420                 winbindd/winbindd_domain.o \
1421                 winbindd/winbindd_idmap.o \
1422                 winbindd/winbindd_locator.o \
1423                 winbindd/winbindd_ndr.o \
1424                 winbindd/wb_ping.o \
1425                 winbindd/wb_lookupsid.o \
1426                 winbindd/wb_lookupsids.o \
1427                 winbindd/wb_lookupname.o \
1428                 winbindd/wb_sid2uid.o \
1429                 winbindd/wb_sid2gid.o \
1430                 winbindd/wb_uid2sid.o \
1431                 winbindd/wb_gid2sid.o \
1432                 winbindd/wb_queryuser.o \
1433                 winbindd/wb_lookupuseraliases.o \
1434                 winbindd/wb_lookupusergroups.o \
1435                 winbindd/wb_getpwsid.o \
1436                 winbindd/wb_gettoken.o \
1437                 winbindd/wb_seqnum.o \
1438                 winbindd/wb_seqnums.o \
1439                 winbindd/wb_group_members.o \
1440                 winbindd/wb_getgrsid.o \
1441                 winbindd/wb_query_user_list.o \
1442                 winbindd/wb_fill_pwent.o \
1443                 winbindd/wb_next_pwent.o \
1444                 winbindd/wb_next_grent.o \
1445                 winbindd/wb_dsgetdcname.o \
1446                 winbindd/winbindd_lookupsid.o \
1447                 winbindd/winbindd_lookupsids.o \
1448                 winbindd/winbindd_lookupname.o \
1449                 winbindd/winbindd_sid_to_uid.o \
1450                 winbindd/winbindd_sid_to_gid.o \
1451                 winbindd/winbindd_uid_to_sid.o \
1452                 winbindd/winbindd_gid_to_sid.o \
1453                 winbindd/winbindd_sids_to_xids.o \
1454                 winbindd/winbindd_allocate_uid.o \
1455                 winbindd/winbindd_allocate_gid.o \
1456                 winbindd/winbindd_getpwsid.o \
1457                 winbindd/winbindd_getpwnam.o \
1458                 winbindd/winbindd_getpwuid.o \
1459                 winbindd/winbindd_getsidaliases.o \
1460                 winbindd/winbindd_getuserdomgroups.o \
1461                 winbindd/winbindd_getgroups.o \
1462                 winbindd/winbindd_show_sequence.o \
1463                 winbindd/winbindd_getgrgid.o \
1464                 winbindd/winbindd_getgrnam.o \
1465                 winbindd/winbindd_getusersids.o \
1466                 winbindd/winbindd_lookuprids.o \
1467                 winbindd/winbindd_setpwent.o \
1468                 winbindd/winbindd_getpwent.o \
1469                 winbindd/winbindd_endpwent.o \
1470                 winbindd/winbindd_setgrent.o \
1471                 winbindd/winbindd_getgrent.o \
1472                 winbindd/winbindd_endgrent.o \
1473                 winbindd/winbindd_dsgetdcname.o \
1474                 winbindd/winbindd_getdcname.o \
1475                 winbindd/winbindd_list_users.o \
1476                 winbindd/winbindd_list_groups.o \
1477                 winbindd/winbindd_check_machine_acct.o \
1478                 winbindd/winbindd_change_machine_acct.o \
1479                 winbindd/winbindd_ping_dc.o \
1480                 winbindd/winbindd_pam_auth.o \
1481                 winbindd/winbindd_pam_auth_crap.o \
1482                 winbindd/winbindd_pam_chauthtok.o \
1483                 winbindd/winbindd_pam_chng_pswd_auth_crap.o \
1484                 winbindd/winbindd_pam_logoff.o \
1485                 auth/auth_util.o \
1486                 auth/token_util.o \
1487                 auth/user_util.o \
1488                 auth/check_samsec.o \
1489                 auth/server_info.o \
1490                 auth/server_info_sam.o \
1491                 auth/user_info.o \
1492                 auth/pampass.o \
1493                 ../nsswitch/wb_reqtrans.o
1494
1495 WINBINDD_OBJ = \
1496                 $(WINBINDD_OBJ1) $(PASSDB_OBJ) $(GROUPDB_OBJ) \
1497                 $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1498                 $(LIBSMB_OBJ) $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
1499                 $(PROFILE_OBJ) $(SLCACHE_OBJ) $(SMBLDAP_OBJ) \
1500                 $(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(POPT_LIB_OBJ) \
1501                 $(DCUTIL_OBJ) $(IDMAP_OBJ) $(NSS_INFO_OBJ) \
1502                 $(RPC_CONFIG) $(RPC_NCACN_NP) \
1503                 $(RPC_SAMR_OBJ) $(RPC_LSARPC_OBJ) \
1504                 $(NPA_TSTREAM_OBJ) \
1505                 $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) \
1506                 $(LIBADS_SERVER_OBJ) \
1507                 $(TDB_VALIDATE_OBJ) \
1508                 $(LIBCLI_DSSETUP_OBJ) \
1509                 $(LIBCLI_LSA_OBJ) \
1510                 $(LIBCLI_SAMR_OBJ) \
1511                 $(LIBCLI_NETLOGON_OBJ) \
1512                 rpc_client/init_netlogon.o \
1513                 rpc_client/init_samr.o \
1514                 $(PAM_ERRORS_OBJ)
1515
1516 WBINFO_OBJ = ../nsswitch/wbinfo.o $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
1517                 $(POPT_LIB_OBJ) $(AFS_SETTOKEN_OBJ) \
1518                 lib/winbind_util.o $(WBCOMMON_OBJ) \
1519                 $(LIBSMB_ERR_OBJ0) $(LIBSMB_ERR_OBJ1) $(SECRETS_OBJ)
1520
1521 WINBIND_NSS_OBJ = $(WBCOMMON_OBJ) $(LIBREPLACE_OBJ) @WINBIND_NSS_EXTRA_OBJS@
1522
1523 WINBIND_KRB5_LOCATOR_OBJ1 = ../nsswitch/winbind_krb5_locator.o
1524 WINBIND_KRB5_LOCATOR_OBJ = $(WINBIND_KRB5_LOCATOR_OBJ1) $(LIBREPLACE_OBJ)
1525
1526 POPT_OBJ=../lib/popt/findme.o ../lib/popt/popt.o ../lib/popt/poptconfig.o \
1527           ../lib/popt/popthelp.o ../lib/popt/poptparse.o
1528
1529 INIPARSER_OBJ = ../lib/iniparser_build/iniparser.o ../lib/iniparser_build/dictionary.o \
1530                 ../lib/iniparser_build/strlib.o
1531
1532 TDBBACKUP_OBJ = @tdbdir@/tools/tdbbackup.o $(LIBREPLACE_OBJ) \
1533         $(SOCKET_WRAPPER_OBJ)
1534
1535 TDBTOOL_OBJ = @tdbdir@/tools/tdbtool.o $(LIBREPLACE_OBJ) \
1536         $(SOCKET_WRAPPER_OBJ)
1537
1538 TDBDUMP_OBJ = @tdbdir@/tools/tdbdump.o $(LIBREPLACE_OBJ) \
1539         $(SOCKET_WRAPPER_OBJ)
1540
1541 TDBRESTORE_OBJ = @tdbdir@/tools/tdbrestore.o $(LIBREPLACE_OBJ) \
1542         $(SOCKET_WRAPPER_OBJ)
1543
1544 TDBTORTURE_OBJ = @tdbdir@/tools/tdbtorture.o $(LIBREPLACE_OBJ) \
1545         $(SOCKET_WRAPPER_OBJ)
1546
1547
1548 NTLM_AUTH_OBJ1 = utils/ntlm_auth.o utils/ntlm_auth_diagnostics.o
1549
1550 NTLM_AUTH_OBJ = ${NTLM_AUTH_OBJ1} \
1551                 ${LIBADS_SERVER_OBJ} \
1552                 $(PASSDB_OBJ) $(GROUPDB_OBJ) \
1553                 $(WBCOMMON_OBJ) \
1554                 $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
1555                 $(AFS_SETTOKEN_OBJ) \
1556                 $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
1557                 $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) @BUILD_INIPARSER@
1558
1559
1560 VLP_OBJ = printing/tests/vlp.o \
1561           ../lib/util/util_tdb.o \
1562           $(LIBSAMBAUTIL_OBJ) \
1563           param/util.o
1564
1565 RPC_OPEN_TCP_OBJ = torture/rpc_open_tcp.o \
1566                    $(LIBSMB_OBJ) \
1567                    $(PARAM_OBJ) \
1568                    $(PASSDB_OBJ) \
1569                    $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
1570                    $(LIB_NONSMBD_OBJ) \
1571                    $(KRBCLIENT_OBJ) \
1572                    $(LIBMSRPC_OBJ) \
1573                    $(LIBMSRPC_GEN_OBJ)
1574
1575 DBWRAP_TOOL_OBJ = utils/dbwrap_tool.o \
1576                   $(PARAM_OBJ) \
1577                   $(LIB_NONSMBD_OBJ) \
1578                   $(LIBSMB_ERR_OBJ) \
1579                   $(POPT_LIB_OBJ)
1580
1581 DBWRAP_TORTURE_OBJ = utils/dbwrap_torture.o \
1582                      $(PARAM_OBJ) \
1583                      $(LIB_NONSMBD_OBJ) \
1584                      $(LIBSMB_ERR_OBJ) \
1585                      $(POPT_LIB_OBJ)
1586
1587 SPLIT_TOKENS_OBJ = utils/split_tokens.o \
1588                    $(PARAM_OBJ) \
1589                    $(LIB_NONSMBD_OBJ) \
1590                    $(POPT_LIB_OBJ) \
1591                    $(LIBSAMBA_OBJ)
1592
1593 ######################################################################
1594 # now the rules...
1595 ######################################################################
1596 all:: SHOWFLAGS basics libs $(SBIN_PROGS) $(BIN_PROGS) \
1597         $(MODULES) $(NSS_MODULES) $(PAM_MODULES) \
1598         $(EXTRA_ALL_TARGETS)
1599
1600 basics:: samba3-idl mkparam
1601
1602 nss_modules:: $(NSS_MODULES)
1603
1604 pam_modules:: $(PAM_MODULES)
1605
1606 pam_smbpass: SHOWFLAGS bin/pam_smbpass.@SHLIBEXT@
1607
1608 pam_winbind: SHOWFLAGS bin/pam_winbind.@SHLIBEXT@
1609
1610 gpext_modules:: $(GPEXT_MODULES)
1611
1612 torture:: SHOWFLAGS basics $(TORTURE_PROGS) @SMBTORTURE4@
1613
1614 smbtorture : SHOWFLAGS bin/smbtorture
1615
1616 masktest : SHOWFLAGS bin/masktest
1617
1618 msgtest : SHOWFLAGS bin/msgtest
1619
1620 locktest : SHOWFLAGS bin/locktest
1621
1622 smbcacls : SHOWFLAGS bin/smbcacls
1623
1624 smbcquotas : SHOWFLAGS bin/smbcquotas
1625
1626 locktest2 : SHOWFLAGS bin/locktest2
1627
1628 debug2html : SHOWFLAGS bin/debug2html
1629
1630 smbfilter : SHOWFLAGS bin/smbfilter
1631
1632 eventlogadm: SHOWFLAGS bin/eventlogadm
1633
1634 sharesec: SHOWFLAGS bin/sharesec
1635
1636 talloctort : SHOWFLAGS $(TALLOCTORT)
1637
1638 replacetort : SHOWFLAGS bin/replacetort
1639
1640 smbconftort : SHOWFLAGS bin/smbconftort
1641
1642 pthreadpooltest : SHOWFLAGS bin/pthreadpooltest
1643
1644 timelimit : SHOWFLAGS bin/timelimit
1645
1646 nsswitch : SHOWFLAGS bin/winbindd bin/wbinfo @WINBIND_NSS@ \
1647         @WINBIND_WINS_NSS@ @WINBIND_KRB5_LOCATOR@ \
1648         bin/pam_winbind.@SHLIBEXT@ bin/smbcontrol
1649
1650 wins : SHOWFLAGS @WINBIND_WINS_NSS@
1651
1652 modules:: SHOWFLAGS $(MODULES)
1653
1654
1655 #####################################################################
1656 ## Perl IDL Compiler
1657
1658 IDL_FILES = librpc/idl/messaging.idl \
1659             librpc/idl/libnetapi.idl \
1660             librpc/idl/wbint.idl \
1661             librpc/idl/perfcount.idl \
1662             librpc/idl/secrets.idl \
1663             librpc/idl/open_files.idl \
1664             librpc/idl/libnet_join.idl
1665
1666 samba3-idl::
1667         @PIDL_OUTPUTDIR="autoconf/librpc/gen_ndr" PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \
1668          srcdir="$(srcdir)" ../librpc/build_idl.sh ../librpc/idl/*.idl
1669         @PIDL_OUTPUTDIR="autoconf/librpc/gen_ndr" PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \
1670          srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh $(IDL_FILES)
1671
1672 idl_full::
1673         @PIDL_OUTPUTDIR="autoconf/librpc/gen_ndr" PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \
1674          srcdir="$(srcdir)" ../librpc/build_idl.sh --full ../librpc/idl/*.idl
1675         @PIDL_OUTPUTDIR="autoconf/librpc/gen_ndr" PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \
1676          srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh --full $(IDL_FILES)
1677
1678 mkparam: ../lib/param/param_local.h ../lib/param/param_global.h param/param_global.h ../lib/param/param_proto.h ../lib/param/s3_param.h
1679
1680 ../lib/param/param_local.h:
1681          $(PERL) ../script/mkparamdefs.pl $(srcdir)/../lib/param/param_functions.c --file ../lib/param/param_local.h --generate-scope=LOCAL
1682 ../lib/param/param_global.h:
1683          $(PERL) ../script/mkparamdefs.pl $(srcdir)/../lib/param/param_functions.c $(srcdir)/../lib/param/loadparm.c --file ../lib/param/param_global.h --generate-scope=GLOBAL
1684 param/param_global.h:
1685          $(PERL) ../script/mkparamdefs.pl $(srcdir)/../lib/param/param_functions.c $(srcdir)/param/loadparm.c --file param/param_global.h --generate-scope=GLOBAL
1686 ../lib/param/param_proto.h:
1687          $(PERL) ../source4/script/mkproto.pl $(srcdir)/../lib/param/param_functions.c $(srcdir)/../lib/param/loadparm.c --public ../lib/param/param_proto.h  --private ../lib/param/param_proto.h
1688 ../lib/param/s3_param.h:
1689          $(PERL) ../script/mks3param.pl $(srcdir)/../lib/param/param_functions.c $(srcdir)/../lib/param/loadparm.c --file ../lib/param/s3_param.h
1690
1691
1692 #####################################################################
1693
1694
1695 everything:: all libtalloc libsmbclient libnetapi debug2html smbfilter talloctort replacetort smbconftort modules torture \
1696         $(EVERYTHING_PROGS) \
1697         vfs_examples
1698
1699 .SUFFIXES:
1700 .SUFFIXES: .c .o .lo
1701
1702 .PHONY: showflags SHOWFLAGS
1703
1704 showflags: SHOWFLAGS
1705
1706 SHOWFLAGS::
1707         @echo "Using CFLAGS     = $(CFLAGS)"
1708         @echo "      PICFLAG    = $(PICFLAG)"
1709         @echo "      LIBS       = $(LIBS)"
1710         @echo "      LDFLAGS    = $(LDFLAGS)"
1711         @echo "      DYNEXP     = $(DYNEXP)"
1712         @echo "      LDSHFLAGS  = $(LDSHFLAGS)"
1713         @echo "      SHLIBEXT   = @SHLIBEXT@"
1714         @echo "      SONAMEFLAG = @SONAMEFLAG@"
1715
1716 # "showcflags" target for debuggin how CFLAGS are composed:
1717
1718 .PHONY: showcflags SHOWCFLAGS
1719
1720 showcflags: SHOWCFLAGS
1721
1722 SHOWCFLAGS::
1723         @echo "CFLAGS         = $(CFLAGS)"
1724         @echo "FLAGS          = $(FLAGS)"
1725         @echo ""
1726         @echo "FLAGS1         = @FLAGS1@"
1727         @echo "SAMBA_CPPFLAGS = @SAMBA_CPPFLAGS@"
1728         @echo "CPPFLAGS       = $(CPPFLAGS)"
1729         @echo "ISA            = $(ISA)"
1730
1731 MAKEDIR = || exec false; \
1732           if test -d "$$dir"; then :; else \
1733           echo mkdir "$$dir"; \
1734           mkdir -p "$$dir" >/dev/null 2>&1 || \
1735           test -d "$$dir" || \
1736           mkdir "$$dir" || \
1737           exec false; fi || exec false
1738
1739 # Run a static checker.
1740 CHECK_CC = $(CC_CHECKER) $(CFLAGS) $(PICFLAG) -c $< -o $@
1741 # Compile a source file.
1742 COMPILE_CC = $(CC) $(CFLAGS) $(PICFLAG) -c $< -o $@
1743 # Compile a source file with the installation paths defined.
1744 COMPILE_CC_PATH = $(CC) $(PATH_FLAGS) $(CFLAGS) $(PICFLAG) -c $< -o $@
1745
1746 COMPILE = $(COMPILE_CC)
1747
1748 .c.o:
1749         @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
1750          dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
1751         @if test -n "$(CC_CHECKER)"; then \
1752           echo "Checking  $*.c with '$(CC_CHECKER)'";\
1753           $(CHECK_CC); \
1754          fi
1755         @echo Compiling $*.c
1756         @$(COMPILE) && exit 0;\
1757                 echo "The following command failed:" 1>&2;\
1758                 echo "$(subst ",\",$(COMPILE_CC))" 1>&2;\
1759                 $(COMPILE_CC) >/dev/null 2>&1
1760 @BROKEN_CC@     -mv `echo $@ | sed 's%^.*/%%g'` $@
1761
1762 PRECOMPILED_HEADER = $(builddir)/include/includes.h.gch
1763
1764 # this adds support for precompiled headers. To use it, install a snapshot
1765 # of gcc-3.4 and run 'make pch' before you do the main build.
1766 pch::
1767         rm -f $(PRECOMPILED_HEADER)
1768         $(MAKE) $(PRECOMPILED_HEADER)
1769
1770 $(PRECOMPILED_HEADER): $(srcdir)/include/includes.h
1771         $(COMPILE)
1772
1773 BINARY_PREREQS = bin/.dummy
1774
1775 # These dependencies are only approximately correct: we want to make
1776 # sure Samba's paths are updated if ./configure is re-run.  Really it
1777 # would be nice if "make prefix=/opt/samba all" also rebuilt things,
1778 # but since we also require "make install prefix=/opt/samba" *not* to
1779 # rebuild it's a bit hard.
1780
1781 ../dynconfig/dynconfig.o: ../dynconfig/dynconfig.c Makefile
1782         @echo Compiling $*.c
1783         @$(COMPILE_CC_PATH) && exit 0;\
1784                 echo "The following command failed:" 1>&2;\
1785                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1786                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1787
1788 ../nsswitch/pam_winbind.o: ../nsswitch/pam_winbind.c Makefile
1789         @echo Compiling $*.c
1790         @$(COMPILE_CC_PATH) && exit 0;\
1791                 echo "The following command failed:" 1>&2;\
1792                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1793                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1794
1795 ../nsswitch/wb_common.o: ../nsswitch/wb_common.c Makefile
1796         @echo Compiling $*.c
1797         @$(COMPILE_CC_PATH) && exit 0;\
1798                 echo "The following command failed:" 1>&2;\
1799                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1800                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1801
1802 ### Start section of object files that require PTHREAD_CFLAGS
1803 ../nsswitch/wins.o: ../nsswitch/wins.c
1804         @echo Compiling $*.c
1805         @$(COMPILE) $(PTHREAD_CFLAGS) && exit 0;\
1806                 echo "The following command failed:" 1>&2;\
1807                 echo "$(COMPILE_CC) $(PTHREAD_CFLAGS)" 1>&2;\
1808                 $(COMPILE_CC) $(PTHREAD_CFLAGS) >/dev/null 2>&1
1809
1810 ../nsswitch/winbind_nss_linux.o: ../nsswitch/winbind_nss_linux.c
1811         @echo Compiling $*.c
1812         @$(COMPILE_CC) $(PTHREAD_CFLAGS) && exit 0;\
1813                 echo "The following command failed:" 1>&2;\
1814                 echo "$(COMPILE_CC) $(PTHREAD_CFLAGS)" 1>&2;\
1815                 $(COMPILE_CC) $(PTHREAD_CFLAGS) >/dev/null 2>&1
1816
1817 libsmb/libsmb_thread_impl.o: libsmb/libsmb_thread_impl.c
1818         @echo Compiling $*.c
1819         @$(COMPILE) $(PTHREAD_CFLAGS) && exit 0;\
1820                 echo "The following command failed:" 1>&2;\
1821                 echo "$(COMPILE_CC) $(PTHREAD_CFLAGS)" 1>&2;\
1822                 $(COMPILE_CC) $(PTHREAD_CFLAGS) >/dev/null 2>&1
1823
1824 libsmb/libsmb_thread_posix.o: libsmb/libsmb_thread_posix.c
1825         @echo Compiling $*.c
1826         @$(COMPILE) $(PTHREAD_CFLAGS) && exit 0;\
1827                 echo "The following command failed:" 1>&2;\
1828                 echo "$(COMPILE_CC) $(PTHREAD_CFLAGS)" 1>&2;\
1829                 $(COMPILE_CC) $(PTHREAD_CFLAGS) >/dev/null 2>&1
1830 ### End section of object files that require PTHREAD_CFLAGS
1831
1832 lib/pidfile.o: lib/pidfile.c
1833         @echo Compiling $*.c
1834         @$(COMPILE_CC_PATH) && exit 0;\
1835                 echo "The following command failed:" 1>&2;\
1836                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1837                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1838
1839 lib/version.o: lib/version.c include/autoconf/version.h
1840         @echo Compiling $*.c
1841         @$(COMPILE_CC_PATH) && exit 0;\
1842                 echo "The following command failed:" 1>&2;\
1843                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1844                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1845
1846 smbd/build_options.o: smbd/build_options.c Makefile include/autoconf/config.h include/build_env.h include/proto.h
1847         @echo Compiling $*.c
1848         @$(COMPILE_CC_PATH) && exit 0;\
1849                 echo "The following command failed:" 1>&2;\
1850                 echo "$(COMPILE_CC_PATH)" 1>&2;\
1851                 $(COMPILE_CC_PATH) >/dev/null 2>&1
1852
1853 smbd/build_options.c: include/autoconf/config.h.in script/mkbuildoptions.awk
1854         @echo Generating $@
1855         @dir=smbd $(MAKEDIR) && $(AWK) -f $(srcdir)/script/mkbuildoptions.awk > $(builddir)/smbd/build_options.c < $(srcdir)/include/autoconf/config.h.in
1856
1857 bin/.dummy:
1858         @if (: >> $@ || : > $@) >/dev/null 2>&1; then :; else \
1859           dir=bin $(MAKEDIR); fi
1860         @: >> $@ || : > $@ # what a fancy emoticon!
1861
1862 bin/smbd: $(BINARY_PREREQS) $(SMBD_OBJ) $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) @BUILD_POPT@
1863         @echo Linking $@
1864         @$(CC) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LDAP_LIBS) @SMBD_FAM_LIBS@ \
1865                 $(KRB5LIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \
1866                 $(ACL_LIBS) $(PASSDB_LIBS) $(LIBS) $(DNSSD_LIBS) $(AVAHI_LIBS) \
1867                 $(POPT_LIBS) @SMBD_LIBS@ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
1868                 $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1869
1870 bin/nmbd: $(BINARY_PREREQS) $(NMBD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1871         @echo Linking $@
1872         @$(CC) -o $@ $(NMBD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1873                 @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \
1874                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(POPT_LIBS) \
1875                 $(KRB5LIBS) $(LDAP_LIBS) $(ZLIB_LIBS)
1876
1877 bin/swat: $(BINARY_PREREQS) $(SWAT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1878         @echo Linking $@
1879         @$(CC) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(DYNEXP) $(PRINT_LIBS) \
1880           $(AUTH_LIBS) $(LIBS) $(PASSDB_LIBS) $(POPT_LIBS) $(KRB5LIBS) \
1881           $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1882
1883 bin/rpcclient: $(BINARY_PREREQS) $(RPCCLIENT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1884         @echo Linking $@
1885         @$(CC) -o $@ $(LDFLAGS) $(RPCCLIENT_OBJ) \
1886                 $(DYNEXP) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
1887                 $(KRB5LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
1888                 $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) $(PASSDB_LIBS)
1889
1890 bin/smbclient: $(BINARY_PREREQS) $(CLIENT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1891         @echo Linking $@
1892         @$(CC) -o $@ $(CLIENT_OBJ) $(LDFLAGS) $(DYNEXP) \
1893                 $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
1894                 $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(DNSSD_LIBS) \
1895                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1896
1897 bin/net: $(BINARY_PREREQS) $(NET_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT) $(LIBNETAPI)
1898         @echo Linking $@
1899         @$(CC) -o $@ $(NET_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
1900                 $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
1901                 $(PASSDB_LIBS) $(TERMLDFLAGS) $(TERMLIBS) $(NSCD_LIBS) \
1902                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(LIBNETAPI_LIBS) \
1903                 $(ZLIB_LIBS)
1904
1905 bin/profiles: $(BINARY_PREREQS) $(PROFILES_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1906         @echo Linking $@
1907         @$(CC) -o $@ $(PROFILES_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
1908                 $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1909
1910 bin/smbspool: $(BINARY_PREREQS) $(CUPS_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1911         @echo Linking $@
1912         @$(CC) -o $@ $(CUPS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
1913                 @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \
1914                 $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
1915
1916 bin/testparm: $(BINARY_PREREQS) $(TESTPARM_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1917         @echo Linking $@
1918         @$(CC) -o $@ $(TESTPARM_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1919                 $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1920
1921 bin/smbta-util: $(BINARY_PREREQS) $(SMBTA_UTIL_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1922         @echo Linking $@
1923         @$(CC) -o $@ $(SMBTA_UTIL_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1924                 $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1925
1926 bin/smbstatus: $(BINARY_PREREQS) $(STATUS_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1927         @echo Linking $@
1928         @$(CC) -o $@ $(STATUS_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1929                 $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1930
1931 bin/smbcontrol: $(BINARY_PREREQS) $(SMBCONTROL_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1932         @echo Linking $@
1933         @$(CC) -DUSING_SMBCONTROL -o $@ \
1934                 $(SMBCONTROL_OBJ) $(DYNEXP) $(LDFLAGS) \
1935                 $(LIBS) $(LDAP_LIBS) @LIBUNWIND_PTRACE@ $(POPT_LIBS) \
1936                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1937
1938 bin/smbtree: $(BINARY_PREREQS) $(SMBTREE_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1939         @echo Linking $@
1940         @$(CC) -o $@ $(SMBTREE_OBJ) $(LDFLAGS) $(DYNEXP) \
1941                 $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1942                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1943
1944 bin/smbpasswd: $(BINARY_PREREQS) $(SMBPASSWD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1945         @echo Linking $@
1946         @$(CC) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(PASSDB_LIBS) \
1947                 $(DYNEXP) $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
1948                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1949
1950 bin/pdbedit: $(BINARY_PREREQS) $(PDBEDIT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1951         @echo Linking $@
1952         @$(CC) -o $@ $(PDBEDIT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1953                 $(POPT_LIBS) $(PASSDB_LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) \
1954                 $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1955
1956 bin/smbget: $(BINARY_PREREQS) $(SMBGET_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1957         @echo Linking $@
1958         @$(CC) -o $@ $(SMBGET_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1959                 $(POPT_LIBS)  $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
1960                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
1961
1962 bin/nmblookup: $(BINARY_PREREQS) $(NMBLOOKUP_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1963         @echo Linking $@
1964         @$(CC) -o $@ $(NMBLOOKUP_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
1965                 $(POPT_LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1966
1967 bin/smbtorture: $(BINARY_PREREQS) $(SMBTORTURE_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1968         @echo Linking $@
1969         @$(CC) -o $@ $(SMBTORTURE_OBJ) $(IDMAP_UTIL_OBJ) $(LDFLAGS) $(DYNEXP) \
1970                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) \
1971                 $(LIBTDB_LIBS) $(ZLIB_LIBS) $(LIBWBCLIENT_LIBS)
1972
1973 bin/talloctort: $(BINARY_PREREQS) $(TALLOCTORT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1974         @echo Linking $@
1975         @$(CC) -o $@ $(TALLOCTORT_OBJ) $(LDFLAGS) \
1976                 $(DYNEXP) $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1977                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1978
1979 bin/replacetort: $(REPLACETORT_OBJ) @BUILD_POPT@ $(LIBTALLOC)
1980         @echo Linking $@
1981         @$(CC) -o $@ $(REPLACETORT_OBJ) $(LDFLAGS) \
1982                 $(DYNEXP) $(LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS)
1983
1984 bin/smbconftort: $(SMBCONFTORT_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
1985         @echo Linking $@
1986         @$(CC) -o $@ $(SMBCONFTORT_OBJ) $(LDFLAGS) \
1987                 $(DYNEXP) $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1988                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
1989
1990 bin/pthreadpooltest: $(PTHREADPOOLTEST_OBJ)
1991         @echo Linking $@
1992         @$(CC) -o $@ $(PTHREADPOOLTEST_OBJ) $(LDFLAGS) $(LIBS) $(PTHREAD_LDFLAGS)
1993
1994 bin/masktest: $(BINARY_PREREQS) $(MASKTEST_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
1995         @echo Linking $@
1996         @$(CC) -o $@ $(MASKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
1997                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
1998                 @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \
1999                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
2000
2001 bin/msgtest: $(BINARY_PREREQS) $(MSGTEST_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
2002         @echo Linking $@
2003         @$(CC) -o $@ $(MSGTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
2004                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
2005                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
2006
2007 bin/smbcacls: $(BINARY_PREREQS) $(SMBCACLS_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2008         @echo Linking $@
2009         @$(CC) -o $@ $(SMBCACLS_OBJ) $(DYNEXP) $(LDFLAGS) \
2010                 $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
2011                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
2012
2013 bin/smbcquotas: $(BINARY_PREREQS) $(SMBCQUOTAS_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2014         @echo Linking $@
2015         @$(CC) -o $@ $(SMBCQUOTAS_OBJ) $(DYNEXP) $(LDFLAGS) \
2016                 $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
2017                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
2018
2019 bin/eventlogadm: $(BINARY_PREREQS) $(EVTLOGADM_OBJ) $(LIBTALLOC) $(LIBTDB)
2020         @echo Linking $@
2021         @$(CC) -o $@ $(EVTLOGADM_OBJ) $(DYNEXP) $(LDFLAGS) \
2022                 $(LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
2023
2024 bin/sharesec: $(BINARY_PREREQS) $(SHARESEC_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB)
2025         @echo Linking $@
2026         @$(CC) -o $@ $(SHARESEC_OBJ) $(DYNEXP) $(LDFLAGS) \
2027                 $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
2028
2029 bin/locktest: $(BINARY_PREREQS) $(LOCKTEST_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2030         @echo Linking $@
2031         @$(CC) -o $@ $(LOCKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
2032                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
2033                 @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \
2034                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
2035
2036 bin/nsstest: $(BINARY_PREREQS) $(NSSTEST_OBJ) $(LIBTALLOC)
2037         @echo Linking $@
2038         @$(CC) -o $@ $(NSSTEST_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
2039                 $(LIBTALLOC_LIBS)
2040
2041 bin/pdbtest: $(BINARY_PREREQS) $(PDBTEST_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2042         @echo Linking $@
2043         @$(CC) -o $@ $(PDBTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
2044                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(PASSDB_LIBS) \
2045                 $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
2046
2047 bin/vfstest: $(BINARY_PREREQS) $(VFSTEST_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2048         @echo Linking $@
2049         @$(CC) -o $@ $(VFSTEST_OBJ) $(LDFLAGS) $(TERMLDFLAGS) $(AVAHI_LIBS) \
2050                 $(TERMLIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) $(DNSSD_LIBS) \
2051                 $(ACL_LIBS) $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
2052                 @SMBD_LIBS@ $(NSCD_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
2053                 $(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
2054
2055 bin/log2pcap: $(BINARY_PREREQS) $(LOG2PCAP_OBJ) @BUILD_POPT@ $(LIBTALLOC)
2056         @echo Linking $@
2057         @$(CC) -o $@ $(LOG2PCAP_OBJ) $(LDFLAGS) $(DYNEXP) \
2058                 $(POPT_LIBS) $(LIBS) $(LIBTALLOC_LIBS)
2059
2060 bin/locktest2: $(BINARY_PREREQS) $(LOCKTEST2_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2061         @echo Linking $@
2062         @$(CC) -o $@ $(LOCKTEST2_OBJ) $(LDFLAGS) $(DYNEXP) \
2063                 @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \
2064                 $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
2065                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
2066
2067 bin/debug2html: $(BINARY_PREREQS) $(DEBUG2HTML_OBJ) @BUILD_POPT@ $(LIBTALLOC)
2068         @echo Linking $@
2069         @$(CC) -o $@ $(DEBUG2HTML_OBJ) $(LDFLAGS) $(DYNEXP) \
2070                 $(LIBS) $(LIBTALLOC_LIBS)
2071
2072 bin/smbfilter: $(BINARY_PREREQS) $(SMBFILTER_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2073         @echo Linking $@
2074         @$(CC) -o $@ $(SMBFILTER_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
2075                 $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
2076                 @LIBWBCLIENT_STATIC@ $(LIBWBCLIENT_LIBS) \
2077                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
2078
2079 bin/versiontest: $(BINARY_PREREQS) lib/version_test.o $(VERSION_OBJ)
2080         @echo Linking $@
2081         @$(CC) $(FLAGS) -o $@ $(VERSION_OBJ) lib/version_test.o
2082
2083
2084 #####################################################################
2085 #
2086 # libraries
2087 #
2088 #####################################################################
2089
2090 MKSYMS_SH = $(srcdir)/script/mksyms.sh
2091
2092
2093 #-------------------------------------------------------------------
2094 #
2095 # libtalloc
2096 #
2097 #-------------------------------------------------------------------
2098
2099
2100 LIBTALLOC_OBJ0 = @LIBTALLOC_OBJ0@
2101 LIBTALLOC_OBJ = $(LIBTALLOC_OBJ0) $(LIBREPLACE_OBJ)
2102
2103 LIBTALLOC_STATIC_TARGET=@LIBTALLOC_STATIC_TARGET@
2104
2105 $(LIBTALLOC_STATIC_TARGET): $(BINARY_PREREQS) $(LIBTALLOC_OBJ0)
2106         @echo Linking non-shared library $@
2107         @-$(AR) -rc $@ $(LIBTALLOC_OBJ0)
2108 libtalloc: $(LIBTALLOC)
2109
2110 cleanlibtalloc::
2111         -rm -f \
2112                 $(LIBTALLOC_STATIC_TARGET)
2113
2114 libs:: libtalloc
2115 cleanlibs:: cleanlibtalloc
2116
2117 showlibtalloc:
2118         @echo  ""
2119         @echo "LIBTALLOC_STATIC                = @LIBTALLOC_STATIC@"
2120         @echo "LIBTALLOC_STATIC_TARGET         = $(LIBTALLOC_STATIC_TARGET)"
2121         @echo "LIBTALLOC                       = $(LIBTALLOC)"
2122
2123 showlibs:: showlibtalloc
2124
2125 #-------------------------------------------------------------------
2126 #
2127 # libtdb
2128 #
2129 #-------------------------------------------------------------------
2130
2131 LIBTDB_OBJ0 = @LIBTDB_OBJ0@
2132 LIBTDB_OBJ = $(LIBTDB_OBJ0) $(LIBREPLACE_OBJ)
2133
2134 LIBTDB_STATIC_TARGET=@LIBTDB_STATIC_TARGET@
2135
2136 $(LIBTDB_STATIC_TARGET): $(BINARY_PREREQS) $(LIBTDB_OBJ0)
2137         @echo Linking non-shared library $@
2138         @-$(AR) -rc $@ $(LIBTDB_OBJ0)
2139
2140 libtdb: $(LIBTDB)
2141
2142 cleanlibtdb::
2143         -rm -f \
2144                 $(LIBTDB_STATIC_TARGET)
2145
2146 libs:: libtdb
2147 cleanlibs:: cleanlibtdb
2148
2149 showlibtdb:
2150         @echo  ""
2151         @echo "LIBTDB_STATIC                = @LIBTDB_STATIC@"
2152         @echo "LIBTDB_STATIC_TARGET         = $(LIBTDB_STATIC_TARGET)"
2153         @echo "LIBTDB                       = $(LIBTDB)"
2154
2155 showlibs:: showlibtdb
2156
2157 #-------------------------------------------------------------------
2158 #
2159 # libwbclient
2160 #
2161 #-------------------------------------------------------------------
2162
2163 LIBWBCLIENT_OBJ0 = ../nsswitch/libwbclient/wbclient.o \
2164                   ../nsswitch/libwbclient/wbc_util.o \
2165                   ../nsswitch/libwbclient/wbc_pwd.o \
2166                   ../nsswitch/libwbclient/wbc_idmap.o \
2167                   ../nsswitch/libwbclient/wbc_sid.o \
2168                   ../nsswitch/libwbclient/wbc_guid.o \
2169                   ../nsswitch/libwbclient/wbc_pam.o
2170
2171 LIBWBCLIENT_OBJ = $(LIBWBCLIENT_OBJ0) \
2172                   $(WBCOMMON_OBJ) \
2173                   $(LIBREPLACE_OBJ) \
2174                   ../lib/util/blocking.o \
2175                   $(SOCKET_WRAPPER_OBJ)
2176
2177 LIBWBCLIENT_SHARED_TARGET=@LIBWBCLIENT_SHARED_TARGET@
2178 LIBWBCLIENT_SOVER=@LIBWBCLIENT_SOVER@
2179 LIBWBCLIENT_FULLVER=@LIBWBCLIENT_FULLVER@
2180 LIBWBCLIENT_SHARED_TARGET_SONAME=@LIBWBCLIENT_SHARED_TARGET_SOVER@
2181 LIBWBCLIENT_STATIC_TARGET=@LIBWBCLIENT_STATIC_TARGET@
2182 LIBWBCLIENT_SYMS=$(srcdir)/exports/libwbclient.@SYMSEXT@
2183 LIBWBCLIENT_HEADERS=$(srcdir)/../nsswitch/libwbclient/wbclient.h
2184
2185 $(LIBWBCLIENT_SYMS): $(LIBWBCLIENT_HEADERS)
2186         @$(MKSYMS_SH) $(AWK) $@ $(LIBWBCLIENT_HEADERS)
2187
2188 $(LIBWBCLIENT_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ) $(LIBWBCLIENT_SYMS)
2189         @echo Linking shared library $@
2190         @$(SHLD_DSO) $(LIBWBCLIENT_OBJ) $(LIBREPLACE_LIBS) \
2191                 @SONAMEFLAG@`basename $@`
2192
2193 $(LIBWBCLIENT_SHARED_TARGET): $(LIBWBCLIENT_SHARED_TARGET_SONAME)
2194         @rm -f $@
2195         @ln -f -s `basename $(LIBWBCLIENT_SHARED_TARGET_SONAME)` $@
2196
2197 $(LIBWBCLIENT_STATIC_TARGET): $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ0) $(WBCOMMON_OBJ)
2198         @echo Linking non-shared library $@
2199         @-$(AR) -rc $@ $(LIBWBCLIENT_OBJ0) $(WBCOMMON_OBJ)
2200
2201 libwbclient: $(LIBWBCLIENT)
2202
2203 cleanlibwbclient::
2204         -rm -f \
2205                 $(LIBWBCLIENT_SYMS) \
2206                 $(LIBWBCLIENT_STATIC_TARGET) \
2207                 $(LIBWBCLIENT_SHARED_TARGET) \
2208                 $(LIBWBCLIENT_SHARED_TARGET_SONAME)
2209
2210 installlibwbclient:: installdirs libwbclient
2211         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2212         -$(INSTALLLIBCMD_SH) $(LIBWBCLIENT_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
2213         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET)`
2214         -if test -r $(LIBWBCLIENT_SHARED_TARGET_SONAME) ; then \
2215                 ln -f -s `basename $(LIBWBCLIENT_SHARED_TARGET_SONAME)` \
2216                         $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET)` ; \
2217         fi
2218         -$(INSTALLLIBCMD_A) bin/libwbclient.a $(DESTDIR)$(LIBDIR)
2219         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2220         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBWBCLIENT_HEADERS) $(DESTDIR)${prefix}/include
2221
2222 uninstalllibwbclient::
2223         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET)`
2224         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET_SONAME)`
2225         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_STATIC_TARGET)`
2226         -rm -f $(DESTDIR)${prefix}/include/wbclient.h
2227
2228 libs:: libwbclient
2229 installlibs:: @INSTALL_LIBWBCLIENT@
2230 uninstalllibs:: uninstalllibwbclient
2231 cleanlibs:: cleanlibwbclient
2232 shlibs test_shlibs: @LIBWBCLIENT_SHARED@
2233
2234 showlibwbclient:
2235         @echo  ""
2236         @echo "LIBWBCLIENT_SHARED               = @LIBWBCLIENT_SHARED@"
2237         @echo "LIBWBCLIENT_STATIC               = @LIBWBCLIENT_STATIC@"
2238         @echo "LIBWBCLIENT_LIBS                 = $(LIBWBCLIENT_LIBS)"
2239         @echo ""
2240         @echo "LIBWBCLIENT_SHARED_TARGET        = $(LIBWBCLIENT_SHARED_TARGET)"
2241         @echo "LIBWBCLIENT_SOVER                = $(LIBWBCLIENT_SOVER)"
2242         @echo "LIBWBCLIENT_FULLVER              = $(LIBWBCLIENT_FULLVER)"
2243         @echo "LIBWBCLIENT_SHARED TARGET_SONAME = $(LIBWBCLIENT_SHARED_TARGET_SONAME)"
2244         @echo "LIBWBCLIENT_STATIC_TARGET        = $(LIBWBCLIENT_STATIC_TARGET)"
2245         @echo "LIBWBCLIENT                      = $(LIBWBCLIENT)"
2246
2247 showlibs:: showlibwbclient
2248
2249
2250 #-------------------------------------------------------------------
2251 #
2252 # libnetapi
2253 #
2254 #-------------------------------------------------------------------
2255
2256 LIBNETAPI_OBJ0 = lib/netapi/netapi.o \
2257                  lib/netapi/cm.o \
2258                  autoconf/librpc/gen_ndr/ndr_libnetapi.o \
2259                  lib/netapi/libnetapi.o \
2260                  lib/netapi/joindomain.o \
2261                  lib/netapi/serverinfo.o \
2262                  lib/netapi/getdc.o \
2263                  lib/netapi/user.o \
2264                  lib/netapi/group.o \
2265                  lib/netapi/localgroup.o \
2266                  lib/netapi/samr.o \
2267                  lib/netapi/sid.o \
2268                  lib/netapi/share.o \
2269                  lib/netapi/file.o \
2270                  lib/netapi/shutdown.o \
2271                  lib/netapi/netlogon.o
2272
2273 LIBNETAPI_OBJ  = $(LIBNETAPI_OBJ0) $(LIBNET_OBJ) \
2274                  $(LIBSMBCONF_OBJ) \
2275                  $(REG_SMBCONF_OBJ) \
2276                  $(PARAM_WITHOUT_REG_OBJ) $(LIB_NONSMBD_OBJ) \
2277                  $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
2278                  $(LIBMSRPC_OBJ) $(LIBMSRPC_GEN_OBJ) \
2279                  $(PASSDB_OBJ) $(SMBLDAP_OBJ) $(GROUPDB_OBJ) \
2280                  $(DCUTIL_OBJ) $(LIBADS_OBJ) $(PRIVILEGES_BASIC_OBJ) \
2281                  auth/token_util.o \
2282                  $(LIBCLI_INITSHUTDOWN_OBJ) \
2283                  $(LIBCLI_WKSSVC_OBJ) \
2284                  $(LIBCLI_SRVSVC_OBJ) \
2285                  $(LIBCLI_LSA_OBJ) \
2286                  $(LIBCLI_SAMR_OBJ) \
2287                  $(LIBCLI_NETLOGON_OBJ) \
2288                  $(RPC_CLIENT_SCHANNEL_OBJ) \
2289                  rpc_client/init_netlogon.o \
2290                  rpc_client/init_samr.o
2291
2292 LIBNETAPI_SHARED_TARGET=@LIBNETAPI_SHARED_TARGET@
2293 LIBNETAPI_SOVER=@LIBNETAPI_SOVER@
2294 LIBNETAPI_FULLVER=@LIBNETAPI_FULLVER@
2295 LIBNETAPI_SHARED_TARGET_SONAME=@LIBNETAPI_SHARED_TARGET_SOVER@
2296 LIBNETAPI_STATIC_TARGET=@LIBNETAPI_STATIC_TARGET@
2297 LIBNETAPI_SYMS=$(srcdir)/exports/libnetapi.@SYMSEXT@
2298 LIBNETAPI_HEADERS=$(srcdir)/lib/netapi/netapi.h
2299
2300 $(LIBNETAPI_SYMS): $(LIBNETAPI_HEADERS)
2301         @$(MKSYMS_SH) $(AWK) $@ $(LIBNETAPI_HEADERS)
2302
2303 $(LIBNETAPI_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBNETAPI_OBJ) $(LIBNETAPI_SYMS) $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2304         @echo Linking shared library $@
2305         @$(SHLD_DSO) $(LIBNETAPI_OBJ) \
2306                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(LIBS) \
2307                 $(LDAP_LIBS) $(KRB5LIBS) $(NSCD_LIBS) $(ZLIB_LIBS) \
2308                 @SONAMEFLAG@`basename $@`
2309
2310 $(LIBNETAPI_SHARED_TARGET): $(LIBNETAPI_SHARED_TARGET_SONAME)
2311         @rm -f $@
2312         @ln -f -s `basename $(LIBNETAPI_SHARED_TARGET_SONAME)` $@
2313
2314 $(LIBNETAPI_STATIC_TARGET): $(BINARY_PREREQS) $(LIBNETAPI_OBJ0)
2315         @echo Linking non-shared library $@
2316         @-$(AR) -rc $@ $(LIBNETAPI_OBJ0)
2317
2318 libnetapi: $(LIBNETAPI)
2319
2320 cleanlibnetapi::
2321         -rm -f \
2322                 $(LIBNETAPI_SYMS) \
2323                 $(LIBNETAPI_STATIC_TARGET) \
2324                 $(LIBNETAPI_SHARED_TARGET) \
2325                 $(LIBNETAPI_SHARED_TARGET_SONAME)
2326
2327 installlibnetapi:: installdirs libnetapi
2328         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2329         -$(INSTALLLIBCMD_SH) $(LIBNETAPI_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
2330         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_SHARED_TARGET)`
2331         -if test -r $(LIBNETAPI_SHARED_TARGET_SONAME) ; then \
2332                 ln -f -s `basename $(LIBNETAPI_SHARED_TARGET_SONAME)` \
2333                         $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_SHARED_TARGET)` ; \
2334         fi
2335         -$(INSTALLLIBCMD_A) $(LIBNETAPI_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
2336         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2337         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(srcdir)/lib/netapi/netapi.h $(DESTDIR)${prefix}/include
2338
2339 uninstalllibnetapi::
2340         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_SHARED_TARGET)`
2341         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_SHARED_TARGET_SONAME)`
2342         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBNETAPI_STATIC_TARGET)`
2343         -rm -f $(DESTDIR)${prefix}/include/netapi.h
2344
2345 libs:: libnetapi
2346 installlibs:: @INSTALL_LIBNETAPI@
2347 uninstalllibs:: @UNINSTALL_LIBNETAPI@
2348 cleanlibs:: cleanlibnetapi
2349 shlibs test_shlibs: @LIBNETAPI_SHARED@
2350
2351 showlibnetapi:
2352         @echo  ""
2353         @echo "LIBNETAPI_SHARED               = @LIBNETAPI_SHARED@"
2354         @echo "LIBNETAPI_STATIC               = @LIBNETAPI_STATIC@"
2355         @echo "LIBNETAPI_LIBS                 = $(LIBNETAPI_LIBS)"
2356         @echo ""
2357         @echo "LIBNETAPI_SHARED_TARGET        = $(LIBNETAPI_SHARED_TARGET)"
2358         @echo "LIBNETAPI_SOVER                = $(LIBNETAPI_SOVER)"
2359         @echo "LIBNETAPI_FULLVER              = $(LIBNETAPI_FULLVER)"
2360         @echo "LIBNETAPI_SHARED TARGET_SONAME = $(LIBNETAPI_SHARED_TARGET_SONAME)"
2361         @echo "LIBNETAPI_STATIC_TARGET        = $(LIBNETAPI_STATIC_TARGET)"
2362         @echo "LIBNETAPI                      = $(LIBNETAPI)"
2363
2364 showlibs:: showlibnetapi
2365
2366 #-------------------------------------------------------------------
2367 #
2368 # libsmbclient
2369 #
2370 #-------------------------------------------------------------------
2371
2372 LIBSMBCLIENT_SHARED_TARGET=@LIBSMBCLIENT_SHARED_TARGET@
2373 LIBSMBCLIENT_SOVER=@LIBSMBCLIENT_SOVER@
2374 LIBSMBCLIENT_FULLVER=@LIBSMBCLIENT_FULLVER@
2375 LIBSMBCLIENT_SHARED_TARGET_SONAME=@LIBSMBCLIENT_SHARED_TARGET_SOVER@
2376 LIBSMBCLIENT_STATIC_TARGET=@LIBSMBCLIENT_STATIC_TARGET@
2377 LIBSMBCLIENT=@LIBSMBCLIENT_STATIC@ @LIBSMBCLIENT_SHARED@
2378 LIBSMBCLIENT_SYMS=$(srcdir)/exports/libsmbclient.@SYMSEXT@
2379 LIBSMBCLIENT_HEADERS=$(srcdir)/include/libsmbclient.h
2380
2381 $(LIBSMBCLIENT_SYMS): $(LIBSMBCLIENT_HEADERS)
2382         @$(MKSYMS_SH) $(AWK) $@ $(LIBSMBCLIENT_HEADERS)
2383
2384 $(LIBSMBCLIENT_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) $(LIBSMBCLIENT_THREAD_OBJ) $(LIBSMBCLIENT_SYMS) $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2385         @echo Linking shared library $@
2386         @$(SHLD_DSO) $(LIBSMBCLIENT_OBJ) $(LIBSMBCLIENT_THREAD_OBJ) \
2387                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) $(LIBS) \
2388                 $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(ZLIB_LIBS) $(PTHREAD_LDFLAGS) \
2389                 @SONAMEFLAG@`basename $@`
2390
2391 $(LIBSMBCLIENT_SHARED_TARGET): $(LIBSMBCLIENT_SHARED_TARGET_SONAME)
2392         @rm -f $@
2393         @ln -s `basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)` $@
2394
2395 $(LIBSMBCLIENT_STATIC_TARGET): $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ1)
2396         @echo Linking non-shared library $@
2397         @-$(AR) -rc $@ $(LIBSMBCLIENT_OBJ1)
2398
2399 libsmbclient: $(LIBSMBCLIENT)
2400
2401 cleanlibsmbclient::
2402         -rm -f \
2403                 $(LIBSMBCLIENT_SHARED_TARGET) \
2404                 $(LIBSMBCLIENT_SHARED_TARGET_SONAME) \
2405                 $(LIBSMBCLIENT_STATIC_TARGET)
2406
2407 installlibsmbclient:: installdirs libsmbclient
2408         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2409         -$(INSTALLLIBCMD_SH) $(LIBSMBCLIENT_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
2410         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)`
2411         -if test -r $(LIBSMBCLIENT_SHARED_TARGET_SONAME) ; then \
2412                 ln -f -s `basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)` \
2413                         $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)` ; \
2414         fi
2415         -$(INSTALLLIBCMD_A) $(LIBSMBCLIENT_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
2416         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2417         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBSMBCLIENT_HEADERS) $(DESTDIR)${prefix}/include
2418
2419 installclientlib:: installlibsmbclient
2420
2421 uninstalllibsmbclient::
2422         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET)`
2423         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_SHARED_TARGET_SONAME)`
2424         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBCLIENT_STATIC_TARGET)`
2425         -rm -f $(DESTDIR)${prefix}/include/libsmbclient.h
2426
2427 uninstallclientlib:: uninstalllibsmbclient
2428
2429 libs:: libsmbclient
2430 installlibs:: @INSTALL_LIBSMBCLIENT@
2431 uninstalllibs:: @UNINSTALL_LIBSMBCLIENT@
2432 cleanlibs:: cleanlibsmbclient
2433 shlibs test_shlibs: @LIBSMBCLIENT_SHARED@
2434
2435 showlibsmbclient:
2436         @echo  ""
2437         @echo "LIBSMBCLIENT_SHARED               = @LIBSMBCLIENT_SHARED@"
2438         @echo "LIBSMBCLIENT_STATIC               = @LIBSMBCLIENT_STATIC@"
2439         @echo "LIBSMBCLIENT_LIBS                 = $(LIBSMBCLIENT_LIBS)"
2440         @echo ""
2441         @echo "LIBSMBCLIENT_SHARED_TARGET        = $(LIBSMBCLIENT_SHARED_TARGET)"
2442         @echo "LIBSMBCLIENT_SOVER                = $(LIBSMBCLIENT_SOVER)"
2443         @echo "LIBSMBCLIENT_FULLVER              = $(LIBSMBCLIENT_FULLVER)"
2444         @echo "LIBSMBCLIENT_SHARED TARGET_SONAME = $(LIBSMBCLIENT_SHARED_TARGET_SONAME)"
2445         @echo "LIBSMBCLIENT_STATIC_TARGET        = $(LIBSMBCLIENT_STATIC_TARGET)"
2446         @echo "LIBSMBCLIENT                      = $(LIBSMBCLIENT)"
2447
2448 showlibs:: showlibsmbclient
2449
2450 #-------------------------------------------------------------------
2451 #
2452 # libsmbsharemodes
2453 #
2454 #-------------------------------------------------------------------
2455
2456 LIBSMBSHAREMODES_OBJ0 = libsmb/smb_share_modes.o ../lib/ccan/hash/hash.o
2457
2458 LIBSMBSHAREMODES_OBJ = $(LIBSMBSHAREMODES_OBJ0)
2459
2460 LIBSMBSHAREMODES_SHARED_TARGET=@LIBSMBSHAREMODES_SHARED_TARGET@
2461 LIBSMBSHAREMODES_SOVER=@LIBSMBSHAREMODES_SOVER@
2462 LIBSMBSHAREMODES_FULLVER=@LIBSMBSHAREMODES_FULLVER@
2463 LIBSMBSHAREMODES_SHARED_TARGET_SONAME=@LIBSMBSHAREMODES_SHARED_TARGET_SOVER@
2464 LIBSMBSHAREMODES_STATIC_TARGET=@LIBSMBSHAREMODES_STATIC_TARGET@
2465 LIBSMBSHAREMODES=@LIBSMBSHAREMODES_STATIC@ @LIBSMBSHAREMODES_SHARED@
2466 LIBSMBSHAREMODES_SYMS=$(srcdir)/exports/libsmbsharemodes.@SYMSEXT@
2467 LIBSMBSHAREMODES_HEADERS=$(srcdir)/include/smb_share_modes.h
2468
2469 $(LIBSMBSHAREMODES_SYMS): $(LIBSMBSHAREMODES_HEADERS)
2470         @$(MKSYMS_SH) $(AWK) $@ $(LIBSMBSHAREMODES_HEADERS)
2471
2472 $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ) $(LIBSMBSHAREMODES_SYMS) $(LIBTALLOC) $(LIBTDB)
2473         @echo Linking shared library $@
2474         @$(SHLD_DSO) $(LIBSMBSHAREMODES_OBJ) \
2475                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
2476                 @SONAMEFLAG@`basename $@`
2477
2478 $(LIBSMBSHAREMODES_SHARED_TARGET): $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)
2479         @rm -f $@
2480         @ln -f -s `basename $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)` $@
2481
2482 $(LIBSMBSHAREMODES_STATIC_TARGET): $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ0)
2483         @echo Linking non-shared library $@
2484         @-$(AR) -rc $@ $(LIBSMBSHAREMODES_OBJ0)
2485
2486 libsmbsharemodes: $(LIBSMBSHAREMODES)
2487
2488 cleanlibsmbsharemodes::
2489         -rm -f \
2490                 $(LIBSMBSHAREMODES_SHARED_TARGET) \
2491                 $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME) \
2492                 $(LIBSMBSHAREMODES_STATIC_TARGET)
2493
2494 installlibsmbsharemodes:: installdirs libsmbsharemodes
2495         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR)
2496         -$(INSTALLLIBCMD_SH) $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME) $(DESTDIR)$(LIBDIR)
2497         @rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_SHARED_TARGET)`
2498         -if test -r $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME) ; then \
2499                 ln -f -s `basename $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)` \
2500                         $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_SHARED_TARGET)` ; \
2501         fi
2502         -$(INSTALLLIBCMD_A) $(LIBSMBSHAREMODES_STATIC_TARGET) $(DESTDIR)$(LIBDIR)
2503         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include
2504         -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBSMBSHAREMODES_HEADERS) $(DESTDIR)${prefix}/include
2505
2506 uninstalllibsmbsharemodes::
2507         -rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_SHARED_TARGET)`
2508         -$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)`
2509         -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename $(LIBSMBSHAREMODES_STATIC_TARGET)`
2510         -rm -f $(DESTDIR)${prefix}/include/smb_share_modes.h
2511
2512 libs:: libsmbsharemodes
2513 installlibs:: @INSTALL_LIBSMBSHAREMODES@
2514 uninstalllibs:: @UNINSTALL_LIBSMBSHAREMODES@
2515 cleanlibs:: cleanlibsmbsharemodes
2516 shlibs test_shlibs: @LIBSMBSHAREMODES_SHARED@
2517
2518 showlibsmbsharemodes:
2519         @echo  ""
2520         @echo "LIBSMBSHAREMODES_SHARED               = @LIBSMBSHAREMODES_SHARED@"
2521         @echo "LIBSMBSHAREMODES_STATIC               = @LIBSMBSHAREMODES_STATIC@"
2522         @echo "LIBSMBSHAREMODES_TARGET               = @LIBSMBSHAREMODES_TARGET@"
2523         @echo "LIBSMBSHAREMODES_LIBS                 = $(LIBSMBSHAREMODES_LIBS)"
2524         @echo ""
2525         @echo "LIBSMBSHAREMODES_SHARED_TARGET        = $(LIBSMBSHAREMODES_SHARED_TARGET)"
2526         @echo "LIBSMBSHAREMODES_SOVER                = $(LIBSMBSHAREMODES_SOVER)"
2527         @echo "LIBSMBSHAREMODES_FULLVER              = $(LIBSMBSHAREMODES_FULLVER)"
2528         @echo "LIBSMBSHAREMODES_SHARED TARGET_SONAME = $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME)"
2529         @echo "LIBSMBSHAREMODES_STATIC_TARGET        = $(LIBSMBSHAREMODES_STATIC_TARGET)"
2530         @echo "LIBSMBSHAREMODES                      = $(LIBSMBSHAREMODES)"
2531
2532 showlibs:: showlibsmbsharemodes
2533
2534 #####################################################################
2535 #
2536 # shared modules
2537 #
2538 #####################################################################
2539
2540 # Linker command to link our shared libraries:
2541 SHLD_LIBRARY = $(SHLD) $(LDSHFLAGS) $(MODULE_EXPORTS) \
2542               -o $@ @SONAMEFLAG@`basename $@`
2543 # Linker command to link samba internal plugin modules:
2544 SHLD_MODULE = $(SHLD) $(LDSHFLAGS_MODULES) $(MODULE_EXPORTS) \
2545         -o $@ @SONAMEFLAG@`basename $@`
2546
2547 bin/librpc_lsarpc.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_LSARPC_OBJ)
2548         @echo "Linking $@"
2549         @$(SHLD_LIBRARY) $(RPC_LSARPC_OBJ)
2550
2551 bin/librpc_samr.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SAMR_OBJ)
2552         @echo "Linking $@"
2553         @$(SHLD_LIBRARY) $(RPC_SAMR_OBJ)
2554
2555 bin/librpc_srvsvc.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SRVSVC_OBJ)
2556         @echo "Linking $@"
2557         @$(SHLD_LIBRARY) $(RPC_SRVSVC_OBJ)
2558
2559 bin/librpc_svcctl.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SVCCTL_OBJ)
2560         @echo "Linking $@"
2561         @$(SHLD_LIBRARY) $(RPC_SVCCTL_OBJ)
2562
2563 bin/librpc_ntsvcs.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_NTSVCS_OBJ)
2564         @echo "Linking $@"
2565         @$(SHLD_LIBRARY) $(RPC_NTSVCS_OBJ)
2566
2567 bin/librpc_wkssvc.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_WKSSVC_OBJ)
2568         @echo "Linking $@"
2569         @$(SHLD_LIBRARY) $(RPC_WKSSVC_OBJ)
2570
2571 bin/librpc_NETLOGON.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_NETLOGON_OBJ)
2572         @echo "Linking $@"
2573         @$(SHLD_LIBRARY) $(RPC_NETLOGON_OBJ)
2574
2575 bin/librpc_winreg.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_WINREG_OBJ)
2576         @echo "Linking $@"
2577         @$(SHLD_LIBRARY) $(RPC_WINREG_OBJ)
2578
2579 bin/librpc_initshutdown.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_INITSHUTDOWN_OBJ)
2580         @echo "Linking $@"
2581         @$(SHLD_LIBRARY) $(RPC_INITSHUTDOWN_OBJ)
2582
2583 bin/librpc_dssetup.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_DSSETUP_OBJ)
2584         @echo "Linking $@"
2585         @$(SHLD_LIBRARY) $(RPC_DSSETUP_OBJ)
2586
2587 bin/librpc_spoolss.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_SPOOLSS_OBJ)
2588         @echo "Linking $@"
2589         @$(SHLD_LIBRARY) $(RPC_SPOOLSS_OBJ)
2590
2591 bin/librpc_eventlog.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_EVENTLOG_OBJ)
2592         @echo "Linking $@"
2593         @$(SHLD_LIBRARY) $(RPC_EVENTLOG_OBJ)
2594
2595 bin/librpc_netdfs.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_NETDFS_OBJ)
2596         @echo "Linking $@"
2597         @$(SHLD_LIBRARY) $(RPC_NETDFS_OBJ)
2598
2599 bin/librpc_rpcecho.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_RPCECHO_OBJ)
2600         @echo "Linking $@"
2601         @$(SHLD_LIBRARY) $(RPC_RPCECHO_OBJ)
2602
2603 bin/winbindd: $(BINARY_PREREQS) $(WINBINDD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2604         @echo "Linking $@"
2605         @$(CC) -o $@ $(WINBINDD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
2606                 $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(AUTH_LIBS) \
2607                 $(PASSDB_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) \
2608                 $(ZLIB_LIBS)
2609
2610 bin/vlp: $(BINARY_PREREQS) $(VLP_OBJ) $(LIBTDB) $(LIBTALLOC)
2611         @echo "Linking $@"
2612         @$(CC) -o $@ $(VLP_OBJ) $(LDFLAGS) $(DYNEXP) \
2613                 $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
2614                 $(LIBTALLOC_LIBS) \
2615                 $(LIBTDB_LIBS)
2616
2617 @WINBIND_NSS@: $(BINARY_PREREQS) $(WINBIND_NSS_OBJ)
2618         @echo "Linking $@"
2619         @$(SHLD) $(WINBIND_NSS_LDSHFLAGS) -o $@ $(WINBIND_NSS_OBJ) \
2620                 $(LIBREPLACE_LIBS) $(PTHREAD_LDFLAGS) \
2621                 @SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@
2622
2623 @WINBIND_WINS_NSS@: $(BINARY_PREREQS) $(WINBIND_WINS_NSS_OBJ) $(LIBTALLOC) $(LIBTDB)
2624         @echo "Linking $@"
2625         @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_WINS_NSS_OBJ) \
2626                 $(LDAP_LIBS) $(KRB5LIBS) $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS) \
2627                 @SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@
2628
2629 bin/winbind_krb5_locator.@SHLIBEXT@: $(BINARY_PREREQS) $(WINBIND_KRB5_LOCATOR_OBJ) $(LIBWBCLIENT)
2630         @echo "Linking $@"
2631         @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_KRB5_LOCATOR_OBJ) $(LIBWBCLIENT_LIBS) $(KRB5LIBS) \
2632                 $(LIBREPLACE_LIBS) @SONAMEFLAG@`basename $@`
2633
2634 bin/pam_winbind.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_WINBIND_OBJ) $(LIBTALLOC) $(LIBWBCLIENT)
2635         @echo "Linking shared library $@"
2636         @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_OBJ) -lpam @INIPARSERLIBS@ \
2637                 $(LIBREPLACE_LIBS) $(LIBTALLOC_LIBS) $(LIBWBCLIENT_LIBS) @SONAMEFLAG@`basename $@`
2638
2639 ##########
2640 # Plugins:
2641 ##########
2642
2643 bin/builtin.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_BUILTIN_OBJ)
2644         @echo "Building plugin $@"
2645         @$(SHLD_MODULE) $(AUTH_BUILTIN_OBJ)
2646
2647 bin/domain.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_DOMAIN_OBJ)
2648         @echo "Building plugin $@"
2649         @$(SHLD_MODULE) $(AUTH_DOMAIN_OBJ)
2650
2651 bin/script.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_SCRIPT_OBJ)
2652         @echo "Building plugin $@"
2653         @$(SHLD_MODULE) $(AUTH_SCRIPT_OBJ)
2654
2655 bin/netlogond.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_NETLOGOND_OBJ)
2656         @echo "Building plugin $@"
2657         @$(SHLD_MODULE) $(AUTH_NETLOGOND_OBJ)
2658
2659 bin/winbind.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_WINBIND_OBJ)
2660         @echo "Building plugin $@"
2661         @$(SHLD_MODULE) $(AUTH_WINBIND_OBJ)
2662
2663 bin/wbc.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_WBC_OBJ)
2664         @echo "Building plugin $@"
2665         @$(SHLD_MODULE) $(AUTH_WBC_OBJ)
2666
2667 bin/unix.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_UNIX_OBJ)
2668         @echo "Building plugin $@"
2669         @$(SHLD_MODULE) $(AUTH_UNIX_OBJ)
2670
2671 bin/sam.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_SAM_OBJ)
2672         @echo "Building plugin $@"
2673         @$(SHLD_MODULE) $(AUTH_SAM_OBJ)
2674
2675 bin/ldapsam.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_ldap.o passdb/pdb_nds.o \
2676                         passdb/pdb_ipa.o passdb/pdb_ldap_util.o
2677         @echo "Building plugin $@"
2678         @$(SHLD_MODULE) passdb/pdb_ldap.o passdb/pdb_nds.o passdb/pdb_ipa.o \
2679                         passdb/pdb_ldap_util.o $(LDAP_LIBS)
2680
2681 bin/ads.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_ads.o
2682         @echo "Building plugin $@"
2683         @$(SHLD_MODULE) passdb/pdb_ads.o
2684
2685 bin/tdbsam.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_tdb.o
2686         @echo "Building plugin $@"
2687         @$(SHLD_MODULE) passdb/pdb_tdb.o
2688
2689 bin/wbc_sam.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_wbc_sam.o
2690         @echo "Building plugin $@"
2691         @$(SHLD_MODULE) passdb/pdb_wbc_sam.o
2692
2693 bin/smbpasswd.@SHLIBEXT@: $(BINARY_PREREQS) passdb/pdb_smbpasswd.o
2694         @echo "Building plugin $@"
2695         @$(SHLD_MODULE) passdb/pdb_smbpasswd.o
2696
2697 bin/rid.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_rid.o
2698         @echo "Building plugin $@"
2699         @$(SHLD_MODULE) winbindd/idmap_rid.o
2700
2701 bin/passdb.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_passdb.o
2702         @echo "Building plugin $@"
2703         @$(SHLD_MODULE) winbindd/idmap_passdb.o
2704
2705 bin/autorid.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_autorid.o
2706         @echo "Building plugin $@"
2707         @$(SHLD_MODULE) winbindd/idmap_autorid.o
2708
2709 bin/ad.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ad.o
2710         @echo "Building plugin $@"
2711         @$(SHLD_MODULE) winbindd/idmap_ad.o
2712
2713 bin/hash.@SHLIBEXT@: $(BINARY_PREREQS) $(IDMAP_HASH_OBJ)
2714         @echo "Building plugin $@"
2715         @$(SHLD_MODULE) $(IDMAP_HASH_OBJ)
2716
2717 bin/adex.@SHLIBEXT@: $(BINARY_PREREQS) $(IDMAP_ADEX_OBJ)
2718         @echo "Building plugin $@"
2719         @$(SHLD_MODULE) $(IDMAP_ADEX_OBJ)
2720
2721 bin/tdb2.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_tdb2.o $(IDMAP_RW_OBJ)
2722         @echo "Building plugin $@"
2723         @$(SHLD_MODULE) winbindd/idmap_tdb2.o $(IDMAP_RW_OBJ)
2724
2725 bin/ldap.@SHLIBEXT@: $(BINARY_PREREQS) winbindd/idmap_ldap.o $(IDMAP_RW_OBJ)
2726         @echo "Building plugin $@"
2727         @$(SHLD_MODULE) winbindd/idmap_ldap.o $(IDMAP_RW_OBJ)
2728
2729 # NOTE, there is no build rule for a dynamic default VFS module because
2730 # this one MUST MUST MUST be built statically.
2731
2732 bin/audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AUDIT_OBJ)
2733         @echo "Building plugin $@"
2734         @$(SHLD_MODULE) $(VFS_AUDIT_OBJ)
2735
2736 bin/extd_audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_EXTD_AUDIT_OBJ)
2737         @echo "Building plugin $@"
2738         @$(SHLD_MODULE) $(VFS_EXTD_AUDIT_OBJ)
2739
2740 bin/full_audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_FULL_AUDIT_OBJ)
2741         @echo "Building plugin $@"
2742         @$(SHLD_MODULE) $(VFS_FULL_AUDIT_OBJ)
2743
2744 bin/recycle.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_RECYCLE_OBJ)
2745         @echo "Building plugin $@"
2746         @$(SHLD_MODULE) $(VFS_RECYCLE_OBJ)
2747
2748 bin/netatalk.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_NETATALK_OBJ)
2749         @echo "Building plugin $@"
2750         @$(SHLD_MODULE) $(VFS_NETATALK_OBJ)
2751
2752 bin/fake_perms.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_FAKE_PERMS_OBJ)
2753         @echo "Building plugin $@"
2754         @$(SHLD_MODULE) $(VFS_FAKE_PERMS_OBJ)
2755
2756 bin/default_quota.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_DEFAULT_QUOTA_OBJ)
2757         @echo "Building plugin $@"
2758         @$(SHLD_MODULE) $(VFS_DEFAULT_QUOTA_OBJ)
2759
2760 bin/readonly.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_READONLY_OBJ)
2761         @echo "Building plugin $@"
2762         @$(SHLD_MODULE) $(VFS_READONLY_OBJ)
2763
2764 bin/shadow_copy.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SHADOW_COPY_OBJ)
2765         @echo "Building plugin $@"
2766         @$(SHLD_MODULE) $(VFS_SHADOW_COPY_OBJ)
2767
2768 bin/shadow_copy2.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SHADOW_COPY2_OBJ)
2769         @echo "Building plugin $@"
2770         @$(SHLD_MODULE) $(VFS_SHADOW_COPY2_OBJ)
2771
2772 bin/syncops.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SYNCOPS_OBJ)
2773         @echo "Building plugin $@"
2774         @$(SHLD_MODULE) $(VFS_SYNCOPS_OBJ)
2775
2776 bin/cap.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CAP_OBJ)
2777         @echo "Building plugin $@"
2778         @$(SHLD_MODULE) $(VFS_CAP_OBJ)
2779
2780 bin/expand_msdfs.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_EXPAND_MSDFS_OBJ)
2781         @echo "Building plugin $@"
2782         @$(SHLD_MODULE) $(VFS_EXPAND_MSDFS_OBJ)
2783
2784 bin/afsacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AFSACL_OBJ)
2785         @echo "Building plugin $@"
2786         @$(SHLD_MODULE) $(VFS_AFSACL_OBJ)
2787
2788 bin/xattr_tdb.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_XATTR_TDB_OBJ)
2789         @echo "Building plugin $@"
2790         @$(SHLD_MODULE) $(VFS_XATTR_TDB_OBJ)
2791
2792 bin/posixacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_POSIXACL_OBJ)
2793         @echo "Building plugin $@"
2794         @$(SHLD_MODULE) $(VFS_POSIXACL_OBJ)
2795
2796 bin/aixacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIXACL_OBJ)
2797         @echo "Building plugin $@"
2798         @$(SHLD_MODULE) $(VFS_AIXACL_OBJ)
2799
2800 bin/aixacl2.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIXACL2_OBJ)
2801         @echo "Building plugin $@"
2802         @$(SHLD_MODULE) $(VFS_AIXACL2_OBJ)
2803
2804 bin/solarisacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SOLARISACL_OBJ)
2805         @echo "Building plugin $@"
2806         @$(SHLD_MODULE) $(VFS_SOLARISACL_OBJ)
2807
2808 bin/zfsacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ZFSACL_OBJ)
2809         @echo "Building plugin $@"
2810         @$(SHLD_MODULE) $(VFS_ZFSACL_OBJ) @ZFSACL_LIBS@
2811
2812 bin/irixacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_IRIXACL_OBJ)
2813         @echo "Building plugin $@"
2814         @$(SHLD_MODULE) $(VFS_IRIXACL_OBJ)
2815
2816 bin/hpuxacl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_HPUXACL_OBJ)
2817         @echo "Building plugin $@"
2818         @$(SHLD_MODULE) $(VFS_HPUXACL_OBJ)
2819
2820 bin/tru64acl.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_TRU64ACL_OBJ)
2821         @echo "Building plugin $@"
2822         @$(SHLD_MODULE) $(VFS_TRU64ACL_OBJ)
2823
2824 bin/catia.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CATIA_OBJ)
2825         @echo "Building plugin $@"
2826         @$(SHLD_MODULE) $(VFS_CATIA_OBJ)
2827
2828 bin/streams_xattr.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_STREAMS_XATTR_OBJ)
2829         @echo "Building plugin $@"
2830         @$(SHLD_MODULE) $(VFS_STREAMS_XATTR_OBJ)
2831
2832 bin/streams_depot.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_STREAMS_DEPOT_OBJ)
2833         @echo "Building plugin $@"
2834         @$(SHLD_MODULE) $(VFS_STREAMS_DEPOT_OBJ)
2835
2836 bin/cacheprime.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CACHEPRIME_OBJ)
2837         @echo "Building plugin $@"
2838         @$(SHLD_MODULE) $(VFS_CACHEPRIME_OBJ)
2839
2840 bin/prealloc.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_PREALLOC_OBJ)
2841         @echo "Building plugin $@"
2842         @$(SHLD_MODULE) $(VFS_PREALLOC_OBJ)
2843
2844 bin/commit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_COMMIT_OBJ)
2845         @echo "Building plugin $@"
2846         @$(SHLD_MODULE) $(VFS_COMMIT_OBJ)
2847
2848 bin/gpfs.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_GPFS_OBJ)
2849         @echo "Building plugin $@"
2850         @$(SHLD_MODULE) $(VFS_GPFS_OBJ)
2851
2852 bin/gpfs_hsm_notify.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_GPFS_HSM_NOTIFY_OBJ)
2853         @echo "Building plugin $@"
2854         @$(SHLD_MODULE) $(VFS_GPFS_HSM_NOTIFY_OBJ)
2855
2856 bin/notify_fam.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_NOTIFY_FAM_OBJ)
2857         @echo "Building plugin $@"
2858         @$(SHLD_MODULE) $(VFS_NOTIFY_FAM_OBJ) @SMB_FAM_LIBS@
2859
2860 bin/readahead.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_READAHEAD_OBJ)
2861         @echo "Building plugin $@"
2862         @$(SHLD_MODULE) $(VFS_READAHEAD_OBJ)
2863
2864 bin/tsmsm.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_TSMSM_OBJ)
2865         @echo "Building plugin $@"
2866         @$(SHLD_MODULE) $(VFS_TSMSM_OBJ)
2867
2868 bin/fileid.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_FILEID_OBJ)
2869         @echo "Building plugin $@"
2870         @$(SHLD_MODULE) $(VFS_FILEID_OBJ)
2871
2872 bin/aio_fork.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIO_FORK_OBJ)
2873         @echo "Building plugin $@"
2874         @$(SHLD_MODULE) $(VFS_AIO_FORK_OBJ)
2875
2876 bin/aio_pthread.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIO_PTHREAD_OBJ)
2877         @echo "Building plugin $@"
2878         @$(SHLD_MODULE) $(VFS_AIO_PTHREAD_OBJ)
2879
2880 bin/aio_linux.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_AIO_LINUX_OBJ)
2881         @echo "Building plugin $@"
2882         @$(SHLD_MODULE) $(VFS_AIO_LINUX_OBJ)
2883
2884 bin/preopen.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_PREOPEN_OBJ)
2885         @echo "Building plugin $@"
2886         @$(SHLD_MODULE) $(VFS_PREOPEN_OBJ)
2887
2888 bin/acl_xattr.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ACL_XATTR_OBJ)
2889         @echo "Building plugin $@"
2890         @$(SHLD_MODULE) $(VFS_ACL_XATTR_OBJ)
2891
2892 bin/smb_traffic_analyzer.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SMB_TRAFFIC_ANALYZER_OBJ)
2893         @echo "Building plugin $@"
2894         @$(SHLD_MODULE) $(VFS_SMB_TRAFFIC_ANALYZER_OBJ)
2895
2896 bin/acl_tdb.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_ACL_TDB_OBJ)
2897         @echo "Building plugin $@"
2898         @$(SHLD_MODULE) $(VFS_ACL_TDB_OBJ)
2899
2900 bin/pc_test.@SHLIBEXT@: $(BINARY_PREREQS) $(PERFCOUNT_TEST_OBJ)
2901         @echo "Building plugin $@"
2902         @$(SHLD_MODULE) $(PERFCOUNT_TEST_OBJ)
2903
2904 bin/registry.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/registry.o
2905         @echo "Building plugin $@"
2906         @$(SHLD_MODULE) libgpo/gpext/registry.o
2907
2908 bin/scripts.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/scripts.o
2909         @echo "Building plugin $@"
2910         @$(SHLD_MODULE) libgpo/gpext/scripts.o
2911
2912 bin/security.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/security.o
2913         @echo "Building plugin $@"
2914         @$(SHLD_MODULE) libgpo/gpext/security.o
2915
2916 bin/dirsort.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_DIRSORT_OBJ)
2917         @echo "Building plugin $@"
2918         @$(SHLD_MODULE) $(VFS_DIRSORT_OBJ)
2919
2920 bin/scannedonly.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_SCANNEDONLY_OBJ)
2921         @echo "Building plugin $@"
2922         @$(SHLD_MODULE) $(VFS_SCANNEDONLY_OBJ)
2923
2924 bin/crossrename.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_CROSSRENAME_OBJ)
2925         @echo "Building plugin $@"
2926         @$(SHLD_MODULE) $(VFS_CROSSRENAME_OBJ)
2927
2928 bin/linux_xfs_sgid.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_LINUX_XFS_SGID_OBJ)
2929         @echo "Building plugin $@"
2930         @$(SHLD_MODULE) $(VFS_LINUX_XFS_SGID_OBJ)
2931
2932 bin/time_audit.@SHLIBEXT@: $(BINARY_PREREQS) $(VFS_TIME_AUDIT_OBJ)
2933         @echo "Building plugin $@"
2934         @$(SHLD_MODULE) $(VFS_TIME_AUDIT_OBJ)
2935
2936 #########################################################
2937 ## IdMap NSS plugins
2938
2939 ## None here right now
2940 #########################################################
2941
2942 bin/wbinfo: $(BINARY_PREREQS) $(WBINFO_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2943         @echo Linking $@
2944         @$(CC) -o $@ $(LDFLAGS) $(WBINFO_OBJ) $(DYNEXP) $(LIBS) \
2945                 $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
2946                 $(LIBWBCLIENT_LIBS)
2947
2948 bin/ntlm_auth: $(BINARY_PREREQS) $(NTLM_AUTH_OBJ) $(PARAM_OBJ) \
2949         $(LIB_NONSMBD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2950         @echo Linking $@
2951         @$(CC) -o $@ $(LDFLAGS) $(DYNEXP) $(NTLM_AUTH_OBJ) \
2952                 $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBS) $(ZLIB_LIBS) \
2953                 $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
2954                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) @INIPARSERLIBS@
2955
2956 bin/pam_smbpass.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_SMBPASS_OBJ) $(LIBTALLOC) $(LIBWBCLIENT) $(LIBTDB)
2957         @echo "Linking shared library $@"
2958         @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_SMBPASS_OBJ) -lpam $(DYNEXP) \
2959                 $(LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(KRB5LIBS) $(ZLIB_LIBS) \
2960                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS)
2961
2962 bin/tdbbackup: $(BINARY_PREREQS) $(TDBBACKUP_OBJ) $(LIBTALLOC) $(LIBTDB)
2963         @echo Linking $@
2964         @$(CC) -o $@ $(LDFLAGS) $(TDBBACKUP_OBJ) $(DYNEXP) \
2965                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
2966
2967 bin/tdbtool: $(BINARY_PREREQS) $(TDBTOOL_OBJ) $(LIBTALLOC) $(LIBTDB)
2968         @echo Linking $@
2969         @$(CC) -o $@ $(LDFLAGS) $(TDBTOOL_OBJ) $(DYNEXP) \
2970                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
2971
2972 bin/tdbdump: $(BINARY_PREREQS) $(TDBDUMP_OBJ) $(LIBTDB)
2973         @echo Linking $@
2974         @$(CC) -o $@ $(LDFLAGS) $(TDBDUMP_OBJ) $(DYNEXP) $(LIBTDB_LIBS) $(LIBREPLACE_LIBS)
2975
2976 bin/tdbrestore: $(BINARY_PREREQS) $(TDBRESTORE_OBJ) $(LIBTDB)
2977         @echo Linking $@
2978         @$(CC) -o $@ $(LDFLAGS) $(TDBRESTORE_OBJ) $(DYNEXP) $(LIBTDB_LIBS) $(LIBREPLACE_LIBS)
2979
2980 bin/tdbtorture: $(BINARY_PREREQS) $(TDBTORTURE_OBJ) $(LIBTALLOC) $(LIBTDB)
2981         @echo Linking $@
2982         @$(CC) -o $@ $(LDFLAGS) $(TDBTORTURE_OBJ) $(DYNEXP) \
2983                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
2984
2985 bin/timelimit: script/tests/timelimit.o
2986         @echo Linking $@
2987         @$(CC) -o $@ $(DYNEXP) script/tests/timelimit.o $(LDFLAGS)
2988
2989 bin/rpc_open_tcp: $(BINARY_PREREQS) $(RPC_OPEN_TCP_OBJ) $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2990         @echo "Linking $@"
2991         @$(CC) -o $@ $(RPC_OPEN_TCP_OBJ) $(LDFLAGS) $(DYNEXP) \
2992                 $(LIBS) $(LIBTALLOC_LIBS) $(LIBWBCLIENT_LIBS) \
2993                 $(LDAP_LIBS) $(KRB5LIBS) $(NSCD_LIBS)
2994
2995 bin/test_lp_load: $(BINARY_PREREQS) $(TEST_LP_LOAD_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
2996         @echo "Linking $@"
2997         @$(CC) -o $@ $(TEST_LP_LOAD_OBJ) \
2998                 $(LDFLAGS) $(DYNEXP) $(LIBS) \
2999                 $(LDAP_LIBS) $(LIBWBCLIENT_LIBS) \
3000                 $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
3001
3002 bin/dbwrap_tool: $(DBWRAP_TOOL_OBJ) $(LIBTALLOC) $(LIBTDB)
3003         @echo "Linking $@"
3004         @$(CC) -o $@ $(DBWRAP_TOOL_OBJ)\
3005                 $(LDFLAGS) $(DYNEXP) $(LIBS) \
3006                 $(LDAP_LIBS) \
3007                 $(POPT_LIBS) \
3008                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
3009
3010 install-dbwrap_tool:: bin/dbwrap_tool
3011         @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $<
3012
3013 bin/dbwrap_torture: $(DBWRAP_TORTURE_OBJ) $(LIBTALLOC) $(LIBTDB)
3014         @echo "Linking $@"
3015         @$(CC) -o $@ $(DBWRAP_TORTURE_OBJ)\
3016                 $(LDFLAGS) $(DYNEXP) $(LIBS) \
3017                 $(LDAP_LIBS) \
3018                 $(POPT_LIBS) \
3019                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
3020
3021 install-dbwrap_torture:: bin/dbwrap_torture
3022         @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $<
3023
3024 bin/split_tokens: $(BINARY_PREREQS) $(SPLIT_TOKENS_OBJ) @BUILD_POPT@ $(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
3025         @echo "Linking $@"
3026         @$(CC) -o $@ $(SPLIT_TOKENS_OBJ) \
3027                 $(LDFLAGS) $(DYNEXP) \
3028                 $(LIBS) $(POPT_LIBS) \
3029                 $(LDAP_LIBS) $(LIBWBCLIENT_LIBS) \
3030                 $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
3031
3032 install:: installservers installbin installman \
3033                 installscripts installdat installmodules @SWAT_INSTALL_TARGETS@ \
3034                 @INSTALL_PAM_MODULES@ installlibs installmo
3035
3036 install-everything:: install installmodules
3037
3038 # DESTDIR is used here to prevent packagers wasting their time
3039 # duplicating the Makefile. Remove it and you will have the privelege
3040 # of package each samba release for muliple versions of multiple
3041 # distributions and operating systems, or at least supplying patches
3042 # to all the packaging files required for this, prior to committing
3043 # the removal of DESTDIR. Do not remove it even though you think it
3044 # is not used
3045
3046 installdirs::
3047         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) \
3048                 $(DESTDIR) $(prefix) $(BINDIR) $(SBINDIR) $(LIBDIR) \
3049                 $(VARDIR) $(PRIVATE_DIR) $(PIDDIR) $(LOCKDIR) $(STATEDIR) \
3050                 $(NMBDSOCKETDIR) $(WINBINDD_SOCKET_DIR) $(WINBINDD_PRIVILEGED_SOCKET_DIR) \
3051                 $(CACHEDIR) $(MANDIR) $(CODEPAGEDIR) $(MODULESDIR) $(LOCALEDIR)
3052
3053 installservers:: all installdirs
3054         @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(SBINDIR) $(SBIN_PROGS)
3055
3056 installbin:: all installdirs
3057         @$(SHELL) script/installbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $(BIN_PROGS)
3058
3059 # Some symlinks are required for the 'probing' of modules.
3060 # This mechanism should go at some point..
3061 installmodules:: modules installdirs
3062         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(VFSLIBDIR) $(VFS_MODULES)
3063         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PDBLIBDIR) $(PDB_MODULES)
3064         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(IDMAPLIBDIR) $(IDMAP_MODULES)
3065         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(NSSINFOLIBDIR) $(NSS_INFO_MODULES)
3066         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(AUTHLIBDIR) $(AUTH_MODULES)
3067         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(GPEXTLIBDIR) $(GPEXT_MODULES)
3068         @$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PERFCOUNTLIBDIR) $(PERFCOUNT_MODULES)
3069         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(PDBLIBDIR) ldapsam.@SHLIBEXT@ NDS_ldapsam.@SHLIBEXT@
3070         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(PDBLIBDIR) ldapsam.@SHLIBEXT@ NDS_ldapsam_compat.@SHLIBEXT@
3071         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(PDBLIBDIR) ldapsam.@SHLIBEXT@ ldapsam_compat.@SHLIBEXT@
3072         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) rhosts.@SHLIBEXT@ hostsequiv.@SHLIBEXT@
3073         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) sam.@SHLIBEXT@ sam_ignoredomain.@SHLIBEXT@
3074         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) domain.@SHLIBEXT@ trustdomain.@SHLIBEXT@ ntdomain.@SHLIBEXT@
3075         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(AUTHLIBDIR) builtin.@SHLIBEXT@ guest.@SHLIBEXT@ fixed_challenge.@SHLIBEXT@ name_to_ntstatus.@SHLIBEXT@
3076         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(NSSINFOLIBDIR) ../idmap/ad.@SHLIBEXT@ rfc2307.@SHLIBEXT@ sfu.@SHLIBEXT@ sfu20.@SHLIBEXT@
3077         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(NSSINFOLIBDIR) ../idmap/adex.@SHLIBEXT@ adex.@SHLIBEXT@
3078         @$(SHELL) $(srcdir)/script/linkmodules.sh $(DESTDIR)$(NSSINFOLIBDIR) ../idmap/hash.@SHLIBEXT@ hash.@SHLIBEXT@
3079
3080 installscripts:: installdirs
3081         @$(SHELL) $(srcdir)/script/installscripts.sh $(INSTALLPERMS_BIN) $(DESTDIR)$(BINDIR) $(SCRIPTS)
3082
3083 installdat:: installdirs
3084         @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR) $(CODEPAGEDIR) $(srcdir)
3085
3086 installmsg:: installdirs
3087         @$(SHELL) $(srcdir)/script/installmsg.sh $(DESTDIR) $(CODEPAGEDIR) $(srcdir)
3088
3089 installswat:: installdirs installmsg
3090         @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR) $(SWATDIR) $(srcdir)
3091
3092 installpammodules:: $(PAM_MODULES)
3093         @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(PAMMODULESDIR)
3094         @for module in $(PAM_MODULES); do \
3095                 echo "Installing module $${module} as $(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@ "; \
3096                 $(INSTALLCMD) -m $(INSTALLPERMS_BIN) bin/$${module}.@SHLIBEXT@ \
3097                         "$(DESTDIR)/$(PAMMODULESDIR)"; \
3098         done
3099
3100 # revert to the previously installed version
3101 revert::
3102         @$(SHELL) $(srcdir)/script/revert.sh $(SBINDIR) $(SBIN_PROGS)
3103         @$(SHELL) $(srcdir)/script/revert.sh $(BINDIR) $(BIN_PROGS) $(SCRIPTS)
3104
3105 installman:: installdirs
3106         @$(SHELL) $(srcdir)/script/installman.sh $(DESTDIR)$(MANDIR) $(srcdir) C "@ROFF@"
3107
3108 installmo:: all installdirs
3109         @$(SHELL) $(srcdir)/script/installmo.sh $(DESTDIR) $(LOCALEDIR) $(srcdir)
3110
3111 .PHONY: showlayout
3112
3113 showlayout::
3114         @echo "Samba will be installed into:"
3115         @echo " prefix:                $(prefix)"
3116         @echo " exec_prefix:           $(exec_prefix)"
3117         @echo " sysconfdir:            $(sysconfdir)"
3118         @echo " localstatedir:         $(localstatedir)"
3119         @echo " datarootdir:           $(datarootdir)"
3120         @echo " BINDIR:                $(BINDIR)"
3121         @echo " SBINDIR:               $(SBINDIR)"
3122         @echo " LIBDIR:                $(LIBDIR)"
3123 #       @echo " LIBEXECDIR:            $(LIBEXECDIR)"
3124         @echo " MANDIR:                $(MANDIR)"
3125         @echo " DATADIR:               $(DATADIR)"
3126         @echo " LOCALEDIR:             $(LOCALEDIR)"
3127 #       @echo " SCRIPTSBINDIR:         $(SCRIPTSBINDIR)"
3128 #       @echo " PYTHONDIR:             $(PYTHONDIR)"
3129 #       @echo " PYTHONARCHDIR:         $(PYTHONARCHDIR)"
3130         @echo " MODULESDIR:            $(MODULESDIR)"
3131         @echo " INCLUDEDIR:            $(INCLUDEDIR)"
3132         @echo " SETUPDIR:              $(SETUPDIR)"
3133 #       @echo " PKGCONFIGDIR:          $(PKGCONFIGDIR)"
3134         @echo " SWATDIR:               $(SWATDIR)"
3135         @echo " CODEPAGEDIR:           $(CODEPAGEDIR)"
3136         @echo " PAMMODULESDIR:         $(PAMMODULESDIR)"
3137         @echo " CONFIGDIR:             $(CONFIGDIR)"
3138         @echo " PRIVATE_DIR:           $(PRIVATE_DIR)"
3139         @echo " LOCKDIR:               $(LOCKDIR)"
3140         @echo " PIDDIR:                $(PIDDIR)"
3141         @echo " STATEDIR:              $(STATEDIR)"
3142         @echo " CACHEDIR:              $(CACHEDIR)"
3143         @echo " LOGFILEBASE:           $(LOGFILEBASE)"
3144         @echo " SOCKET_DIR:            $(SOCKET_DIR)"
3145         @echo " PRIVILEGED_SOCKET_DIR: $(PRIVILEGED_SOCKET_DIR)"
3146         @echo " WINBINDD_SOCKET_DIR:   $(WINBINDD_SOCKET_DIR)"
3147         @echo " WINBINDD_PRIVILEGED_SOCKET_DIR: $(WINBINDD_PRIVILEGED_SOCKET_DIR)"
3148         @echo " NMBDSOCKETDIR:         $(NMBDSOCKETDIR)"
3149 #       @echo " NTP_SIGND_SOCKET_DIR:  $(NTP_SIGND_SOCKET_DIR)"
3150         @echo " NCALRPCDIR:            $(NCALRPCDIR)"
3151         @echo " CONFIGFILE:            $(CONFIGFILE)"
3152         @echo " LMHOSTSFILE:           $(LMHOSTSFILE)"
3153         @echo " SMB_PASSWD_FILE:       $(SMB_PASSWD_FILE)"
3154
3155
3156 uninstall:: uninstallmo uninstallman uninstallservers uninstallbin uninstallscripts uninstalldat uninstallswat uninstallmodules uninstalllibs @UNINSTALL_PAM_MODULES@
3157
3158 uninstallmo::
3159         @$(SHELL) $(srcdir)/script/uninstallmo.sh $(DESTDIR) $(LOCALEDIR) $(srcdir)
3160
3161 uninstallman::
3162         @$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(MANDIR) $(srcdir) C
3163
3164 uninstallservers::
3165         @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(SBINDIR) $(SBIN_PROGS)
3166
3167 uninstallbin::
3168         @$(SHELL) script/uninstallbin.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(BINDIR) $(BIN_PROGS)
3169
3170 uninstallmodules::
3171         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(VFSLIBDIR) $(VFS_MODULES)
3172         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PDBLIBDIR) $(PDB_MODULES)
3173         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(IDMAPLIBDIR) $(IDMAP_MODULES)
3174         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(AUTHLIBDIR) $(AUTH_MODULES)
3175         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(GPEXTLIBDIR) $(GPEXT_MODULES)
3176         @$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(prefix) $(PERFCOUNTLIBDIR) $(PERFCOUNT_MODULES)
3177
3178 uninstallscripts::
3179         @$(SHELL) $(srcdir)/script/uninstallscripts.sh $(INSTALLPERMS_BIN) $(DESTDIR)$(BINDIR) $(SCRIPTS)
3180
3181 uninstalldat::
3182         @$(SHELL) $(srcdir)/script/uninstalldat.sh $(DESTDIR) $(LIBDIR) $(srcdir)
3183
3184 uninstallmsg::
3185         @$(SHELL) $(srcdir)/script/uninstallmsg.sh $(DESTDIR) $(LIBDIR) $(srcdir)
3186
3187 uninstallswat:: uninstallmsg
3188         @$(SHELL) $(srcdir)/script/uninstallswat.sh $(DESTDIR) $(SWATDIR) $(srcdir)
3189
3190 uninstallpammodules::
3191         @for module in $(PAM_MODULES); do \
3192                 echo "Removing $(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@ "; \
3193                 rm -f "$(DESTDIR)/$(PAMMODULESDIR)/$${module}.@SHLIBEXT@"; \
3194         done
3195
3196 cleanlibs::
3197         -rm -f ../lib/*/*.o ../lib/*/*/*.o \
3198                 ../lib/*/*.ho \
3199                 ../libcli/*.o ../libcli/*/*.o ../libcli/*/*/*.o \
3200                 ../librpc/*/*.o \
3201                 ../libgpo/*.o ../libgpo/*/*.o \
3202                 ../libds/*.o ../libds/*/*.o ../dynconfig/*.o ../auth/*.o ../auth/*/*.o
3203
3204 clean:: cleanlibs
3205         -rm -f include/build_env.h
3206         -rm -f smbd/build_options.c
3207         -rm -f param/param_local.h
3208         -rm -f param/param_global.h
3209         -rm -f ../lib/param/param_local.h
3210         -rm -f ../lib/param/param_global.h
3211         -rm -f ../lib/param/param_proto.h
3212         -rm -f ../lib/param/s3_param.h
3213         -rm -f $(PRECOMPILED_HEADER)
3214         -rm -f core */*~ *~ \
3215                 */*.o */*/*.o */*/*/*.o */*/*/*/*.o \
3216                 ../testsuite/*/*.o \
3217                 ../nsswitch/*.o ../nsswitch/*/*.o ../nsswitch/*/*/*.o ../nsswitch/*.@SHLIBEXT@ \
3218                 ../client/*.o \
3219                 */*.@SHLIBEXT@ */*/*.@SHLIBEXT@ */*/*/*.@SHLIBEXT@ \
3220                 $(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) \
3221                 $(MODULES) $(TORTURE_PROGS) \
3222                 $(EVERYTHING_PROGS) \
3223                 bin/timelimit \
3224                 .headers.stamp */src/*.o
3225         -rm -rf t_dir
3226
3227 include/build_env.h: script/build_env.sh
3228         @echo Building include/build_env.h
3229         @$(SHELL) $(srcdir)/script/build_env.sh $(srcdir) $(builddir) $(CC) \
3230           > $(builddir)/include/build_env.h
3231
3232 proto::
3233
3234 etags::
3235         rm -f TAGS
3236         find $(srcdir)/.. -name "*.[ch]" | xargs -n 100 etags --append $(ETAGS_OPTIONS)
3237
3238 ctags::
3239         ctags $(CTAGS_OPTIONS) `find $(srcdir)/.. -name "*.[ch]" | grep -v proto\.h`
3240
3241 realclean:: clean
3242         -rm -f config.log bin/.dummy script/findsmb script/gen-8bit-gap.sh
3243         -rm -f script/installbin.sh script/uninstallbin.sh
3244
3245 distclean:: realclean
3246         -rm -f smbadduser
3247         -rm -f include/autoconf/config.h Makefile
3248         -rm -f config.status config.cache so_locations
3249         -rm -rf .deps TAGS
3250
3251 realdistclean:: distclean
3252         -rm -f include/autoconf/config.h.in
3253         -rm -f include/version.h
3254         -rm -f configure
3255
3256 # when configure.in is updated, reconfigure
3257 $(srcdir)/configure: $(srcdir)/configure.in
3258         @echo "WARNING: you need to rerun ./autogen.sh"
3259
3260 config.status: $(srcdir)/configure
3261         @echo "WARNING: you need to run ./configure"
3262
3263 Makefile: $(srcdir)/Makefile.in config.status
3264         @echo "WARNING: you need to run ./config.status"
3265
3266 ######################################################################
3267 # Samba Testing Framework
3268
3269 # Check shared libs for unresolved symbols
3270 test_shlibs:
3271         @echo "Testing $? "
3272         @$(LIB_PATH_VAR)=./bin && \
3273         export $(LIB_PATH_VAR) && \
3274         for module in $?; do \
3275                 ./script/tests/dlopen.sh $(LIBDL) $${module} \
3276                         || exit 1; \
3277         done
3278
3279 # Check for NSS module problems.
3280 test_nss_modules:: nss_modules
3281         @echo "Testing $(NSS_MODULES) "
3282         @$(LIB_PATH_VAR)=./bin && \
3283         export $(LIB_PATH_VAR) && \
3284         for module in $(NSS_MODULES); do \
3285                 ./script/tests/dlopen.sh $(LIBDL) $${module} \
3286                         || exit 1; \
3287         done
3288
3289 # Check for PAM module problems.  Specifically, check that every module we
3290 # built can actually be loaded by a minimal PAM-aware application.
3291 test_pam_modules:: pam_modules
3292         @echo "Testing $(PAM_MODULES) "
3293         @$(LIB_PATH_VAR)=./bin && \
3294         export $(LIB_PATH_VAR) && \
3295         for module in $(PAM_MODULES); do \
3296                 ./script/tests/dlopen.sh -lpam $(LIBDL) bin/$${module}.@SHLIBEXT@ \
3297                         || exit 1; \
3298         done
3299
3300
3301 ##
3302 ## Targets for 'make test'
3303 ##
3304
3305 valgrindtest:: all torture timelimit
3306         @echo Running Test suite with valgrind
3307         @$(MAKE) test \
3308          NMBD_VALGRIND="xterm -n nmbd -e valgrind -q --db-attach=yes --num-callers=30" \
3309          WINBINDD_VALGRIND="xterm -n winbindd -e valgrind -q --db-attach=yes --num-callers=30" \
3310          SMBD_VALGRIND="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \
3311          VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log"
3312
3313 selftestdir = ../selftest
3314
3315 S3_LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)="$(builddir)/bin:$$$(LIB_PATH_VAR)"
3316
3317 test:: all torture timelimit
3318         @LIB_PATH_VAR=$(LIB_PATH_VAR) $(S3_LD_LIBPATH_OVERRIDE) \
3319                 NSS_WRAPPER_WINBIND_SO_PATH="$(srcdir)/../nsswitch/libnss_winbind.so" \
3320                 SELFTESTDIR="$(selftestdir)" SELFTESTPREFIX="$(selftest_prefix)" \
3321                 SOURCEDIR="$(srcdir)" \
3322                 VFSLIBDIR="$(builddir)/bin" \
3323                 RUN_FROM_BUILD_FARM="$(RUN_FROM_BUILD_FARM)" \
3324                 SUBUNIT_FORMATTER="$(SUBUNIT_FORMATTER)" \
3325                 PERL="$(PERL)" PYTHON="$(PYTHON)" \
3326                 $(srcdir)/selftest/s3-selftest.sh
3327
3328 test-%:
3329         $(MAKE) test TESTS=$*
3330
3331 buildfarm-test:
3332         $(MAKE) test RUN_FROM_BUILD_FARM=yes
3333
3334 subunit-test:
3335         $(MAKE) test SUBUNIT_FORMATTER=cat
3336
3337 SELFTEST_TESTENV = s3dc
3338
3339 testenv:
3340         $(MAKE) test SELFTEST_TESTENV=$(SELFTEST_TESTENV) TESTS="--testenv"
3341
3342 gdbtestenv:
3343         $(MAKE) test SELFTEST_TESTENV=$(SELFTEST_TESTENV) \
3344                 NMBD_VALGRIND="xterm -n nmbd -title nmbd -e $(selftestdir)/gdb_run $(S3_LD_LIBPATH_OVERRIDE)" \
3345                 WINBINDD_VALGRIND="xterm -n winbindd -title winbindd -e $(selftestdir)/gdb_run $(S3_LD_LIBPATH_OVERRIDE)" \
3346                 SMBD_VALGRIND="xterm -n smbd -title smbd -e $(selftestdir)/gdb_run $(S3_LD_LIBPATH_OVERRIDE)" \
3347                 TESTS="--testenv"
3348
3349 valgrindtestenv:
3350         $(MAKE) test SELFTEST_TESTENV=$(SELFTEST_TESTENV) \
3351                 NMBD_VALGRIND="xterm -n nmbd -title nmbd -e valgrind -q --db-attach=yes --num-callers=30" \
3352                 WINBINDD_VALGRIND="xterm -n winbindd -title winbindd -e valgrind -q --db-attach=yes --num-callers=30" \
3353                 SMBD_VALGRIND="xterm -n smbd -title smbd -e valgrind -q --db-attach=yes --num-callers=30" \
3354                 TESTS="--testenv"
3355
3356
3357 # Check for Winbind struct 32/64bit padding
3358 test_wbpad:
3359         @echo "Testing winbind request/response structure for 32/64bit padding"
3360         @./script/tests/wb_pad.sh || exit 1;
3361
3362 ##
3363 ## Examples:
3364 ##
3365
3366 libsmbclient_examples: libsmbclient
3367         $(MAKE) -C ../examples/libsmbclient -f Makefile.internal
3368
3369 clean_libsmbclient_examples:
3370         $(MAKE) -C ../examples/libsmbclient -f Makefile.internal clean
3371
3372 libnetapi_examples: libnetapi
3373         $(MAKE) -C lib/netapi/examples
3374
3375 clean_libnetapi_examples:
3376         $(MAKE) -C lib/netapi/examples clean
3377
3378 .PHONY: bin/smbtorture4 bin/ndrdump4
3379
3380 bin/smbtorture4: $(BINARY_PREREQS)
3381         $(MAKE) -f Makefile-smbtorture4 bin/smbtorture4
3382
3383 bin/ndrdump4: $(BINARY_PREREQS)
3384         $(MAKE) -f Makefile-smbtorture4 bin/ndrdump4
3385
3386 .PHONY: vfs_examples
3387
3388 vfs_examples:
3389         ( \
3390         cd ../examples/VFS && \
3391         test -e ./configure || exit 0 && \
3392         ./configure && \
3393         make clean && \
3394         make \
3395         )