From 29fc8d5cbd01cfc2f019e1c2c1855c9e7f6c8971 Mon Sep 17 00:00:00 2001 From: nexus89 Date: Sun, 2 Jan 2011 20:51:54 +0000 Subject: Move OSX libs related functions in Makefile to make it working again in Linux git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2787 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Makefile.in | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'Makefile.in') diff --git a/Makefile.in b/Makefile.in index 7e9450a6..8816a9c8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -85,6 +85,22 @@ ifeq ($(USE_PROJECTM_CWRAPPER), yes) DEPS += $(PROJECTM_CWRAPPER_DIR) endif +################################################# +# Mac OS X library functions +################################################# +# copy the dylib and change its install names + +define install_osx_libraries + $(shell $(INSTALL) -m 755 $(dylib) $(macosx_bundle_path)/MacOS) + $(shell $(INSTALL_NAME_TOOL) -change $(dylib) @executable_path/$(notdir $(dylib)) $(macosx_bundle_path)/MacOS/ultrastardx) + $(shell $(INSTALL_NAME_TOOL) -id @executable_path/$(notdir $(dylib)) $(macosx_bundle_path)/MacOS/$(notdir $(dylib))) + $(foreach linked_dylibs_2,$(shell $(OTOOL) -L $(dylib) | grep version | cut -f 1 -d ' ' | grep -v \/System\/Library | grep -v \usr\/lib | grep -v executable_path),$(rename_secondary_osx_libraries)) +endef + +define rename_secondary_osx_libraries + $(shell $(INSTALL_NAME_TOOL) -change $(linked_dylibs_2) @executable_path/$(notdir $(linked_dylibs_2)) $(macosx_bundle_path)/MacOS/$(notdir $(dylib))) +endef + ################################################# # general targets ################################################# @@ -409,19 +425,6 @@ macosx-standalone-app: macosx-app @echo "Creating the standalone Mac OS X application" @echo "" -# copy the dylib and change its install names - -define install_osx_libraries - $(shell $(INSTALL) -m 755 $(dylib) $(macosx_bundle_path)/MacOS) - $(shell $(INSTALL_NAME_TOOL) -change $(dylib) @executable_path/$(notdir $(dylib)) $(macosx_bundle_path)/MacOS/ultrastardx) - $(shell $(INSTALL_NAME_TOOL) -id @executable_path/$(notdir $(dylib)) $(macosx_bundle_path)/MacOS/$(notdir $(dylib))) - $(foreach linked_dylibs_2,$(shell $(OTOOL) -L $(dylib) | grep version | cut -f 1 -d ' ' | grep -v \/System\/Library | grep -v \usr\/lib | grep -v executable_path),$(rename_secondary_osx_libraries)) -endef - -define rename_secondary_osx_libraries - $(shell $(INSTALL_NAME_TOOL) -change $(linked_dylibs_2) @executable_path/$(notdir $(linked_dylibs_2)) $(macosx_bundle_path)/MacOS/$(notdir $(dylib))) -endef - # work on the dylibs in $(macosx_bundle_path)/MacOS/ultrastardx $(foreach dylib,$(shell $(OTOOL) -L $(macosx_bundle_path)/MacOS/ultrastardx | grep version | cut -f 1 -d ' ' | grep -v \/System\/Library | grep -v \/usr\/lib),$(install_osx_libraries)) -- cgit v1.2.3