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