4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync## @file
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# GNU Make makefile for C tools build.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# This program and the accompanying materials
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# are licensed and made available under the terms and conditions of the BSD License
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# which accompanies this distribution. The full text of the license may be found at
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# http://opensource.org/licenses/bsd-license.php
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncifndef ARCH
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync # If ARCH is not defined, then we use 'uname -m' to attempt
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync # try to figure out the appropriate ARCH.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync uname_m = $(shell uname -m)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync $(info Attempting to detect ARCH from 'uname -m': $(uname_m))
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ifeq ($(uname_m),x86_64)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ARCH=X64
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync endif
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ifeq ($(patsubst i%86,IA32,$(uname_m)),IA32)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ARCH=IA32
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync endif
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ifndef ARCH
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync $(info Could not detected ARCH from uname results)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync $(error ARCH is not defined!)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync endif
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync $(info Detected ARCH of $(ARCH) using uname.)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncendif
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncexport ARCH
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncMAKEROOT = .
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncinclude Makefiles/header.makefile
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncall: makerootdir subdirs $(MAKEROOT)/libs
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @echo Finished building BaseTools C Tools with ARCH=$(ARCH)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncLIBRARIES = Common
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# NON_BUILDABLE_APPLICATIONS = GenBootSector BootSectImage
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncAPPLICATIONS = \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync GnuGenBootSector \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync BootSectImage \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync EfiLdrImage \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync EfiRom \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync GenFfs \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync GenFv \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync GenFw \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync GenPage \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync GenSec \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync GenCrc32 \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync GenVtf \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync LzmaCompress \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Split \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync TianoCompress \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync VolInfo \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync VfrCompile
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncSUBDIRS := $(LIBRARIES) $(APPLICATIONS)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync.PHONY: outputdirs
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncmakerootdir:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync -mkdir -p $(MAKEROOT)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync.PHONY: subdirs $(SUBDIRS)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncsubdirs: $(SUBDIRS)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync$(SUBDIRS):
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync $(MAKE) -C $@
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync.PHONY: $(patsubst %,%-clean,$(sort $(SUBDIRS)))
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync$(patsubst %,%-clean,$(sort $(SUBDIRS))):
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync -$(MAKE) -C $(@:-clean=) clean
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncclean: $(patsubst %,%-clean,$(sort $(SUBDIRS)))
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncclean: localClean
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynclocalClean:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync rm -f $(MAKEROOT)/bin/*
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync -rmdir $(MAKEROOT)/libs $(MAKEROOT)/bin
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncinclude Makefiles/footer.makefile