# ********************************************************************** # # 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. # OSX_TARGET_MIN_SDK_VERSION = 10.9 CXX = xcrun clang++ CPPFLAGS += -pthread -fvisibility=hidden CXXFLAGS += -Wall -Werror -mmacosx-version-min=$(OSX_TARGET_MIN_SDK_VERSION) # If MAXWARN is set then enable extra warnings ifeq ($(MAXWARN),yes) CXXFLAGS += -Wextra -Wshadow -Wredundant-decls endif # # By default we build x86_64 binaries. # ifeq ($(CXXARCHFLAGS),) CXXARCHFLAGS := -arch x86_64 endif ifeq ($(OPTIMIZE),yes) CXXFLAGS := $(CXXARCHFLAGS) -O2 -DNDEBUG $(CXXFLAGS) else CXXFLAGS := $(CXXARCHFLAGS) -g $(CXXFLAGS) endif # # On OS X, always build with C++11 support enabled unless we # explicitly set it to no (possibly to test binary compatibility). # ifneq ($(CPP11), no) CPPFLAGS += --std=c++11 endif # # C++ run-time libraries, necessary for linking some shared libraries. # CXXLIBS = clean:: rm -f *.keychain *.fl* LOADER_PATH = @loader_path ifeq ($(RPATH_DIR),) ifdef ice_src_dist RPATH_DIR = @loader_path/$(libdir) else RPATH_DIR = $(ice_dir)/$(libsubdir) endif endif # # Clear rpath setting when doing a system install # ifeq ($(ice_dir), $(usr_dir)) RPATH_DIR = endif ifneq ($(RPATH_DIR),) LDEXEFLAGS = -Wl,-rpath,$(RPATH_DIR) endif ifdef ice_src_dist rpathlink = -Wl,-rpath,$(1) endif mklib = libtool -static -o $(1) $(2) mkshlib = $(CXX) -dynamiclib $(LDFLAGS) -o $(1) -install_name @rpath/$(2) $(3) $(4) BASELIBS = -lIceUtil LIBS = -lIce $(BASELIBS) ICONV_LIB = -liconv ICEUTIL_OS_LIBS = ICE_OS_LIBS = -ldl CRYPT_OS_LIBS = -framework Security -framework CoreFoundation SSL_OS_LIBS = $(CRYPT_OS_LIBS) PLATFORM_HAS_READLINE := yes ifeq ($(DB_HOME),) ifneq ($(wildcard /usr/local/opt/berkeley-db53),) DB_HOME = /usr/local/opt/berkeley-db53 endif endif