Merge pull request #2245 from dwt/add_homebrew_comments_to_makefile_config_example
[platform/upstream/caffeonacl.git] / Makefile.config.example
1 ## Refer to http://caffe.berkeleyvision.org/installation.html
2 # Contributions simplifying and improving our build system are welcome!
3
4 # cuDNN acceleration switch (uncomment to build with cuDNN).
5 # USE_CUDNN := 1
6
7 # CPU-only switch (uncomment to build without GPU support).
8 # CPU_ONLY := 1
9
10 # To customize your choice of compiler, uncomment and set the following.
11 # N.B. the default for Linux is g++ and the default for OSX is clang++
12 # CUSTOM_CXX := g++
13
14 # CUDA directory contains bin/ and lib/ directories that we need.
15 CUDA_DIR := /usr/local/cuda
16 # On Ubuntu 14.04, if cuda tools are installed via
17 # "sudo apt-get install nvidia-cuda-toolkit" then use this instead:
18 # CUDA_DIR := /usr
19
20 # CUDA architecture setting: going with all of them.
21 # For CUDA < 6.0, comment the *_50 lines for compatibility.
22 CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \
23                 -gencode arch=compute_20,code=sm_21 \
24                 -gencode arch=compute_30,code=sm_30 \
25                 -gencode arch=compute_35,code=sm_35 \
26                 -gencode arch=compute_50,code=sm_50 \
27                 -gencode arch=compute_50,code=compute_50
28
29 # BLAS choice:
30 # atlas for ATLAS (default)
31 # mkl for MKL
32 # open for OpenBlas
33 BLAS := atlas
34 # Custom (MKL/ATLAS/OpenBLAS) include and lib directories.
35 # Leave commented to accept the defaults for your choice of BLAS
36 # (which should work)!
37 # BLAS_INCLUDE := /path/to/your/blas
38 # BLAS_LIB := /path/to/your/blas
39
40 # Homebrew puts openblas in a directory that is not on the standard search path
41 # BLAS_INCLUDE := $(shell brew --prefix openblas)/include
42 # BLAS_LIB := $(shell brew --prefix openblas)/lib
43
44 # This is required only if you will compile the matlab interface.
45 # MATLAB directory should contain the mex binary in /bin.
46 # MATLAB_DIR := /usr/local
47 # MATLAB_DIR := /Applications/MATLAB_R2012b.app
48
49 # NOTE: this is required only if you will compile the python interface.
50 # We need to be able to find Python.h and numpy/arrayobject.h.
51 PYTHON_INCLUDE := /usr/include/python2.7 \
52                 /usr/lib/python2.7/dist-packages/numpy/core/include
53 # Anaconda Python distribution is quite popular. Include path:
54 # Verify anaconda location, sometimes it's in root.
55 # ANACONDA_HOME := $(HOME)/anaconda
56 # PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
57                 # $(ANACONDA_HOME)/include/python2.7 \
58                 # $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include \
59
60 # We need to be able to find libpythonX.X.so or .dylib.
61 PYTHON_LIB := /usr/lib
62 # PYTHON_LIB := $(ANACONDA_HOME)/lib
63
64 # Homebrew installs numpy in a non standard path (keg only)
65 # PYTHON_INCLUDE += $(dir $(shell python -c 'import numpy.core; print(numpy.core.__file__)'))/include
66 # PYTHON_LIB += $(shell brew --prefix numpy)/lib
67
68 # Uncomment to support layers written in Python (will link against Python libs)
69 # WITH_PYTHON_LAYER := 1
70
71 # Whatever else you find you need goes here.
72 INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
73 LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib
74
75 # If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies
76 # INCLUDE_DIRS += $(shell brew --prefix)/include
77 # LIBRARY_DIRS += $(shell brew --prefix)/lib
78
79 # Uncomment to use `pkg-config` to specify OpenCV library paths.
80 # (Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.)
81 # USE_PKG_CONFIG := 1
82
83 BUILD_DIR := build
84 DISTRIBUTE_DIR := distribute
85
86 # Uncomment for debugging. Does not work on OSX due to https://github.com/BVLC/caffe/issues/171
87 # DEBUG := 1
88
89 # The ID of the GPU that 'make runtest' will use to run unit tests.
90 TEST_GPUID := 0
91
92 # enable pretty build (comment to see full commands)
93 Q ?= @