Commit 4d440b66 authored by matthijs's avatar matthijs

fix Makefile flags

parent a280791c
...@@ -63,10 +63,10 @@ tests/test_blas: tests/test_blas.cpp ...@@ -63,10 +63,10 @@ tests/test_blas: tests/test_blas.cpp
$(CXX) $(CXXFLAGS) $< -o $@ $(LDFLAGS) $(BLASLDFLAGS) $(BLASCFLAGS) $(CXX) $(CXXFLAGS) $< -o $@ $(LDFLAGS) $(BLASLDFLAGS) $(BLASCFLAGS)
demos/demo_ivfpq_indexing: demos/demo_ivfpq_indexing.cpp $(LIBNAME).a demos/demo_ivfpq_indexing: demos/demo_ivfpq_indexing.cpp $(LIBNAME).a
$(CXX) -o $@ $(CFLAGS) $< $(LIBNAME).a $(LDFLAGS) $(BLASLDFLAGS) $(CXX) -o $@ $(CXXFLAGS) $< $(LIBNAME).a $(LDFLAGS) $(BLASLDFLAGS)
demos/demo_sift1M: demos/demo_sift1M.cpp $(LIBNAME).a demos/demo_sift1M: demos/demo_sift1M.cpp $(LIBNAME).a
$(CXX) -o $@ $(CFLAGS) $< $(LIBNAME).a $(LDFLAGS) $(BLASLDFLAGS) $(CXX) -o $@ $(CXXFLAGS) $< $(LIBNAME).a $(LDFLAGS) $(BLASLDFLAGS)
############################# #############################
......
...@@ -125,8 +125,6 @@ PYTHONCFLAGS=-I/usr/include/python2.7/ -I/usr/lib64/python2.7/site-packages/nump ...@@ -125,8 +125,6 @@ PYTHONCFLAGS=-I/usr/include/python2.7/ -I/usr/lib64/python2.7/site-packages/nump
########################################################################### ###########################################################################
# a C++ compiler that supports c++11
CXX11=g++
# root of the cuda 8 installation # root of the cuda 8 installation
CUDAROOT=/usr/local/cuda-8.0/ CUDAROOT=/usr/local/cuda-8.0/
...@@ -143,7 +141,7 @@ NVCCFLAGS= $(CUDAFLAGS) \ ...@@ -143,7 +141,7 @@ NVCCFLAGS= $(CUDAFLAGS) \
-gencode arch=compute_52,code="compute_52" \ -gencode arch=compute_52,code="compute_52" \
-gencode arch=compute_60,code="compute_60" \ -gencode arch=compute_60,code="compute_60" \
--std c++11 -lineinfo \ --std c++11 -lineinfo \
-ccbin $(CXX11) -DFAISS_USE_FLOAT16 -ccbin $(CXX) -DFAISS_USE_FLOAT16
# BLAS LD flags for nvcc (used to generate an executable) # BLAS LD flags for nvcc (used to generate an executable)
# if BLASLDFLAGS contains several flags, each one may # if BLASLDFLAGS contains several flags, each one may
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Tested on macOS Sierra (10.12.2) with llvm installed using Homebrew (https://brew.sh) # Tested on macOS Sierra (10.12.2) with llvm installed using Homebrew (https://brew.sh)
# brew install llvm # brew install llvm
CC=/usr/local/opt/llvm/bin/clang++ CXX=/usr/local/opt/llvm/bin/clang++
CFLAGS=-fPIC -m64 -Wall -g -O3 -msse4 -mpopcnt -fopenmp -Wno-sign-compare -I/usr/local/opt/llvm/include CFLAGS=-fPIC -m64 -Wall -g -O3 -msse4 -mpopcnt -fopenmp -Wno-sign-compare -I/usr/local/opt/llvm/include
CXXFLAGS=$(CFLAGS) -std=c++11 CXXFLAGS=$(CFLAGS) -std=c++11
LLVM_VERSION_PATH=$(shell ls -rt /usr/local/Cellar/llvm/ | tail -n1) LLVM_VERSION_PATH=$(shell ls -rt /usr/local/Cellar/llvm/ | tail -n1)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# The system default clang does not support openmp # The system default clang does not support openmp
# You can install an openmp compatible g++ with macports: # You can install an openmp compatible g++ with macports:
# port install g++-mp-6 # port install g++-mp-6
CC=/opt/local/bin/g++-mp-6 CXX=/opt/local/bin/g++-mp-6
CFLAGS=-fPIC -m64 -Wall -g -O3 -msse4 -mpopcnt -fopenmp -Wno-sign-compare CFLAGS=-fPIC -m64 -Wall -g -O3 -msse4 -mpopcnt -fopenmp -Wno-sign-compare
CXXFLAGS=$(CFLAGS) -std=c++11 CXXFLAGS=$(CFLAGS) -std=c++11
......
...@@ -74,7 +74,7 @@ CUOBJ= impl/BroadcastSum.o \ ...@@ -74,7 +74,7 @@ CUOBJ= impl/BroadcastSum.o \
.cpp.o: .cpp.o:
$(CXX11) $(CXXFLAGS) -fPIC -m64 -Wall -g -Wno-sign-compare -O3 -fopenmp \ $(CXX) $(CXXFLAGS) -fPIC -m64 -Wall -g -Wno-sign-compare -O3 -fopenmp \
-c $< -o $@ $(EXTRAFLAGS) $(CUDACFLAGS) -c $< -o $@ $(EXTRAFLAGS) $(CUDACFLAGS)
.cu.o: .cu.o:
...@@ -86,7 +86,7 @@ $(LIBNAME).a: $(CPPOBJ) $(CUOBJ) ...@@ -86,7 +86,7 @@ $(LIBNAME).a: $(CPPOBJ) $(CUOBJ)
ar r $@ $^ ar r $@ $^
$(LIBNAME).$(SHAREDEXT): $(CPPOBJ) $(CUOBJ) $(LIBNAME).$(SHAREDEXT): $(CPPOBJ) $(CUOBJ)
$(CC) -L$(CUDAROOT)/lib64 -lcublas -lcudart $(LDFLAGS) \ $(CXX) -L$(CUDAROOT)/lib64 -lcublas -lcudart $(LDFLAGS) \
$(FAISSSHAREDFLAGS) -o $(LIBNAME).$(SHAREDEXT) $^ $(FAISSSHAREDFLAGS) -o $(LIBNAME).$(SHAREDEXT) $^
......
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