VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/GNUmakefile@ 100121

Last change on this file since 100121 was 99404, checked in by vboxsync, 20 months ago

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 2.1 KB
Line 
1## @file
2# GNU/Linux makefile for C tools build.
3#
4# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
5#
6# SPDX-License-Identifier: BSD-2-Clause-Patent
7#
8
9ifndef HOST_ARCH
10 #
11 # If HOST_ARCH is not defined, then we use 'uname -m' to attempt
12 # try to figure out the appropriate HOST_ARCH.
13 #
14 uname_m = $(shell uname -m)
15 $(info Attempting to detect HOST_ARCH from 'uname -m': $(uname_m))
16 ifneq (,$(strip $(filter $(uname_m), x86_64 amd64)))
17 HOST_ARCH=X64
18 endif
19 ifeq ($(patsubst i%86,IA32,$(uname_m)),IA32)
20 HOST_ARCH=IA32
21 endif
22 ifneq (,$(findstring aarch64,$(uname_m)))
23 HOST_ARCH=AARCH64
24 else ifneq (,$(findstring arm64,$(uname_m)))
25 HOST_ARCH=AARCH64
26 else ifneq (,$(findstring arm,$(uname_m)))
27 HOST_ARCH=ARM
28 endif
29 ifneq (,$(findstring riscv64,$(uname_m)))
30 HOST_ARCH=RISCV64
31 endif
32 ifneq (,$(findstring loongarch64,$(uname_m)))
33 HOST_ARCH=LOONGARCH64
34 endif
35 ifndef HOST_ARCH
36 $(info Could not detected HOST_ARCH from uname results)
37 $(error HOST_ARCH is not defined!)
38 endif
39 $(info Detected HOST_ARCH of $(HOST_ARCH) using uname.)
40endif
41
42export HOST_ARCH
43
44MAKEROOT = .
45
46include Makefiles/header.makefile
47
48all: makerootdir subdirs
49 @echo Finished building BaseTools C Tools with HOST_ARCH=$(HOST_ARCH)
50
51LIBRARIES = Common
52VFRAUTOGEN = VfrCompile/VfrLexer.h
53APPLICATIONS = \
54 BrotliCompress \
55 VfrCompile \
56 EfiRom \
57 GenFfs \
58 GenFv \
59 GenFw \
60 GenSec \
61 GenCrc32 \
62 LzmaCompress \
63 TianoCompress \
64 VolInfo \
65 DevicePath
66
67SUBDIRS := $(LIBRARIES) $(APPLICATIONS)
68
69$(LIBRARIES): $(MAKEROOT)/libs
70$(APPLICATIONS): $(LIBRARIES) $(MAKEROOT)/bin $(VFRAUTOGEN)
71
72.PHONY: outputdirs
73makerootdir:
74 -mkdir -p $(MAKEROOT)
75
76.PHONY: subdirs $(SUBDIRS)
77subdirs: $(SUBDIRS)
78$(SUBDIRS):
79 $(MAKE) -C $@
80
81.PHONY: $(patsubst %,%-clean,$(sort $(SUBDIRS)))
82$(patsubst %,%-clean,$(sort $(SUBDIRS))):
83 -$(MAKE) -C $(@:-clean=) clean
84
85$(VFRAUTOGEN): VfrCompile/VfrSyntax.g
86 $(MAKE) -C VfrCompile VfrLexer.h
87
88clean: $(patsubst %,%-clean,$(sort $(SUBDIRS)))
89
90clean: localClean
91
92localClean:
93 rm -f $(MAKEROOT)/bin/*
94 -rmdir $(MAKEROOT)/libs $(MAKEROOT)/bin
95
96include Makefiles/footer.makefile
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette