Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (34 loc) · 1.48 KB
/
Copy pathMakefile
File metadata and controls
43 lines (34 loc) · 1.48 KB
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
# Miranda — local development
PREFIX ?= $(HOME)/.local/bin
.PHONY: build test race reproduce install dev netsim
build:
cd go && go build -o ../bin/mir-signal ./cmd/mir-signal
cd go && go build -o ../bin/mir-agent ./cmd/mir-agent
cd go && go build -o ../bin/mir ./cmd/mir
test:
cd go && go test ./...
race:
cd go && go test -race -count=1 ./...
reproduce:
./scripts/verify-reproducible.sh
# netsim: the NAT matrix in Docker — attach, TURN fallback, and resume after a
# network flip, measured across NAT types. Needs a running Docker (OrbStack is
# fine). Takes a few minutes; results land in netsim/results/. See netsim/README.md.
netsim:
./netsim/run.sh
# install the CLIs onto your PATH (default ~/.local/bin; override with PREFIX=...)
install: build
mkdir -p "$(PREFIX)"
install -m 0755 bin/mir bin/mir-agent bin/mir-signal "$(PREFIX)/"
@echo "installed mir, mir-agent, mir-signal -> $(PREFIX)"
# dev: run the signaling server + an agent locally.
# 1) `make build`
# 2) `make dev` (starts mir-signal, enrolls an agent against it)
# Pair an owner with: bin/mir pair-dev --owner-pub <hex>
dev: build
@echo "starting mir-signal on :8443 ..."
@./bin/mir-signal --addr :8443 & echo $$! > /tmp/mir-signal.pid
@sleep 1
@./bin/mir enroll --dir /tmp/mir-agent-dev --signal http://localhost:8443 || true
@echo "agent enrolled. Pair an owner, then: ./bin/mir up --dir /tmp/mir-agent-dev --shell sh"
@echo "client: ./bin/mir attach <machine> | stop signal: kill \`cat /tmp/mir-signal.pid\`"