Files
alcove/Makefile
Michael Santos cf134922b4 Allow passing options to dialzyer
On ARM, dialyzer crashes when compiling native code. Add support for
dialyzer flags via an environment variable to work around this:

    DIALYZER_FLAGS=--no_native make dialyzer
2014-11-28 16:44:41 -05:00

43 lines
952 B
Makefile

REBAR=$(shell which rebar || echo ./rebar)
DEPSOLVER_PLT=$(CURDIR)/.depsolver_plt
all: compile
./rebar:
erl -noshell -s inets start -s ssl start \
-eval 'httpc:request(get, {"https://raw.github.com/wiki/rebar/rebar/rebar", []}, [], [{stream, "./rebar"}])' \
-s inets stop -s init stop
chmod +x ./rebar
compile: $(REBAR)
@$(REBAR) compile
clean: $(REBAR)
@$(REBAR) clean
deps: $(REBAR)
@$(REBAR) get-deps
test: compile
@$(REBAR) xref eunit recursive=false
examples: eg
eg:
@erlc -I deps -o ebin examples/*.erl
.PHONY: test dialyzer typer clean distclean
$(DEPSOLVER_PLT):
@dialyzer $(DIALYZER_FLAGS) --output_plt $(DEPSOLVER_PLT) --build_plt \
--apps erts kernel stdlib crypto
dialyzer: $(DEPSOLVER_PLT)
@dialyzer $(DIALYZER_FLAGS) -I include --plt $(DEPSOLVER_PLT) -Wrace_conditions \
--src src test examples
typer: $(DEPSOLVER_PLT)
@typer -I include --plt $(DEPSOLVER_PLT) -r ./src
distclean: clean
@rm $(DEPSOLVER_PLT)