2016-01-11 13:14:09 -05:00
|
|
|
LIBS=wpi
|
2016-03-05 01:26:54 -05:00
|
|
|
CXX=arm-frc-linux-gnueabi-g++
|
|
|
|
override CPPFLAGS +=-std=c++14
|
|
|
|
LDFLAGS=-l$(LIBS)
|
2016-01-11 13:14:09 -05:00
|
|
|
TEAM=1786
|
2016-03-05 13:28:49 -05:00
|
|
|
SSH_OPTIONS=-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
|
2016-01-11 13:14:09 -05:00
|
|
|
SSH_SSHPASS=$(shell command -v sshpass >/dev/null 2>&1 && echo -n "sshpass -p ''")
|
2016-03-05 13:28:49 -05:00
|
|
|
SSH_HOST=roborio-1786-frc.local
|
2016-01-11 13:14:09 -05:00
|
|
|
|
|
|
|
all: deploy
|
|
|
|
|
|
|
|
build: FRCUserProgram
|
|
|
|
|
2016-03-05 01:26:54 -05:00
|
|
|
FRCUserProgram: src/Robot.cpp
|
2016-01-11 13:14:09 -05:00
|
|
|
@echo "Building FRCUserProgram"
|
2016-03-05 01:26:54 -05:00
|
|
|
$(CXX) $(CPPFLAGS) $< -o $@ $(LDFLAGS)
|
2016-01-11 13:14:09 -05:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm FRCUserProgram
|
|
|
|
|
|
|
|
deploy: build
|
|
|
|
@echo "Copying FRCUserProgram"
|
2016-03-05 13:28:49 -05:00
|
|
|
ssh $(SSH_OPTIONS) lvuser@$(SSH_HOST) 'rm -f /home/lvuser/FRCUserProgram'
|
|
|
|
scp $(SSH_OPTIONS) -o "LogLevel QUIET" FRCUserProgram lvuser@$(SSH_HOST):/home/lvuser/FRCUserProgram
|
2016-01-11 13:14:09 -05:00
|
|
|
@echo "Restarting FRCUserProgram"
|
2016-03-05 13:28:49 -05:00
|
|
|
$(SSH_SSHPASS) ssh $(SSH_OPTIONS) admin@$(SSH_HOST) '. /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKillRobot.sh -t -r'
|
2016-01-11 13:14:09 -05:00
|
|
|
|
|
|
|
restart: FRCUserProgram
|
2016-03-05 13:28:49 -05:00
|
|
|
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'
|
2016-01-11 13:14:09 -05:00
|
|
|
|
|
|
|
stop:
|
|
|
|
@echo "Restarting FRCUserProgram"
|
2016-03-05 13:28:49 -05:00
|
|
|
$(SSH_SSHPASS) ssh $(SSH_OPTIONS) admin@$(SSH_HOST) '. /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKillRobot.sh -t'y
|
2016-01-28 14:14:46 -05:00
|
|
|
|