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