summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEvan Shelhamer <shelhamer@imaginarynumber.net>2015-01-16 13:19:31 -0800
committerEvan Shelhamer <shelhamer@imaginarynumber.net>2015-01-16 13:19:31 -0800
commitdbc152742e6222ba80b41b5fd5d007826b156960 (patch)
tree6e523de3dcdf4d30149d59da5a481b2792020ecd /Makefile
parentc24c83ef0c9aefbfd4fb079fa23d8fd20a5955dc (diff)
parent3c5048c27e0579ca43e10186a0102b908b591a69 (diff)
downloadcaffeonacl-dbc152742e6222ba80b41b5fd5d007826b156960.tar.gz
caffeonacl-dbc152742e6222ba80b41b5fd5d007826b156960.tar.bz2
caffeonacl-dbc152742e6222ba80b41b5fd5d007826b156960.zip
Merge pull request #1705 from longjon/origin-rpath
Makefile: specify RPATH using $ORIGIN
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d47df30c..6af18a08 100644
--- a/Makefile
+++ b/Makefile
@@ -340,6 +340,7 @@ endif
LDFLAGS += $(foreach librarydir,$(LIBRARY_DIRS),-L$(librarydir)) $(PKG_CONFIG) \
$(foreach library,$(LIBRARIES),-l$(library))
PYTHON_LDFLAGS := $(LDFLAGS) $(foreach library,$(PYTHON_LIBRARIES),-l$(library))
+DYNAMIC_LDFLAGS := -l$(PROJECT) -Wl,-rpath,\$$ORIGIN/../lib
# 'superclean' target recursively* deletes all files ending with an extension
# in $(SUPERCLEAN_EXTS) below. This may be useful if you've built older
@@ -509,7 +510,7 @@ $(TEST_ALL_DYNLINK_BIN): $(TEST_MAIN_SRC) $(TEST_OBJS) $(GTEST_OBJ) $(DYNAMIC_NA
| $(TEST_BIN_DIR)
@ echo CXX/LD -o $@ $<
$(Q)$(CXX) $(TEST_MAIN_SRC) $(TEST_OBJS) $(GTEST_OBJ) \
- -o $@ $(LINKFLAGS) $(LDFLAGS) -l$(PROJECT) -Wl,-rpath,$(LIB_BUILD_DIR)
+ -o $@ $(LINKFLAGS) $(LDFLAGS) $(DYNAMIC_LDFLAGS)
$(TEST_CU_BINS): $(TEST_BIN_DIR)/%.testbin: $(TEST_CU_BUILD_DIR)/%.o \
$(GTEST_OBJ) $(STATIC_NAME) | $(TEST_BIN_DIR)