# ********************************************************************** # # Copyright (c) 2003-2007 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 = LDPLATFORMFLAGS = -Wl,-bind_at_load shlibldflags = $(CXXFLAGS) -L$(libdir) 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. # ifeq ($(shell test -f $(libdir)/libFreeze.$(VERSION).dylib && echo 0),0) dblib_install_name=$(firstword $(strip $(shell otool -L $(libdir)/libFreeze.$(VERSION).dylib | grep libdb_cxx))) ifeq ($(shell test ! -f $(dblib_install_name) -a -f $(libdir)/$(notdir $(dblib_install_name)) && echo 0),0) DB_RPATH_LINK=-dylib_file $(dblib_install_name):$(libdir)/$(notdir $(dblib_install_name)) endif endif endif BASELIBS = -lIceUtil -lpthread LIBS = -lIce $(BASELIBS) ICEUTIL_OS_LIBS = -lpthread ICE_OS_LIBS = -ldl PLATFORM_HAS_READLINE := no export DYLD_LIBRARY_PATH := $(libdir):$(DYLD_LIBRARY_PATH)