# ********************************************************************** # # 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) # # Override CPPFLAGS set in cpp/config/Make.rules.Darwin, PHP5 extension build # doesn't work well with --std=c++11 or -fvisibility=hidden # CPPFLAGS = -pthread LDPLATFORMFLAGS += ${wl}-flat_namespace ${wl}-undefined ${wl}suppress $(LDEXEFLAGS) 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 installphplib = $(INSTALL) $(1) $(2); \ chmod a+rx $(2)/$(notdir $(1)) # # 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),) installphplib += ; install_name_tool -rpath $(RPATH_DIR) $(embedded_runpath_prefix)/lib $(2)/$(notdir $(1)) else ifdef usr_dir_install installphplib += ; install_name_tool -delete_rpath $(RPATH_DIR) $(2)/$(notdir $(1)) else ifdef ice_src_dist installphplib += ; install_name_tool -rpath $(RPATH_DIR) @loader_path/../$(libsubdir) $(2)/$(notdir $(1)) endif endif