47 lines
1.3 KiB
Makefile
47 lines
1.3 KiB
Makefile
ERL=@ERL@
|
|
ERLC=@ERLC@
|
|
ERL_ERTS=@ERLANG_LIB_DIR_erts@
|
|
ERL_KERNEL=@ERLANG_LIB_DIR_kernel@
|
|
ERL_STDLIB=@ERLANG_LIB_DIR_stdlib@
|
|
ERL_CRYPTO=@ERLANG_LIB_DIR_crypto@
|
|
ERL_COMPILER=@ERLANG_LIB_DIR_compiler@
|
|
ERL_HIPE=@ERLANG_LIB_DIR_hipe@
|
|
ERL_SYNTAX_TOOLS=@ERLANG_LIB_DIR_syntax_tools@
|
|
OTP_TOP=/usr/lib/erlang/lib
|
|
PLT_SRC=$(ERL_ERTS)/ebin $(ERL_KERNEL)/ebin $(ERL_STDLIB)/ebin $(ERL_CRYPTO)/ebin $(ERL_COMPILER)/ebin $(ERL_HIPE)/ebin $(ERL_SYNTAX_TOOLS)/ebin
|
|
|
|
all: compile docs
|
|
|
|
test: compile_test
|
|
$(ERL) -noshell -pa ebin \
|
|
-eval 'eunit:test({dir, "ebin"})' \
|
|
-s init stop
|
|
|
|
compile: compile_c
|
|
$(ERL) -make
|
|
|
|
compile_test: compile_c
|
|
erl -noshell -eval "make:all([{d, 'TEST'}])." -s init stop
|
|
|
|
compile_c:
|
|
test -d ebin || mkdir ebin
|
|
cd priv && make
|
|
|
|
ifeq ($(wildcard sqlite3.plt),)
|
|
static:
|
|
dialyzer --build_plt --output_plt sqlite3.plt -r $(PLT_SRC)
|
|
dialyzer --add_to_plt --plt sqlite3.plt -r ebin --get_warnings
|
|
else
|
|
static:
|
|
dialyzer --add_to_plt --plt sqlite3.plt -r ebin --get_warnings
|
|
endif
|
|
|
|
clean:
|
|
- rm -rf ebin/*.beam doc/* sqlite3.plt src/test/*.beam
|
|
- rm -rf ct_run* all_runs.html variables* index.html
|
|
- find . -name "*~" | xargs rm
|
|
cd priv && make clean
|
|
|
|
docs:
|
|
$(ERL) -noshell -run edoc_run application "'sqlite3'" '"."' '[{title,"Welcome to sqlite3"},{hidden,false},{private,false}]' -s erlang halt
|