]> git.saurik.com Git - apple/icu.git/blobdiff - makefile
ICU-62123.0.1.tar.gz
[apple/icu.git] / makefile
index ca5b4fa4406f2557779f73856cb22acc4751d66a..6d1483ad87d2c46e36b8204ba1c89ee0f87f052d 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,6 +1,6 @@
 ##
 # Wrapper makefile for ICU
-# Copyright (C) 2003-2016 Apple Inc. All rights reserved.
+# Copyright (C) 2003-2018 Apple Inc. All rights reserved.
 #
 # See http://www.gnu.org/manual/make/html_chapter/make_toc.html#SEC_Contents
 # for documentation on makefiles. Most of this was culled from the ncurses makefile.
@@ -13,7 +13,7 @@
 # ICU-MMmAA[.B]
 #
 # MM comes from the open-source ICU major version, and can range from 1 to 214 (the max is
-#    due to B&I limits on submission versions. As of March 2016 this is 57; it increases
+#    due to B&I limits on submission versions). As of March 2016 this is 57; it increases
 #    by 1 for each ICU major release (usually 2 / year). This corresponds to
 #    U_ICU_VERSION_MAJOR_NUM.
 # m  is a single digit specifying the open-source ICU minor version. This is 0 before final
 # target now submits different sources to different trains, we have to distinguish them.
 # The values currently defined for T are
 # 1  OSX trains
-# 2  embedded trains (iOS, tvos, watchos) including simulator versions thereof
+# 2  embedded trains (iOS, tvos, watchos, bridgeos) including simulator versions thereof
 # 8  AAS for Windows
 # 9  linux for Siri servers
 # (additional train numbers for Apple platforms can be assigned from 3 up, additional
 # train numbers for non-Apple platforms can be assigned from 7 down).
 #
 #################################
-# Notes on building for AAS using Windows (7) + Visual Studio (2010) + Cygwin:
+# Notes on building for AAS using Windows (10) + Visual Studio (2015) + Cygwin:
 #
 # Either this should be run indirectly from the VS command prompt via the
 # BuildICUForAAS script or project, using the instructions there (which build
 # both 32-bit and 64-bit), or it should be run from within Cygwin using the
-# following instructions or equivalent (different steps for 32-bit or 64-bit):
+# following instructions or equivalent (different steps for 32-bit or 64-bit
+# targets, details may also differ if you have the 32-bit cygwin install vs the
+# 64-bit one, i.e. cygwin vs cygwin64):
 #
 # 1. From VS command prompt, run vcvarsall.bat to set various environment variables.
 #    For a 32-bit build:
-#    > "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
+#    > "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
 #    For a 64-bit build:
-#    > "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64
+#    > "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
 #
-# 2. Launch Cygwin, e.g.
-#    > C:\cygwin\Cygwin.bat
+# 2. Launch Cygwin, e.g. for the 64-bit cygwin install:
+#    > C:\cygwin64\cygwin.bat
 #
 # 3. Within cygwin, cd to the top level of the ICU sources directory, e.g.
 #    $ cd ICU
 #
 # 4. Adjust the PATH to put the appropriate VC tools directory first:
 #    For a 32-bit build:
-#    $ export PATH="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/":$PATH
+#    $ export PATH="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/":$PATH
 #    For a 64-bit build:
-#    $ export PATH="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/amd64/":$PATH
+#    $ export PATH="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/":$PATH
 #
 # 5. Run the ICU makefile
 #    For a 32-bit build:
 
 # Sane defaults, which are typically overridden on the command line
 #or by the environment
-WINDOWS=NO
-LINUX=NO
-ARCH64=NO
+ifeq ($(OS),Windows_NT)
+       WINDOWS=YES
+       LINUX=NO
+else
+       WINDOWS=NO
+       LINUX?=$(shell [[ "`uname -s`" == "Linux" ]] && echo YES || echo NO)
+endif
+ARCH64?=YES
 RC_ARCHS=
 ifndef RC_ProjectSourceVersion
 ifdef RC_PROJECTSOURCEVERSION
        RC_ProjectSourceVersion=$(RC_PROJECTSOURCEVERSION)
 endif
 endif
