forked from zhuoyikang/spt_crate
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
57 lines (45 loc) · 868 Bytes
/
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
# 需要加载的代码路径
LOAD_PATH = \
ebin \
deps/*/ebin \
$(NULL)
# 节点名称
NODE = galaxy-empire@127.0.0.1
# cookie
COOKIE = abcdeft
# 部分配置参数
OPTS = \
-pa $(LOAD_PATH) \
-env ERL_MAX_ETS_TABLES 10000 \
-setcookie $(COOKIE) \
+A 8 +K true +P 120000 # -smp disable \
-detached \
-noshell \
$(NULL)
# rebar-用于编译
REBAR := ./bin/rebar --config config/rebar.config
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
REBAR := ./bin/rebar.linux --config config/rebar.config
# do something Linux-y
endif
# 编译全部
all:
$(REBAR) compile
# 获取到所有的依赖
deps:
$(REBAR) get-deps
t:
$(REBAR) compile eunit
c:
$(REBAR) clean
# 调用生成器生成代码
g:
cd src/ && ruby ./proto_gen.rb
s:
erl $(OPTS) -name $(NODE) -s slg_support start
e:
erl $(OPTS)
r:
erl $(OPTS) -s robot start
.PHONY: deps get-deps