diff options
author | Simon Warta <[email protected]> | 2015-06-22 14:39:11 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-06-22 14:39:11 +0200 |
commit | 43e3c4555c9f2535f18741f3e252b3c93cbbaeca (patch) | |
tree | 62ac80cbb85718d0aaf84cc935bf5d66cb66311c | |
parent | 808bc5edc075a36f190235dc4bdfcea07a53c5df (diff) | |
parent | 61fe5f70701b4cab06c9763cc133b111788f8d02 (diff) |
Merge pull request #127 from webmaster128/dylib-path
Use install_name_tool to change location of botan lib on OSX
-rwxr-xr-x | configure.py | 7 | ||||
-rw-r--r-- | src/build-data/makefile/gmake.in | 2 | ||||
-rw-r--r-- | src/build-data/makefile/header.in | 3 | ||||
-rw-r--r-- | src/build-data/makefile/nmake.in | 2 |
4 files changed, 14 insertions, 0 deletions
diff --git a/configure.py b/configure.py index 888f9e71e..0d459bb66 100755 --- a/configure.py +++ b/configure.py @@ -1317,6 +1317,13 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo): 'with_sphinx': options.with_sphinx } + if options.os == 'darwin': + vars['app_post_link_cmd'] = 'install_name_tool -change "/$(SONAME)" "@executable_path/$(SONAME)" $(APP)' + vars['test_post_link_cmd'] = 'install_name_tool -change "/$(SONAME)" "@executable_path/$(SONAME)" $(TEST)' + else: + vars['app_post_link_cmd'] = '' + vars['test_post_link_cmd'] = '' + gen_makefile_lists(vars, build_config, options, modules, cc, arch, osinfo) if options.os != 'windows': diff --git a/src/build-data/makefile/gmake.in b/src/build-data/makefile/gmake.in index af902c57b..6b22a26f3 100644 --- a/src/build-data/makefile/gmake.in +++ b/src/build-data/makefile/gmake.in @@ -35,9 +35,11 @@ all: $(APP) $(TEST) $(APP): $(LIBRARIES) $(APPOBJS) $(APP_LINK_CMD) $(LDFLAGS) $(APPOBJS) -L%{out_dir} -l%{libname} $(APP_LINKS_TO) -o $(APP) + $(APP_POST_LINK_CMD) $(TEST): $(LIBRARIES) $(TESTOBJS) $(TEST_LINK_CMD) $(LDFLAGS) $(TESTOBJS) -L%{out_dir} -l%{libname} $(TEST_LINKS_TO) -o $(TEST) + $(TEST_POST_LINK_CMD) $(STATIC_LIB): $(LIBOBJS) $(RM) $(STATIC_LIB) diff --git a/src/build-data/makefile/header.in b/src/build-data/makefile/header.in index dcc43592d..b0e248ebe 100644 --- a/src/build-data/makefile/header.in +++ b/src/build-data/makefile/header.in @@ -19,3 +19,6 @@ APP_FLAGS = $(LANG_FLAGS) $(APP_OPT) $(WARN_FLAGS) TEST_FLAGS = $(LANG_FLAGS) $(APP_OPT) $(WARN_FLAGS) SCRIPTS_DIR = %{scripts_dir} + +APP_POST_LINK_CMD = %{app_post_link_cmd} +TEST_POST_LINK_CMD = %{test_post_link_cmd} diff --git a/src/build-data/makefile/nmake.in b/src/build-data/makefile/nmake.in index c89eb7f44..9445063d9 100644 --- a/src/build-data/makefile/nmake.in +++ b/src/build-data/makefile/nmake.in @@ -43,9 +43,11 @@ all: $(APP) $(TEST) # Link Commands $(APP): $(LIBRARIES) $(APPOBJS) $(APP_LINK_CMD) /Fe$@ $(APPOBJS) $(LIB_FILENAME) $(APP_LINKS_TO) + $(APP_POST_LINK_CMD) $(TEST): $(LIBRARIES) $(TESTOBJS) $(TEST_LINK_CMD) /Fe$@ $(TESTOBJS) $(LIB_FILENAME) $(TEST_LINKS_TO) + $(TEST_POST_LINK_CMD) $(LIB_FILENAME): $(LIBOBJS) !If "$(SO_OBJ_FLAGS)" == "" |