# **********************************************************************
#
# Copyright (c) 2003-2006 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.
#

#
# We require Python to be built as a Framework for the IcePy plugin.
#
ifneq ($(PYTHON_HOME),)
    ifeq ($(shell test ! -f $(PYTHON_HOME)/Python && echo 0),0)
        $(error Unable to find Python framework See config/Make.rules.Darwin)
    endif
else
    PYTHON_HOME		= /System/Library/Frameworks/Python.framework/Versions/Current
endif

PYTHON_INCLUDE_DIR	= $(PYTHON_HOME)/include/$(PYTHON_VERSION)
PYTHON_LIBS		= -F$(PYTHON_HOME) -framework Python

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,-executable_path,$(top_srcdir)/bin

shlibldflags		= $(CXXFLAGS) -L$(libdir)

mkshlib                 = $(CXX) -bundle $(shlibldflags) -o $(1) $(3) $(4)

BASELIBS		= -lIceUtil -lpthread 
LIBS			= -lIce $(BASELIBS)

PLATFORM_HAS_READLINE   := no

export DYLD_LIBRARY_PATH := $(libdir):$(DYLD_LIBRARY_PATH)
