blob: 58aab7dd6b87b3a66800f7ec59575570d5811c5a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# **********************************************************************
#
# 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 = $(CXXFLAGS) -L$(libdir) $(LDEXEFLAGS)
mkrblibfilename = $(if $(2),$(1).$(2).bundle,$(1).bundle)
mkrbsoname = $(if $(2),$(1).$(2).bundle,$(1).bundle)
mkrblibname = $(1).bundle
RUBY_FLAGS += -Wno-unknown-pragmas
mkshlib = $(CXX) -dynamic -bundle $(shlibldflags) -o $(1) $(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
|