edk2/BaseTools/Source/C/GNUmakefile
Michael D Kinney 12f785f106 Revert "BaseTools: Add support for out-of-tree builds"
This reverts commit 3fe1d56cc9.

PR https://github.com/tianocore/edk2/pull/11757 introduced a
"Breaking Change" feature for out of tree builds of tools.

This breaking change is blocking testing of edk2-stable202602
due to side effects on building FitGen tool in edk2-platforms.

Revert this feature for the edk2-stable202602 release and
work on this feature after the release.

Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2026-02-11 22:53:29 +00:00

65 lines
1.3 KiB
Makefile

## @file
# GNU/Linux makefile for C tools build.
#
# Copyright (c) 2007 - 2025, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
ifeq (Windows, $(findstring Windows,$(OS)))
SHELL := cmd.exe
MAKEROOT := $(shell echo %CD%)
else
MAKEROOT := .
endif
include Makefiles/header.makefile
export PYTHON_COMMAND
export HOST_ARCH
all: makerootdir subdirs
@echo Finished building BaseTools C Tools with HOST_ARCH=$(HOST_ARCH)
LIBRARIES = Common
APPLICATIONS = \
BrotliCompress \
VfrCompile \
EfiRom \
GenFfs \
GenFv \
GenFw \
GenSec \
GenCrc32 \
LzmaCompress \
TianoCompress \
VolInfo \
DevicePath
SUBDIRS := $(LIBRARIES) $(APPLICATIONS)
$(LIBRARIES): $(MAKEROOT)/libs
$(APPLICATIONS): $(LIBRARIES) $(MAKEROOT)/bin
.PHONY: outputdirs
makerootdir:
-$(MD) $(MAKEROOT)
.PHONY: subdirs $(SUBDIRS)
subdirs: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@
.PHONY: $(patsubst %,%-clean,$(sort $(SUBDIRS)))
$(patsubst %,%-clean,$(sort $(SUBDIRS))):
-$(MAKE) -C $(@:-clean=) clean
clean: $(patsubst %,%-clean,$(sort $(SUBDIRS)))
clean: localClean
localClean:
$(RM) $(MAKEROOT)/bin/*
-$(RD) $(MAKEROOT)/libs $(MAKEROOT)/bin
include Makefiles/footer.makefile