Skip to content

Commit 4d440b6

Browse files
committed
fix Makefile flags
1 parent a280791 commit 4d440b6

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ tests/test_blas: tests/test_blas.cpp
6363
$(CXX) $(CXXFLAGS) $< -o $@ $(LDFLAGS) $(BLASLDFLAGS) $(BLASCFLAGS)
6464

6565
demos/demo_ivfpq_indexing: demos/demo_ivfpq_indexing.cpp $(LIBNAME).a
66-
$(CXX) -o $@ $(CFLAGS) $< $(LIBNAME).a $(LDFLAGS) $(BLASLDFLAGS)
66+
$(CXX) -o $@ $(CXXFLAGS) $< $(LIBNAME).a $(LDFLAGS) $(BLASLDFLAGS)
6767

6868
demos/demo_sift1M: demos/demo_sift1M.cpp $(LIBNAME).a
69-
$(CXX) -o $@ $(CFLAGS) $< $(LIBNAME).a $(LDFLAGS) $(BLASLDFLAGS)
69+
$(CXX) -o $@ $(CXXFLAGS) $< $(LIBNAME).a $(LDFLAGS) $(BLASLDFLAGS)
7070

7171

7272
#############################

example_makefiles/makefile.inc.Linux

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ PYTHONCFLAGS=-I/usr/include/python2.7/ -I/usr/lib64/python2.7/site-packages/nump
125125
###########################################################################
126126

127127

128-
# a C++ compiler that supports c++11
129-
CXX11=g++
130128

131129
# root of the cuda 8 installation
132130
CUDAROOT=/usr/local/cuda-8.0/
@@ -143,7 +141,7 @@ NVCCFLAGS= $(CUDAFLAGS) \
143141
-gencode arch=compute_52,code="compute_52" \
144142
-gencode arch=compute_60,code="compute_60" \
145143
--std c++11 -lineinfo \
146-
-ccbin $(CXX11) -DFAISS_USE_FLOAT16
144+
-ccbin $(CXX) -DFAISS_USE_FLOAT16
147145

148146
# BLAS LD flags for nvcc (used to generate an executable)
149147
# if BLASLDFLAGS contains several flags, each one may

example_makefiles/makefile.inc.Mac.brew

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# Tested on macOS Sierra (10.12.2) with llvm installed using Homebrew (https://brew.sh)
55
# brew install llvm
6-
CC=/usr/local/opt/llvm/bin/clang++
6+
CXX=/usr/local/opt/llvm/bin/clang++
77
CFLAGS=-fPIC -m64 -Wall -g -O3 -msse4 -mpopcnt -fopenmp -Wno-sign-compare -I/usr/local/opt/llvm/include
88
CXXFLAGS=$(CFLAGS) -std=c++11
99
LLVM_VERSION_PATH=$(shell ls -rt /usr/local/Cellar/llvm/ | tail -n1)

example_makefiles/makefile.inc.Mac.port

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# The system default clang does not support openmp
88
# You can install an openmp compatible g++ with macports:
99
# port install g++-mp-6
10-
CC=/opt/local/bin/g++-mp-6
10+
CXX=/opt/local/bin/g++-mp-6
1111

1212
CFLAGS=-fPIC -m64 -Wall -g -O3 -msse4 -mpopcnt -fopenmp -Wno-sign-compare
1313
CXXFLAGS=$(CFLAGS) -std=c++11

gpu/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ CUOBJ= impl/BroadcastSum.o \
7474

7575

7676
.cpp.o:
77-
$(CXX11) $(CXXFLAGS) -fPIC -m64 -Wall -g -Wno-sign-compare -O3 -fopenmp \
77+
$(CXX) $(CXXFLAGS) -fPIC -m64 -Wall -g -Wno-sign-compare -O3 -fopenmp \
7878
-c $< -o $@ $(EXTRAFLAGS) $(CUDACFLAGS)
7979

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

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

9292

0 commit comments

Comments
 (0)