-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
46 lines (31 loc) · 924 Bytes
/
Makefile
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
ERLC = erlc
RM = rm -rf
SOURCES = $(wildcard src/*.erl)
BEAMDIR = ebin
SRCDIR = src
DOCDIR = doc
BEAMS = $(subst ${SRCDIR},${BEAMDIR},$(subst .erl,.beam,${SOURCES}))
HTMLS = $(subst ${SRCDIR},${DOCDIR},$(subst .erl,.html,${SOURCES}))
INCLUDES = -I include
ERLCFLAGS += +debug_info
ERLCFLAGS += -W3
ERLCFLAGS += ${INCLUDES}
ERLCFLAGS += -o ${BEAMDIR}
APPNAME = teleutils
APP_VSN = git
DOC_OPTS = {def,{vsn,\"$(APP_VSN)\"}}
all: compile-beam make-doc TAGS
compile-beam: ${BEAMS}
make-doc: ${HTMLS}
${BEAMDIR}/%.beam: ${SRCDIR}/%.erl
${ERLC} ${ERLCFLAGS} $<
${DOCDIR}/%.html: ${SRCDIR}/%.erl
erl -noshell -eval "edoc:application($(APPNAME), \".\", [$(DOC_OPTS)])" -s init stop
clean:
${RM} ${BEAMDIR}/*.beam erl_crash.dump ${SRCDIR}/*~ *~ TAGS doc/*
dialyzer:
dialyzer -Wno_match -c ${BEAMDIR}/*.beam
dialyzer-src:
dialyzer --src ${INCLUDES} -Wno_match -c ${SRCDIR}/*.erl
TAGS:
etags ${SRCDIR}/*.erl