2003-10-17 21:15:38 +02:00
|
|
|
# $Id$
|
|
|
|
|
|
|
|
CC = @CC@
|
2004-09-26 22:46:43 +02:00
|
|
|
CFLAGS = @CFLAGS@
|
2003-10-17 21:15:38 +02:00
|
|
|
CPPFLAGS = @CPPFLAGS@
|
|
|
|
LDFLAGS = @LDFLAGS@
|
2004-09-26 22:46:43 +02:00
|
|
|
LIBS = @LIBS@
|
|
|
|
|
|
|
|
EXPAT_CFLAGS = @EXPAT_CFLAGS@
|
|
|
|
ERLANG_CFLAGS= @ERLANG_CFLAGS@
|
|
|
|
|
|
|
|
EXPAT_LIBS = @EXPAT_LIBS@
|
|
|
|
ERLANG_LIBS = @ERLANG_LIBS@
|
2003-10-17 21:15:38 +02:00
|
|
|
|
2007-05-29 16:31:12 +02:00
|
|
|
ASN_FLAGS = -bber_bin +der +compact_bit_string +optimize +noobj
|
2008-07-15 10:45:05 +02:00
|
|
|
|
|
|
|
INSTALLUSER=@INSTALLUSER@
|
|
|
|
# if no user was enabled, don't set privileges or ownership
|
|
|
|
ifeq ($(INSTALLUSER),)
|
|
|
|
O_USER=
|
|
|
|
G_USER=
|
|
|
|
CHOWN_COMMAND=echo
|
|
|
|
CHOWN_OUTPUT=/dev/null
|
|
|
|
else
|
|
|
|
O_USER=-o $(INSTALLUSER)
|
|
|
|
G_USER=-g $(INSTALLUSER)
|
|
|
|
CHOWN_COMMAND=chown
|
|
|
|
CHOWN_OUTPUT=&1
|
|
|
|
endif
|
|
|
|
|
|
|
|
EFLAGS += @ERLANG_SSL39@
|
|
|
|
|
2005-12-06 20:32:50 +01:00
|
|
|
# make debug=true to compile Erlang module with debug informations.
|
|
|
|
ifdef debug
|
2008-07-15 10:45:05 +02:00
|
|
|
EFLAGS+=+debug_info
|
2005-12-06 20:32:50 +01:00
|
|
|
endif
|
|
|
|
|
2006-04-01 18:05:20 +02:00
|
|
|
ifdef ejabberd_debug
|
2008-07-15 10:45:05 +02:00
|
|
|
EFLAGS+=-Dejabberd_debug
|
2006-04-01 18:05:20 +02:00
|
|
|
endif
|
|
|
|
|
2007-12-06 18:09:35 +01:00
|
|
|
ifeq (@hipe@, true)
|
2008-07-15 10:45:05 +02:00
|
|
|
EFLAGS+=+native
|
2007-12-06 18:09:35 +01:00
|
|
|
endif
|
|
|
|
|
2005-12-11 20:48:31 +01:00
|
|
|
ifeq (@roster_gateway_workaround@, true)
|
2008-07-15 10:45:05 +02:00
|
|
|
EFLAGS+=-DROSTER_GATEWAY_WORKAROUND
|
2005-12-11 20:48:31 +01:00
|
|
|
endif
|
|
|
|
|
2007-07-31 14:05:00 +02:00
|
|
|
ifeq (@full_xml@, true)
|
2008-07-15 10:45:05 +02:00
|
|
|
EFLAGS+=-DFULL_XML_SUPPORT
|
2007-07-31 14:05:00 +02:00
|
|
|
endif
|
|
|
|
|
2007-09-14 16:16:36 +02:00
|
|
|
ifeq (@transient_supervisors@, false)
|
2008-07-15 10:45:05 +02:00
|
|
|
EFLAGS+=-DNO_TRANSIENT_SUPERVISORS
|
2007-09-14 16:16:36 +02:00
|
|
|
endif
|
|
|
|
|
2008-03-25 19:59:45 +01:00
|
|
|
INSTALL_EPAM=
|
|
|
|
ifeq (@pam@, pam)
|
2008-07-15 10:45:05 +02:00
|
|
|
INSTALL_EPAM=install -m 750 $(O_USER) epam $(PBINDIR)
|
2008-03-25 19:59:45 +01:00
|
|
|
endif
|
|
|
|
|
2003-10-21 22:28:36 +02:00
|
|
|
prefix = @prefix@
|
2008-04-02 16:24:18 +02:00
|
|
|
exec_prefix = @exec_prefix@
|
2003-10-21 22:28:36 +02:00
|
|
|
|
2007-10-01 12:33:03 +02:00
|
|
|
SUBDIRS = @mod_irc@ @mod_pubsub@ @mod_muc@ @mod_proxy65@ @eldap@ @pam@ @web@ stringprep @tls@ @odbc@ @ejabberd_zlib@
|
2003-10-17 21:15:38 +02:00
|
|
|
ERLSHLIBS = expat_erl.so
|
2007-12-07 09:44:22 +01:00
|
|
|
ERLBEHAVS = cyrsasl.erl gen_mod.erl p1_fsm.erl
|
2008-03-26 10:27:46 +01:00
|
|
|
SOURCES_ALL = $(wildcard *.erl)
|
|
|
|
SOURCES = $(filter-out $(ERLBEHAVS),$(SOURCES_ALL))
|
|
|
|
ERLBEHAVBEAMS = $(ERLBEHAVS:.erl=.beam)
|
2005-12-11 20:48:31 +01:00
|
|
|
BEAMS = $(SOURCES:.erl=.beam)
|
2003-10-17 21:15:38 +02:00
|
|
|
|
2008-01-15 12:11:27 +01:00
|
|
|
DESTDIR =
|
2003-10-21 22:28:36 +02:00
|
|
|
|
2008-07-15 10:45:05 +02:00
|
|
|
# /etc/ejabberd/
|
|
|
|
ETCDIR = $(DESTDIR)@sysconfdir@/ejabberd
|
|
|
|
|
|
|
|
# /sbin/
|
|
|
|
SBINDIR = $(DESTDIR)@sbindir@
|
|
|
|
|
|
|
|
# /lib/ejabberd/
|
|
|
|
EJABBERDDIR = $(DESTDIR)@libdir@/ejabberd
|
|
|
|
|
|
|
|
# /share/doc/ejabberd
|
|
|
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
|
|
|
datarootdir = @datarootdir@
|
2008-12-01 16:53:30 +01:00
|
|
|
DOCDIR = $(DESTDIR)@docdir@
|
2008-07-15 10:45:05 +02:00
|
|
|
|
|
|
|
# /usr/lib/ejabberd/ebin/
|
2004-05-17 22:36:41 +02:00
|
|
|
BEAMDIR = $(EJABBERDDIR)/ebin
|
2008-07-15 10:45:05 +02:00
|
|
|
|
|
|
|
# /usr/lib/ejabberd/include/
|
|
|
|
INCLUDEDIR = $(EJABBERDDIR)/include
|
|
|
|
|
|
|
|
# /usr/lib/ejabberd/priv/
|
2003-10-21 22:28:36 +02:00
|
|
|
PRIVDIR = $(EJABBERDDIR)/priv
|
2008-07-15 10:45:05 +02:00
|
|
|
|
|
|
|
# /usr/lib/ejabberd/priv/bin
|
2008-03-21 16:42:14 +01:00
|
|
|
PBINDIR = $(PRIVDIR)/bin
|
2008-07-15 10:45:05 +02:00
|
|
|
|
|
|
|
# /usr/lib/ejabberd/priv/lib
|
|
|
|
SODIR = $(PRIVDIR)/lib
|
|
|
|
|
|
|
|
# /usr/lib/ejabberd/priv/msgs
|
2003-11-13 20:09:33 +01:00
|
|
|
MSGSDIR = $(PRIVDIR)/msgs
|
2008-07-15 10:45:05 +02:00
|
|
|
|
|
|
|
# /var/lib/ejabberd/
|
|
|
|
SPOOLDIR = $(DESTDIR)@localstatedir@/lib/ejabberd
|
|
|
|
|
|
|
|
# /var/lib/ejabberd/.erlang.cookie
|
|
|
|
COOKIEFILE = $(SPOOLDIR)/.erlang.cookie
|
|
|
|
|
|
|
|
# /var/log/ejabberd/
|
2008-04-02 16:24:18 +02:00
|
|
|
LOGDIR = $(DESTDIR)@localstatedir@/log/ejabberd
|
2003-10-21 22:28:36 +02:00
|
|
|
|
2006-08-28 16:56:13 +02:00
|
|
|
ifeq ($(shell uname),Darwin)
|
|
|
|
DYNAMIC_LIB_CFLAGS = -fPIC -bundle -flat_namespace -undefined suppress
|
|
|
|
else
|
|
|
|
# Assume Linux-style dynamic library flags
|
|
|
|
DYNAMIC_LIB_CFLAGS = -fpic -shared
|
|
|
|
endif
|
|
|
|
|
2004-05-17 22:36:41 +02:00
|
|
|
all: $(ERLSHLIBS) compile-beam all-recursive
|
2003-10-17 21:15:38 +02:00
|
|
|
|
2008-03-26 10:27:46 +01:00
|
|
|
compile-beam: XmppAddr.hrl $(ERLBEHAVBEAMS) $(BEAMS)
|
|
|
|
|
|
|
|
$(BEAMS): $(ERLBEHAVBEAMS)
|
|
|
|
|
|
|
|
all-recursive: $(ERLBEHAVBEAMS)
|
2005-12-11 20:48:31 +01:00
|
|
|
|
|
|
|
%.beam: %.erl
|
2008-07-15 10:45:05 +02:00
|
|
|
@ERLC@ -W $(EFLAGS) $<
|
2003-10-17 21:15:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
all-recursive install-recursive uninstall-recursive \
|
|
|
|
clean-recursive distclean-recursive \
|
|
|
|
mostlyclean-recursive maintainer-clean-recursive:
|
|
|
|
@subdirs="$(SUBDIRS)"; for subdir in $$subdirs; do \
|
|
|
|
target=`echo $@|sed 's,-recursive,,'`; \
|
|
|
|
echo making $$target in $$subdir; \
|
|
|
|
(cd $$subdir && $(MAKE) $$target) || exit 1; \
|
|
|
|
done
|
|
|
|
|
|
|
|
|
2005-11-17 06:29:33 +01:00
|
|
|
%.hrl: %.asn1
|
2005-12-11 20:48:31 +01:00
|
|
|
@ERLC@ $(ASN_FLAGS) $<
|
2008-07-15 10:45:05 +02:00
|
|
|
@ERLC@ -W $(EFLAGS) $*.erl
|
2005-11-17 06:29:33 +01:00
|
|
|
|
2003-10-18 21:15:12 +02:00
|
|
|
$(ERLSHLIBS): %.so: %.c
|
2008-04-11 19:32:20 +02:00
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) \
|
|
|
|
$(subst ../,,$(subst .so,.c,$@)) \
|
|
|
|
$(EXPAT_LIBS) \
|
|
|
|
$(EXPAT_CFLAGS) \
|
|
|
|
$(ERLANG_LIBS) \
|
|
|
|
$(ERLANG_CFLAGS) \
|
|
|
|
-o $@ \
|
|
|
|
$(DYNAMIC_LIB_CFLAGS)
|
2003-10-17 21:15:38 +02:00
|
|
|
|
2008-09-16 16:39:57 +02:00
|
|
|
translations:
|
|
|
|
../contrib/extract_translations/prepare-translation.sh -updateall
|
|
|
|
|
2003-10-21 22:28:36 +02:00
|
|
|
install: all
|
2008-07-15 10:45:05 +02:00
|
|
|
#
|
|
|
|
# Configuration files
|
|
|
|
install -d -m 750 $(G_USER) $(ETCDIR)
|
|
|
|
[ -f $(ETCDIR)/ejabberd.cfg ] \
|
|
|
|
&& install -b -m 640 $(G_USER) ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg-new \
|
|
|
|
|| install -b -m 640 $(G_USER) ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg
|
|
|
|
sed -e "s*@rootdir@*@prefix@*" \
|
|
|
|
-e "s*@installuser@*@INSTALLUSER@*" \
|
|
|
|
-e "s*@LIBDIR@*@libdir@*" \
|
|
|
|
-e "s*@SYSCONFDIR@*@sysconfdir@*" \
|
|
|
|
-e "s*@LOCALSTATEDIR@*@localstatedir@*" \
|
Merge from trunk: 1835, 1836, 1842, 1843, 1854, 1858, 1860, 1861, and 1862.
* doc/Makefile: In Clean do not remove html. In new Distclean,
remove also html.
* doc/Makefile: When cleaning, remove contributed_modules.tex
* src/Makefile.in: Fix arguments to Install program
* doc/guide.tex: Provide only an example of language option
* doc/guide.html: Likewise
* doc/guide.tex: mod_muc can run in several nodes of cluster
* doc/guide.html: Likewise
* doc/api/process-one.css: Add some style to HTML elements
* src/ejabberd_listener.erl: Fix EDoc errors
* src/web/ejabberd_web_admin.erl: Likewise
* src/ejabberd_hooks.erl: Explanation in EDoc of some functions
* doc/guide.tex: Explain that account creation is only supported
by internal and odbc authentication methods
* doc/guide.html: Likewise
* src/Makefile.in: The path to the installed copy of ejabberd
Guide is set in the environment variable
EJABBERD_DOC_PATH (EJAB-837).
* src/web/ejabberd_web_admin.erl: Likewise
* src/ejabberdctl.template: Likewise
* doc/guide.tex: Likewise
* doc/guide.html: Likewise
SVN Revision: 1937
2009-03-03 19:11:23 +01:00
|
|
|
-e "s*@DOCDIR@*@docdir@*" \
|
2008-07-15 10:45:05 +02:00
|
|
|
-e "s*@erl@*@ERL@*" ejabberdctl.template \
|
|
|
|
> ejabberdctl.example
|
|
|
|
[ -f $(ETCDIR)/ejabberdctl.cfg ] \
|
|
|
|
&& install -b -m 640 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg-new \
|
|
|
|
|| install -b -m 640 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg
|
|
|
|
install -b -m 644 $(G_USER) inetrc $(ETCDIR)/inetrc
|
|
|
|
#
|
|
|
|
# Administration script
|
Merge from trunk: 1835, 1836, 1842, 1843, 1854, 1858, 1860, 1861, and 1862.
* doc/Makefile: In Clean do not remove html. In new Distclean,
remove also html.
* doc/Makefile: When cleaning, remove contributed_modules.tex
* src/Makefile.in: Fix arguments to Install program
* doc/guide.tex: Provide only an example of language option
* doc/guide.html: Likewise
* doc/guide.tex: mod_muc can run in several nodes of cluster
* doc/guide.html: Likewise
* doc/api/process-one.css: Add some style to HTML elements
* src/ejabberd_listener.erl: Fix EDoc errors
* src/web/ejabberd_web_admin.erl: Likewise
* src/ejabberd_hooks.erl: Explanation in EDoc of some functions
* doc/guide.tex: Explain that account creation is only supported
by internal and odbc authentication methods
* doc/guide.html: Likewise
* src/Makefile.in: The path to the installed copy of ejabberd
Guide is set in the environment variable
EJABBERD_DOC_PATH (EJAB-837).
* src/web/ejabberd_web_admin.erl: Likewise
* src/ejabberdctl.template: Likewise
* doc/guide.tex: Likewise
* doc/guide.html: Likewise
SVN Revision: 1937
2009-03-03 19:11:23 +01:00
|
|
|
[ -d $(SBINDIR) ] || install -d -m 750 $(SBINDIR)
|
2008-07-15 10:45:05 +02:00
|
|
|
install -m 550 $(G_USER) ejabberdctl.example $(SBINDIR)/ejabberdctl
|
|
|
|
#
|
|
|
|
# Binary Erlang files
|
2004-05-17 22:36:41 +02:00
|
|
|
install -d $(BEAMDIR)
|
2008-07-15 10:45:05 +02:00
|
|
|
install -m 644 *.app $(BEAMDIR)
|
2004-05-17 22:36:41 +02:00
|
|
|
install -m 644 *.beam $(BEAMDIR)
|
|
|
|
rm -f $(BEAMDIR)/configure.beam
|
2008-07-15 10:45:05 +02:00
|
|
|
#
|
|
|
|
# ejabberd header files
|
|
|
|
install -d $(INCLUDEDIR)
|
2008-07-17 17:33:50 +02:00
|
|
|
install -m 644 *.hrl $(INCLUDEDIR)
|
|
|
|
install -d $(INCLUDEDIR)/eldap/
|
|
|
|
install -m 644 eldap/*.hrl $(INCLUDEDIR)/eldap/
|
2008-12-08 13:02:27 +01:00
|
|
|
install -d $(INCLUDEDIR)/mod_muc/
|
|
|
|
install -m 644 mod_muc/*.hrl $(INCLUDEDIR)/mod_muc/
|
2008-07-17 17:33:50 +02:00
|
|
|
install -d $(INCLUDEDIR)/mod_proxy65/
|
|
|
|
install -m 644 mod_proxy65/*.hrl $(INCLUDEDIR)/mod_proxy65/
|
|
|
|
install -d $(INCLUDEDIR)/mod_pubsub/
|
|
|
|
install -m 644 mod_pubsub/*.hrl $(INCLUDEDIR)/mod_pubsub/
|
|
|
|
install -d $(INCLUDEDIR)/web/
|
|
|
|
install -m 644 web/*.hrl $(INCLUDEDIR)/web/
|
2008-07-15 10:45:05 +02:00
|
|
|
#
|
|
|
|
# Binary C programs
|
2008-03-21 16:42:14 +01:00
|
|
|
install -d $(PBINDIR)
|
2008-03-25 19:59:45 +01:00
|
|
|
$(INSTALL_EPAM)
|
2008-07-15 10:45:05 +02:00
|
|
|
#
|
|
|
|
# Binary system libraries
|
|
|
|
install -d $(SODIR)
|
|
|
|
install -m 644 *.so $(SODIR)
|
|
|
|
#
|
|
|
|
# Translated strings
|
2004-05-17 22:36:41 +02:00
|
|
|
install -d $(MSGSDIR)
|
|
|
|
install -m 644 msgs/*.msg $(MSGSDIR)
|
2008-07-15 10:45:05 +02:00
|
|
|
#
|
|
|
|
# Spool directory
|
|
|
|
install -d -m 750 $(O_USER) $(SPOOLDIR)
|
|
|
|
$(CHOWN_COMMAND) -R @INSTALLUSER@ $(SPOOLDIR) >$(CHOWN_OUTPUT)
|
|
|
|
chmod -R 750 $(SPOOLDIR)
|
|
|
|
[ ! -f $(COOKIEFILE) ] || { $(CHOWN_COMMAND) @INSTALLUSER@ $(COOKIEFILE) >$(CHOWN_OUTPUT) ; chmod 400 $(COOKIEFILE) ; }
|
|
|
|
#
|
|
|
|
# Log directory
|
|
|
|
install -d -m 750 $(O_USER) $(LOGDIR)
|
|
|
|
$(CHOWN_COMMAND) -R @INSTALLUSER@ $(LOGDIR) >$(CHOWN_OUTPUT)
|
|
|
|
chmod -R 750 $(LOGDIR)
|
|
|
|
#
|
|
|
|
# Documentation
|
|
|
|
install -d $(DOCDIR)
|
|
|
|
install ../doc/guide.html $(DOCDIR)
|
|
|
|
install ../doc/*.png $(DOCDIR)
|
|
|
|
install ../doc/*.txt $(DOCDIR)
|
2004-05-17 22:36:41 +02:00
|
|
|
|
2007-12-02 02:03:18 +01:00
|
|
|
uninstall: uninstall-binary
|
|
|
|
|
|
|
|
uninstall-binary:
|
2008-07-15 10:45:05 +02:00
|
|
|
rm -f $(SBINDIR)/ejabberdctl
|
|
|
|
rm -fr $(DOCDIR)
|
|
|
|
rm -f $(BEAMDIR)/*.beam
|
|
|
|
rm -f $(BEAMDIR)/*.app
|
|
|
|
rm -fr $(BEAMDIR)
|
|
|
|
rm -f $(INCLUDEDIR)/*.hrl
|
|
|
|
rm -fr $(INCLUDEDIR)
|
|
|
|
rm -fr $(PBINDIR)
|
|
|
|
rm -f $(SODIR)/*.so
|
|
|
|
rm -fr $(SODIR)
|
|
|
|
rm -f $(MSGSDIR)/*.msgs
|
|
|
|
rm -fr $(MSGSDIR)
|
|
|
|
rm -fr $(PRIVDIR)
|
|
|
|
rm -fr $(EJABBERDDIR)
|
2007-12-02 02:03:18 +01:00
|
|
|
|
|
|
|
uninstall-all: uninstall-binary
|
|
|
|
rm -rf $(ETCDIR)
|
|
|
|
rm -rf $(EJABBERDDIR)
|
2008-07-15 10:45:05 +02:00
|
|
|
rm -rf $(SPOOLDIR)
|
|
|
|
rm -rf $(LOGDIR)
|
2007-12-02 02:03:18 +01:00
|
|
|
|
2004-05-17 22:36:41 +02:00
|
|
|
clean: clean-recursive clean-local
|
|
|
|
|
|
|
|
clean-local:
|
2008-12-01 16:53:30 +01:00
|
|
|
rm -f *.beam $(ERLSHLIBS) epam ejabberdctl.example
|
2005-12-22 15:48:01 +01:00
|
|
|
rm -f XmppAddr.asn1db XmppAddr.erl XmppAddr.hrl
|
2003-10-17 21:15:38 +02:00
|
|
|
|
2004-05-17 22:36:41 +02:00
|
|
|
distclean: distclean-recursive clean-local
|
|
|
|
rm -f config.status
|
|
|
|
rm -f config.log
|
|
|
|
rm -f Makefile
|
|
|
|
|
2003-10-17 21:15:38 +02:00
|
|
|
TAGS:
|
|
|
|
etags *.erl
|
|
|
|
|
|
|
|
Makefile: Makefile.in
|
2007-05-29 16:31:12 +02:00
|
|
|
|
|
|
|
dialyzer: $(BEAMS)
|
|
|
|
@dialyzer -c .
|