2013-03-07 21:03:30 +00:00
|
|
|
TARGET= wterl
|
2011-12-18 20:54:46 +00:00
|
|
|
|
2013-03-07 21:03:30 +00:00
|
|
|
REBAR= ./rebar
|
|
|
|
#REBAR= /usr/bin/env rebar
|
|
|
|
ERL= /usr/bin/env erl
|
|
|
|
DIALYZER= /usr/bin/env dialyzer
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: plt analyze all deps compile get-deps clean
|
|
|
|
|
|
|
|
all: compile
|
|
|
|
|
|
|
|
deps: get-deps
|
|
|
|
|
|
|
|
get-deps:
|
2013-04-16 15:47:04 +00:00
|
|
|
c_src/build_deps.sh get-deps
|
2013-03-07 21:03:30 +00:00
|
|
|
@$(REBAR) get-deps
|
|
|
|
|
|
|
|
update-deps:
|
2013-04-16 15:47:04 +00:00
|
|
|
c_src/build_deps.sh update-deps
|
2013-03-07 21:03:30 +00:00
|
|
|
@$(REBAR) update-deps
|
|
|
|
|
2013-04-16 21:20:57 +00:00
|
|
|
c_src/wterl.o: c_src/async_nif.h
|
|
|
|
touch c_src/wterl.c
|
2013-03-07 21:03:30 +00:00
|
|
|
|
|
|
|
ebin/app_helper.beam:
|
|
|
|
@echo You need to:
|
|
|
|
@echo cp ../riak/deps/riak_core/ebin/app_helper.beam ebin
|
|
|
|
@/bin/false
|
|
|
|
|
|
|
|
compile: c_src/wterl.o ebin/app_helper.beam
|
|
|
|
@$(REBAR) compile
|
2011-12-18 20:54:46 +00:00
|
|
|
|
|
|
|
clean:
|
2013-03-07 21:03:30 +00:00
|
|
|
@$(REBAR) clean
|
|
|
|
|
|
|
|
test: eunit
|
|
|
|
|
|
|
|
eunit: compile
|
|
|
|
@$(REBAR) eunit skip_deps=true
|
|
|
|
|
|
|
|
eunit_console:
|
2013-04-17 17:19:06 +00:00
|
|
|
@$(ERL) -pa .eunit deps/lager/ebin
|
2013-03-07 21:03:30 +00:00
|
|
|
|
|
|
|
plt: compile
|
2013-04-17 17:19:06 +00:00
|
|
|
@$(DIALYZER) --build_plt --output_plt .$(TARGET).plt -pa deps/lager/ebin --apps kernel stdlib
|
2013-03-07 21:03:30 +00:00
|
|
|
|
|
|
|
analyze: compile
|
2013-04-17 17:19:06 +00:00
|
|
|
$(DIALYZER) --plt .$(TARGET).plt -pa deps/lager/ebin ebin
|
2013-03-07 21:03:30 +00:00
|
|
|
|
|
|
|
repl:
|
2013-04-17 17:19:06 +00:00
|
|
|
$(ERL) -pz deps/lager/ebin -pa ebin
|
2013-03-07 21:03:30 +00:00
|
|
|
|
|
|
|
eunit-repl:
|
2013-04-17 17:19:06 +00:00
|
|
|
$(ERL) -pz deps/lager/ebin -pa ebin -pa .eunit
|