michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: STANDALONE_MAKEFILE = 1 michael@0: michael@0: # Ensure that this happens before including rules.mk michael@0: ifdef ENABLE_INTL_API michael@0: ifndef MOZ_NATIVE_ICU michael@0: # Library names: On Windows, ICU uses modified library names for static michael@0: # and debug libraries. michael@0: ifeq ($(OS_ARCH),WINNT) michael@0: ifdef MOZ_DEBUG michael@0: ICU_LIB_SUFFIX=d michael@0: endif michael@0: endif # WINNT michael@0: ifdef MOZ_SHARED_ICU michael@0: ifeq ($(OS_ARCH),WINNT) michael@0: ifdef JS_SHARED_LIBRARY michael@0: ICU_FILES := $(foreach libname,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(libname)$(ICU_LIB_SUFFIX)$(MOZ_ICU_VERSION).dll) michael@0: endif michael@0: else # ! WINNT michael@0: ifeq ($(OS_ARCH),Darwin) michael@0: ifdef JS_SHARED_LIBRARY michael@0: ICU_FILES := $(foreach libname,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(DLL_PREFIX)$(libname).$(MOZ_ICU_VERSION)$(DLL_SUFFIX)) michael@0: endif michael@0: else # ! Darwin michael@0: ifdef JS_SHARED_LIBRARY michael@0: ICU_FILES := $(foreach libname,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(DLL_PREFIX)$(libname)$(DLL_SUFFIX).$(MOZ_ICU_VERSION)) michael@0: endif michael@0: endif michael@0: endif # WINNT michael@0: ifdef ICU_FILES michael@0: ICU_DEST := $(DIST)/bin michael@0: INSTALL_TARGETS += ICU michael@0: $(ICU_FILES): buildicu michael@0: ICU_TARGET := default michael@0: endif michael@0: else # !MOZ_SHARED_ICU michael@0: ifeq ($(OS_ARCH),WINNT) michael@0: ICU_LIB_RENAME = $(foreach libname,$(ICU_LIB_NAMES),\ michael@0: cp -p $(DEPTH)/intl/icu/target/lib/s$(libname)$(ICU_LIB_SUFFIX).lib $(DEPTH)/intl/icu/target/lib/$(libname).lib;) michael@0: endif michael@0: endif # MOZ_SHARED_ICU michael@0: endif # !MOZ_NATIVE_ICU michael@0: endif # ENABLE_INTL_API michael@0: michael@0: include $(topsrcdir)/config/rules.mk michael@0: michael@0: ifdef ENABLE_INTL_API michael@0: ifndef MOZ_NATIVE_ICU michael@0: ifdef .PYMAKE michael@0: ICU_MAKE = $(GMAKE) michael@0: else michael@0: ICU_MAKE = $(MAKE) michael@0: endif michael@0: michael@0: default:: buildicu michael@0: michael@0: # - ICU requires GNU make according to its readme.html. pymake can't be used michael@0: # because it doesn't support order only dependencies. michael@0: # - Force ICU to use the standard suffix for object files because expandlibs michael@0: # will discard all files with a non-standard suffix (bug 857450). michael@0: # - Options for genrb: -k strict parsing; -R omit collation tailoring rules. michael@0: buildicu:: michael@0: # ICU's build system is full of races, so force non-parallel build. michael@0: ifdef CROSS_COMPILE michael@0: +$(ICU_MAKE) -j1 -C host STATIC_O=$(OBJ_SUFFIX) GENRBOPTS='-k -R -C' michael@0: endif michael@0: +$(ICU_MAKE) -j1 -C target STATIC_O=$(OBJ_SUFFIX) GENRBOPTS='-k -R' michael@0: $(ICU_LIB_RENAME) michael@0: michael@0: distclean clean:: michael@0: ifdef CROSS_COMPILE michael@0: +$(ICU_MAKE) -C host $@ STATIC_O=$(OBJ_SUFFIX) michael@0: endif michael@0: +$(ICU_MAKE) -C target $@ STATIC_O=$(OBJ_SUFFIX) michael@0: michael@0: endif michael@0: endif