aboutsummaryrefslogtreecommitdiffstats
path: root/src/build-data
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-12-01 09:41:28 -0500
committerJack Lloyd <[email protected]>2017-12-01 09:41:28 -0500
commitba843d795772f72a4f3ecf9649c9b58f6422b3d3 (patch)
treecf8f5db867451a255b306ac89ff38e572dd82b9b /src/build-data
parent7e5ce9d4df54da881417bdbf2b9c4329081f10f6 (diff)
Fix macOS dynamic link
Diffstat (limited to 'src/build-data')
-rw-r--r--src/build-data/makefile.in7
-rw-r--r--src/build-data/os/darwin.txt2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/build-data/makefile.in b/src/build-data/makefile.in
index d89d1cccd..89098c466 100644
--- a/src/build-data/makefile.in
+++ b/src/build-data/makefile.in
@@ -24,8 +24,7 @@ EXE_FLAGS = $(LANG_FLAGS) $(CXXFLAGS) $(WARN_FLAGS)
SCRIPTS_DIR = %{scripts_dir}
INSTALLED_LIB_DIR = %{prefix}/%{libdir}
-CLI_POST_LINK_CMD = %{cli_post_link_cmd}
-TEST_POST_LINK_CMD = %{test_post_link_cmd}
+POST_LINK_CMD = %{post_link_cmd}
# The primary target
all: libs cli tests
@@ -71,11 +70,11 @@ TESTOBJS = %{test_objs}
$(CLI): $(LIBRARIES) $(CLIOBJS)
$(EXE_LINK_CMD) $(LDFLAGS) $(CLIOBJS) $(EXE_LINKS_TO) %{output_to_exe}$@
- $(CLI_POST_LINK_CMD)
+ $(POST_LINK_CMD)
$(TEST): $(LIBRARIES) $(TESTOBJS)
$(EXE_LINK_CMD) $(LDFLAGS) $(TESTOBJS) $(EXE_LINKS_TO) %{output_to_exe}$@
- $(TEST_POST_LINK_CMD)
+ $(POST_LINK_CMD)
%{if build_static_lib}
diff --git a/src/build-data/os/darwin.txt b/src/build-data/os/darwin.txt
index 78ad4a948..4c8ba2c47 100644
--- a/src/build-data/os/darwin.txt
+++ b/src/build-data/os/darwin.txt
@@ -4,6 +4,8 @@ soname_pattern_base "libbotan-{version_major}.dylib"
soname_pattern_abi "libbotan-{version_major}.{abi_rev}.dylib"
soname_pattern_patch "libbotan-{version_major}.{abi_rev}.{version_minor}.{version_patch}.dylib"
+so_post_link_command "install_name_tool -change '$(INSTALLED_LIB_DIR)/{soname_abi}' '@executable_path/{soname_abi}' $@"
+
doc_dir doc
<target_features>