forked from NTNU-TDT4295/slamdunk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (40 loc) · 1.3 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
46
47
48
49
50
BOARD_URI=xilinx@pynq
all: slamvis
./slamvis/slamvis:
$(MAKE) -C slamvis
.PHONY: slamvis
slamvis: ./slamvis/slamvis
.PHONY: deploy
deploy:
@echo ""
@echo "Uploading SLAMDUNK project to: $(BOARD_URI)"
rsync -avz ./build $(BOARD_URI):~/slamdunk/
rsync -avz --exclude=build/* ./pynqslam $(BOARD_URI):~/slamdunk/
rsync -avz --exclude=build/* --exclude=libslamcommon.a ./libs/slamcommon $(BOARD_URI):~/slamdunk/libs/
rsync -avz ./pynq $(BOARD_URI):~/slamdunk/
.PHONY: slamcommon
slamcommon: deploy
@echo ""
@echo "Building slamcommon on PYNQ: $(BOARD_URI)"
ssh $(BOARD_URI) "cd ~/slamdunk/libs/slamcommon && make TARGET=pynq"
.PHONY: pynqslam
pynqslam: deploy slamcommon
@echo ""
@echo "Building pynqslam on PYNQ: $(BOARD_URI)"
ssh $(BOARD_URI) "cd ~/slamdunk/pynqslam && make TARGET=pynq"
IP_ADDR := $(shell hostname -I | cut -f1 -d" ")
.PHONY: run
run:
@echo ""
@echo "Running SLAMIT on: $(BOARD_URI) -- your IP-address: $(IP_ADDR)"
ssh $(BOARD_URI) "echo $(IP_ADDR) | sudo tee /etc/slamvis_host; sudo systemctl restart pynqslam.service"
.PHONY: stop
stop:
@echo ""
@echo "Stopping SLAMIT on: $(BOARD_URI)"
ssh $(BOARD_URI) "sudo systemctl stop pynqslam.service"
.PHONY: restart
restart:
@echo ""
@echo "Restarting SLAMIT on: $(BOARD_URI)"
ssh $(BOARD_URI) "sudo systemctl restart pynqslam.service"