-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
83 lines (63 loc) · 2.49 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
all: clean compile run
cowlib:
rm -rf lib/cowlib/ebin/*.beam
erlc +debug_info -I lib/cowlib/include -o lib/cowlib/ebin lib/cowlib/src/*.erl
cowboy:
rm -rf lib/cowboy/ebin/*.beam
erlc +debug_info -I lib -o lib/cowboy/ebin lib/cowboy/src/*.erl
goldrush:
rm -rf lib/goldrush/ebin
mkdir -p lib/goldrush/ebin
erlc +debug_info -o lib/goldrush/ebin lib/goldrush/src/*.erl
cp lib/goldrush/src/goldrush.app.src lib/goldrush/ebin/goldrush.app
gproc:
rm -rf lib/gproc/ebin/*
erlc +debug_info -o lib/gproc/ebin -I lib/gproc/include lib/gproc/src/*.erl
cp lib/gproc/src/gproc.app.src lib/gproc/ebin/gproc.app
jsx:
rm -rf lib/jsx/ebin
mkdir -p lib/jsx/ebin
erlc +debug_info -Dmaps_support=true -o lib/jsx/ebin lib/jsx/src/*.erl
cp lib/jsx/src/jsx.app.src lib/jsx/ebin/jsx.app
lager:
rm -rf lib/lager/ebin
mkdir -p lib/lager/ebin
erlc +debug_info -o lib/lager/ebin -I lib/lager/include lib/lager/src/*.erl
cp lib/lager/src/lager.app.src lib/lager/ebin/lager.app
ranch:
rm -rf lib/ranch/ebin/*.beam
erlc +debug_info -o lib/ranch/ebin lib/ranch/src/*.erl
proper:
rm -rf lib/proper/ebin/*.beam
./lib/proper/write_compile_flags lib/proper/include/compile_flags.hrl
erlc +debug_info -I lib/proper/include -o lib/proper/ebin lib/proper/src/vararg.erl
erlc +debug_info "+{parse_transform, vararg}" -I lib/proper/include -pa lib/proper/ebin -o lib/proper/ebin lib/proper/src/*.erl
deps: cowboy cowlib goldrush gproc jsx lager ranch proper
build:
erlc +debug_info -I lib/proper/include "+{parse_transform, lager_transform}" "+{parse_transform, proper_unused_imports_remover}" -pa lib/lager/ebin/ -pa lib/proper/ebin -pa lib -o ebin/ `find src tests -type f -iname "*.erl" -print0 | xargs -0`
clean:
rm -rf ebin/*.beam
compile: clean build dialyzer
run: compile shell
test_clock:
erl -noshell -pa ebin/ \
-eval "eunit:test([clock, clock_statem], [verbose])" -s init stop
test_all:
erl -noshell -pa ebin/ \
-eval "eunit:test([data_avatar, data_attack, data_events, data_health, data_mana, data_position, avatar_misc, autoattack, clock, clock_statem], [verbose])" -s init stop
test: compile test_all
shell:
erl -pa ebin/ \
lib/cowboy/ebin/ \
lib/cowlib/ebin/ \
lib/goldrush/ebin/ \
lib/gproc/ebin/ \
lib/jsx/ebin/ \
lib/lager/ebin/ \
lib/ranch/ebin/ \
lib/proper/ebin \
-s gameplay_server
noshell:
erl -pa ebin/ lib/cowboy/ebin/ lib/cowlib/ebin/ lib/goldrush/ebin/ lib/gproc/ebin/ lib/jsx/ebin/ lib/lager/ebin/ lib/ranch/ebin/ -noshell -s gameplay_server
dialyzer:
dialyzer --no_check_plt ebin