Find file
Fetching contributors…
Cannot retrieve contributors at this time
48 lines (34 sloc) 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
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) \
rm -rf $(appname)
rm -rf $(appname)
make -C caffe clean
cp Makefile.caffe caffe/Makefile.config
make -C caffe clean
make -C caffe all -j $(cores)
make -C caffe distribute