mirror of
https://github.com/processone/ejabberd.git
synced 2024-09-17 13:58:38 +02:00
50137aa98d
SVN Revision: 2842
48 lines
940 B
Makefile
48 lines
940 B
Makefile
# $Id: Makefile.in 775 2007-05-29 14:31:12Z mremond $
|
|
|
|
CC = @CC@
|
|
CFLAGS = @CFLAGS@ @PAM_CFLAGS@
|
|
CPPFLAGS = @CPPFLAGS@
|
|
LDFLAGS = @LDFLAGS@
|
|
LIBS = @LIBS@ @PAM_LIBS@
|
|
|
|
ERLANG_CFLAGS = @ERLANG_CFLAGS@
|
|
ERLANG_LIBS = @ERLANG_LIBS@
|
|
|
|
EFLAGS += -I ..
|
|
EFLAGS += -pz ..
|
|
|
|
# make debug=true to compile Erlang module with debug informations.
|
|
ifdef debug
|
|
EFLAGS+=+debug_info +export_all
|
|
endif
|
|
|
|
ERLSHLIBS = ../epam
|
|
OUTDIR = ..
|
|
SOURCES = $(wildcard *.erl)
|
|
BEAMS = $(addprefix $(OUTDIR)/,$(SOURCES:.erl=.beam))
|
|
|
|
|
|
all: $(BEAMS) $(ERLSHLIBS)
|
|
|
|
$(OUTDIR)/%.beam: %.erl
|
|
@ERLC@ -W $(EFLAGS) -o $(OUTDIR) $<
|
|
|
|
#all: $(ERLSHLIBS)
|
|
# erl -s make all report "{outdir, \"..\"}" -noinput -s erlang halt
|
|
|
|
$(ERLSHLIBS): ../%: %.c
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \
|
|
$(subst ../,,$(subst ,.c,$@)) $(LIBS) \
|
|
$(ERLANG_LIBS) $(ERLANG_CFLAGS) \
|
|
-o $@ -lpthread
|
|
|
|
clean:
|
|
rm -f $(BEAMS) $(ERLSHLIBS)
|
|
|
|
distclean: clean
|
|
rm -f Makefile
|
|
|
|
TAGS:
|
|
etags *.erl
|