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
|
|
|
|
2003-10-21 22:28:36 +02:00
|
|
|
prefix = @prefix@
|
|
|
|
|
2005-05-23 22:27:17 +02:00
|
|
|
SUBDIRS = @mod_irc@ @mod_pubsub@ @mod_muc@ @eldap@ @web@ stringprep @tls@ @odbc@
|
2003-10-17 21:15:38 +02:00
|
|
|
ERLSHLIBS = expat_erl.so
|
|
|
|
|
2003-10-21 22:28:36 +02:00
|
|
|
DESTDIR =
|
|
|
|
|
|
|
|
EJABBERDDIR = $(DESTDIR)/var/lib/ejabberd
|
2004-05-17 22:36:41 +02:00
|
|
|
BEAMDIR = $(EJABBERDDIR)/ebin
|
2003-10-21 22:28:36 +02:00
|
|
|
PRIVDIR = $(EJABBERDDIR)/priv
|
2004-05-17 22:36:41 +02:00
|
|
|
SODIR = $(PRIVDIR)/lib
|
2003-11-13 20:09:33 +01:00
|
|
|
MSGSDIR = $(PRIVDIR)/msgs
|
2004-07-06 23:34:50 +02:00
|
|
|
LOGDIR = $(DESTDIR)/var/log/ejabberd
|
|
|
|
ETCDIR = $(DESTDIR)/etc/ejabberd
|
2003-10-21 22:28:36 +02:00
|
|
|
|
2004-05-17 22:36:41 +02:00
|
|
|
all: $(ERLSHLIBS) compile-beam all-recursive
|
2003-10-17 21:15:38 +02:00
|
|
|
|
|
|
|
compile-beam:
|
2004-09-27 20:54:17 +02:00
|
|
|
@ERL@ -s make all report -noinput -s erlang halt
|
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
|
|
|
|
|
|
|
|
|
2003-10-18 21:15:12 +02:00
|
|
|
$(ERLSHLIBS): %.so: %.c
|
2004-08-05 22:46:24 +02:00
|
|
|
gcc -Wall $(CFLAGS) $(LDFLAGS) $(LIBS) \
|
2003-10-17 21:15:38 +02:00
|
|
|
$(subst ../,,$(subst .so,.c,$@)) \
|
2004-09-26 22:46:43 +02:00
|
|
|
$(EXPAT_LIBS) $(EXPAT_CFLAGS) \
|
|
|
|
$(ERLANG_LIBS) $(ERLANG_CFLAGS) \
|
|
|
|
-o $@ -fpic -shared
|
2003-10-17 21:15:38 +02:00
|
|
|
|
2003-10-21 22:28:36 +02:00
|
|
|
install: all
|
2004-05-17 22:36:41 +02:00
|
|
|
install -d $(BEAMDIR)
|
|
|
|
install -m 644 *.beam $(BEAMDIR)
|
|
|
|
rm -f $(BEAMDIR)/configure.beam
|
|
|
|
install -m 644 *.app $(BEAMDIR)
|
|
|
|
install -d $(SODIR)
|
|
|
|
install -m 644 *.so $(SODIR)
|
|
|
|
install -d $(MSGSDIR)
|
|
|
|
install -m 644 msgs/*.msg $(MSGSDIR)
|
2004-07-06 23:34:50 +02:00
|
|
|
install -d $(ETCDIR)
|
|
|
|
install -b -m 644 ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg
|
|
|
|
install -d $(LOGDIR)
|
2004-05-17 22:36:41 +02:00
|
|
|
|
|
|
|
clean: clean-recursive clean-local
|
|
|
|
|
|
|
|
clean-local:
|
2003-10-17 21:15:38 +02:00
|
|
|
rm -f *.beam $(ERLSHLIBS)
|
|
|
|
|
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
|