-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
62 lines (49 loc) · 1.02 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
APP:=rudp
SRC_PATH:= -pa _build/default/lib/*/ebin
ERL_RUN_ARGS:= $(SRC_PATH) +pc unicode -name $(APP)@`hostname` -s rudp_app main
.PHONY: all
all: compile
.PHONY: compile
compile:
./rebar3 compile
.PHONY: run
run: compile clear-log
erl $(ERL_RUN_ARGS)
.PHONY: upload
upload: compile upload1 upload2
rsync -rltxSRzv \
--exclude .git \
--exclude *.log* \
--exclude *.pid \
--exclude .idea \
. server:~/rudp
.PHONY: s1
s1:
ssh sergey@54.229.209.50
.PHONY: upload1
upload1:
rsync -rltxSRzv \
--exclude .git \
--exclude *.log* \
--exclude *.pid \
--exclude .idea \
--exclude *.erl \
. sergey@54.229.209.50:~/rudp
.PHONY: s2
s2:
ssh sergey@54.154.235.68
.PHONY: upload2
upload2:
rsync -rltxSRzv \
--exclude .git \
--exclude *.log* \
--exclude *.pid \
--exclude .idea \
--exclude *.erl \
. sergey@54.154.235.68:~/rudp
clear-log:
rm -f log/*
kill:
kill `cat server.pid` || true
daemon: kill
run_erl -daemon /tmp/ log/ "erl $(ERL_RUN_ARGS)"