| # |
| # Copyright (c) 2010-2012 Nest Labs, Inc. |
| # All rights reserved. |
| # |
| # This document is the property of Nest. It is considered |
| # confidential and proprietary information. |
| # |
| # This document may not be reproduced or transmitted in any form, |
| # in whole or in part, without the express written permission of |
| # Nest. |
| # |
| # Description: |
| # This file is the host make file for the International |
| # Components for Unicode (ICU) library. |
| # |
| |
| # To cross-compile, ICU needs to be bootstrapped for whatever the |
| # native build host is. In our environment, that's the simulator. At |
| # some point in the future, we should tease apart truly building for |
| # the simulator and just building host-native stuff to support a build |
| # target. |
| |
| #TODO QUESTION what is this? diamondsim // diamond3sim? |
| |
| ifneq ($(BUILD_FEATURE_SIMULATOR),1) |
| override BuildProduct := diamondsim |
| SaveBuildMode := $(BuildMode) |
| override BuildMode := snapshot |
| endif |
| |
| include pre.mak |
| include ./Makefile.common |
| |
| PackageName := icu |
| |
| PackageExtension := tar.gz |
| PackageSeparator := - |
| |
| PackagePatchArgs := -p1 |
| |
| PackageArchive := $(PackageName).$(PackageExtension) |
| PackageSourceDir := $(PackageName) |
| |
| PackageBuildMakefile = $(call GenerateBuildPaths,Makefile) |
| |
| CleanPaths += $(PackageLicenseFile) |
| |
| SOURCEDIRS = $(PackageSourceDir) configs |
| $(PackageSourceDir)_RULE_TARGET = $(BuildDirectory)/configure |
| configs_RULE_TARGET = $(BuildDirectory)/configure |
| |
| all: $(PackageDefaultGoal) |
| |
| # Generate the package license contents. |
| |
| $(PackageSourceDir)/license.html: $(BuildDirectory)/source |
| |
| $(PackageLicenseFile): $(PackageSourceDir)/license.html |
| $(copy-result) |
| |
| # Extract the source from the archive and apply patches, if any. |
| |
| $(PackageSourceDir): $(PackageArchive) $(PackagePatchPaths) |
| $(expand-and-patch-package) |
| |
| # Prepare the sources. |
| |
| $(BuildDirectory)/source: | $(PackageSourceDir) |
| $(Verbose)touch $@ |
| |
| # Patch the sources, if necessary. |
| |
| $(BuildDirectory)/patch: $(BuildDirectory)/source |
| $(Verbose)touch $@ |
| |
| # Generate the package build makefile. |
| |
| # Configure the source for building. |
| |
| $(ICUDataConfMaybeBuildPaths): | $(BuildDirectory) |
| |
| $(BuildDirectory)/configure: $(BuildDirectory)/source $(ICUDataConfMaybeBuildPaths) | $(PackageSourceDir) $(BuildDirectory) $(ResultDirectory) |
| $(Verbose)cd $(BuildDirectory) && \ |
| INSTALL="$(INSTALL) $(INSTALLFLAGS)" \ |
| $(CURDIR)/$(PackageSourceDir)/source/configure \ |
| --prefix=/usr \ |
| --sysconfdir=/etc \ |
| --localstatedir=/var \ |
| --disable-extras \ |
| --disable-icuio \ |
| --disable-layout \ |
| --disable-tests \ |
| --disable-samples |
| $(Verbose)touch $@ |
| |
| # Build the source. |
| # |
| # We have to unset MAKEFLAGS since they confuse the package build otherwise. |
| |
| $(BuildDirectory)/build: $(BuildDirectory)/configure |
| $(Verbose)unset MAKEFLAGS && \ |
| $(MAKE) $(JOBSFLAG) -C $(BuildDirectory) all |
| $(Verbose)touch $@ |
| |
| # Stage the build to a temporary installation area. |
| # |
| # We have to unset MAKEFLAGS since they confuse the package build otherwise. |
| |
| $(BuildDirectory)/stage: $(BuildDirectory)/build | $(ResultDirectory) |
| $(Verbose)unset MAKEFLAGS && \ |
| $(MAKE) $(JOBSFLAG) -C $(BuildDirectory) DESTDIR=$(ResultDirectory) install |
| $(Verbose)touch $@ |
| |
| .PHONY: stage |
| stage: $(BuildDirectory)/stage |
| |
| clean: |
| $(Verbose)$(RM) $(RMFLAGS) -r $(PackageSourceDir) |
| $(Verbose)$(RM) $(RMFLAGS) -r $(BuildDirectory) |
| $(Verbose)$(RM) $(RMFLAGS) -r $(ResultDirectory) |
| |
| include post.mak |
| |
| ifneq ($(BUILD_FEATURE_SIMULATOR),1) |
| override BuildMode := $(SaveBuildMode) |
| endif |