32 lines
631 B
Makefile
32 lines
631 B
Makefile
ERLC_WARNINGS = -W1
|
|
MNESIA_DIR = db
|
|
RUN_INIT =
|
|
DEBUG =
|
|
OPTIONS =
|
|
|
|
all : clean compile
|
|
|
|
nowarn : ERLC_WARNINGS = -W0
|
|
nowarn : clean compile
|
|
|
|
test : ERLC_WARNINGS = -W0
|
|
test : OPTIONS := $(OPTIONS) -DTEST
|
|
test : all
|
|
erlc $(ERLC_WARNINGS) $(OPTIONS) -o ./ebin ./tests/*.erl
|
|
erl -noshell -pa ebin -s test_master start -s erlang halt
|
|
|
|
compile :
|
|
erlc $(DEBUG) $(ERLC_WARNINGS) $(OPTIONS) -o ./ebin ./src/*.erl
|
|
-erl -noshell -pa ebin -s erldev make_app . -s erlang halt
|
|
|
|
clean :
|
|
-@rm ebin/*
|
|
|
|
|
|
run :
|
|
erl -pa ebin -mnesia dir $(MNESIA_DIR) $(RUN_INIT)
|
|
|
|
|
|
debug : DEBUG = +debug_info
|
|
debug : RUN_INIT = -s debugger start
|
|
debug : all |