1 Star 0 Fork 1

littleboyWangzi / miles-deep

forked from Quincy / miles-deep 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Makefile 1.39 KB
一键复制 编辑 原始数据 按行查看 历史
#Created by Ryan Jay 30.10.16
#Covered by the GPL. v3 (see included LICENSE)
CUDA := -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcublas -lcudart -lcurand
#CUDNN := -lcudnn -DUSE_CUDNN
#CPU_ONLY := -DCPU_ONLY
appname := miles-deep
libcaffe := caffe/distribute/lib/libcaffe.a
CXX := g++
CXXFLAGS := -std=c++11 -Wno-sign-compare -Wall -pthread -fPIC -DNDEBUG -O2 -DUSE_OPENCV
INCLUDES := -I/usr/local/include -I. -I./caffe/distribute/include
LDLIBS := -L/usr/lib -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu
LDFLAGS := -lm -lglog -lopencv_core -lopencv_highgui -lopencv_imgproc \
-lstdc++ -lhdf5 -lhdf5_hl -lopenblas
CAFFE := -Wl,--whole-archive $(libcaffe) -Wl,--no-whole-archive
S := /usr/lib/x86_64-linux-gnu
#if you have trouble making, try removing any problematic static lib
#and replacing it with -lsomelib in the LDFLAGS instead
STATIC_LIBS := $S/libgflags.a $S/libboost_thread.a $S/libboost_system.a $S/libprotobuf.a
srcfiles := *.cpp
cores := $(shell grep -c ^processor /proc/cpuinfo)
all: $(appname)
$(appname): $(libcaffe) $(srcfiles)
$(CXX) $(CXXFLAGS) -o $(appname) $(srcfiles) $(CAFFE) $(LDFLAGS) $(INCLUDES) \
$(CUDA) $(CUDNN) $(CPU_ONLY) $(LDLIBS) $(STATIC_LIBS)
clean:
rm -rf $(appname)
superclean:
rm -rf $(appname)
make -C caffe clean
$(libcaffe):
cp Makefile.caffe caffe/Makefile.config
make -C caffe clean
make -C caffe all -j $(cores)
make -C caffe distribute
C++
1
https://gitee.com/littleboyWangzi/miles-deep.git
git@gitee.com:littleboyWangzi/miles-deep.git
littleboyWangzi
miles-deep
miles-deep
master

搜索帮助