-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
36 lines (25 loc) · 956 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
include ../../utils/Makefile
all: images compile build controller
terminals: h1 h2 h3 h4
build: clean
./build.sh
# Sleep for 2 seconds to allow the switches to start
controller:
sleep 2 && ../../controller/controller.py --config config/switches.json
clean:
./clean.sh
migrate:
@if [ "${SOURCE}" = "" ] || [ "${TARGET}" = "" ]; then \
echo "Usage: make migrate SOURCE=x TARGET=y"; \
else \
./cr.sh ${SOURCE} ${TARGET}; \
fi
h1:
xterm -xrm 'XTerm.vt100.allowTitleOps: false' -T "h1" -hold -e "sudo podman rm -f tcp-client && sudo podman run --name tcp-client --pod h1-pod tcp-client" &
h2:
xterm -xrm 'XTerm.vt100.allowTitleOps: false' -T "h2" -hold -e "sudo podman logs -f h2" &
h3:
xterm -xrm 'XTerm.vt100.allowTitleOps: false' -T "h3" -hold -e "sudo podman logs -f h3" &
h4:
xterm -xrm 'XTerm.vt100.allowTitleOps: false' -T "h4" -hold -e "sudo podman logs -f h4" &
.PHONY: all terminals build controller clean migrate h1 h2 h3 h4