Skip to content

Commit

Permalink
Add the appropriate math -rpath to shared libraries link.
Browse files Browse the repository at this point in the history
  • Loading branch information
diyessi committed Jul 30, 2015
1 parent bc5f69b commit f5634af
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ NVCCFLAGS = -std=c++11 -D_POSIX_SOURCE -D_XOPEN_SOURCE=600 -D__USE_XOPEN2K -m 64

# Set up linker option to embed ORIGIN, i.e. directory where cntk is into the search path option
# at runtime. This will try to resolve all dependent binaries in the same directory where cntk binary resides
LDFLAGS=-Wl,-rpath,'$$ORIGIN'
LDFLAGS:=-Wl,-rpath,'$$ORIGIN'
ifeq ($(DEVICE),cpu)
LDFLAGS:=$(LDFLAGS) -Wl,-rpath,$(MATHLIB_PATH)/lib
else
LDFLAGS:=$(LDFLAGS) -Wl,-rpath,$(CUDA_PATH)/lib -Wl,-rpath,$(NVML_LIB)
endif

# Define all sources that need to be built
COMMON_SRC = Common/fileutil.cpp Common/DataWriter.cpp Common/ConfigFile.cpp Common/DataReader.cpp \
Expand Down

0 comments on commit f5634af

Please sign in to comment.