aboutsummaryrefslogtreecommitdiff
path: root/src/web/Makefile.in
blob: 161dbb25c396bc61d22e040e1cedd2f4446b6f36 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @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

SOURCES = $(wildcard *.erl)
OUTDIR = ..
BEAMS = $(addprefix $(OUTDIR)/,$(SOURCES:.erl=.beam))

all: $(BEAMS)

$(OUTDIR)/%.beam: %.erl
	@ERLC@ -W $(EFLAGS) -o $(OUTDIR) $<

clean:
	rm -f $(BEAMS)

distclean: clean
	rm -f Makefile

TAGS:
	etags *.erl


DEVDOCDIR=../../doc/devdoc
DDTDIR=..
HTMLS = $(SOURCES:%.erl=../../doc/devdoc/%.html)
ERLHTMLS = $(SOURCES:%.erl=../../doc/devdoc/%.erl.html)
SVGS = $(SOURCES:%.erl=../../doc/devdoc/%.svg)

devdoc: $(HTMLS) $(ERLHTMLS) $(SVGS)

$(DEVDOCDIR)/%.erl.html: %.erl
	@ERL@ -noshell -pa $(DEVDOCDIR) -run escobar_run file $< $(DDTDIR) -s init stop

$(DEVDOCDIR)/%.html: %.erl
	@ERL@ -noshell -run edoc_run file $< \
	'[{dir,"$(DDTDIR)"},{packages,false},{todo,true},{private,true},{def,{vsn,"$(VSN)"}},{stylesheet,"process-one.css"},{overview,"overview.edoc"}]' -s init stop

$(DEVDOCDIR)/%.svg: %.erl
	@ERL@ -noshell -pa $(DEVDOCDIR) -run funrelg dir $< $(DDTDIR) -s init stop