2014-01-20 04:13:06 +04:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
|
|
|
# Ensure that this happens before including rules.mk
|
2014-10-10 10:55:00 +04:00
|
|
|
ifdef USE_ICU
|
2014-01-20 04:13:06 +04:00
|
|
|
ifndef MOZ_NATIVE_ICU
|
|
|
|
# Library names: On Windows, ICU uses modified library names for static
|
|
|
|
# and debug libraries.
|
|
|
|
ifdef MOZ_SHARED_ICU
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
2014-10-18 08:09:25 +04:00
|
|
|
ICU_FILES := $(foreach libname,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(libname)$(MOZ_ICU_DBG_SUFFIX)$(MOZ_ICU_VERSION).dll)
|
2014-01-20 04:13:06 +04:00
|
|
|
else # ! WINNT
|
|
|
|
ifeq ($(OS_ARCH),Darwin)
|
2014-10-18 08:09:25 +04:00
|
|
|
ICU_FILES := $(foreach libname,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(DLL_PREFIX)$(libname).$(MOZ_ICU_VERSION)$(DLL_SUFFIX))
|
2014-01-20 04:13:06 +04:00
|
|
|
else # ! Darwin
|
2014-10-18 08:09:25 +04:00
|
|
|
ICU_FILES := $(foreach libname,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(DLL_PREFIX)$(libname)$(DLL_SUFFIX).$(MOZ_ICU_VERSION))
|
2014-01-20 04:13:06 +04:00
|
|
|
endif
|
|
|
|
endif # WINNT
|
|
|
|
ifdef ICU_FILES
|
|
|
|
ICU_DEST := $(DIST)/bin
|
|
|
|
INSTALL_TARGETS += ICU
|
|
|
|
$(ICU_FILES): buildicu
|
2014-08-06 21:58:52 +04:00
|
|
|
ICU_TARGET := target
|
2014-01-20 04:13:06 +04:00
|
|
|
endif
|
|
|
|
else # !MOZ_SHARED_ICU
|
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
ICU_LIB_RENAME = $(foreach libname,$(ICU_LIB_NAMES),\
|
2014-06-12 01:55:55 +04:00
|
|
|
cp -p $(DEPTH)/intl/icu/target/lib/s$(libname)$(MOZ_ICU_DBG_SUFFIX).lib $(DEPTH)/intl/icu/target/lib/$(libname)$(MOZ_ICU_DBG_SUFFIX).lib;)
|
2014-01-20 04:13:06 +04:00
|
|
|
endif
|
|
|
|
endif # MOZ_SHARED_ICU
|
|
|
|
endif # !MOZ_NATIVE_ICU
|
2014-10-10 10:55:00 +04:00
|
|
|
endif # USE_ICU
|
2014-01-20 04:13:06 +04:00
|
|
|
|
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
2014-10-10 10:55:00 +04:00
|
|
|
ifdef USE_ICU
|
2014-01-20 04:13:06 +04:00
|
|
|
ifndef MOZ_NATIVE_ICU
|
2014-08-06 21:58:52 +04:00
|
|
|
target:: buildicu
|
2014-08-07 09:21:03 +04:00
|
|
|
$(STATIC_LIBS): buildicu
|
2014-01-20 04:13:06 +04:00
|
|
|
|
|
|
|
# - Force ICU to use the standard suffix for object files because expandlibs
|
|
|
|
# will discard all files with a non-standard suffix (bug 857450).
|
|
|
|
# - Options for genrb: -k strict parsing; -R omit collation tailoring rules.
|
|
|
|
buildicu::
|
|
|
|
# ICU's build system is full of races, so force non-parallel build.
|
2014-07-08 02:30:33 +04:00
|
|
|
# Msys screws up GENRBOPTS when it contains spaces, so all genrb flags need
|
|
|
|
# to be stuck together. See https://bugzilla.mozilla.org/show_bug.cgi?id=1034594#c34
|
2014-01-20 04:13:06 +04:00
|
|
|
ifdef CROSS_COMPILE
|
2015-10-14 03:48:55 +03:00
|
|
|
+ASAN_OPTIONS=detect_leaks=0 $(MAKE) -j1 -C $(DEPTH)/intl/icu/host STATIC_O=$(OBJ_SUFFIX) GENRBOPTS='-kRC'
|
2014-01-20 04:13:06 +04:00
|
|
|
endif
|
2015-10-14 03:48:55 +03:00
|
|
|
+ASAN_OPTIONS=detect_leaks=0 $(MAKE) -j1 -C $(DEPTH)/intl/icu/target STATIC_O=$(OBJ_SUFFIX) GENRBOPTS='-kR'
|
2014-01-20 04:13:06 +04:00
|
|
|
$(ICU_LIB_RENAME)
|
|
|
|
|
|
|
|
distclean clean::
|
|
|
|
ifdef CROSS_COMPILE
|
2014-08-06 21:58:52 +04:00
|
|
|
+$(MAKE) -C $(DEPTH)/intl/icu/host $@ STATIC_O=$(OBJ_SUFFIX)
|
2014-01-20 04:13:06 +04:00
|
|
|
endif
|
2014-08-06 21:58:52 +04:00
|
|
|
+$(MAKE) -C $(DEPTH)/intl/icu/target $@ STATIC_O=$(OBJ_SUFFIX)
|
2014-01-20 04:13:06 +04:00
|
|
|
|
|
|
|
endif
|
|
|
|
endif
|