2005-12-15 15:59:10 +00:00
all : basics bin /asn 1_compile bin /compile_et binaries
2005-10-21 22:49:23 +00:00
2005-08-03 04:15:16 +00:00
i n c l u d e h e i m d a l _ b u i l d / c o n f i g . m k
i n c l u d e c o n f i g . m k
i n c l u d e d s d b / c o n f i g . m k
i n c l u d e g t k / c o n f i g . m k
i n c l u d e s m b d / c o n f i g . m k
i n c l u d e s m b d / p r o c e s s _ m o d e l . m k
i n c l u d e l i b n e t / c o n f i g . m k
i n c l u d e a u t h / c o n f i g . m k
i n c l u d e n s s w i t c h / c o n f i g . m k
i n c l u d e l i b / b a s i c . m k
i n c l u d e p a r a m / c o n f i g . m k
i n c l u d e s m b _ s e r v e r / c o n f i g . m k
i n c l u d e r p c _ s e r v e r / c o n f i g . m k
i n c l u d e l d a p _ s e r v e r / c o n f i g . m k
i n c l u d e w e b _ s e r v e r / c o n f i g . m k
i n c l u d e w i n b i n d / c o n f i g . m k
i n c l u d e n b t _ s e r v e r / c o n f i g . m k
2005-10-14 12:37:13 +00:00
i n c l u d e w r e p l _ s e r v e r / c o n f i g . m k
2005-08-03 04:15:16 +00:00
i n c l u d e c l d a p _ s e r v e r / c o n f i g . m k
i n c l u d e u t i l s / n e t / c o n f i g . m k
i n c l u d e u t i l s / c o n f i g . m k
i n c l u d e n t v f s / c o n f i g . m k
i n c l u d e n t p t r / c o n f i g . m k
i n c l u d e t o r t u r e / c o n f i g . m k
i n c l u d e l i b r p c / c o n f i g . m k
i n c l u d e c l i e n t / c o n f i g . m k
i n c l u d e l i b c l i / c o n f i g . m k
i n c l u d e s c r i p t i n g / c o n f i g . m k
i n c l u d e k d c / c o n f i g . m k
2006-01-02 00:16:08 +00:00
i n c l u d e p a s s d b / c o n f i g . m k
2005-08-03 04:15:16 +00:00
2005-12-15 15:59:10 +00:00
binaries : $( BINARIES )
2005-10-26 14:18:27 +00:00
libraries : $( STATIC_LIBS ) $( SHARED_LIBS )
2006-01-02 00:16:08 +00:00
modules : $( SHARED_MODULES )
2005-10-26 14:18:27 +00:00
headers : $( PUBLIC_HEADERS )
2005-08-03 04:15:16 +00:00
manpages : $( MANPAGES )
2005-08-03 05:28:08 +00:00
everything : all
2005-08-03 04:15:16 +00:00
showlayout :
@echo "Samba will be installed into:"
@echo " basedir: $( BASEDIR) "
@echo " bindir: $( BINDIR) "
@echo " sbindir: $( SBINDIR) "
@echo " libdir: $( LIBDIR) "
2005-12-26 16:46:55 +00:00
@echo " modulesdir: $( MODULESDIR) "
2005-10-26 14:18:27 +00:00
@echo " includedir: $( INCLUDEDIR) "
2005-08-03 04:15:16 +00:00
@echo " vardir: $( VARDIR) "
@echo " privatedir: $( PRIVATEDIR) "
@echo " piddir: $( PIDDIR) "
@echo " lockdir: $( LOCKDIR) "
2005-12-17 10:10:09 +00:00
@echo " logfilebase: $( LOGFILEBASE) "
2005-08-03 04:15:16 +00:00
@echo " swatdir: $( SWATDIR) "
@echo " mandir: $( MANDIR) "
showflags :
@echo "Samba will be compiled with flags:"
@echo " CFLAGS = $( CFLAGS) "
2005-12-15 15:59:10 +00:00
@echo " LDFLAGS = $( LDFLAGS) "
2005-08-03 04:15:16 +00:00
@echo " STLD_FLAGS = $( STLD_FLAGS) "
@echo " SHLD_FLAGS = $( SHLD_FLAGS) "
2005-09-05 19:54:35 +00:00
@echo " LIBS = $( LIBS) "
2005-08-03 04:15:16 +00:00
2005-10-26 19:07:01 +00:00
# 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))
CONFIGFILE = $( CONFIGDIR) /smb.conf
2005-12-15 16:32:08 +00:00
PKGCONFIGDIR = $( LIBDIR) /pkgconfig
2005-10-26 19:07:01 +00:00
LMHOSTSFILE = $( CONFIGDIR) /lmhosts
PATH_FLAGS = -DCONFIGFILE= \" $( CONFIGFILE) \" -DSBINDIR= \" $( SBINDIR) \" \
-DBINDIR= \" $( BINDIR) \" -DLMHOSTSFILE= \" $( LMHOSTSFILE) \" \
-DLOCKDIR= \" $( LOCKDIR) \" -DPIDDIR= \" $( PIDDIR) \" -DLIBDIR= \" $( LIBDIR) \" \
-DLOGFILEBASE= \" $( LOGFILEBASE) \" -DSHLIBEXT= \" $( SHLIBEXT) \" \
-DCONFIGDIR= \" $( CONFIGDIR) \" -DNCALRPCDIR= \" $( NCALRPCDIR) \" \
2005-12-26 16:46:55 +00:00
-DSWATDIR= \" $( SWATDIR) \" -DPRIVATE_DIR= \" $( PRIVATEDIR) \" \
-DMODULESDIR= \" $( MODULESDIR) \"
2005-10-26 19:07:01 +00:00
2005-10-26 14:18:27 +00:00
install : showlayout installbin installdat installswat installmisc installlib \
2005-12-15 16:32:08 +00:00
installheader installpc
2005-08-03 04:15:16 +00:00
2005-08-03 05:28:08 +00:00
# DESTDIR is used here to prevent packagers wasting their time
# duplicating the Makefile. Remove it and you will have the privilege
# of packaging each samba release for multiple 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 :
2005-12-17 10:10:09 +00:00
@$( SHELL) $( srcdir) /script/installdirs.sh \
$( DESTDIR) $( BASEDIR) \
$( DESTDIR) $( BINDIR) \
$( DESTDIR) $( SBINDIR) \
$( DESTDIR) $( LIBDIR) \
$( DESTDIR) $( VARDIR) \
$( DESTDIR) $( PRIVATEDIR) \
$( DESTDIR) $( PIDDIR) \
$( DESTDIR) $( LOCKDIR) \
$( DESTDIR) $( LOGFILEBASE) \
$( DESTDIR) $( PRIVATEDIR) /tls \
$( DESTDIR) $( INCLUDEDIR) \
$( DESTDIR) $( PKGCONFIGDIR)
2005-08-03 05:28:08 +00:00
2005-12-15 15:59:10 +00:00
installbin : $( SBIN_PROGS ) $( BIN_PROGS ) installdirs
2005-12-17 10:10:09 +00:00
@$( 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)
2005-08-03 05:28:08 +00:00
2005-10-26 14:18:27 +00:00
installlib : libraries installdirs
@$( SHELL) $( srcdir) /script/installlib.sh $( DESTDIR) $( LIBDIR) $( SHARED_LIBS)
@$( SHELL) $( srcdir) /script/installlib.sh $( DESTDIR) $( LIBDIR) $( STATIC_LIBS)
installheader : headers installdirs
@$( SHELL) $( srcdir) /script/installheader.sh $( DESTDIR) $( INCLUDEDIR) $( PUBLIC_HEADERS)
2005-08-03 05:28:08 +00:00
installdat : installdirs
@$( SHELL) $( srcdir) /script/installdat.sh $( DESTDIR) $( LIBDIR) $( srcdir)
installswat : installdirs
@$( SHELL) $( srcdir) /script/installswat.sh $( DESTDIR) $( SWATDIR) $( srcdir) $( DESTDIR) $( LIBDIR)
installman : installdirs
@$( SHELL) $( srcdir) /script/installman.sh $( DESTDIR) $( MANDIR) $( MANPAGES)
2005-08-04 02:27:30 +00:00
installmisc : installdirs
@$( SHELL) $( srcdir) /script/installmisc.sh $( srcdir) $( DESTDIR) $( LIBDIR) $( DESTDIR) $( BINDIR)
2005-12-15 16:32:08 +00:00
installpc : installdirs
2005-12-15 17:19:27 +00:00
@$( SHELL) $( srcdir) /script/installpc.sh $( srcdir) $( DESTDIR) $( PKGCONFIGDIR) $( PC_FILES)
2005-12-15 16:32:08 +00:00
2005-10-26 14:18:27 +00:00
uninstall : uninstallbin uninstallman uninstallmisc uninstalllib uninstallheader
2005-08-04 02:27:30 +00:00
uninstallmisc :
#FIXME
2005-08-03 05:28:08 +00:00
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)
2005-10-26 14:18:27 +00:00
uninstalllib :
@$( SHELL) $( srcdir) /script/uninstalllib.sh $( DESTDIR) $( LIBDIR) $( SHARED_LIBS)
@$( SHELL) $( srcdir) /script/uninstalllib.sh $( DESTDIR) $( LIBDIR) $( STATIC_LIBS)
uninstallheader :
@$( SHELL) $( srcdir) /script/uninstallheader.sh $( DESTDIR) $( INCLUDEDIR) $( PUBLIC_HEADERS)
2005-08-03 05:28:08 +00:00
uninstallman :
@$( SHELL) $( srcdir) /script/uninstallman.sh $( DESTDIR) $( MANDIR) $( MANPAGES)
2005-10-26 19:07:01 +00:00
Makefile : config .status $( MK_FILES )
./config.status
2005-08-03 05:28:08 +00:00
etags :
etags ` find $( srcdir) -name "*.[ch]" `
ctags :
ctags ` find $( srcdir) -name "*.[ch]" `
2005-10-28 22:40:31 +00:00
pidl/Makefile : pidl /Makefile .PL
cd pidl && $( PERL) Makefile.PL
installpidl : pidl /Makefile
cd pidl && $( MAKE) install
2005-08-22 00:06:35 +00:00
idl_full : pidl /lib /Parse /Pidl /IDL .pm
2005-09-17 13:08:49 +00:00
@CPP= " $( CPP) " PERL = " $( PERL) " script/build_idl.sh FULL $( PIDL_ARGS)
2005-08-03 05:28:08 +00:00
2005-08-22 00:06:35 +00:00
idl : pidl /lib /Parse /Pidl /IDL .pm
2005-09-17 13:08:49 +00:00
@CPP= " $( CPP) " PERL = " $( PERL) " script/build_idl.sh PARTIAL $( PIDL_ARGS)
2005-08-03 05:28:08 +00:00
2005-08-22 00:06:35 +00:00
pidl/lib/Parse/Pidl/IDL.pm : pidl /idl .yp
2005-09-02 03:10:42 +00:00
-$( YAPP) -s -m 'Parse::Pidl::IDL' -o pidl/lib/Parse/Pidl/IDL.pm pidl/idl.yp
2005-08-03 05:28:08 +00:00
2005-08-21 23:17:35 +00:00
smb_interfaces : pidl /smb_interfaces .pm
$( PERL) -Ipidl script/build_smb_interfaces.pl \
2005-08-03 05:28:08 +00:00
include/smb_interfaces.h
2005-08-21 23:17:35 +00:00
pidl/smb_interfaces.pm : pidl /smb_interfaces .yp
2005-09-02 03:10:42 +00:00
-$( YAPP) -s -m 'smb_interfaces' -o pidl/smb_interfaces.pm pidl/smb_interfaces.yp
2005-08-03 05:28:08 +00:00
2005-08-04 04:45:42 +00:00
include/config.h :
@echo "include/config.h not present"
@echo "You need to rerun ./autogen.sh and ./configure"
@/bin/false
2005-12-23 13:02:52 +00:00
include/proto.h : $( PROTO_OBJS :.o =.c )
2005-12-23 12:29:13 +00:00
@echo "Creating include/proto.h"
2005-12-30 19:18:51 +00:00
@$( PERL) $( srcdir) /script/mkproto.pl --public-define= _PROTO_H_ \
2005-12-23 12:29:13 +00:00
--public= include/proto.h --private= include/proto.h \
2005-12-23 13:02:52 +00:00
$( PROTO_OBJS)
2005-08-03 05:28:08 +00:00
2005-08-04 04:45:42 +00:00
proto : include /proto .h
2005-12-27 20:29:19 +00:00
2005-12-28 22:23:24 +00:00
pch : clean_pch include /config .h \
2005-08-04 04:53:06 +00:00
include/proto.h \
idl \
include/includes.h.gch
2005-08-03 05:28:08 +00:00
2005-12-28 15:38:36 +00:00
libcli/nbt/libnbt.h : libcli /nbt /nbt_proto .h
2005-12-28 22:23:24 +00:00
include/includes.h : lib /basic .h libcli /nbt /libnbt .h librpc /ndr /libndr_proto .h librpc /rpc /dcerpc_proto .h auth /credentials /credentials_proto .h
2005-12-28 02:38:26 +00:00
2005-12-27 20:29:19 +00:00
clean_pch :
-rm -f include/includes.h.gch
2005-08-04 04:45:42 +00:00
basics : include /config .h \
include/proto.h \
2005-12-27 22:51:30 +00:00
$( PROTO_HEADERS) \
2005-08-04 04:45:42 +00:00
idl \
2005-12-27 22:51:30 +00:00
heimdal_basics
2005-08-03 05:28:08 +00:00
2005-10-26 19:07:01 +00:00
clean : heimdal_clean
@echo Removing headers
@-rm -f include/proto.h
@echo Removing objects
@-find . -name '*.o' -exec rm -f '{}' \;
2005-12-18 22:28:41 +00:00
@echo Removing hostcc objects
@-find . -name '*.ho' -exec rm -f '{}' \;
2005-10-26 19:07:01 +00:00
@echo Removing binaries
@-rm -f $( BIN_PROGS) $( SBIN_PROGS)
2005-10-28 18:26:26 +00:00
@echo Removing libraries
@-rm -f bin/*.$( SHLIBEXT) .*
2005-10-26 19:07:01 +00:00
@echo Removing dummy targets
@-rm -f bin/.*_*
@echo Removing generated files
@-rm -rf librpc/gen_*
@-rm -f lib/registry/regf.h lib/registry/tdr_regf*
2005-12-27 21:11:09 +00:00
@echo Removing proto headers
@-rm -f $( PROTO_HEADERS)
2005-10-26 19:07:01 +00:00
distclean : clean
2005-12-15 15:59:10 +00:00
-rm -f bin/.dummy
2005-10-26 19:07:01 +00:00
-rm -f include/config.h include/smb_build.h
-rm -f Makefile
-rm -f config.status
-rm -f config.log config.cache
-rm -f samba4-deps.dot
-rm -f config.pm config.mk
removebackup :
-rm -f *.bak *~ */*.bak */*~ */*/*.bak */*/*~ */*/*/*.bak */*/*/*~
realdistclean : distclean removebackup
-rm -f include/config.h.in
-rm -f include/version.h
-rm -f configure
-rm -f $( MANPAGES)
2005-08-03 05:28:08 +00:00
test : $( DEFAULT_TEST_TARGET )
test-swrap : all
./script/tests/selftest.sh ${ selftest_prefix } /st all SOCKET_WRAPPER
test-noswrap : all
./script/tests/selftest.sh ${ selftest_prefix } /st all
quicktest : all
./script/tests/selftest.sh ${ selftest_prefix } /st quick SOCKET_WRAPPER
valgrindtest : all
SMBD_VALGRIND = "xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \
2005-12-29 07:40:54 +00:00
VALGRIND = " valgrind -q --num-callers=30 --log-file= ${ selftest_prefix } /st/valgrind.log " \
2005-08-03 05:28:08 +00:00
./script/tests/selftest.sh ${ selftest_prefix } /st quick SOCKET_WRAPPER
2005-12-28 22:49:02 +00:00
gdbtest : all
SMBD_VALGRIND = "xterm -n smbd -e gdb --args " \
./script/tests/selftest.sh ${ selftest_prefix } /st quick SOCKET_WRAPPER
2005-10-26 19:07:01 +00:00
bin/.dummy :
@: >> $@ || : > $@
###############################################################################
# File types
###############################################################################
.c.d :
@echo " Generating dependencies for $< "
@$( CC) -MM -MG -MT $( <:.c= .o) -MF $@ $( CFLAGS) $<
2005-08-03 05:28:08 +00:00
.y.c :
2005-08-04 05:23:07 +00:00
@echo " Building $< with $( YACC) "
@-$( srcdir) /script/yacc_compile.sh " $( YACC) " " $< " " $@ "
2005-08-03 05:28:08 +00:00
.l.c :
2005-08-04 05:23:07 +00:00
@echo " Building $< with $( LEX) "
@-$( srcdir) /script/lex_compile.sh " $( LEX) " " $< " " $@ "
2005-10-26 19:07:01 +00:00
DOCBOOK_MANPAGE_URL = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
.1.xml.1 :
$( XSLTPROC) -o $@ $( DOCBOOK_MANPAGE_URL) $<
.3.xml.3 :
$( XSLTPROC) -o $@ $( DOCBOOK_MANPAGE_URL) $<
.5.xml.5 :
$( XSLTPROC) -o $@ $( DOCBOOK_MANPAGE_URL) $<
.7.xml.7 :
$( XSLTPROC) -o $@ $( DOCBOOK_MANPAGE_URL) $<