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