Commit f82e8a45 authored by Jason Gauci's avatar Jason Gauci Committed by Matthijs Douze

Fix for homebrew and support for non-standard python distributions (#242)

* fixes for homebrew and anaconda python

* remove #/bin/bash

* PR feedback and handle different versions of LLVM
parent 2eb8eb99
......@@ -55,7 +55,7 @@ BLASLDFLAGSSO ?= $(BLASLDFLAGS)
# pure C++ test in the test directory
tests/test_blas: tests/test_blas.cpp
$(CC) $(CFLAGS) $< -o $@ $(BLASLDFLAGS) $(BLASCFLAGS)
$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) $(BLASLDFLAGS) $(BLASCFLAGS)
tests/demo_ivfpq_indexing: tests/demo_ivfpq_indexing.cpp $(LIBNAME).a
......
......@@ -5,7 +5,8 @@
# brew install llvm
CC=/usr/local/opt/llvm/bin/clang++
CFLAGS=-fPIC -m64 -Wall -g -O3 -msse4 -mpopcnt -fopenmp -Wno-sign-compare -I/usr/local/opt/llvm/include -std=c++11
LDFLAGS=-g -fPIC -fopenmp -L/usr/local/opt/llvm/lib
LLVM_VERSION_PATH=$(shell ls -rt /usr/local/Cellar/llvm/ | tail -n1)
LDFLAGS=-g -fPIC -fopenmp -L/usr/local/opt/llvm/lib -L/usr/local/Cellar/llvm/${LLVM_VERSION_PATH}/lib
# common mac flags
SHAREDEXT=dylib
......@@ -77,17 +78,11 @@ BLASLDFLAGS=-framework Accelerate
SWIGEXEC=/usr/local/bin/swig
# The Python include directories for the current python executable can
# typically be found with
#
# python -c "import distutils.sysconfig; print distutils.sysconfig.get_python_inc()"
# python -c "import numpy ; print numpy.get_include()"
#
# the paths below are for the system python (not the macports one)
PYTHONCFLAGS=-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 \
-I/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include
# The Python include directories for the current python executable
PYTHON_INC=$(shell python -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())")
NUMPY_INC=$(shell python -c "import numpy ; print(numpy.get_include())")
PYTHONCFLAGS=-I${PYTHON_INC} -I${NUMPY_INC}
##########################################################################
# Faiss GPU
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment