summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEvan Shelhamer <shelhamer@imaginarynumber.net>2016-02-20 22:42:05 -0800
committerEvan Shelhamer <shelhamer@imaginarynumber.net>2016-02-20 22:42:05 -0800
commit4541f8900588a335f2d9387a5b03460deba68678 (patch)
treeaf27cc5517778f2d37e558cede753bfd85e5682c /Makefile
parent25baf472e410a338457bdd415915ea3570fc980c (diff)
parentb46133aff47d5ac9d2f0f1289c6d5a9c57b3c2c5 (diff)
downloadcaffeonacl-4541f8900588a335f2d9387a5b03460deba68678.tar.gz
caffeonacl-4541f8900588a335f2d9387a5b03460deba68678.tar.bz2
caffeonacl-4541f8900588a335f2d9387a5b03460deba68678.zip
Merge pull request #3696 from shelhamer/fix-osx-install-name
fix library install name on OS X for @rpath linking
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 2 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 9b5ffb96..2f81aca8 100644
--- a/Makefile
+++ b/Makefile
@@ -293,9 +293,8 @@ ifeq ($(OSX), 1)
# boost::thread is called boost_thread-mt to mark multithreading on OS X
LIBRARIES += boost_thread-mt
# we need to explicitly ask for the rpath to be obeyed
- DYNAMIC_FLAGS := -install_name @rpath/libcaffe.so
ORIGIN := @loader_path
- VERSIONFLAGS += -Wl,-install_name,$(DYNAMIC_VERSIONED_NAME_SHORT) -Wl,-rpath,$(ORIGIN)/../../build/lib
+ VERSIONFLAGS += -Wl,-install_name,@rpath/$(DYNAMIC_VERSIONED_NAME_SHORT) -Wl,-rpath,$(ORIGIN)/../../build/lib
else
ORIGIN := \$$ORIGIN
endif
@@ -562,7 +561,7 @@ $(ALL_BUILD_DIRS): | $(BUILD_DIR_LINK)
$(DYNAMIC_NAME): $(OBJS) | $(LIB_BUILD_DIR)
@ echo LD -o $@
- $(Q)$(CXX) -shared -o $@ $(OBJS) $(VERSIONFLAGS) $(LINKFLAGS) $(LDFLAGS) $(DYNAMIC_FLAGS)
+ $(Q)$(CXX) -shared -o $@ $(OBJS) $(VERSIONFLAGS) $(LINKFLAGS) $(LDFLAGS)
@ cd $(BUILD_DIR)/lib; rm -f $(DYNAMIC_NAME_SHORT); ln -s $(DYNAMIC_VERSIONED_NAME_SHORT) $(DYNAMIC_NAME_SHORT)
$(STATIC_NAME): $(OBJS) | $(LIB_BUILD_DIR)