This repository has been archived on 2020-09-21. You can view files and clone it, but cannot push or open issues or pull requests.
FRC2016-old/Makefile

33 lines
1.1 KiB
Makefile
Raw Normal View History

2016-01-11 13:14:09 -05:00
LIBS=wpi
2016-01-11 15:41:15 -05:00
override CFLAGS +=-l$(LIBS) -std=c++14
2016-01-11 13:14:09 -05:00
TEAM=1786
SSH_OPTIONS=-q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
SSH_SSHPASS=$(shell command -v sshpass >/dev/null 2>&1 && echo -n "sshpass -p ''")
all: deploy
build: FRCUserProgram
FRCUserProgram: robot.cpp
@echo "Building FRCUserProgram"
arm-frc-linux-gnueabi-g++ robot.cpp -o FRCUserProgram $(CFLAGS)
clean:
rm FRCUserProgram
deploy: build
@echo "Copying FRCUserProgram"
2016-01-28 14:14:46 -05:00
@ssh $(SSH_OPTIONS) lvuser@10.17.86.20 'rm -f /home/lvuser/FRCUserProgram'
@scp $(SSH_OPTIONS) -o "LogLevel QUIET" FRCUserProgram lvuser@10.17.86.20:/home/lvuser/FRCUserProgram
2016-01-11 13:14:09 -05:00
@echo "Restarting FRCUserProgram"
2016-01-28 14:14:46 -05:00
@$(SSH_SSHPASS) ssh $(SSH_OPTIONS) admin@10.17.86.20 '. /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKillRobot.sh -t -r'
2016-01-11 13:14:09 -05:00
restart: FRCUserProgram
@echo "Restarting FRCUserProgram"
2016-01-28 14:14:46 -05:00
@$(SSH_SSHPASS) ssh $(SSH_OPTIONS) admin@10.17.86.20 '. /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKillRobot.sh -t -r'
2016-01-11 13:14:09 -05:00
stop:
@echo "Restarting FRCUserProgram"
2016-01-28 14:14:46 -05:00
@$(SSH_SSHPASS) ssh $(SSH_OPTIONS) admin@10.17.86.20 '. /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKillRobot.sh -t'y