forked from lorabasics/basicstation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
32 lines (26 loc) · 884 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
TD=../..
platform?=linux
variant?=testsim
all: station sim
station:
platform=${platform} variant=${variant} make -C ${TD}
sim: station
PATH=${TD}/build-${platform}-${variant}/bin:${PATH} python sim.py
tmux: station
@if [ -z "${TMUX}" ]; then \
echo "Starting new tmux session" ; \
tmux new-session -d 'python sim.py tc'; \
tmux split-window -v 'python sim.py lgwsim'; \
tmux split-window -v '${TD}/build-${platform}-${variant}/bin/station -l DEBUG'; \
tmux -2 attach-session -d; \
tmux select-layout even-vertical; \
else \
echo "Creating new window inside tmux session"; \
tmux new-window 'python sim.py tc'; \
tmux split-window -v 'python sim.py lgwsim'; \
tmux split-window -v '${TD}/build-${platform}-${variant}/bin/station -l DEBUG'; \
tmux select-layout even-vertical; \
fi
clean:
rm -rf tc-* station.log station.pid spidev
.PHONY: all clean