2014-02-26 10:59:26 +04:00
|
|
|
## Refer to http://caffe.berkeleyvision.org/installation.html
|
|
|
|
# Contributions simplifying and improving our build system are welcome!
|
|
|
|
|
2014-09-02 01:51:24 +04:00
|
|
|
# cuDNN acceleration switch (uncomment to build with cuDNN).
|
|
|
|
# USE_CUDNN := 1
|
|
|
|
|
2014-06-30 07:45:41 +04:00
|
|
|
# CPU-only switch (uncomment to build without GPU support).
|
|
|
|
# CPU_ONLY := 1
|
|
|
|
|
2014-07-04 05:15:38 +04:00
|
|
|
# To customize your choice of compiler, uncomment and set the following.
|
|
|
|
# N.B. the default for Linux is g++ and the default for OSX is clang++
|
2014-07-15 00:43:08 +04:00
|
|
|
# CUSTOM_CXX := g++
|
2014-07-04 05:15:38 +04:00
|
|
|
|
2014-02-03 14:41:44 +04:00
|
|
|
# CUDA directory contains bin/ and lib/ directories that we need.
|
|
|
|
CUDA_DIR := /usr/local/cuda
|
2014-06-16 05:07:04 +04:00
|
|
|
# On Ubuntu 14.04, if cuda tools are installed via
|
|
|
|
# "sudo apt-get install nvidia-cuda-toolkit" then use this instead:
|
|
|
|
# CUDA_DIR := /usr
|
2014-02-03 14:41:44 +04:00
|
|
|
|
2014-12-05 19:06:40 +03:00
|
|
|
# CUDA architecture setting: going with all of them.
|
|
|
|
# For CUDA < 6.0, comment the *_50 lines for compatibility.
|
2014-02-03 14:41:44 +04:00
|
|
|
CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \
|
2014-04-09 02:25:04 +04:00
|
|
|
-gencode arch=compute_20,code=sm_21 \
|
|
|
|
-gencode arch=compute_30,code=sm_30 \
|
2014-06-30 12:08:55 +04:00
|
|
|
-gencode arch=compute_35,code=sm_35 \
|
2014-12-05 19:06:40 +03:00
|
|
|
-gencode arch=compute_50,code=sm_50 \
|
|
|
|
-gencode arch=compute_50,code=compute_50
|
2014-02-03 14:41:44 +04:00
|
|
|
|
2014-04-15 11:37:06 +04:00
|
|
|
# BLAS choice:
|
|
|
|
# atlas for ATLAS (default)
|
|
|
|
# mkl for MKL
|
|
|
|
# open for OpenBlas
|
|
|
|
BLAS := atlas
|
|
|
|
# Custom (MKL/ATLAS/OpenBLAS) include and lib directories.
|
|
|
|
# Leave commented to accept the defaults for your choice of BLAS
|
|
|
|
# (which should work)!
|
|
|
|
# BLAS_INCLUDE := /path/to/your/blas
|
|
|
|
# BLAS_LIB := /path/to/your/blas
|
2014-02-03 14:41:44 +04:00
|
|
|
|
2014-02-26 10:59:26 +04:00
|
|
|
# This is required only if you will compile the matlab interface.
|
|
|
|
# MATLAB directory should contain the mex binary in /bin.
|
2014-04-09 03:42:03 +04:00
|
|
|
# MATLAB_DIR := /usr/local
|
2014-02-26 10:59:26 +04:00
|
|
|
# MATLAB_DIR := /Applications/MATLAB_R2012b.app
|
2014-02-03 14:41:44 +04:00
|
|
|
|
|
|
|
# NOTE: this is required only if you will compile the python interface.
|
|
|
|
# We need to be able to find Python.h and numpy/arrayobject.h.
|
2014-07-19 03:13:24 +04:00
|
|
|
PYTHON_INCLUDE := /usr/include/python2.7 \
|
|
|
|
/usr/lib/python2.7/dist-packages/numpy/core/include
|
2014-02-26 10:59:26 +04:00
|
|
|
# Anaconda Python distribution is quite popular. Include path:
|
2014-10-16 08:26:01 +04:00
|
|
|
# Verify anaconda location, sometimes it's in root.
|
|
|
|
# ANACONDA_HOME := $(HOME)/anaconda
|
|
|
|
# PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
|
|
|
|
# $(ANACONDA_HOME)/include/python2.7 \
|
|
|
|
# $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include \
|
2014-02-26 10:59:26 +04:00
|
|
|
|
2014-02-03 14:41:44 +04:00
|
|
|
# We need to be able to find libpythonX.X.so or .dylib.
|
2014-07-19 03:13:24 +04:00
|
|
|
PYTHON_LIB := /usr/lib
|
2014-10-16 08:26:01 +04:00
|
|
|
# PYTHON_LIB := $(ANACONDA_HOME)/lib
|
2014-02-26 10:59:26 +04:00
|
|
|
|
2014-02-03 14:41:44 +04:00
|
|
|
# Whatever else you find you need goes here.
|
2014-04-15 11:36:18 +04:00
|
|
|
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
|
2014-04-21 00:38:30 +04:00
|
|
|
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib
|
2014-02-03 14:41:44 +04:00
|
|
|
|
2014-10-15 08:03:03 +04:00
|
|
|
# Uncomment to use `pkg-config` to specify OpenCV library paths.
|
|
|
|
# (Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.)
|
|
|
|
# USE_PKG_CONFIG := 1
|
|
|
|
|
2014-02-15 11:28:26 +04:00
|
|
|
BUILD_DIR := build
|
|
|
|
DISTRIBUTE_DIR := distribute
|
2014-03-22 02:15:00 +04:00
|
|
|
|
2014-06-17 11:00:01 +04:00
|
|
|
# Uncomment for debugging. Does not work on OSX due to https://github.com/BVLC/caffe/issues/171
|
2014-04-09 02:25:04 +04:00
|
|
|
# DEBUG := 1
|
2014-03-30 04:46:39 +04:00
|
|
|
|
|
|
|
# The ID of the GPU that 'make runtest' will use to run unit tests.
|
|
|
|
TEST_GPUID := 0
|
2014-12-12 01:45:38 +03:00
|
|
|
|
|
|
|
# enable pretty build (comment to see full commands)
|
|
|
|
Q ?= @
|