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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
# **********************************************************************
#
# Copyright (c) 2003-2009 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.
#
CXX = c++
CXXFLAGS = -ftemplate-depth-128 -Wall -D_REENTRANT
ifeq ($(OPTIMIZE),yes)
CXXFLAGS := -O2 -DNDEBUG $(CXXFLAGS)
else
CXXFLAGS := -g $(CXXFLAGS)
endif
#
# C++ run-time libraries, necessary for linking some shared libraries.
#
CXXLIBS =
ifneq ($(embedded_runpath_prefix),)
# Only use -rpath if Mac OS X >= 10.5
release = $(shell uname -r)
ifeq ($(shell test $(firstword $(subst ., ,$(release))) -ge 9 && echo 0),0)
LDPLATFORMFLAGS = -Wl,-rpath,$(runpath_libdir)
endif
endif
ifdef ice_src_dist
shlibldflags = $(CXXFLAGS) -L$(libdir)
else
shlibldflags = $(CXXFLAGS) -L$(ice_dir)/$(libsubdir)
endif
mklibfilename = $(if $(2),lib$(1).$(2).dylib,lib$(1).dylib)
mksoname = $(if $(2),lib$(1).$(2).dylib,lib$(1).dylib)
mklibname = lib$(1).dylib
curdir = $(shell pwd)
ifeq ($(OPTIMIZE),yes)
ifneq ($(embedded_runpath_prefix),)
mkshlib = $(CXX) -dynamiclib $(shlibldflags) -o $(1) -install_name $(runpath_libdir)/$(2) $(3) $(4)
else
mkshlib = $(CXX) -dynamiclib $(shlibldflags) -o $(1) -install_name $(2) $(3) $(4)
endif
else
# Don't use -install_name if we're building a debug version. GDB doesn't honor the
# DYLD_LIBRARY_PATH environment variable if a runpath is embedded in the
# executables or libraries.
mkshlib = $(CXX) -dynamiclib $(shlibldflags) -o $(1) $(3) $(4)
endif
ifeq ($(DB_HOME),)
#
# If DB_HOME is not set and the BerkeleyDB library is not at the expected location
# but in the ICE_DIR/lib directory, we set DB_RPATH_LINK to tell the linker where
# to find it.
#
ifndef ice_src_dist
ifeq ($(shell test -f $(ice_dir)/$(libsubdir)/libFreeze.$(VERSION).dylib && echo 0),0)
dblib_install_name=$(firstword $(strip $(shell otool -L $(ice_dir)/$(libsubdir)/libFreeze.$(VERSION).dylib | grep libdb_cxx)))
ifeq ($(shell test ! -f $(dblib_install_name) -a -f $(ice_dir)/$(libsubdir)/$(notdir $(dblib_install_name)) && echo 0),0)
DB_RPATH_LINK=-dylib_file $(dblib_install_name):$(ice_dir)/$(libsubdir)/$(notdir $(dblib_install_name))
endif
endif
endif
endif
BASELIBS = -lIceUtil -lpthread
LIBS = -lIce $(BASELIBS)
ICONV_LIB = -liconv
ICEUTIL_OS_LIBS = -lpthread
ICE_OS_LIBS = -ldl $(ICONV_LIB)
PLATFORM_HAS_READLINE := no
|