forked from NetComposer/nksip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
111 lines (84 loc) · 2.9 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
PROJECT = nksip
DIALYZER = dialyzer
REBAR = ./rebar
#RELOADER = -s nkreloader
all: app
deps:
@$(REBAR) get-deps
app: deps
@$(REBAR) compile
cnodeps:
./rebar compile skip_deps=true
clean: clean-docs clean-logs clean-edocs
@$(REBAR) clean
rm -f erl_crash.dump
clean-logs:
rm -rf log/*
rm -rf samples/nksip_loadtest/log/*
rm -rf samples/nksip_pbx/log/*
rm -rf samples/nksip_tutorial/log/*
docs: clean-docs
@$(REBAR) doc skip_deps=true
clean-docs:
rm -f doc/*.css doc/*.html \
doc/*.png doc/edoc-info
rm -f plugins/doc/*.css plugins/doc/*.html \
plugins/doc/*.png plugins/doc/edoc-info
rm -f samples/nksip_loadtest/doc/*.css samples/nksip_loadtest/doc/*.html \
samples/nksip_loadtest/doc/*.png samples/nksip_loadtest/doc/edoc-info
rm -f samples/nksip_pbx/doc/*.css samples/nksip_pbx/doc/*.html \
samples/nksip_pbx/doc/*.png samples/nksip_pbx/doc/edoc-info
rm -f samples/nksip_tutorial/doc/*.css samples/nksip_tutorial/doc/*.html \
samples/nksip_tutorial/doc/*.png samples/nksip_tutorial/doc/edoc-info
EDOC_SOURCE_PATH_H = "./src", \
"./include", \
"./priv/doc_src", \
"./samples/nksip_loadtest/src", \
"./samples/nksip_pbx/src", \
"./samples/nksip_tutorial/src", \
"./plugins/src", \
"./plugins/include", \
"./deps/nklib/src","./deps/nklib/include", \
"./deps/nkpacket/src","./deps/nkpacket/include", \
"./deps/nkservice/src","./deps/nkservice/include", \
"./deps/nkdocker/src","./deps/nkdocker/include"
EDOC_SOURCE_PATH = "./priv/doc_src","./src"
USER_EDOC_OPTS = '[{source_path,[$(EDOC_SOURCE_PATH)]},\
{dir,"./edocs"}, \
]'
DEVELOPER_EDOC_OPTS = '[{source_path,[$(EDOC_SOURCE_PATH)]},\
{dir,"./edocs"}, \
{private,true}, \
{todo,true} \
]'
edocs: clean-edocs
erl -noshell -run edoc_run packages '[""]' $(USER_EDOC_OPTS)
edocs-dev: clean-edocs
erl -noshell -run edoc_run packages '[""]' $(DEVELOPER_EDOC_OPTS)
clean-edocs:
rm -Rf edocs
tests: app eunit
eunit:
export ERL_FLAGS="-config test/app.config"; ./rebar eunit skip_deps=true
build-plt:
@$(DIALYZER) --build_plt --output_plt .$(PROJECT).plt \
--apps erts kernel stdlib sasl tools inets crypto public_key ssl eunit
dialyze: app
@$(DIALYZER) ebin/nksip*.beam --plt .$(PROJECT).plt \
-Werror_handling #-Wunmatched_returns -Wrace_conditions -Wunderspecs
shell:
erl -config priv/app.config -args_file priv/vm.args $(RELOADER)
tutorial: app
erl -config samples/nksip_tutorial/priv/app.config \
-args_file samples/nksip_tutorial/priv/vm.args
loadtest: app
erl -config samples/nksip_loadtest/priv/app.config \
-args_file samples/nksip_loadtest/priv/vm.args -s nksip_loadtest
pbx: app
erl -config samples/nksip_pbx/priv/app.config \
-args_file samples/nksip_pbx/priv/vm.args
build_tests:
erlc -pa ebin -pa deps/lager/ebin -pa deps/nklib/ebin -pa deps/nkpacket/ebin \
-o ebin -I include \
+export_all +debug_info +"{parse_transform, lager_transform}" \
test/*.erl