# ********************************************************************** # # Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** # # This file is included by Make.rules when uname is Darwin. # include $(top_srcdir)/../cpp/config/Make.rules.$(UNAME) shlibldflags += $(LDEXEFLAGS) mksoname = $(if $(2),lib$(1).$(2).so,lib$(1).so) mklibname = lib$(1).so mkshlib = $(CXX) -dynamiclib $(shlibldflags) -o $(1) -install_name @rpath/$(2) $(3) $(4) ifneq ($(STATICLIBS),yes) # # Set RPATH to the cpp/lib directory or Ice installation lib directory. Note that unlike Linux # platforms, we always set the RPATH for source builds on OS X. This is required because we # can no longer rely on DYLD_LIBRARY_PATH on El Capitan. The RPATH is updated when the library # is installed (see cpp/config/Make.rules.Darwin). # ifdef ice_src_dist RPATH_DIR = @loader_path/../../cpp/$(libsubdir) else RPATH_DIR = $(ice_dir)/$(libsubdir) endif # # Update the RPATH to the installation lib directory when installing a library instead # of relying on the RPATH set during the build (which isn't correct anymore for the # installation directly layout). # ifneq ($(embedded_runpath_prefix),) installlib += ; install_name_tool -rpath $(RPATH_DIR) $(embedded_runpath_prefix)/lib $(1)/$(3) else ifdef usr_dir_install installlib += ; install_name_tool -delete_rpath $(RPATH_DIR) $(1)/$(3) else ifdef ice_src_dist installlib += ; install_name_tool -rpath $(RPATH_DIR) @loader_path/../$(libsubdir) $(1)/$(3) endif endif