1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-17 02:05:21 +03:00
samba-mirror/source4/Makefile.in
Stefan Metzmacher e06687eb17 merge the version.h autogeneration stuff from 3.0
metze
(This used to be commit 24dc237e109f6dce69814b22e0fb7878a7f6bfa8)
2004-01-28 12:47:52 +00:00

616 lines
22 KiB
Makefile

#########################################################################
# Makefile.in for Samba - rewritten for autoconf support
# Copyright Andrew Tridgell 1992-2003
# Copyright (C) 2001 by Martin Pool <mbp@samba.org>
# Copyright (C) 2002 Andrew Bartlett <abartlet@samba.org>
# Copyright (C) 2003 Anthony Liguori <aliguor@us.ibm.com>
# Copyright (C) 2003 James Myers <myersjj@samba.org>
# Copyright (C) 2002-2003 Jelmer Vernooij <jelmer@samba.org>
# Copyright (C) 2004 Stefan Metzmacher <metze@samba.org>
###########################################################################
prefix=@prefix@
exec_prefix=@exec_prefix@
LIBS=@LIBS@
CC=@CC@
SHLD=@SHLD@
CFLAGS=@CFLAGS@
CPPFLAGS=@CPPFLAGS@
LDFLAGS=@LDFLAGS@
LDSHFLAGS=@LDSHFLAGS@ @LDFLAGS@ @CFLAGS@
AWK=@AWK@
PERL=@PERL@
DYNEXP=@DYNEXP@
TERMLDFLAGS=@TERMLDFLAGS@
TERMLIBS=@TERMLIBS@
VPATH=@srcdir@
srcdir=@srcdir@
builddir=@builddir@
SHELL=/bin/sh
BASEDIR= @prefix@
BINDIR = @bindir@
SBINDIR = @sbindir@
LIBDIR = @libdir@
CONFIGDIR = @configdir@
VARDIR = @localstatedir@
# The permissions to give the executables
INSTALLPERMS = 0755
# set these to where to find various files
# These can be overridden by command line switches (see smbd(8))
# or in smb.conf (see smb.conf(5))
LOGFILEBASE = @logfilebase@
CONFIGFILE = $(CONFIGDIR)/smb.conf
LMHOSTSFILE = $(CONFIGDIR)/lmhosts
# This is where smbpasswd et al go
PRIVATEDIR = @privatedir@
SMB_PASSWD_FILE = $(PRIVATEDIR)/smbpasswd
# the directory where lock files go
LOCKDIR = @lockdir@
# the directory where pid files go
PIDDIR = @piddir@
FLAGS = $(CFLAGS) @FLAGS1@ -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I. $(CPPFLAGS) -I$(srcdir)
FLAGS32 =
PASSWD_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" -DPRIVATE_DIR=\"$(PRIVATEDIR)\"
PATH_FLAGS1 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DSBINDIR=\"$(SBINDIR)\"
PATH_FLAGS2 = $(PATH_FLAGS1) -DBINDIR=\"$(BINDIR)\"
PATH_FLAGS3 = $(PATH_FLAGS2) -DLMHOSTSFILE=\"$(LMHOSTSFILE)\"
PATH_FLAGS4 = $(PATH_FLAGS3) -DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\"
PATH_FLAGS5 = $(PATH_FLAGS4) -DLIBDIR=\"$(LIBDIR)\" \
-DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"@SHLIBEXT@\"
PATH_FLAGS6 = $(PATH_FLAGS5) -DCONFIGDIR=\"$(CONFIGDIR)\"
PATH_FLAGS = $(PATH_FLAGS6) $(PASSWD_FLAGS)
# Note that all executable programs now provide for an optional executable suffix.
SBIN_PROGS = bin/smbd@EXEEXT@
BIN_PROGS = bin/smbclient@EXEEXT@
TORTURE_PROGS = bin/smbtorture@EXEEXT@ \
bin/gentest@EXEEXT@ \
bin/locktest@EXEEXT@ \
bin/masktest@EXEEXT@ \
bin/ndrdump@EXEEXT@
CHARSET_MODULES = @CHARSET_MODULES@
CHARSET_LIBDIR = $(LIBDIR)/charset
DCERPC_MODULES = @DCERPC_MODULES@
DCERPC_LIBDIR = $(LIBDIR)/dcerpc
NTVFS_MODULES = @NTVFS_MODULES@
NTVFS_LIBDIR = $(LIBDIR)/ntvfs
MODULES = $(CHARSET_MODULES) $(DCERPC_MODULES) $(NTVFS_MODULES)
######################################################################
# object file lists
######################################################################
TDBBASE_OBJ = tdb/tdb.o tdb/spinlock.o
TDB_OBJ = $(TDBBASE_OBJ) tdb/tdbutil.o
LIB_OBJ = lib/version.o lib/charcnv.o lib/debug.o lib/fault.o \
lib/getsmbpass.o lib/interface.o lib/md4.o \
lib/interfaces.o lib/pidfile.o lib/replace.o \
lib/signal.o lib/system.o lib/sendfile.o lib/time.o \
lib/genrand.o lib/username.o \
lib/util_getent.o lib/util_pw.o lib/smbrun.o \
lib/bitmap.o lib/crc32.o lib/snprintf.o lib/dprintf.o \
lib/xfile.o lib/wins_srv.o \
lib/util_str.o lib/util_sid.o lib/util_uuid.o \
lib/util_unistr.o lib/util_file.o lib/data_blob.o \
lib/util.o lib/util_sock.o \
lib/talloc.o lib/substitute.o lib/fsusage.o \
lib/ms_fnmatch.o lib/select.o lib/messages.o \
lib/tallocmsg.o lib/dmallocmsg.o \
lib/md5.o lib/hmacmd5.o lib/iconv.o lib/smbpasswd.o \
nsswitch/wb_client.o nsswitch/wb_common.o \
lib/pam_errors.o intl/lang_tdb.o lib/account_pol.o \
lib/gencache.o $(TDB_OBJ) \
lib/module.o lib/genparser.o \
lib/ldap_escape.o lib/events.o lib/mutex.o
LIB_SMBD_OBJ = lib/util_smbd.o $(LIB_OBJ)
READLINE_OBJ = lib/readline.o
POPT_LIB_OBJ = lib/popt_common.o
PARAM_OBJ = param/loadparm.o param/params.o dynconfig.o
SECRETS_OBJ = passdb/secrets.o
LIBNMB_OBJ = libcli/unexpected.o libcli/namecache.o libcli/nmblib.o \
libcli/namequery.o
LIBSAMBA_OBJ = libcli/util/nterr.o libcli/util/smbdes.o libcli/util/smbencrypt.o
LIBCLIUTIL_OBJ = libcli/util/asn1.o \
libcli/util/smberr.o \
libcli/util/doserr.o libcli/util/errormap.o \
libcli/util/pwd_cache.o libcli/util/clierror.o libcli/util/cliutil.o
LIBRAW_NDR_OBJ = librpc/ndr/ndr.o librpc/ndr/ndr_basic.o librpc/ndr/ndr_sec.o \
librpc/ndr/ndr_spoolss_buf.o \
librpc/gen_ndr/tables.o librpc/gen_ndr/ndr_dcerpc.o \
librpc/gen_ndr/ndr_echo.o librpc/gen_ndr/ndr_misc.o \
librpc/gen_ndr/ndr_lsa.o librpc/gen_ndr/ndr_dfs.o \
librpc/gen_ndr/ndr_samr.o librpc/gen_ndr/ndr_spoolss.o \
librpc/gen_ndr/ndr_wkssvc.o librpc/gen_ndr/ndr_srvsvc.o \
librpc/gen_ndr/ndr_atsvc.o librpc/gen_ndr/ndr_eventlog.o \
librpc/gen_ndr/ndr_epmapper.o librpc/gen_ndr/ndr_winreg.o \
librpc/gen_ndr/ndr_mgmt.o librpc/gen_ndr/ndr_protected_storage.o \
librpc/gen_ndr/ndr_dcom.o librpc/gen_ndr/ndr_wzcsvc.o \
librpc/gen_ndr/ndr_browser.o librpc/gen_ndr/ndr_w32time.o \
librpc/gen_ndr/ndr_scerpc.o librpc/gen_ndr/ndr_ntsvcs.o \
librpc/gen_ndr/ndr_netlogon.o librpc/gen_ndr/ndr_trkwks.o \
librpc/gen_ndr/ndr_keysvc.o
LIBRAW_RPC_OBJ = librpc/rpc/dcerpc.o librpc/rpc/dcerpc_auth.o \
librpc/rpc/dcerpc_util.o \
librpc/rpc/dcerpc_smb.o librpc/rpc/dcerpc_tcp.o
LIBNTLMSSP_OBJ = libcli/auth/ntlmssp.o libcli/auth/ntlmssp_parse.o \
libcli/auth/ntlmssp_sign.o
LIBCLIAUTH_OBJ = $(LIBNTLMSSP_OBJ) libcli/auth/credentials.o
LIBRAW_OBJ = libcli/raw/rawfile.o libcli/raw/smb_signing.o \
libcli/raw/clisocket.o libcli/raw/clitransport.o \
libcli/raw/clisession.o libcli/raw/clitree.o \
libcli/raw/clikrb5.o libcli/raw/clispnego.o libcli/raw/rawrequest.o \
libcli/raw/rawreadwrite.o \
libcli/raw/rawsearch.o libcli/raw/rawsetfileinfo.o libcli/raw/raweas.o \
libcli/raw/rawtrans.o libcli/raw/clioplock.o \
libcli/raw/rawnegotiate.o libcli/raw/rawfsinfo.o \
libcli/raw/rawfileinfo.o libcli/raw/rawnotify.o \
libcli/raw/rawioctl.o libcli/raw/rawacl.o \
$(LIBRAW_NDR_OBJ) $(LIBRAW_RPC_OBJ) $(LIBSAMBA_OBJ) $(LIBCLIUTIL_OBJ) \
$(LIBNMB_OBJ) $(LIBCLIAUTH_OBJ)
LIBSMB_OBJ = libcli/clireadwrite.o libcli/cliconnect.o \
libcli/clifile.o libcli/clilist.o libcli/clitrans2.o \
libcli/climessage.o \
libcli/clideltree.o \
$(LIBRAW_OBJ)
PASSDB_GET_SET_OBJ = passdb/pdb_get_set.o
PASSDB_OBJ = $(PASSDB_GET_SET_OBJ) passdb/passdb.o passdb/pdb_interface.o \
passdb/machine_sid.o passdb/pdb_smbpasswd.o \
passdb/pdb_tdb.o passdb/pdb_ldap.o \
passdb/pdb_unix.o passdb/pdb_guest.o passdb/util_sam_sid.o \
passdb/pdb_compat.o passdb/pdb_nisplus.o
PLAINTEXT_AUTH_OBJ = auth/pampass.o auth/pass_check.o
AUTH_OBJ = auth/auth.o auth/auth_sam.o \
auth/auth_unix.o auth/auth_util.o \
auth/auth_builtin.o auth/auth_compat.o auth/auth_ntlmssp.o \
$(PLAINTEXT_AUTH_OBJ)
SMBD_OBJ_MAIN = smbd/server.o
NTVFS_CSM_MAIN = ntvfs/tank/vfs_tank.o
#we don't want these in main proto.h
NTVFS_CSM_OBJ = ntvfs/tank/csm_init.o ntvfs/tank/csm_unlink.o \
ntvfs/tank/csm_util.o ntvfs/tank/csm_error.o ntvfs/tank/csm_lookup.o \
ntvfs/tank/csm_blockmap.o ntvfs/tank/csm_dir.o \
ntvfs/tank/csm_fcntl.o ntvfs/tank/csm_io.o ntvfs/tank/csm_mkdir.o \
ntvfs/tank/csm_open.o ntvfs/tank/csm_rename.o \
ntvfs/tank/csm_attr.o ntvfs/tank/csm_truncate.o \
ntvfs/tank/csm_fd.o
NTVFS_CIFS_OBJ = ntvfs/cifs/vfs_cifs.o
NTVFS_SIMPLE_OBJ = ntvfs/simple/vfs_simple.o ntvfs/simple/svfs_util.o
NTVFS_IPC_OBJ = ntvfs/ipc/vfs_ipc.o
NTVFS_PRINT_OBJ = ntvfs/print/vfs_print.o
NTVFS_POSIX_OBJ = ntvfs/posix/vfs_posix.o
SMBD_NTVFS_OBJ = ntvfs/ntvfs_base.o ntvfs/ntvfs_util.o \
ntvfs/ntvfs_generic.o @NTVFS_STATIC@
DCERPC_RPCECHO_OBJ = rpc_server/echo/rpc_echo.o
DCERPC_EPMAPPER_OBJ = rpc_server/epmapper/rpc_epmapper.o
DCERPC_REMOTE_OBJ = rpc_server/remote/dcesrv_remote.o
SMBD_RPC_OBJ = rpc_server/dcerpc_server.o rpc_server/dcesrv_auth.o \
rpc_server/dcerpc_tcp.o rpc_server/handles.o @DCERPC_STATIC@
SMBD_OBJ_SRV = smbd/connection.o \
smbd/session.o \
smbd/password.o smbd/conn.o \
smbd/negprot.o smbd/request.o \
smbd/reply.o smbd/sesssetup.o \
smbd/trans2.o smbd/search.o smbd/nttrans.o \
lib/sysacls.o lib/server_mutex.o \
smbd/build_options.o smbd/service.o \
smbd/rewrite.o $(SMBD_RPC_OBJ) \
$(SMBD_NTVFS_OBJ) @SMBD_EXTRA_OBJS@
PROCESS_MODEL_OBJ = smbd/process.o smbd/process_model.o smbd/process_standard.o \
smbd/process_single.o
SMBD_OBJ_BASE = $(PROCESS_MODEL_OBJ) $(SMBD_OBJ_SRV) \
$(PARAM_OBJ) $(SECRETS_OBJ) $(PASSDB_OBJ) \
$(AUTH_OBJ) $(LIB_SMBD_OBJ) $(POPT_LIB_OBJ) $(LIBSMB_OBJ)
SMBD_OBJ = $(SMBD_OBJ_MAIN) $(SMBD_OBJ_BASE)
CLIENT_OBJ1 = client/client.o client/clitar.o libcli/raw/clirewrite.o
CLIENT_OBJ = $(CLIENT_OBJ1) $(PARAM_OBJ) $(LIBSMB_OBJ) \
$(LIB_OBJ) \
$(READLINE_OBJ) $(POPT_LIB_OBJ)
SMBTORTURE_RAW_OBJ = torture/raw/qfsinfo.o torture/raw/qfileinfo.o torture/raw/setfileinfo.o \
torture/raw/search.o torture/raw/close.o torture/raw/open.o torture/raw/mkdir.o \
torture/raw/oplock.o torture/raw/notify.o torture/raw/mux.o torture/raw/ioctl.o \
torture/raw/chkpath.o torture/raw/unlink.o torture/raw/read.o torture/raw/context.o \
torture/raw/write.o torture/raw/lock.o torture/raw/rename.o torture/raw/seek.o
SMBTORTURE_RPC_OBJ = torture/rpc/lsa.o torture/rpc/echo.o torture/rpc/dfs.o \
torture/rpc/spoolss.o torture/rpc/samr.o torture/rpc/wkssvc.o \
torture/rpc/srvsvc.o torture/rpc/atsvc.o torture/rpc/eventlog.o \
torture/rpc/epmapper.o torture/rpc/winreg.o torture/rpc/mgmt.o \
torture/rpc/scanner.o torture/rpc/autoidl.o torture/rpc/netlogon.o
SMBTORTURE_OBJ1 = torture/torture.o torture/torture_util.o torture/nbio.o torture/scanner.o \
torture/utable.o torture/denytest.o torture/mangle_test.o \
torture/aliases.o libcli/raw/clirewrite.o $(SMBTORTURE_RAW_OBJ) \
$(SMBTORTURE_RPC_OBJ)
SMBTORTURE_OBJ = $(SMBTORTURE_OBJ1) $(SECRETS_OBJ) \
$(LIBSMB_OBJ) $(PARAM_OBJ) $(LIB_OBJ)
GENTEST_OBJ = torture/gentest.o torture/torture_util.o $(LIBSMB_OBJ) $(PARAM_OBJ) \
$(LIB_OBJ) libcli/raw/clirewrite.o
MASKTEST_OBJ = torture/masktest.o $(LIBSMB_OBJ) $(PARAM_OBJ) \
$(LIB_OBJ) libcli/raw/clirewrite.o
LOCKTEST_OBJ = torture/locktest.o $(LOCKING_OBJ) $(LIBSMB_OBJ) $(PARAM_OBJ) \
$(LIB_OBJ) libcli/raw/clirewrite.o
NDRDUMP_OBJ = utils/ndrdump.o utils/rewrite.o \
$(LIBSMB_OBJ) $(PARAM_OBJ) $(LIB_OBJ)
PROTO_OBJ = $(SMBD_OBJ_SRV) \
$(SMBD_OBJ_MAIN) $(PROCESS_MODEL_OBJ) \
$(LIBSMB_OBJ) \
$(LIBRAW_OBJ) $(LIBCLIAUTH_OBJ) \
$(SMBTORTURE_OBJ1) \
$(AUTH_OBJ) $(PARAM_OBJ) $(SECRETS_OBJ) \
$(PASSDB_OBJ) \
$(READLINE_OBJ) $(CLIENT_OBJ1) \
$(LIB_SMBD_OBJ) $(POPT_LIB_OBJ) \
POPT_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
popt/popthelp.o popt/poptparse.o
######################################################################
# now the rules...
######################################################################
all: SHOWFLAGS $(SBIN_PROGS) $(BIN_PROGS) $(TORTURE_PROGS) $(MODULES)
torture : SHOWFLAGS $(TORTURE_PROGS)
smbtorture : SHOWFLAGS bin/smbtorture@EXEEXT@
gentest: SHOWFLAGS bin/gentest@EXEEXT@
masktest : SHOWFLAGS bin/masktest@EXEEXT@
locktest : SHOWFLAGS bin/locktest@EXEEXT@
modules: SHOWFLAGS proto_exists $(MODULES)
everything: all
.SUFFIXES:
.SUFFIXES: .c .o .po .po32 .lo
SHOWFLAGS: basics
@echo "Using FLAGS = $(FLAGS)"
@echo " FLAGS32 = $(FLAGS32)"
@echo " LIBS = $(LIBS)"
@echo " LDSHFLAGS = $(LDSHFLAGS)"
@echo " LDFLAGS = $(LDFLAGS)"
MAKEDIR = || exec false; \
if test -d "$$dir"; then :; else \
echo mkdir "$$dir"; \
mkdir -p "$$dir" >/dev/null 2>&1 || \
test -d "$$dir" || \
mkdir "$$dir" || \
exec false; fi || exec false
.c.o:
@echo Compiling $*.c
@$(CC) -I. -I$(srcdir) $(FLAGS) -c $< \
-o $@
@BROKEN_CC@ -mv `echo $@ | sed 's%^.*/%%g'` $@
# 'make pch' is extremely useful for fast compiles if you have gcc-3.4
pch: basics
rm -f $(srcdir)/include/includes.h.gch
$(CC) -I. -I$(srcdir) $(FLAGS) -c $(srcdir)/include/includes.h -o $(srcdir)/include/includes.h.gch
idl_full: build/pidl/idl.pm
CPP="@CPP@" script/build_idl.sh FULL
idl: build/pidl/idl.pm
@CPP="@CPP@" script/build_idl.sh
basics: idl proto_test
build/pidl/idl.pm: build/pidl/idl.yp
-yapp -s build/pidl/idl.yp
# These dependencies are only approximately correct: we want to make
# sure Samba's paths are updated if ./configure is re-run. Really it
# would be nice if "make prefix=/opt/samba all" also rebuilt things,
# but since we also require "make install prefix=/opt/samba" *not* to
# rebuild it's a bit hard.
dynconfig.o: dynconfig.c Makefile
@echo Compiling $*.c
@$(CC) $(FLAGS) $(PATH_FLAGS) -c $< -o $@
dynconfig.po: dynconfig.c Makefile
@if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
@echo Compiling $*.c with @PICFLAG@
@$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) @PICFLAG@ -c $< -o $*.@PICSUFFIX@
@BROKEN_CC@ -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.po$$%.o%'` $@
@POBAD_CC@ @mv $*.po.o $@
lib/version.o: lib/version.c include/version.h
@echo Compiling $*.c
@$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) -c $< -o $@
lib/version.po: lib/version.c include/version.h
@if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
@echo Compiling $*.c with @PICFLAG@
@$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) @PICFLAG@ -c $< -o $*.@PICSUFFIX@
@BROKEN_CC@ -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.po$$%.o%'` $@
@POBAD_CC@ @mv $*.po.o $@
.c.po:
@if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
@echo Compiling $*.c with @PICFLAG@
@$(CC) -I. -I$(srcdir) $(FLAGS) @PICFLAG@ -c $< -o $*.@PICSUFFIX@
@BROKEN_CC@ -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.po$$%.o%'` $@
@POBAD_CC@ @mv $*.po.o $@
# this is for IRIX
.c.po32:
@if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
@echo Compiling $*.c with @PICFLAG@ and -32
@$(CC) -32 -I. -I$(srcdir) $(FLAGS32) $(PATH_FLAGS) @PICFLAG@ -c $< \
-o $*.po32.o
@BROKEN_CC@ -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.po32$$%.o%'` $@.o
@mv $*.po32.o $@
bin/.dummy:
@if (: >> $@ || : > $@) >/dev/null 2>&1; then :; else \
dir=bin $(MAKEDIR); fi
@: >> $@ || : > $@ # what a fancy emoticon!
bin/smbd@EXEEXT@: $(SMBD_OBJ) @BUILD_POPT@ bin/.dummy
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(DYNEXP) \
$(LIBS) @SMBD_EXTRA_LIBS@ @BUILD_POPT@
bin/smbclient@EXEEXT@: $(CLIENT_OBJ) @BUILD_POPT@ bin/.dummy
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(CLIENT_OBJ) $(LDFLAGS) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) @BUILD_POPT@
bin/smbtorture@EXEEXT@: $(SMBTORTURE_OBJ) bin/.dummy
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(LIBS)
bin/ndrdump@EXEEXT@: $(NDRDUMP_OBJ) bin/.dummy
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(NDRDUMP_OBJ) $(LDFLAGS) $(LIBS)
bin/gentest@EXEEXT@: $(GENTEST_OBJ) bin/.dummy
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(GENTEST_OBJ) $(LDFLAGS) $(LIBS)
bin/masktest@EXEEXT@: $(MASKTEST_OBJ) bin/.dummy
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(MASKTEST_OBJ) $(LDFLAGS) $(LIBS)
bin/locktest@EXEEXT@: $(LOCKTEST_OBJ) bin/.dummy
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(LOCKTEST_OBJ) $(LDFLAGS) $(LIBS)
install: installbin installtorture installdat
# DESTDIR is used here to prevent packagers wasting their time
# duplicating the Makefile. Remove it and you will have the privelege
# of package each samba release for muliple versions of multiple
# distributions and operating systems, or at least supplying patches
# to all the packaging files required for this, prior to committing
# the removal of DESTDIR. Do not remove it even though you think it
# is not used
installdirs:
@$(SHELL) $(srcdir)/script/installdirs.sh $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(PRIVATEDIR) $(DESTDIR)$(PIDDIR) $(DESTDIR)$(LOCKDIR)
@$(SHELL) $(srcdir)/script/installdirs.sh $(DESTDIR)$(BASEDIR) $(DESTDIR)$(CHARSET_LIBDIR) $(DESTDIR)$(DCERPC_LIBDIR) $(DESTDIR)$(NTVFS_LIBDIR)
installservers: all installdirs
@$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(SBIN_PROGS)
installbin: all installdirs
@$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(SBIN_PROGS)
@$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(BIN_PROGS)
installtorture: all installdirs
@$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(TORTURE_PROGS)
installmodules: all installdirs
@$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(NTVFS_LIBDIR) $(NTVFS_MODULES)
@$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(DCERPC_LIBDIR) $(DCERPC_MODULES)
@$(SHELL) $(srcdir)/script/installmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(CHARSET_LIBDIR) $(CHARSET_MODULES)
installdat: installdirs
@$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(LIBDIR) $(srcdir)
# revert to the previously installed version
revert:
@$(SHELL) $(srcdir)/script/revert.sh $(SBINDIR) $(SBIN_PROGS)
.PHONY: showlayout
showlayout:
@echo "Samba will be installed into:"
@echo " basedir: $(BASEDIR)"
@echo " bindir: $(BINDIR)"
@echo " sbindir: $(SBINDIR)"
@echo " libdir: $(LIBDIR)"
@echo " vardir: $(VARDIR)"
uninstall: uninstallbin uninstalltorture
uninstallbin:
@$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(SBIN_PROGS)
@$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(BIN_PROGS)
uninstalltorture:
@$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(TORTURE_PROGS)
uninstallmodules:
@$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(NTVFS_LIBDIR) $(DESTDIR)$(NTVFS_MODULES)
@$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(DCERPC_LIBDIR) $(DESTDIR)$(DCERPC_MODULES)
@$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(CHARSET_LIBDIR) $(DESTDIR)$(CHARSET_MODULES)
# Toplevel clean files
TOPFILES=dynconfig.o dynconfig.po
clean: delheaders
-rm -f core */*~ *~ */*.o */*/*.o */*/*.po */*/*.po32 */*.po */*.po32 */*.@SHLIBEXT@ \
$(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) $(MODULES) $(TORTURE_PROGS) \
.headers.stamp
-rm -rf librpc/gen_*
# Making this target will just make sure that the prototype files
# exist, not necessarily that they are up to date. Since they're
# removed by "make clean" this will always be run when you do anything
# afterwards.
proto_exists: include/proto.h include/build_env.h
delheaders:
@/bin/rm -f $(srcdir)/include/proto.h $(srcdir)/include/build_env.h
include/proto.h:
@cd $(srcdir) && $(SHELL) script/mkproto.sh $(PERL) \
-h _PROTO_H_ $(builddir)/include/proto.h \
$(PROTO_OBJ)
include/build_env.h:
@echo Building include/build_env.h
@cd $(srcdir) && $(SHELL) script/build_env.sh $(srcdir) $(builddir) $(CC) > $(builddir)/include/build_env.h
# "make headers" or "make proto" calls a subshell because we need to
# make sure these commands are executed in sequence even for a
# parallel make.
headers: delheaders include/proto.h include/build_env.h
proto: idl headers
proto_test:
@[ -f include/proto.h ] || $(MAKE) proto
.PHONY: headers proto
realclean: clean delheaders
-rm -f config.log $(BIN_PROGS) $(MODULES) $(SBIN_PROGS) bin/.dummy script/findsmb
distclean: realclean
-rm -f include/stamp-h
-rm -f include/config.h Makefile
-rm -f config.status config.cache so_locations
-rm -rf .deps
realdistclean: distclean
-rm -f include/config.h.in
-rm -f lib/version.h
-rm -f configure
# when configure.in is updated, reconfigure
$(srcdir)/configure: $(srcdir)/configure.in
@echo "WARNING: you need to rerun ./autogen.sh"
config.status: $(srcdir)/configure
@echo "WARNING: you need to run configure"
Makefile: $(srcdir)/Makefile.in config.status
@echo "WARNING: you need to run ./config.status"
#Some Maintainer stuff
etags:
etags `find $(srcdir) -name "*.[ch]" | grep -v /CVS/`
ctags:
ctags `find $(srcdir) -name "*.[ch]" | grep -v /CVS/`
# this target is really just for my use. It only works on a limited
# range of machines and is used to produce a list of potentially
# dead (ie. unused) functions in the code. (tridge)
finddead:
nm */*.o |grep 'U ' | $(AWK) '{print $$2}' | sort -u > nmused.txt
nm */*.o |grep 'T ' | $(AWK) '{print $$3}' | sort -u > nmfns.txt
comm -13 nmused.txt nmfns.txt
test_prefix=/tmp/test-samba
# Run regression suite using the external "satyr" framework
check:
@echo "** Sorry, samba self-test without installation does not work "
@echo "** yet. Please try specifying a scratch directory to"
@echo "** ./configure --prefix DIR"
@echo "** then run \"make install installcheck\""
exit 1
# -rm -rf $(test_prefix)/lib
# mkdir $(test_prefix)/lib -p ./testdir
# PATH=$(builddir)/bin:$(PATH) \
# SATYR_SUITEDIR=../testsuite/build_farm/ prefix=$(test_prefix) \
# testdir=./testdir $(SHELL) satyr
# Run regression suite on the installed version.
# `installcheck'
# Perform installation tests (if any). The user must build and
# install the program before running the tests. You should not
# assume that `$(BINDIR)' is in the search path.
dangerous-installcheck:
mkdir -p $(BASEDIR)/lib
mkdir -p $(BASEDIR)/var
PATH=$(BINDIR):$(SBINDIR):$(PATH) \
SATYR_DISCOURAGE=1 \
SATYR_SUITEDIR=../testsuite/satyr/ prefix=$(BASEDIR) \
LIBSMB_PROG=$(SBINDIR)/smbd \
testdir=./testdir $(SHELL) satyr