opencv makefile install

all: install
 
update: | opencv opencv_contrib
cd opencv/ && git pull origin master
cd opencv_contrib/ && git pull origin master
 
dep:
sudo apt-get install -y cmake git checkinstall build-essential libdc1394-22-dev libv4l-dev libavcodec-dev libavutil-dev libavformat-dev libavutil-dev libswscale-dev libx264-dev libeigen3-dev libgtk2.0-dev libgstreamer1.0-dev libgstreamer-vaapi1.0-dev libtbb-dev libgtkglext1 libilmbase-dev libjasper-dev libjbig-dev liblzma-dev libopenexr-dev libtiff5-dev libtiffxx5
 
dep-graphic: dep
sudo apt-get install -y libqt4-dev libqt4-opengl-dev
 
opencv_contrib:
git clone https://github.com/itseez/opencv_contrib.git
 
opencv:
git clone https://github.com/itseez/opencv.git
cd opencv && git checkout 3.0.0-beta
 
opencv/release: | opencv
mkdir opencv/release
 
opencv/release/Makefile: | opencv/release opencv_contrib
make clean #necessary to make sure old configuration files are not present
make opencv/release
cd opencv/release/; cmake -D CMAKE_BUILD_TYPE=RELEASE -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules $(options) ..
 
opencv/release/lib/libopencv_core.so: build
 
build: opencv/release/Makefile
make -C opencv/release -j $$(( $$(nproc) - 1 )) -l $$(nproc)
 
opencv.deb: opencv/release/lib/libopencv_core.so
echo "OpenCV library compiled from git repository along with the contrib" > description-pak
sudo checkinstall --install=no --maintainer="$(USER)" --nodoc --pkgname="opencv" --provides="opencv" --deldesc=yes --delspec=yes --backup=no --fstrans=yes --default\
--requires="libdc1394-22-dev,libv4l-dev,libavcodec-dev,libavutil-dev,libavformat-dev,libavutil-dev,libswscale-dev,libx264-dev,libeigen3-dev,libgtk2.0-dev,libgstreamer1.0-dev,libgstreamer-vaapi1.0-dev,libtbb-dev,libfaac0,libgtkglext1,libilmbase-dev,libjasper-dev,libjbig-dev,liblzma-dev,libopenexr-dev,libtiff5-dev,libtiffxx5"\
--replaces="libopencv-dev"\
make -C $(PWD)/opencv/release/ install
rm description-pak
sudo mv opencv_*_*.deb opencv.deb
 
install: opencv.deb
sudo dpkg -i opencv.deb
sudo ldconfig
 
uninstall:
sudo dpkg -r opencv
 
clean:
rm -rf opencv/release
 
mrproper:
rm -rf opencv/ opencv_contrib/
 

.PHONY: dep-graphic clean mrproper uninstall


源码地址:

https://github.com/Yougmark/opencv_gpu_benchmark/blob/master/Makefile

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

AI算法网奇

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值