-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathMakefile
71 lines (51 loc) · 1.11 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
LOAD_PATH = \
ebin \
mochiweb/ebin \
$(NULL)
MNESIA_DIR = /tmp/janus.db
NAME = janus
HOST = `hostname`
NODE = $(NAME)@$(HOST)
EC2_USER_DATA = `priv/user_data`
BASIC_OPTS = \
-pa $(LOAD_PATH) \
+A 8 +K true +P 120000 -smp disable \
$(NULL)
OPTS = \
$(BASIC_OPTS) \
-mnesia dir '"$(MNESIA_DIR)"' \
-s mnesia start \
$(NULL)
LOCAL_OPTS = \
$(OPTS) \
-janus cluster $(CLUSTER) \
-janus listen_port 8081 \
$(EXTRA_OPTS) \
$(NULL)
EC2_OPTS = \
$(OPTS) \
-janus cluster "'$(EC2_USER_DATA)'" \
$(EXTRA_OPTS) \
$(NULL)
all: compile
compile:
erl -make -smp disable
make_boot: compile
erl $(BASIC_OPTS) -s janus_admin make_boot -s init stop
run: compile
erl $(LOCAL_OPTS) -name $(NODE) -s janus start
run1: compile
erl $(LOCAL_OPTS) -name $(NODE) -s janus start
run2: compile
erl $(LOCAL_OPTS) -name $(NODE) -boot janus
ec2: compile make_boot
erl $(EC2_OPTS) -name $(NODE) -boot janus
remsh:
erl $(BASIC_OPTS) -name remote -remsh $(NODE)
sh: compile
erl $(LOCAL_OPTS) -name debug
sh1: compile
erl $(LOCAL_OPTS) -name debug1 -remsh debug@$(NODE)
clean:
rm -rf ebin/*.beam
rm -fr $(MNESIA_DIR)