+$(info # RC_XBS=$(RC_XBS))
 $(info # RC_ARCHS=$(RC_ARCHS))
 $(info # RC_ProjectName=$(RC_ProjectName))
 $(info # RC_ProjectSourceVersion=$(RC_ProjectSourceVersion))
@@ -120,12 +128,12 @@ ifeq "$(WINDOWS)" "YES"
 endif
 
 # chicken and egg problem: we can't use cygpath until PATH & SHELL are set,
-# but we have to convert VS100VCTOOLS_PATH in order to set PATH. So instead we
+# but we have to convert VS140VCTOOLS_PATH in order to set PATH. So instead we
 # convert using subst.
 ifeq "$(WINDOWS)" "YES"
-       ifneq "$(VS100VCTOOLS_PATH)" ""
-               VS100VCTOOLS_CYGPATH:= /cygdrive/$(subst :/,/,$(subst \,/,$(VS100VCTOOLS_PATH)))
-               PATH:=$(VS100VCTOOLS_CYGPATH):/usr/local/bin/:/usr/bin/:$(PATH)
+       ifneq "$(VS140VCTOOLS_PATH)" ""
+               VS140VCTOOLS_CYGPATH:= /cygdrive/$(subst :/,/,$(subst \,/,$(VS140VCTOOLS_PATH)))
+               PATH:=$(VS140VCTOOLS_CYGPATH):/usr/local/bin/:/usr/bin/:$(PATH)
        endif
 endif
 $(info # PATH=$(PATH))
@@ -142,7 +150,7 @@ endif
 # for SRCROOT etc. to cygwin-style paths. Don't define them if not
 # already defined.
 ifeq "$(WINDOWS)" "YES"
-       ifneq "$(VS100VCTOOLS_PATH)" ""
+       ifneq "$(VS140VCTOOLS_PATH)" ""
                ifdef SRCROOT
                        SRCROOT:=$(shell /bin/cygpath -ua $(subst \,/,$(SRCROOT)))
                endif
@@ -219,19 +227,19 @@ $(info # SDKPATH=$(SDKPATH))
 # This corresponds to MMmAA.(0 | B).T where
 # MM is U_ICU_VERSION_MAJOR_NUM
 # m  is U_ICU_VERSION_MINOR_NUM
-# AA is the Apple delta version 
+# AA is the Apple delta version
 # B  is the Apple branch version (1 or 2 digits)
 # T  is the Apple train code for submissions.
 # Note The value for the SourceVersion property in version.plists will be calculated as
 # (X*10000 + Y*100 + Z).
 # We want ICU_BUILD = 100*AA + B.
-# 
+#
 ifneq "$(RC_ProjectSourceVersion)" ""
        ifeq "$(WINDOWS)" "YES"
-               ICU_BUILD_AA  := $(shell echo $(RC_ProjectSourceVersion) | sed -r -e 's/([0-9]+)([0-9]{2})(\.([0-9])([0-9])?(\.([0-9]{1,2}))?)?/\2/')
-               ICU_BUILD_B1 := $(shell echo $(RC_ProjectSourceVersion) | sed -r -e 's/([0-9]+)([0-9]{2})(\.([0-9])([0-9])?(\.([0-9]{1,2}))?)?/\4/')
-               ICU_BUILD_B2 := $(shell echo $(RC_ProjectSourceVersion) | sed -r -e 's/([0-9]+)([0-9]{2})(\.([0-9])([0-9])?(\.([0-9]{1,2}))?)?/\5/')
-               ICU_TRAIN_CODE := $(shell echo $(RC_ProjectSourceVersion) | sed -r -e 's/([0-9]+)([0-9]{2})(\.([0-9])([0-9])?(\.([0-9]{1,2}))?)?/\7/')
+               ICU_BUILD_AA  := $(shell echo $(RC_ProjectSourceVersion) | /usr/bin/sed -r -e 's/([0-9]+)([0-9]{2})(\.([0-9])([0-9])?(\.([0-9]{1,2}))?)?/\2/')
+               ICU_BUILD_B1 := $(shell echo $(RC_ProjectSourceVersion) | /usr/bin/sed -r -e 's/([0-9]+)([0-9]{2})(\.([0-9])([0-9])?(\.([0-9]{1,2}))?)?/\4/')
+               ICU_BUILD_B2 := $(shell echo $(RC_ProjectSourceVersion) | /usr/bin/sed -r -e 's/([0-9]+)([0-9]{2})(\.([0-9])([0-9])?(\.([0-9]{1,2}))?)?/\5/')
+               ICU_TRAIN_CODE := $(shell echo $(RC_ProjectSourceVersion) | /usr/bin/sed -r -e 's/([0-9]+)([0-9]{2})(\.([0-9])([0-9])?(\.([0-9]{1,2}))?)?/\7/')
        else
                ICU_BUILD_AA  := $(shell echo $(RC_ProjectSourceVersion) | sed -E -e 's/([0-9]+)([0-9]{2})(\.([0-9])([0-9])?(\.([0-9]{1,2}))?)?/\2/')
                ICU_BUILD_B1 := $(shell echo $(RC_ProjectSourceVersion) | sed -E -e 's/([0-9]+)([0-9]{2})(\.([0-9])([0-9])?(\.([0-9]{1,2}))?)?/\4/')
@@ -299,12 +307,12 @@ endif
 # TARGET_OS_IPHONE -is 1 iff generating code for firmware, devices, or simulator (all embedded trains)
 # in that case:
 #      exactly one of the following is 1: TARGET_OS_SIMULATOR, TARGET_OS_EMBEDDED (i.e. device)
-#      exactly one of the following is 1: TARGET_OS_IOS, TARGET_OS_TV, TARGET_OS_WATCH
+#      exactly one of the following is 1: TARGET_OS_IOS, TARGET_OS_TV, TARGET_OS_WATCH, TARGET_OS_BRIDGE
 #
 ifeq "$(ICU_FOR_APPLE_PLATFORMS)" "YES"
        HOSTCC := $(shell xcrun --sdk macosx --find cc)
        HOSTCXX := $(shell xcrun --sdk macosx --find c++)
-       HOSTSDKPATH := $(shell xcrun --sdk macosx --show-sdk-path)
+       HOSTSDKPATH := $(shell xcrun --sdk macosx.internal --show-sdk-path)
        HOSTISYSROOT = -isysroot $(HOSTSDKPATH)
        ifeq "$(SDKPATH)" "/"
                ISYSROOT:= -isysroot $(HOSTSDKPATH)
@@ -333,6 +341,7 @@ ifeq "$(ICU_FOR_APPLE_PLATFORMS)" "YES"
        SIMULATOROS:=$(shell $(CXX) -E -dM -x c $(ISYSROOT) -include TargetConditionals.h /dev/null | fgrep define' 'TARGET_OS_SIMULATOR | cut -d' ' -f3)
        TVOS:=$(shell $(CXX) -E -dM -x c $(ISYSROOT) -include TargetConditionals.h /dev/null | fgrep define' 'TARGET_OS_TV | cut -d' ' -f3)
        WATCHOS:=$(shell $(CXX) -E -dM -x c $(ISYSROOT) -include TargetConditionals.h /dev/null | fgrep define' 'TARGET_OS_WATCH | cut -d' ' -f3)
+       BRIDGEOS:=$(shell $(CXX) -E -dM -x c $(ISYSROOT) -include TargetConditionals.h /dev/null | fgrep define' 'TARGET_OS_BRIDGE | cut -d' ' -f3)
        ifeq "$(ICU_FOR_EMBEDDED_TRAINS)" "YES"
                ifeq "$(SIMULATOROS)" "1"
                        BUILD_TYPE=SIMULATOR
@@ -347,12 +356,18 @@ ifeq "$(ICU_FOR_APPLE_PLATFORMS)" "YES"
 else
        ifeq "$(LINUX)" "YES"
                ISYSROOT:=
-               CC := gcc
-               CXX := g++
+               ifeq "$(shell (which clang >& /dev/null && which clang++ >& /dev/null && echo YES) || echo NO)" "YES"
+                       CC := clang
+                       CXX := clang++
+               else
+                       CC := gcc
+                       CXX := g++
+               endif
        endif
        export ICU_FOR_EMBEDDED_TRAINS:=NO
        TVOS:=0
        WATCHOS:=0
+       BRIDGEOS:=0
        BUILD_TYPE=
 endif
 
@@ -381,51 +396,62 @@ $(error Cross-builds currently not allowed on Linux)
 endif
 endif
 
-MAC_OS_X_VERSION_MIN_REQUIRED=101100
-OSX_HOST_VERSION_MIN_STRING=10.11
+MAC_OS_X_VERSION_MIN_REQUIRED=101300
+OSX_HOST_VERSION_MIN_STRING=10.13
 
 ifndef IPHONEOS_DEPLOYMENT_TARGET
-       IOS_VERSION_TARGET_STRING=10.0
+       IOS_VERSION_TARGET_STRING=12.0
 else ifeq "$(IPHONEOS_DEPLOYMENT_TARGET)" ""
-       IOS_VERSION_TARGET_STRING=10.0
+       IOS_VERSION_TARGET_STRING=12.0
 else
        IOS_VERSION_TARGET_STRING=$(IPHONEOS_DEPLOYMENT_TARGET)
 endif
 
 ifndef MACOSX_DEPLOYMENT_TARGET
-       OSX_VERSION_TARGET_STRING=10.12
+       OSX_VERSION_TARGET_STRING=10.14
 else ifeq "$(MACOSX_DEPLOYMENT_TARGET)" ""
-       OSX_VERSION_TARGET_STRING=10.12
+       OSX_VERSION_TARGET_STRING=10.14
 else
        OSX_VERSION_TARGET_STRING=$(MACOSX_DEPLOYMENT_TARGET)
 endif
 
 ifndef WATCHOS_DEPLOYMENT_TARGET
-       WATCHOS_VERSION_TARGET_STRING=3.0
+       WATCHOS_VERSION_TARGET_STRING=5.0
 else ifeq "$(WATCHOS_DEPLOYMENT_TARGET)" ""
-       WATCHOS_VERSION_TARGET_STRING=3.0
+       WATCHOS_VERSION_TARGET_STRING=5.0
 else
        WATCHOS_VERSION_TARGET_STRING=$(WATCHOS_DEPLOYMENT_TARGET)
 endif
 
 ifndef TVOS_DEPLOYMENT_TARGET
-       TVOS_VERSION_TARGET_STRING=10.0
+       TVOS_VERSION_TARGET_STRING=12.0
 else ifeq "$(TVOS_DEPLOYMENT_TARGET)" ""
-       TVOS_VERSION_TARGET_STRING=10.0
+       TVOS_VERSION_TARGET_STRING=12.0
 else
        TVOS_VERSION_TARGET_STRING=$(TVOS_DEPLOYMENT_TARGET)
 endif
 
+ifndef BRIDGEOS_DEPLOYMENT_TARGET
+       BRIDGEOS_VERSION_TARGET_STRING=2.0
+else ifeq "$(BRIDGEOS_DEPLOYMENT_TARGET)" ""
+       BRIDGEOS_VERSION_TARGET_STRING=2.0
+else
+       BRIDGEOS_VERSION_TARGET_STRING=$(BRIDGEOS_DEPLOYMENT_TARGET)
+endif
+
 $(info # IOS_VERSION_TARGET_STRING=$(IOS_VERSION_TARGET_STRING))
 $(info # OSX_VERSION_TARGET_STRING=$(OSX_VERSION_TARGET_STRING))
 $(info # WATCHOS_VERSION_TARGET_STRING=$(WATCHOS_VERSION_TARGET_STRING))
 $(info # TVOS_VERSION_TARGET_STRING=$(TVOS_VERSION_TARGET_STRING))
+$(info # BRIDGEOS_VERSION_TARGET_STRING=$(BRIDGEOS_VERSION_TARGET_STRING))
 
 ifeq "$(BUILD_TYPE)" "DEVICE"
        ifeq "$(WATCHOS)" "1"
                ICU_TARGET_VERSION := -mwatchos-version-min=$(WATCHOS_VERSION_TARGET_STRING)
        else ifeq "$(TVOS)" "1"
                ICU_TARGET_VERSION := -mtvos-version-min=$(TVOS_VERSION_TARGET_STRING)
+       else ifeq "$(BRIDGEOS)" "1"
+               ICU_TARGET_VERSION := -mbridgeos-version-min=$(BRIDGEOS_VERSION_TARGET_STRING)
        else
                ICU_TARGET_VERSION := -miphoneos-version-min=$(IOS_VERSION_TARGET_STRING)
        endif
@@ -475,7 +501,7 @@ $(info # buildhost=$(UNAME_PROCESSOR))
 #
 ifeq "$(CROSS_BUILD)" "YES"
        RC_ARCHS_FIRST=$(shell echo $(RC_ARCHS) | cut -d' ' -f1)
-       TARGET_SPEC=$(RC_ARCHS_FIRST)-apple-darwin15.0.0
+       TARGET_SPEC=$(RC_ARCHS_FIRST)-apple-darwin17.3.0
        ENV_CONFIGURE_ARCHS=-arch $(RC_ARCHS_FIRST)
        ICUPKGTOOLIBS="$(CROSSHOST_OBJROOT)/lib:$(CROSSHOST_OBJROOT)/stubdata"
        ICUPKGTOOL=$(CROSSHOST_OBJROOT)/bin/icupkg
@@ -491,7 +517,7 @@ else ifeq "$(LINUX)" "YES"
        ICUPKGTOOL=$(OBJROOT_CURRENT)/bin/icupkg
        FORCEENDIAN=
 else
-       TARGET_SPEC=$(UNAME_PROCESSOR)-apple-darwin15.0.0
+       TARGET_SPEC=$(UNAME_PROCESSOR)-apple-darwin17.3.0
        ENV_CONFIGURE_ARCHS=
        ICUPKGTOOLIBS="$(OBJROOT_CURRENT)/lib:$(OBJROOT_CURRENT)/stubdata"
        ICUPKGTOOL=$(OBJROOT_CURRENT)/bin/icupkg
@@ -517,14 +543,24 @@ ifdef RC_EMBEDDEDPROJECT_DIR
        ifeq "$(shell test -L $(RC_EMBEDDEDPROJECT_DIR)/TimeZoneData/usr/local/share/tz/latest_tzdata.tar.gz && echo YES )" "YES"
                export TZDATA:=$(RC_EMBEDDEDPROJECT_DIR)/TimeZoneData/usr/local/share/tz/$(shell readlink $(RC_EMBEDDEDPROJECT_DIR)/TimeZoneData/usr/local/share/tz/latest_tzdata.tar.gz)
        endif
+       ifeq "$(shell test -d $(RC_EMBEDDEDPROJECT_DIR)/TimeZoneData/usr/local/share/tz/icudata && echo YES )" "YES"
+               export TZAUXFILESDIR:=$(RC_EMBEDDEDPROJECT_DIR)/TimeZoneData/usr/local/share/tz/icudata
+       endif
 endif
 ifndef TZDATA
        ifeq "$(shell test -L $(SDKPATH)/usr/local/share/tz/latest_tzdata.tar.gz && echo YES )" "YES"
                export TZDATA:=$(SDKPATH)/usr/local/share/tz/$(shell readlink $(SDKPATH)/usr/local/share/tz/latest_tzdata.tar.gz)
        endif
+       ifeq "$(shell test -d $(SDKPATH)/usr/local/share/tz/icudata && echo YES )" "YES"
+               export TZAUXFILESDIR:=$(SDKPATH)/usr/local/share/tz/icudata
+       endif
 endif
 $(info # RC_EMBEDDEDPROJECT_DIR=$(RC_EMBEDDEDPROJECT_DIR))
 $(info # TZDATA=$(TZDATA))
+$(info # TZAUXFILESDIR=$(TZAUXFILESDIR))
+ifndef TZAUXFILESDIR
+       TZAUXFILESDIR:=.
+endif
 
 APPLE_INTERNAL_DIR=/AppleInternal
 DSYMTOOL := /usr/bin/dsymutil
@@ -658,7 +694,7 @@ endif
 # The ICU version/subversion should reflect the actual ICU version.
 
 LIB_NAME = icucore
-ICU_VERS = 57
+ICU_VERS = 62
 ICU_SUBVERS = 1
 CORE_VERS = A
 
@@ -675,9 +711,9 @@ ifeq "$(WINDOWS)" "YES"
 else ifeq "$(LINUX)" "YES"
        DYLIB_SUFF = so
        ifeq "$(ARCH64)" "YES"
-               libdir = /usr/lib64/
+               libdir = /usr/local/lib/
        else
-               libdir = /usr/lib/
+               libdir = /usr/local/lib32/
        endif
        winprogdir =
        winintlibdir =
@@ -722,15 +758,19 @@ OPEN_SOURCE_LICENSES_DIR=/usr/local/OpenSourceLicenses/
 B_DATA_FILE=icudt$(ICU_VERS)b.dat
 L_DATA_FILE=icudt$(ICU_VERS)l.dat
 DATA_BUILD_SUBDIR= data/out
+ifeq "$(LINUX)" "YES"
+DATA_INSTALL_DIR=/usr/local/share/icu/
+else
 DATA_INSTALL_DIR=/usr/share/icu/
+endif
 
 # DATA_LOOKUP_DIR is what the target ICU_DATA_DIR gets set to in CFLAGS, CXXFLAGS;
 # DATA_LOOKUP_DIR_BUILDHOST is what any crossbuild host ICU_DATA_DIR gets set to.
 # Formerly we had DATA_LOOKUP_DIR=/var/db/icu/ for embedded non-simulator builds
 # and DATA_LOOKUP_DIR=/usr/share/icu/ for everything else. Now all systems look
 # in the same place for the main data file:
-DATA_LOOKUP_DIR=/usr/share/icu/
-DATA_LOOKUP_DIR_BUILDHOST=/usr/share/icu/
+DATA_LOOKUP_DIR=$(DATA_INSTALL_DIR)
+DATA_LOOKUP_DIR_BUILDHOST=$(DATA_INSTALL_DIR)
 
 # Timezone data file(s)
 # ICU will look for /var/db/timezone/icutz/icutz44l.dat
@@ -811,15 +851,17 @@ GENBRKTOOL = icugenbrk
 GENBRKTOOL_OBJS = ./tools/genbrk/genbrk.o
 
 #################################
-# CLDR file(s)
+# Ancillary files
 # e.g. supplementalData.xml, per <rdar://problem/13426014>
 # These are like internal headers in that they are only installed for
 # (other) projects to build against, not needed at runtime.
-# Therefore install during installhdrs.
+# Install during installhdrs? That does not seem to work for CLDRFILESDIR
 #################################
 
 CLDRFILESDIR=/usr/local/share/cldr
 
+EMOJI_DATA_DIR=/usr/local/share/emojiData
+
 #################################
 # Environment variables
 #################################
@@ -838,86 +880,94 @@ LIBOVERRIDES=LIBICUDT="-L$(OBJROOT_CURRENT) -l$(LIB_NAME)" \
 # options here and also the update the LINK.EXE lines in the TARGETS section below.
 ifeq "$(WINDOWS)" "YES"
        ifeq "$(ARCH64)" "YES"
-               ENV= CFLAGS="/O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES" \
-                       CXXFLAGS="/O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /Zc:wchar_t" \
+               ENV= CFLAGS="/utf-8 /O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES" \
+                       CXXFLAGS="/utf-8 /O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /Zc:wchar_t /DU_SHOW_CPLUSPLUS_API=1" \
                        LDFLAGS="/NXCOMPAT /DYNAMICBASE /DEBUG /OPT:REF"
        else
-               ENV= CFLAGS="/O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES" \
-                       CXXFLAGS="/O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /Zc:wchar_t" \
+               ENV= CFLAGS="/utf-8 /O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES" \
+                       CXXFLAGS="/utf-8 /O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /Zc:wchar_t /DU_SHOW_CPLUSPLUS_API=1" \
                        LDFLAGS="/NXCOMPAT /SAFESEH /DYNAMICBASE /DEBUG /OPT:REF"
        endif
        ENV_CONFIGURE= CPPFLAGS="-DU_DISABLE_RENAMING=1 $(DEFINE_BUILD_LEVEL)" \
-               CFLAGS="/O2 /Ob2 /MD /GF /GS /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES" \
-               CXXFLAGS="/O2 /Ob2 /MD /GF /GS /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /Zc:wchar_t"
-       ENV_DEBUG= CFLAGS="/O2 /Ob2 /MDd /GF /GS /Zi /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES" \
-               CXXFLAGS="/O2 /Ob2 /MDd /GF /GS /Zi /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc" \
+               CFLAGS="/utf-8 /O2 /Ob2 /MD /GF /GS /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES" \
+               CXXFLAGS="/utf-8 /O2 /Ob2 /MD /GF /GS /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /Zc:wchar_t /DU_SHOW_CPLUSPLUS_API=1"
+       ENV_DEBUG= CFLAGS="/utf-8 /O2 /Ob2 /MDd /GF /GS /Zi /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES" \
+               CXXFLAGS="/utf-8 /O2 /Ob2 /MDd /GF /GS /Zi /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /DU_SHOW_CPLUSPLUS_API=1" \
                LDFLAGS="/DEBUG /DYNAMICBASE"
        ENV_PROFILE=
 else ifeq "$(LINUX)" "YES"
        ifeq "$(ARCH64)" "YES"
                ENV_CONFIGURE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
+                       LANG="en_US.utf8" \
                        CPPFLAGS="-DU_DISABLE_RENAMING=1 $(DEFINE_BUILD_LEVEL)"  \
                        CC="$(CC)" \
                        CXX="$(CXX)" \
                        CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m64 -g -Os -fno-exceptions -fvisibility=hidden" \
-                       CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m64 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \
+                       CXXFLAGS="-std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m64 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \
                        TZDATA="$(TZDATA)" \
-                       DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib64"
+                       DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib"
 
                ENV= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
+                       LANG="en_US.utf8" \
                        CC="$(CC)" \
                        CXX="$(CXX)" \
                        CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m64 -g -Os -fno-exceptions -fvisibility=hidden" \
-                       CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m64 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \
+                       CXXFLAGS="-std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m64 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \
                        TZDATA="$(TZDATA)" \
-                       DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib64"
+                       DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib"
 
                ENV_DEBUG= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
+                       LANG="en_US.utf8" \
                        CC="$(CC)" \
                        CXX="$(CXX)" \
                        CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m64 -O0 -gfull -fno-exceptions -fvisibility=hidden" \
-                       CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m64 -O0 -gfull -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \
+                       CXXFLAGS="-std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m64 -O0 -gfull -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \
                        TZDATA="$(TZDATA)" \
-                       DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib64"
+                       DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib"
 
                ENV_PROFILE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
+                       LANG="en_US.utf8" \
                        CC="$(CC)" \
                        CXX="$(CXX)" \
                        CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m64 -g -Os -pg -fno-exceptions -fvisibility=hidden" \
-                       CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m64 -g -Os -pg -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \
+                       CXXFLAGS="-std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m64 -g -Os -pg -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \
                        TZDATA="$(TZDATA)" \
-                       DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib64"
+                       DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib"
        else
                ENV_CONFIGURE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
+                       LANG="en_US.utf8" \
                        CPPFLAGS="-DU_DISABLE_RENAMING=1 $(DEFINE_BUILD_LEVEL)" \
                        CC="$(CC)" \
                        CXX="$(CXX)" \
                        CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m32 -g -Os -fno-exceptions -fvisibility=hidden" \
-                       CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m32 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \
+                       CXXFLAGS="-std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m32 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \
                        TZDATA="$(TZDATA)" \
                        DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib"
 
                ENV= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
+                       LANG="en_US.utf8" \
                        CC="$(CC)" \
                        CXX="$(CXX)" \
                        CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m32 -g -Os -fno-exceptions -fvisibility=hidden" \
-                       CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m32 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \
+                       CXXFLAGS="-std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m32 -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \
                        TZDATA="$(TZDATA)" \
                        DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib"
 
                ENV_DEBUG= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
+                       LANG="en_US.utf8" \
                        CC="$(CC)" \
                        CXX="$(CXX)" \
                        CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m32 -O0 -gfull -fno-exceptions -fvisibility=hidden" \
-                       CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m32 -O0 -gfull -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \
+                       CXXFLAGS="-std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m32 -O0 -gfull -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \
                        TZDATA="$(TZDATA)" \
                        DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib"
 
                ENV_PROFILE= APPLE_INTERNAL_DIR="$(APPLE_INTERNAL_DIR)" \
+                       LANG="en_US.utf8" \
                        CC="$(CC)" \
                        CXX="$(CXX)" \
                        CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m32 -g -Os -pg -fno-exceptions -fvisibility=hidden" \
-                       CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m32 -g -Os -pg -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \
+                       CXXFLAGS="-std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DICU_DATA_DIR_PREFIX_ENV_VAR=\"\\\"$(DATA_DIR_PREFIX_ENV_VAR)\\\"\" -m32 -g -Os -pg -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \
                        TZDATA="$(TZDATA)" \
                        DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib"
        endif
@@ -928,7 +978,7 @@ else
                CC="$(CC)" \
                CXX="$(CXX)" \
                CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(ENV_CONFIGURE_ARCHS) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG)" \
-               CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(ENV_CONFIGURE_ARCHS) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \
+               CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(ENV_CONFIGURE_ARCHS) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \
                RC_ARCHS="$(RC_ARCHS)" $(FORCEENDIAN)\
                TZDATA="$(TZDATA)" \
                DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib"
@@ -937,7 +987,7 @@ else
                CC="$(CC)" \
                CXX="$(CXX)" \
                CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG)" \
-               CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \
+               CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \
                RC_ARCHS="$(RC_ARCHS)" \
                TZDATA="$(TZDATA)" \
                DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib"
@@ -946,7 +996,7 @@ else
                CC="$(CC)" \
                CXX="$(CXX)" \
                CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -O0 -gfull -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG)" \
-               CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -O0 -gfull -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \
+               CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -O0 -gfull -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \
                RC_ARCHS="$(RC_ARCHS)" \
                TZDATA="$(TZDATA)" \
                DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib"
@@ -955,7 +1005,7 @@ else
                CC="$(CC)" \
                CXX="$(CXX)" \
                CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -pg -Wglobal-constructors -fno-exceptions -fvisibility=hidden $(ISYSROOT) $(THUMB_FLAG)" \
-               CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -pg -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \
+               CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_FILES_DIR=\"\\\"$(TZDATA_LOOKUP_DIR)\\\"\" -DU_TIMEZONE_PACKAGE=\"\\\"$(TZDATA_PACKAGE)\\\"\" $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -pg -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG)" \
                RC_ARCHS="$(RC_ARCHS)" \
                TZDATA="$(TZDATA)" \
                DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib"
@@ -965,7 +1015,7 @@ else
                CC="$(HOSTCC)" \
                CXX="$(HOSTCXX)" \
                CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR_BUILDHOST)\\\"\" -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) $(HOSTISYSROOT) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden" \
-               CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR_BUILDHOST)\\\"\" -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) $(HOSTISYSROOT) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \
+               CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR_BUILDHOST)\\\"\" -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) $(HOSTISYSROOT) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \
                TZDATA="$(TZDATA)" \
                DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib"
 
@@ -973,7 +1023,7 @@ else
                CC="$(HOSTCC)" \
                CXX="$(HOSTCXX)" \
                CFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR_BUILDHOST)\\\"\" -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) $(HOSTISYSROOT) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden" \
-               CXXFLAGS="-DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR_BUILDHOST)\\\"\" -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) $(HOSTISYSROOT) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \
+               CXXFLAGS="--std=c++11 -DU_SHOW_CPLUSPLUS_API=1 -DU_SHOW_INTERNAL_API=1 -DU_TIMEZONE=timezone -DICU_DATA_DIR=\"\\\"$(DATA_LOOKUP_DIR_BUILDHOST)\\\"\" -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) -mmacosx-version-min=$(OSX_HOST_VERSION_MIN_STRING) $(HOSTISYSROOT) -g -Os -Wglobal-constructors -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden" \
                TZDATA="$(TZDATA)" \
                DYLD_LIBRARY_PATH="$(DSTROOT)/usr/local/lib"
 
@@ -1015,12 +1065,13 @@ crossbuildhost icutztoolsforsdk
 #
 # The various patchconfig files should assume the current directory is icuSources.
 #
-# Note that if sources have been installed by installsrc (only run as part of buildit
-# or B&I builds), then
-#    $(SRCROOT)/.git is not present, and
+# Note that if sources have been installed by installsrc (only run as part of buildit or
+# submitproject for Apple platforms, not for Windows/Linux), then
+#    $(SRCROOT)/installsrcNotRunFlag is not present, and
 #    ADJUST_SOURCES has already have been run.
-# Otherwise, if we are doing a local build (e.g. make check, make install), then
-#    $(SRCROOT)/.git is present, and
+# Otherwise, if we are doing a local build (e.g. make check, make install), or if
+# sources were submitted using submitproject for non-Apple platforms (Windows/Linux) then
+#    $(SRCROOT)/installsrcNotRunFlag is present, and
 #    ADJUST_SOURCES has not been run (run it after copying sources to OBJROOT_CURRENT)
 #
 
@@ -1048,7 +1099,7 @@ ADJUST_SOURCES = \
 icu debug profile : $(OBJROOT_CURRENT)/Makefile
        echo "# make for target";
        (cd $(OBJROOT_CURRENT); \
-               $(MAKE) $($(ENV_$@)); \
+               $(MAKE) $($(ENV_$@)) || exit 1; \
                if test "$(WINDOWS)" = "YES"; then \
                        (cd common; \
                                rc.exe /folibicuuc.res $(CPPFLAGS) -DU_RELEASE=1 -D_CRT_SECURE_NO_DEPRECATE -I. -I../i18n \
@@ -1095,39 +1146,6 @@ icu debug profile : $(OBJROOT_CURRENT)/Makefile
                                        fi; \
                                        mt.exe -nologo -manifest ../lib/libicuin.dll.manifest -outputresource:"../lib/libicuin.dll;2"; \
                                ); \
-                               if test "$(ARCH64)" != "YES"; then \
-                                       mkdir -p lib/shim; \
-                                       (cd common; \
-                                               rm -f icuuc40shim.o; \
-                                               rm -f ../lib/icuuc40.dll.manifest; \
-                                               cl -DU_DISABLE_RENAMING=1 -DU_ICU_VERSION_BUILDLEVEL_NUM=$(ICU_BUILD) \
-                                                       -DU_RELEASE=1 -D_CRT_SECURE_NO_DEPRECATE -I. -I../i18n \
-                                                       -DU_LOCAL_SERVICE_HOOK=1 -DWIN32 -DU_COMMON_IMPLEMENTATION \
-                                                       /O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /Zc:wchar_t \
-                                                       /c /Foicuuc40shim.o icuuc40shim.cpp; \
-                                               rc.exe /foicuuc40shim.res $(CPPFLAGS) -DU_RELEASE=1 -D_CRT_SECURE_NO_DEPRECATE -I. -I../i18n \
-                                                       "-DDEFAULT_ICU_PLUGINS=\"/AppleInternal/lib/icu\" " -DU_LOCAL_SERVICE_HOOK=1 icuuc40shim.rc; \
-                                               LINK.EXE /DLL /NXCOMPAT /SAFESEH /DYNAMICBASE /DEBUG /OPT:REF /MANIFEST \
-                                                       /IMPLIB:../lib/shim/icuuc.lib /out:../lib/icuuc40.dll \
-                                                       icuuc40shim.o icuuc40shim.res ../lib/libicuuc.lib ../stubdata/icudt.lib advapi32.lib; \
-                                               mt.exe -nologo -manifest ../lib/icuuc40.dll.manifest -outputresource:"../lib/icuuc40.dll;2"; \
-                                       ); \
-                                       (cd i18n; \
-                                               rm -f icuin40shim.o; \
-                                               rm -f ../lib/icuin40.dll.manifest; \
-                                               cl -DU_DISABLE_RENAMING=1 -DU_ICU_VERSION_BUILDLEVEL_NUM=$(ICU_BUILD) \
-                                                       -DU_RELEASE=1 -D_CRT_SECURE_NO_DEPRECATE -I. -I../common \
-                                                       -DU_LOCAL_SERVICE_HOOK=1 -DWIN32 -DU_I18N_IMPLEMENTATION \
-                                                       /O2 /Ob2 /MD /GF /GS /Zi /nologo /D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES /EHsc /Zc:wchar_t \
-                                                       /c /Foicuin40shim.o icuin40shim.cpp; \
-                                               rc.exe /foicuin40shim.res $(CPPFLAGS) -DU_RELEASE=1 -D_CRT_SECURE_NO_DEPRECATE -I. -I../common \
-                                                       "-DDEFAULT_ICU_PLUGINS=\"/AppleInternal/lib/icu\" " -DU_LOCAL_SERVICE_HOOK=1 icuin40shim.rc; \
-                                               LINK.EXE /DLL /NXCOMPAT /SAFESEH /DYNAMICBASE /DEBUG /OPT:REF /MANIFEST \
-                                                       /IMPLIB:../lib/shim/icuin.lib /out:../lib/icuin40.dll \
-                                                       icuin40shim.o icuin40shim.res ../lib/libicuin.lib ../stubdata/icudt.lib advapi32.lib; \
-                                               mt.exe -nologo -manifest ../lib/icuin40.dll.manifest -outputresource:"../lib/icuin40.dll;2"; \
-                                       ); \
-                               fi; \
                        fi; \
                else \
                        if test "$(LINUX)" = "YES"; then \
@@ -1145,14 +1163,17 @@ icu debug profile : $(OBJROOT_CURRENT)/Makefile
                        else \
                                tmpfile=`mktemp -t weakexternal.XXXXXX` || exit 1; \
                                $(NM) -m $(RC_ARCHS:%=-arch %) $(DYLIB_OBJS) | fgrep "weak external" | fgrep -v "undefined" | sed -e 's/.*weak external[^_]*//' | sort | uniq | cat >$$tmpfile; \
+                               if test ! "$(ICU_FOR_EMBEDDED_TRAINS)" = "YES"; then \
+                                       ZIPPERING_LDFLAGS=-Wl,-iosmac_version_min,12.0; \
+                               fi; \
                                $($(ENV_$@)) $(CXX) -current_version $(ICU_VERS).$(ICU_SUBVERS) -compatibility_version 1 -dynamiclib -dynamic \
                                        $(RC_ARCHS:%=-arch %) $(ICU_TARGET_VERSION) -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG) \
-                                       $(CXXFLAGS) $(LDFLAGS) -single_module $(SECTORDER_FLAGS) -unexported_symbols_list $$tmpfile -dead_strip \
+                                       $(CXXFLAGS) $(LDFLAGS) $$ZIPPERING_LDFLAGS -single_module $(SECTORDER_FLAGS) -unexported_symbols_list $$tmpfile -dead_strip \
                                        -install_name $(libdir)$($(INSTALLED_DYLIB_$@)) -o ./$($(INSTALLED_DYLIB_$@)) $(DYLIB_OBJS); \
                                if test "$@" = "icu"; then \
                                        ln -fs  $(INSTALLED_DYLIB) $(DYLIB); \
                                        echo '# build' $(INFOTOOL) 'linked against' $(LIB_NAME) ; \
-                                       $($(ENV_$@)) $(CXX) $(RC_ARCHS:%=-arch %) -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG) \
+                                       $($(ENV_$@)) $(CXX) --std=c++11 $(RC_ARCHS:%=-arch %) -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) $(THUMB_FLAG) \
                                                $(LDFLAGS) -dead_strip -o ./$(INFOTOOL) $(INFOTOOL_OBJS) -L./ -l$(LIB_NAME) ; \
                                        echo '# build' $(TOOLS_DYLIB) 'linked against' $(LIB_NAME) ; \
                                        $($(ENV_$@)) $(CXX) -current_version $(ICU_VERS).$(ICU_SUBVERS) -compatibility_version 1 -dynamiclib -dynamic \
@@ -1160,7 +1181,7 @@ icu debug profile : $(OBJROOT_CURRENT)/Makefile
                                                $(CXXFLAGS) $(LDFLAGS) -single_module \
                                                -install_name $(locallibdir)$(TOOLS_DYLIB) -o ./$(TOOLS_DYLIB) $(TOOLS_DYLIB_OBJS) -L./ -l$(LIB_NAME) ; \
                                        echo '# build' $(ICUZDUMPTOOL) 'linked against' $(TOOLSLIB_NAME) $(LIB_NAME) ; \
-                                       $($(ENV_$@)) $(LINK.cc) $(RC_ARCHS:%=-arch %) -g -Os $(ISYSROOT) $(THUMB_FLAG) --std=c++0x \
+                                       $($(ENV_$@)) $(LINK.cc) $(RC_ARCHS:%=-arch %) -g -Os $(ISYSROOT) $(THUMB_FLAG) --std=c++11 \
                                                -dead_strip -o ./$(ICUZDUMPTOOL) $(ICUZDUMPTOOL_OBJS) -L./ -l$(TOOLSLIB_NAME) -l$(LIB_NAME); \
                                fi; \
                        fi; \
@@ -1180,7 +1201,7 @@ icu debug profile : $(OBJROOT_CURRENT)/Makefile
 crossbuildhost : $(CROSSHOST_OBJROOT)/Makefile
        echo "# make for crossbuild host";
        (cd $(CROSSHOST_OBJROOT); \
-               $(MAKE) $($(ENV_BUILDHOST)); \
+               $(MAKE) $($(ENV_BUILDHOST)) || exit 1; \
        );
 
 # For the install-icutztoolsforsdk target, SDKROOT will always be an OSX SDK root.
@@ -1190,27 +1211,27 @@ crossbuildhost : $(CROSSHOST_OBJROOT)/Makefile
 icutztoolsforsdk : $(OBJROOT_CURRENT)/Makefile
        echo "# make icutztoolsforsdk";
        (cd $(OBJROOT_CURRENT); \
-               if test ! -d $(SRCROOT)/.git ; then patch -N -p1 <$(SRCROOT)/crosshostpatchconfig.txt; fi; \
-               $(MAKE) $($(ENV)); \
+               if test ! -e $(SRCROOT)/installsrcNotRunFlag ; then patch -N -p1 <$(SRCROOT)/crosshostpatchconfig.txt; fi; \
+               $(MAKE) $($(ENV)) || exit 1; \
                echo '# build' $(TOOLS_DYLIB_FORTOOLS) 'linked against' $(LIB_NAME) ; \
                $($(ENV)) $(CXX) -current_version $(ICU_VERS).$(ICU_SUBVERS) -compatibility_version 1 -dynamiclib -dynamic \
                        -g -Os -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden $(ISYSROOT) \
                        $(CXXFLAGS) $(LDFLAGS) -single_module \
                        -install_name $(locallibdir)$(TOOLS_DYLIB_FORTOOLS) -o ./$(TOOLS_DYLIB_FORTOOLS) $(TOOLS_DYLIB_OBJS_FORTOOLS) -L./ -l$(LIB_NAME) ; \
                echo '# build' $(ZICTOOL) 'linked against' $(TOOLSLIB_NAME_FORTOOLS) ; \
-               $($(ENV_BUILDHOST)) $(CXX) -g -Os -isysroot $(HOSTSDKPATH) \
+               $($(ENV_BUILDHOST)) $(CXX) --std=c++11 -g -Os -isysroot $(HOSTSDKPATH) \
                        $(LDFLAGS) -dead_strip -o ./$(ZICTOOL) $(ZICTOOL_OBJS) -L./ -l$(TOOLSLIB_NAME_FORTOOLS) ; \
                echo '# build' $(RESTOOL) 'linked against' $(TOOLSLIB_NAME_FORTOOLS) $(LIB_NAME) ; \
-               $($(ENV_BUILDHOST)) $(CXX) -g -Os -isysroot $(HOSTSDKPATH) \
+               $($(ENV_BUILDHOST)) $(CXX) --std=c++11 -g -Os -isysroot $(HOSTSDKPATH) \
                        $(LDFLAGS) -dead_strip -o ./$(RESTOOL) $(RESTOOL_OBJS) -L./ -l$(TOOLSLIB_NAME_FORTOOLS) -l$(LIB_NAME) ; \
                echo '# build' $(PKGTOOL) 'linked against' $(TOOLSLIB_NAME_FORTOOLS) ; \
-               $($(ENV_BUILDHOST)) $(CXX) -g -Os -isysroot $(HOSTSDKPATH) \
+               $($(ENV_BUILDHOST)) $(CXX) --std=c++11 -g -Os -isysroot $(HOSTSDKPATH) \
                        $(LDFLAGS) -dead_strip -o ./$(PKGTOOL) $(PKGTOOL_OBJS) -L./ -l$(TOOLSLIB_NAME_FORTOOLS) ; \
                echo '# build' $(TZ2ICUTOOL) 'linked against' $(TOOLSLIB_NAME_FORTOOLS) ; \
-               $($(ENV_BUILDHOST)) $(CXX) -g -Os -isysroot $(HOSTSDKPATH) \
+               $($(ENV_BUILDHOST)) $(CXX) --std=c++11 -g -Os -isysroot $(HOSTSDKPATH) \
                        $(LDFLAGS) -dead_strip -o ./$(TZ2ICUTOOL) $(TZ2ICUTOOL_OBJS) -L./ -l$(TOOLSLIB_NAME_FORTOOLS) ; \
                echo '# build' $(GENBRKTOOL) 'linked against' $(TOOLSLIB_NAME_FORTOOLS) ; \
-               $($(ENV_BUILDHOST)) $(CXX) -g -Os -isysroot $(HOSTSDKPATH) \
+               $($(ENV_BUILDHOST)) $(CXX) --std=c++11 -g -Os -isysroot $(HOSTSDKPATH) \
                        $(LDFLAGS) -dead_strip -o ./$(GENBRKTOOL) $(GENBRKTOOL_OBJS) -L./ -l$(TOOLSLIB_NAME_FORTOOLS) ; \
        );
 
@@ -1252,7 +1273,12 @@ endif
        fi;
        cp -Rpf $(SRCROOT)/icuSources/* $(OBJROOT_CURRENT)/;
        (cd $(OBJROOT_CURRENT); \
-               if test -d $(SRCROOT)/.git ; then $(ADJUST_SOURCES); fi; \
+               if test -e $(SRCROOT)/installsrcNotRunFlag ; then $(ADJUST_SOURCES); fi; \
+               if test -f $(TZAUXFILESDIR)/metaZones.txt ; then cp -p $(TZAUXFILESDIR)/metaZones.txt data/misc/; fi; \
+               if test -f $(TZAUXFILESDIR)/timezoneTypes.txt ; then cp -p $(TZAUXFILESDIR)/timezoneTypes.txt data/misc/; fi; \
+               if test -f $(TZAUXFILESDIR)/windowsZones.txt ; then cp -p $(TZAUXFILESDIR)/windowsZones.txt data/misc/; fi; \
+               if test -f $(TZAUXFILESDIR)/icuregions ; then cp -p $(TZAUXFILESDIR)/icuregions tools/tzcode/; fi; \
+               if test -f $(TZAUXFILESDIR)/icuzones ; then cp -p $(TZAUXFILESDIR)/icuzones tools/tzcode/; fi; \
                if test "$(WINDOWS)" = "YES"; then \
                        echo "# configure for target"; \
                        $(ENV_CONFIGURE) ./runConfigureICU Cygwin/MSVC $(CONFIG_FLAGS); \
@@ -1278,7 +1304,12 @@ $(CROSSHOST_OBJROOT)/Makefile :
        fi;
        cp -Rpf $(SRCROOT)/icuSources/* $(CROSSHOST_OBJROOT);
        (cd $(CROSSHOST_OBJROOT); \
-               if test -d $(SRCROOT)/.git; then $(ADJUST_SOURCES); fi; \
+               if test -e $(SRCROOT)/installsrcNotRunFlag; then $(ADJUST_SOURCES); fi; \
+               if test -f $(TZAUXFILESDIR)/metaZones.txt ; then cp -p $(TZAUXFILESDIR)/metaZones.txt data/misc/; fi; \
+               if test -f $(TZAUXFILESDIR)/timezoneTypes.txt ; then cp -p $(TZAUXFILESDIR)/timezoneTypes.txt data/misc/; fi; \
+               if test -f $(TZAUXFILESDIR)/windowsZones.txt ; then cp -p $(TZAUXFILESDIR)/windowsZones.txt data/misc/; fi; \
+               if test -f $(TZAUXFILESDIR)/icuregions ; then cp -p $(TZAUXFILESDIR)/icuregions tools/tzcode/; fi; \
+               if test -f $(TZAUXFILESDIR)/icuzones ; then cp -p $(TZAUXFILESDIR)/icuzones tools/tzcode/; fi; \
                if test "$(ICU_FOR_EMBEDDED_TRAINS)" = "YES"; then \
                        patch -p1 <$(SRCROOT)/crosshostpatchconfig.txt; \
                fi; \
@@ -1292,13 +1323,13 @@ $(CROSSHOST_OBJROOT)/Makefile :
 
 # Since our sources are in icuSources (ignore the ICU subdirectory for now), we wish to
 # copy them to somewhere else. We tar it to stdout, cd to the appropriate directory, and
-# untar from stdin.  We then look for all the CVS directories and remove them. We may have
-# to remove the .cvsignore files also.
+# untar from stdin.
+# Do NOT include installsrcNotRunFlag in the list of files to tar up, that defeats the purpose.
 
 installsrc :
        if test ! -d $(SRCROOT); then mkdir $(SRCROOT); fi;
        if test -d $(SRCROOT)/icuSources ; then rm -rf $(SRCROOT)/icuSources; fi;
-       tar cf - ./makefile ./ICU.plist ./LICENSE ./icuSources ./cldrFiles $(INSTALLSRC_VARFILES) | (cd $(SRCROOT) ; tar xfp -); \
+       tar cf - ./makefile ./ICU.plist ./LICENSE ./icuSources ./cldrFiles ./emojiData ./modules $(INSTALLSRC_VARFILES) | (cd $(SRCROOT) ; tar xfp -); \
        (cd $(SRCROOT)/icuSources; $(ADJUST_SOURCES) );
 
 # This works. Just not for ~ in the DSTROOT. We run configure first (in case it hasn't
@@ -1315,12 +1346,14 @@ endif
 MKINSTALLDIRS=$(SHELL) $(SRCROOT)/icuSources/mkinstalldirs
 INSTALL_DATA=${INSTALL} -m 644
 
-ifeq "$(RC_XBS)" "YES"
-installhdrsint :
-else
+ifneq "$(ICU_FOR_APPLE_PLATFORMS)" "YES"
+installhdrsint : $(OBJROOT_CURRENT)/Makefile
+else ifneq "$(RC_XBS)" "YES"
 installhdrsint : $(OBJROOT_CURRENT)/Makefile
+else
+installhdrsint :
 endif
-       (if test -d $(SRCROOT)/.git; then cd $(OBJROOT_CURRENT); else cd $(SRCROOT)/icuSources/; fi; \
+       (if test -e $(SRCROOT)/installsrcNotRunFlag; then cd $(OBJROOT_CURRENT); else cd $(SRCROOT)/icuSources/; fi; \
                $(MKINSTALLDIRS) $(DSTROOT)/$(PRIVATE_HDR_PREFIX)/include/unicode/; \
                for subdir in $(HDR_MAKE_SUBDIR); do \
                        echo "# Subdir $$subdir"; \
@@ -1348,10 +1381,12 @@ endif
                                                -I $(DSTROOT)/$(HDR_PREFIX)/include/ -I $(SDKPATH)/usr/include/ -E > /dev/null ; \
                                fi; \
                        fi; \
-                       if test ! -d $(DSTROOT)/$(CLDRFILESDIR)/; then \
-                               $(INSTALL) -d -m 0755 $(DSTROOT)/$(CLDRFILESDIR)/; \
+                       $(INSTALL_DATA) $(SRCROOT)/modules/embedded/module.modulemap $(DSTROOT)/$(HDR_PREFIX)/include/unicode/ ; \
+                       $(INSTALL_DATA) $(SRCROOT)/modules/embedded/module.private.modulemap $(DSTROOT)/$(PRIVATE_HDR_PREFIX)/include/unicode/ ; \
+               else \
+                       if test "$(ICU_FOR_APPLE_PLATFORMS)" = "YES"; then \
+                               $(INSTALL_DATA) $(SRCROOT)/modules/macos/module.private.modulemap $(DSTROOT)/$(PRIVATE_HDR_PREFIX)/include/unicode/ ; \
                        fi; \
-                       $(INSTALL) -b -m 0644  $(SRCROOT)/cldrFiles/supplementalData.xml $(DSTROOT)/$(CLDRFILESDIR)/supplementalData.xml; \
                fi; \
        );
 
@@ -1375,20 +1410,15 @@ install : installhdrsint icu
                $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/libicuin.pdb $(DSTROOT)/$(winprogdir)libicuin.pdb; \
                $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/lib/libicuin.dll $(DSTROOT)/$(winprogdir)libicuin.dll; \
                $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/lib/icudt$(ICU_VERS).dll $(DSTROOT)/$(winprogdir)icudt$(ICU_VERS).dll; \
-               if test "$(ARCH64)" != "YES"; then \
-                       $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/shim/icuuc.lib $(DSTROOT)/$(winintlibdir)icuuc.lib; \
-                       $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/icuuc40.pdb $(DSTROOT)/$(winprogdir)icuuc40.pdb; \
-                       $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/lib/icuuc40.dll $(DSTROOT)/$(winprogdir)icuuc40.dll; \
-                       $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/shim/icuin.lib $(DSTROOT)/$(winintlibdir)icuin.lib; \
-                       $(INSTALL) -b -m 0644 $(OBJROOT_CURRENT)/lib/icuin40.pdb $(DSTROOT)/$(winprogdir)icuin40.pdb; \
-                       $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/lib/icuin40.dll $(DSTROOT)/$(winprogdir)icuin40.dll; \
-               fi; \
        else \
                if test ! -d $(DSTROOT)/$(libdir)/; then \
                        $(INSTALL) -d -m 0755 $(DSTROOT)/$(libdir)/; \
                fi; \
                $(INSTALL) -b -m 0755 $(OBJROOT_CURRENT)/$(INSTALLED_DYLIB) $(DSTROOT)/$(libdir)$(INSTALLED_DYLIB); \
                if test "$(LINUX)" = "YES"; then \
+                       if test ! -d $(SYMROOT_CURRENT)/; then \
+                               $(INSTALL) -d -m 0755 $(SYMROOT_CURRENT)/; \
+                       fi; \
                        cp $(OBJROOT_CURRENT)/$(INSTALLED_DYLIB) $(SYMROOT_CURRENT)/$(INSTALLED_DYLIB); \
                        strip -x -S $(DSTROOT)/$(libdir)$(INSTALLED_DYLIB); \
                else \
@@ -1418,6 +1448,16 @@ install : installhdrsint icu
                        $(INSTALL) -d -m 0755 $(DSTROOT)/$(OPEN_SOURCE_LICENSES_DIR)/; \
                fi; \
                $(INSTALL) -b -m 0644 $(SRCROOT)/LICENSE $(DSTROOT)/$(OPEN_SOURCE_LICENSES_DIR)ICU.txt; \
+               if test ! -d $(DSTROOT)/$(CLDRFILESDIR)/; then \
+                       $(INSTALL) -d -m 0755 $(DSTROOT)/$(CLDRFILESDIR)/; \
+               fi; \
+               $(INSTALL) -b -m 0644  $(SRCROOT)/cldrFiles/supplementalData.xml $(DSTROOT)/$(CLDRFILESDIR)/supplementalData.xml; \
+               $(INSTALL) -b -m 0644  $(SRCROOT)/cldrFiles/plurals.xml $(DSTROOT)/$(CLDRFILESDIR)/plurals.xml; \
+               if test ! -d $(DSTROOT)/$(EMOJI_DATA_DIR)/; then \
+                       $(INSTALL) -d -m 0755 $(DSTROOT)/$(EMOJI_DATA_DIR)/; \
+               fi; \
+               $(INSTALL) -b -m 0644 $(SRCROOT)/emojiData/charClasses.txt $(DSTROOT)/$(EMOJI_DATA_DIR)/charClasses.txt; \
+               $(INSTALL) -b -m 0644 $(SRCROOT)/emojiData/lineClasses.txt $(DSTROOT)/$(EMOJI_DATA_DIR)/lineClasses.txt; \
                if test "$(LINUX)" != "YES"; then \
                        if test ! -d $(DSTROOT)/$(localtooldir)/; then \
                                $(INSTALL) -d -m 0755 $(DSTROOT)/$(localtooldir)/; \
@@ -1470,6 +1510,9 @@ install_debug install_profile : $$(DEPEND_$$@)
                fi; \
                $(INSTALL) -b -m 0664 $(OBJROOT_CURRENT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))) $(DSTROOT)/$(libdir)$($(INSTALLED_DYLIB_$(DEPEND_$@))); \
                if test "$(LINUX)" = "YES"; then \
+                       if test ! -d $(SYMROOT_CURRENT)/; then \
+                               $(INSTALL) -d -m 0755 $(SYMROOT_CURRENT)/; \
+                       fi; \
                        cp $(OBJROOT_CURRENT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))) $(SYMROOT_CURRENT)/$($(INSTALLED_DYLIB_$(DEPEND_$@))); \
                        strip -x -S $(DSTROOT)/$(libdir)$($(INSTALLED_DYLIB_$(DEPEND_$@))); \
                else \