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