aboutsummaryrefslogtreecommitdiffstats
path: root/src/build-data
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-06-22 11:12:39 +0200
committerSimon Warta <[email protected]>2015-06-22 11:12:39 +0200
commit624b21b900aee236d79da91ec18651710d3c31ed (patch)
tree5bd32f365fe6f7450e78237daafadca7f1a3b291 /src/build-data
parentd1bf8d1193820cecf96df2acef7fa2dea9758d6a (diff)
Set RPATH to $ORIGIN for ./botan and ./botan-test
This makes setting LD_LIBRARY_PATH obsolete when Botan lib and botan /botan-test binary are in the same directory. This behavior is default on Windows. LD_LIBRARY_PATH can still be used to override the RPATH.
Diffstat (limited to 'src/build-data')
-rw-r--r--src/build-data/makefile/gmake.in4
-rw-r--r--src/build-data/makefile/header.in4
-rw-r--r--src/build-data/makefile/nmake.in4
3 files changed, 7 insertions, 5 deletions
diff --git a/src/build-data/makefile/gmake.in b/src/build-data/makefile/gmake.in
index dd2fa418d..af902c57b 100644
--- a/src/build-data/makefile/gmake.in
+++ b/src/build-data/makefile/gmake.in
@@ -34,10 +34,10 @@ all: $(APP) $(TEST)
%{gmake_dso_in}
$(APP): $(LIBRARIES) $(APPOBJS)
- $(CXX) $(LDFLAGS) $(APPOBJS) -L%{out_dir} -l%{libname} $(APP_LINKS_TO) -o $(APP)
+ $(APP_LINK_CMD) $(LDFLAGS) $(APPOBJS) -L%{out_dir} -l%{libname} $(APP_LINKS_TO) -o $(APP)
$(TEST): $(LIBRARIES) $(TESTOBJS)
- $(CXX) $(LDFLAGS) $(TESTOBJS) -L%{out_dir} -l%{libname} $(TEST_LINKS_TO) -o $(TEST)
+ $(TEST_LINK_CMD) $(LDFLAGS) $(TESTOBJS) -L%{out_dir} -l%{libname} $(TEST_LINKS_TO) -o $(TEST)
$(STATIC_LIB): $(LIBOBJS)
$(RM) $(STATIC_LIB)
diff --git a/src/build-data/makefile/header.in b/src/build-data/makefile/header.in
index d1a2ee3ef..dcc43592d 100644
--- a/src/build-data/makefile/header.in
+++ b/src/build-data/makefile/header.in
@@ -6,7 +6,9 @@ LANG_FLAGS = %{lang_flags}
WARN_FLAGS = %{warn_flags}
SO_OBJ_FLAGS = %{shared_flags}
-LIB_LINK_CMD = %{so_link}
+LIB_LINK_CMD = %{lib_link_cmd}
+APP_LINK_CMD = %{app_link_cmd}
+TEST_LINK_CMD = %{test_link_cmd}
LIB_LINKS_TO = %{link_to}
APP_LINKS_TO = $(LIB_LINKS_TO)
diff --git a/src/build-data/makefile/nmake.in b/src/build-data/makefile/nmake.in
index 6454e46ea..c89eb7f44 100644
--- a/src/build-data/makefile/nmake.in
+++ b/src/build-data/makefile/nmake.in
@@ -42,10 +42,10 @@ all: $(APP) $(TEST)
# Link Commands
$(APP): $(LIBRARIES) $(APPOBJS)
- $(CXX) /Fe$@ $(APPOBJS) $(LIB_FILENAME) $(APP_LINKS_TO)
+ $(APP_LINK_CMD) /Fe$@ $(APPOBJS) $(LIB_FILENAME) $(APP_LINKS_TO)
$(TEST): $(LIBRARIES) $(TESTOBJS)
- $(CXX) /Fe$@ $(TESTOBJS) $(LIB_FILENAME) $(TEST_LINKS_TO)
+ $(TEST_LINK_CMD) /Fe$@ $(TESTOBJS) $(LIB_FILENAME) $(TEST_LINKS_TO)
$(LIB_FILENAME): $(LIBOBJS)
!If "$(SO_OBJ_FLAGS)" == ""