Skip to content

Commit

Permalink
fix Makefile flags
Browse files Browse the repository at this point in the history
  • Loading branch information
mdouze committed Feb 28, 2018
1 parent a280791 commit 4d440b6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ tests/test_blas: tests/test_blas.cpp
$(CXX) $(CXXFLAGS) $< -o $@ $(LDFLAGS) $(BLASLDFLAGS) $(BLASCFLAGS)

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
$(CXX) -o $@ $(CFLAGS) $< $(LIBNAME).a $(LDFLAGS) $(BLASLDFLAGS)
$(CXX) -o $@ $(CXXFLAGS) $< $(LIBNAME).a $(LDFLAGS) $(BLASLDFLAGS)


#############################
Expand Down
4 changes: 1 addition & 3 deletions example_makefiles/makefile.inc.Linux
Original file line number Diff line number Diff line change
Expand Up @@ -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
CUDAROOT=/usr/local/cuda-8.0/
Expand All @@ -143,7 +141,7 @@ NVCCFLAGS= $(CUDAFLAGS) \
-gencode arch=compute_52,code="compute_52" \
-gencode arch=compute_60,code="compute_60" \
--std c++11 -lineinfo \
-ccbin $(CXX11) -DFAISS_USE_FLOAT16
-ccbin $(CXX) -DFAISS_USE_FLOAT16

# BLAS LD flags for nvcc (used to generate an executable)
# if BLASLDFLAGS contains several flags, each one may
Expand Down
2 changes: 1 addition & 1 deletion example_makefiles/makefile.inc.Mac.brew
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Tested on macOS Sierra (10.12.2) with llvm installed using Homebrew (https://brew.sh)
# 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
CXXFLAGS=$(CFLAGS) -std=c++11
LLVM_VERSION_PATH=$(shell ls -rt /usr/local/Cellar/llvm/ | tail -n1)
Expand Down
2 changes: 1 addition & 1 deletion example_makefiles/makefile.inc.Mac.port
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# The system default clang does not support openmp
# You can install an openmp compatible g++ with macports:
# 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
CXXFLAGS=$(CFLAGS) -std=c++11
Expand Down
4 changes: 2 additions & 2 deletions gpu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ CUOBJ= impl/BroadcastSum.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)

.cu.o:
Expand All @@ -86,7 +86,7 @@ $(LIBNAME).a: $(CPPOBJ) $(CUOBJ)
ar r $@ $^

$(LIBNAME).$(SHAREDEXT): $(CPPOBJ) $(CUOBJ)
$(CC) -L$(CUDAROOT)/lib64 -lcublas -lcudart $(LDFLAGS) \
$(CXX) -L$(CUDAROOT)/lib64 -lcublas -lcudart $(LDFLAGS) \
$(FAISSSHAREDFLAGS) -o $(LIBNAME).$(SHAREDEXT) $^


Expand Down

0 comments on commit 4d440b6

Please sign in to comment.