2003-10-17 21:15:38 +02:00
|
|
|
# $Id$
|
|
|
|
|
|
|
|
CC = @CC@
|
|
|
|
CFLAGS = @CFLAGS@
|
|
|
|
CPPFLAGS = @CPPFLAGS@
|
|
|
|
LDFLAGS = @LDFLAGS@
|
|
|
|
LIBS = @LIBS@
|
|
|
|
|
2003-10-21 22:28:36 +02:00
|
|
|
prefix = @prefix@
|
|
|
|
|
2003-10-17 21:15:38 +02:00
|
|
|
INCLUDES = @ERLANG_CFLAGS@ @EXPAT_CFLAGS@
|
|
|
|
|
|
|
|
LIBDIRS = @ERLANG_LIBS@ @EXPAT_LIBS@
|
|
|
|
|
2003-11-23 21:11:21 +01:00
|
|
|
SUBDIRS = @mod_irc@ @mod_pubsub@ @mod_muc@ @eldap@ stringprep
|
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
|
|
|
|
BEAMDIR = $(EJABBERDDIR)/beam
|
|
|
|
PRIVDIR = $(EJABBERDDIR)/priv
|
2003-11-13 20:09:33 +01:00
|
|
|
SODIR = $(PRIVDIR)
|
|
|
|
MSGSDIR = $(PRIVDIR)/msgs
|
2003-10-21 22:28:36 +02:00
|
|
|
|
2003-10-17 21:15:38 +02:00
|
|
|
all: all-recursive $(ERLSHLIBS) compile-beam
|
|
|
|
|
|
|
|
compile-beam:
|
|
|
|
@erl -s make all report -noinput -s erlang halt
|
|
|
|
|
|
|
|
|
|
|
|
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
|
2003-10-17 21:15:38 +02:00
|
|
|
gcc -Wall $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(LIBDIRS) \
|
|
|
|
$(subst ../,,$(subst .so,.c,$@)) \
|
2003-10-18 21:15:12 +02:00
|
|
|
-lexpat \
|
2003-10-17 21:15:38 +02:00
|
|
|
-lerl_interface \
|
|
|
|
-lei \
|
|
|
|
-o $@ -fpic -shared \
|
|
|
|
|
2003-10-21 22:28:36 +02:00
|
|
|
install: all
|
|
|
|
mkdir -p $(BEAMDIR)
|
|
|
|
cp *.beam $(BEAMDIR)
|
|
|
|
mkdir -p $(SODIR)
|
|
|
|
cp *.so $(SODIR)
|
2003-11-13 20:09:33 +01:00
|
|
|
mkdir -p $(MSGSDIR)
|
|
|
|
cp msgs/*.msg $(MSGSDIR)
|
2003-10-21 22:28:36 +02:00
|
|
|
|
2003-10-17 21:15:38 +02:00
|
|
|
clean: clean-recursive
|
|
|
|
rm -f *.beam $(ERLSHLIBS)
|
|
|
|
|
|
|
|
TAGS:
|
|
|
|
etags *.erl
|
|
|
|
|
|
|
|
Makefile: Makefile.in
|