-
Notifications
You must be signed in to change notification settings - Fork 154
/
Makefile
75 lines (59 loc) · 1.54 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
ifneq ($(findstring movidius, $(PYTHONPATH)), movidius)
export PYTHONPATH:=/opt/movidius/caffe/python:$(PYTHONPATH)
endif
.PHONY: help
help:
@echo "\nmake help starting."
@echo "Make targets are:"
@echo " make help - shows this message"
@echo " make install - Installs the ncsdk."
@echo " make examples - makes the ncsdk examples."
@echo " make api - installs only the api. Ideal for RPi setup."
@echo " make uninstall - uninstalls the ncsdk."
@echo " make clean - removes targets and intermediate files."
.PHONY: all
all: install examples
.PHONY: opencv
opencv:
./install-opencv.sh
.PHONY: uninstallopencv
uninstallopencv:
./uninstall-opencv.sh
.PHONY: prereqs
prereqs:
@sed -i 's/\r//' ncsdk.conf
@if [ -e ncsdk_redirector.txt ] ; \
then \
@sed -i 's/\r//' ncsdk_redirector.txt ; \
fi
@sed -i 's/\r//' install.sh
@sed -i 's/\r//' uninstall.sh
@sed -i 's/\r//' README.md
@chmod +x install.sh
@chmod +x uninstall.sh
@chmod +x install-opencv.sh
@chmod +x uninstall-opencv.sh
.PHONY: install
install: prereqs uninstallopencv
@echo "\nmake install starting."
./install.sh
.PHONY: uninstall
uninstall: prereqs
@echo "\nmake uninstall starting."
./uninstall.sh
.PHONY: examples
examples: prereqs opencv
@echo "\nmake examples starting."
(cd examples; make)
.PHONY: runexamples
runexamples: prereqs opencv
@echo "\nmake examples starting."
(cd examples; make run)
.PHONY: api
api:
@echo "\nmake api starting."
(cd api/src; make; sudo make install)
.PHONY: clean
clean:
@echo "\nmake clean starting."
(cd examples; make clean)