| # |
| # Copyright (c) 2010-2011 Nest, 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 makefile for the GNU binary utilities |
| # (binutils). |
| # |
| # The following set of packages MUST be a matched set: |
| # |
| # * Target Binary Utilities |
| # * Target GNU C Standard Library |
| # * Target GNU C++ Standard Library |
| # * Target GDB server and client |
| # * Host Cross Binary Utilities |
| # * Host Cross Compilers |
| # * Host Cross GDB client |
| # |
| # These are presumed provided by the tool chain and are simply |
| # sourced from it rather than built anew from source. |
| # |
| |
| include pre.mak |
| |
| # Packages that come from the tool chain (e.g. glibc, libstdc++, |
| # binutils) rather than the project source tree need special |
| # pre-processing so that we pick up the correct make file for the |
| # current tool chain for these packages. |
| # |
| # If the current tool chain supports target-based binutils, then there |
| # should be a binutils-$(ToolVendor)-$(ToolProduct)-$(ToolVersion).mak |
| # make file that places the target-based binutils into the results |
| # directory. |
| |
| ToolPackageName := binutils |
| |
| MakefileSuffix := .mak |
| |
| ToolMakefileTuple := -$(ToolVendor)-$(ToolProduct)-$(ToolVersion) |
| |
| ToolMakefile := $(wildcard $(ToolPackageName)$(ToolMakefileTuple)$(MakefileSuffix)) |
| |
| PackageMakefile := $(if $(ToolMakefile),$(ToolMakefile),$(wildcard $(ToolPackageName)$(MakefileSuffix))) |
| |
| # |
| # Default, empty, targets for tool chains that don't support |
| # target-based binutils. |
| # |
| |
| all: $(PackageDefaultGoal) |
| |
| # Prepare the sources. |
| |
| .PHONY: source |
| source: |
| |
| # Patch the sources, if necessary. |
| |
| .PHONY: patch |
| patch: source |
| |
| # Configure the source for building. |
| |
| .PHONY: configure |
| configure: source |
| |
| # Build the source. |
| |
| .PHONY: build |
| build: configure |
| |
| # Stage the build to a temporary installation area. |
| |
| .PHONY: stage |
| stage: build |
| |
| # Attempt to include the general- or tool chain-specific make file for |
| # this package. |
| |
| ifneq ($(PackageMakefile),) |
| include $(PackageMakefile) |
| endif |
| |
| include post.mak |