36 lines
1.2 KiB
Makefile
36 lines
1.2 KiB
Makefile
LIBS=wpi
|
|
CXX=arm-frc-linux-gnueabi-g++
|
|
override CPPFLAGS +=-std=c++14
|
|
LDFLAGS=-l$(LIBS)
|
|
TEAM=1786
|
|
SSH_OPTIONS=-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
|
|
SSH_SSHPASS=$(shell command -v sshpass >/dev/null 2>&1 && echo -n "sshpass -p ''")
|
|
SSH_HOST=roborio-1786-frc.local
|
|
|
|
all: deploy
|
|
|
|
build: FRCUserProgram
|
|
|
|
FRCUserProgram: src/Robot.cpp src/Shooter.o
|
|
@echo "Building FRCUserProgram"
|
|
$(CXX) $(CPPFLAGS) $^ -o $@ $(LDFLAGS)
|
|
|
|
clean:
|
|
rm FRCUserProgram src/Shooter.o
|
|
|
|
deploy: build
|
|
@echo "Copying FRCUserProgram"
|
|
ssh $(SSH_OPTIONS) lvuser@$(SSH_HOST) 'rm -f /home/lvuser/FRCUserProgram'
|
|
scp $(SSH_OPTIONS) -o "LogLevel QUIET" FRCUserProgram lvuser@$(SSH_HOST):/home/lvuser/FRCUserProgram
|
|
@echo "Restarting FRCUserProgram"
|
|
$(SSH_SSHPASS) ssh $(SSH_OPTIONS) admin@$(SSH_HOST) '. /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKillRobot.sh -t -r'
|
|
|
|
restart: FRCUserProgram
|
|
echo "Restarting FRCUserProgram"
|
|
$(SSH_SSHPASS) ssh $(SSH_OPTIONS) admin@$(SSH_HOST) '. /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKillRobot.sh -t -r'
|
|
|
|
stop:
|
|
@echo "Restarting FRCUserProgram"
|
|
$(SSH_SSHPASS) ssh $(SSH_OPTIONS) admin@$(SSH_HOST) '. /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKillRobot.sh -t'y
|
|
|