-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (36 loc) · 1.13 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
LIB=RobotCode2024
OUT=target/arm-unknown-linux-gnueabi/release/$(LIB)
DEPLOY=javastub/src/main/deploy/$(LIB)
TEAM=25.02
.PHONY: check
check:
cargo check
.PHONY: compile
compile: $(OUT)
$(OUT): src/** Cargo.* talon-board/out
cargo build --release --target arm-unknown-linux-gnueabi
$(dir $(DEPLOY)):
mkdir -p $(dir $(DEPLOY))
$(DEPLOY): $(dir $(DEPLOY)) $(OUT)
cp $(OUT) $(dir $(DEPLOY))
# just deploys robotcode
.PHONY: deploy-scp
deploy-scp: $(OUT)
ssh lvuser@10.$(TEAM).2 /usr/local/frc/bin/frcKillRobot.sh
ssh lvuser@10.$(TEAM).2 rm $(LIB)
scp $(OUT) lvuser@10.$(TEAM).2:
ssh lvuser@10.$(TEAM).2 /usr/local/frc/bin/frcRunRobot.sh
# Deploys the "deploy" directory and robotcode
.PHONY: deploy
deploy: $(OUT)
cd javastub; ./gradlew deploy
ssh lvuser@10.$(TEAM).2 cp robotCommand3 robotCommand
ssh lvuser@10.$(TEAM).2 chmod +x robotCommand
.PHONY: deploy-static
deploy-static:
cd javastub; ./gradlew deployfrcStaticFileDeployroborio
.PHONY: win
win:
cargo build --release --target arm-unknown-linux-gnueabi
copy target\arm-unknown-linux-gnueabi\release\libRobotCode2024.so javastub\src\main\deploy
cd javastub && gradlew deploy