]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - BaseTools/Source/C/GNUmakefile
BaseTools: Enable structure pcd in FDF file
[mirror_edk2.git] / BaseTools / Source / C / GNUmakefile
... / ...
CommitLineData
1## @file\r
2# GNU/Linux makefile for C tools build.\r
3#\r
4# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
5#\r
6# This program and the accompanying materials\r
7# are licensed and made available under the terms and conditions of the BSD License\r
8# which accompanies this distribution. The full text of the license may be found at\r
9# http://opensource.org/licenses/bsd-license.php\r
10#\r
11# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13#\r
14\r
15ifndef HOST_ARCH\r
16 #\r
17 # If HOST_ARCH is not defined, then we use 'uname -m' to attempt\r
18 # try to figure out the appropriate HOST_ARCH.\r
19 #\r
20 uname_m = $(shell uname -m)\r
21 $(info Attempting to detect HOST_ARCH from 'uname -m': $(uname_m))\r
22 ifneq (,$(strip $(filter $(uname_m), x86_64 amd64)))\r
23 HOST_ARCH=X64\r
24 endif\r
25 ifeq ($(patsubst i%86,IA32,$(uname_m)),IA32)\r
26 HOST_ARCH=IA32\r
27 endif\r
28 ifneq (,$(findstring aarch64,$(uname_m)))\r
29 HOST_ARCH=AARCH64\r
30 endif\r
31 ifneq (,$(findstring arm,$(uname_m)))\r
32 HOST_ARCH=ARM\r
33 endif\r
34 ifndef HOST_ARCH\r
35 $(info Could not detected HOST_ARCH from uname results)\r
36 $(error HOST_ARCH is not defined!)\r
37 endif\r
38 $(info Detected HOST_ARCH of $(HOST_ARCH) using uname.)\r
39endif\r
40\r
41export HOST_ARCH\r
42\r
43MAKEROOT = .\r
44\r
45include Makefiles/header.makefile\r
46\r
47all: makerootdir subdirs\r
48 @echo Finished building BaseTools C Tools with HOST_ARCH=$(HOST_ARCH)\r
49\r
50LIBRARIES = Common\r
51VFRAUTOGEN = VfrCompile/VfrLexer.h\r
52# NON_BUILDABLE_APPLICATIONS = GenBootSector BootSectImage\r
53APPLICATIONS = \\r
54 BrotliCompress \\r
55 VfrCompile \\r
56 GnuGenBootSector \\r
57 BootSectImage \\r
58 EfiLdrImage \\r
59 EfiRom \\r
60 GenFfs \\r
61 GenFv \\r
62 GenFw \\r
63 GenPage \\r
64 GenSec \\r
65 GenCrc32 \\r
66 GenVtf \\r
67 LzmaCompress \\r
68 Split \\r
69 TianoCompress \\r
70 VolInfo \\r
71 DevicePath\r
72\r
73SUBDIRS := $(LIBRARIES) $(APPLICATIONS)\r
74\r
75$(LIBRARIES): $(MAKEROOT)/libs\r
76$(APPLICATIONS): $(LIBRARIES) $(MAKEROOT)/bin $(VFRAUTOGEN)\r
77\r
78.PHONY: outputdirs\r
79makerootdir:\r
80 -mkdir -p $(MAKEROOT)\r
81\r
82.PHONY: subdirs $(SUBDIRS)\r
83subdirs: $(SUBDIRS)\r
84$(SUBDIRS):\r
85 $(MAKE) -C $@\r
86\r
87.PHONY: $(patsubst %,%-clean,$(sort $(SUBDIRS)))\r
88$(patsubst %,%-clean,$(sort $(SUBDIRS))):\r
89 -$(MAKE) -C $(@:-clean=) clean\r
90\r
91$(VFRAUTOGEN): VfrCompile/VfrSyntax.g \r
92 $(MAKE) -C VfrCompile VfrLexer.h\r
93\r
94clean: $(patsubst %,%-clean,$(sort $(SUBDIRS)))\r
95\r
96clean: localClean\r
97\r
98localClean:\r
99 rm -f $(MAKEROOT)/bin/*\r
100 -rmdir $(MAKEROOT)/libs $(MAKEROOT)/bin\r
101\r
102include Makefiles/footer.makefile\r