From a18d898cf2171f7f967a7c11ae09ba470f94adc8 Mon Sep 17 00:00:00 2001 From: Yangqing Jia Date: Mon, 16 Sep 2013 11:41:34 -0700 Subject: [PATCH] Makefile --- src/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index f90a90a..60fa3c8 100644 --- a/src/Makefile +++ b/src/Makefile @@ -38,8 +38,10 @@ CXXFLAGS += $(foreach includedir,$(INCLUDE_DIRS),-I$(includedir)) LDFLAGS += $(foreach librarydir,$(LIBRARY_DIRS),-L$(librarydir)) LDFLAGS += $(foreach library,$(LIBRARIES),-l$(library)) -LINK = $(CXX) -fPIC $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(WARNINGS) -NVCC = nvcc $(CXXFLAGS) $(CPPFLAGS) $(CUDA_ARCH) +FPIC_FLAGS = -fPIC + +LINK = $(CXX) $(FPIC_FLAGS) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(WARNINGS) +NVCC = nvcc -Xcompiler $(FPIC_FLAGS) $(CXXFLAGS) $(CPPFLAGS) $(CUDA_ARCH) .PHONY: all test clean distclean -- 2.7.4