api install needed sudo (#34)
[platform/adaptation/npu/intel-libmvnc.git] / Makefile
1
2 ifneq ($(findstring movidius, $(PYTHONPATH)), movidius)
3         export PYTHONPATH:=/opt/movidius/caffe/python:$(PYTHONPATH)
4 endif
5
6
7 .PHONY: help
8 help:
9         @echo "\nmake help starting."
10         @echo "Make targets are:"
11         @echo "  make help - shows this message"
12         @echo "  make install - Installs the ncsdk."
13         @echo "  make examples - makes the ncsdk examples."
14         @echo "  make api - installs only the api. Ideal for RPi setup."
15         @echo "  make uninstall - uninstalls the ncsdk."
16         @echo "  make clean - removes targets and intermediate files." 
17
18 .PHONY: all
19 all: install examples
20
21 .PHONY: opencv
22 opencv: 
23         ./install-opencv.sh
24
25 .PHONY: uninstallopencv
26 uninstallopencv:
27         ./uninstall-opencv.sh
28
29 .PHONY: prereqs
30 prereqs:
31         @sed -i 's/\r//' ncsdk.conf
32         @if [ -e ncsdk_redirector.txt ] ; \
33         then \
34                 @sed -i 's/\r//' ncsdk_redirector.txt ; \
35         fi
36
37         @sed -i 's/\r//' install.sh
38         @sed -i 's/\r//' uninstall.sh
39         @sed -i 's/\r//' README.md
40         @chmod +x install.sh
41         @chmod +x uninstall.sh
42         @chmod +x install-opencv.sh
43         @chmod +x uninstall-opencv.sh
44
45 .PHONY: install
46 install: prereqs uninstallopencv
47         @echo "\nmake install starting."
48         ./install.sh
49
50 .PHONY: uninstall
51 uninstall: prereqs
52         @echo "\nmake uninstall starting."
53         ./uninstall.sh
54
55 .PHONY: examples
56 examples: prereqs opencv
57         @echo "\nmake examples starting."
58         (cd examples; make)
59
60 .PHONY: runexamples
61 runexamples: prereqs opencv
62         @echo "\nmake examples starting."
63         (cd examples; make run)
64
65 .PHONY: api
66 api:
67         @echo "\nmake api starting."
68         (cd api/src; make; sudo make install)
69
70 .PHONY: clean
71 clean:
72         @echo "\nmake clean starting."
73         (cd examples; make clean)
74
75