25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00
xmpp.chapril.org-ejabberd/src/Makefile.in

66 lines
1.3 KiB
Makefile
Raw Normal View History

# $Id$
CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
prefix = @prefix@
INCLUDES = @ERLANG_CFLAGS@ @EXPAT_CFLAGS@
LIBDIRS = @ERLANG_LIBS@ @EXPAT_LIBS@
SUBDIRS = @mod_irc@ @mod_pubsub@ @mod_muc@ @eldap@ stringprep
ERLSHLIBS = expat_erl.so
DESTDIR =
EJABBERDDIR = $(DESTDIR)/var/lib/ejabberd
BEAMDIR = $(EJABBERDDIR)/beam
PRIVDIR = $(EJABBERDDIR)/priv
SODIR = $(PRIVDIR)
MSGSDIR = $(PRIVDIR)/msgs
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
$(ERLSHLIBS): %.so: %.c
gcc -Wall $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(LIBDIRS) \
$(subst ../,,$(subst .so,.c,$@)) \
-lexpat \
-lerl_interface \
-lei \
-o $@ -fpic -shared \
install: all
mkdir -p $(BEAMDIR)
cp *.beam $(BEAMDIR)
mkdir -p $(SODIR)
cp *.so $(SODIR)
mkdir -p $(MSGSDIR)
cp msgs/*.msg $(MSGSDIR)
clean: clean-recursive
rm -f *.beam $(ERLSHLIBS)
TAGS:
etags *.erl
Makefile: Makefile.in