-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (44 loc) · 1.51 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
.PHONY: all clean
all: build
EXECUTABLES = mpc_sesman demo_keygen demo_sign
build: kill_tmux
cargo build
mkdir out || true
for exe in $(EXECUTABLES); do \
cp target/debug/$$exe out/$$exe; \
done
demo_keygen: build
@tmux new-session -s frost \
-n man -d ";" new-window \
-n p1 -d ";" new-window \
-n p2 -d ";" new-window \
-n p3 -d ";" new-window \
-n p4 -d ";" new-window \
-n p5 -d ";"
@sleep 1
@tmux send-keys -t frost:man "cd $(shell pwd)/out && ./mpc_sesman" C-m
@sleep 1
@tmux send-keys -t frost:p1 "cd $(shell pwd)/out && ./demo_keygen -m 1" C-m
@tmux send-keys -t frost:p2 "cd $(shell pwd)/out && ./demo_keygen -m 2" C-m
@tmux send-keys -t frost:p3 "cd $(shell pwd)/out && ./demo_keygen -m 3" C-m
@tmux send-keys -t frost:p4 "cd $(shell pwd)/out && ./demo_keygen -m 4" C-m
@tmux send-keys -t frost:p5 "cd $(shell pwd)/out && ./demo_keygen -m 5" C-m
demo_sign: build
@tmux new-session -s frost \
-n p1 -d ";" new-window \
-n p2 -d ";" new-window \
-n p3 -d ";" new-window \
-n p4 -d ";" new-window \
-n p5 -d ";"
-n man -d ";" new-window \
@sleep 1
@tmux send-keys -t frost:man "cd $(shell pwd)/out && ./mpc_sesman" C-m
@sleep 1
@tmux send-keys -t frost:p1 "cd $(shell pwd)/out && ./demo_sign -s 1 -n 3 -m 1" C-m
@tmux send-keys -t frost:p3 "cd $(shell pwd)/out && ./demo_sign -s 2 -n 3 -m 3" C-m
@tmux send-keys -t frost:p5 "cd $(shell pwd)/out && ./demo_sign -s 3 -n 3 -m 5" C-m
clean: kill_tmux
cargo clean
rm -r out
kill_tmux:
tmux kill-session -t frost || true