]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/Source/C/GNUmakefile
BaseTools/GenFds: Fix 'NoneType' object is not iterable error.
[mirror_edk2.git] / BaseTools / Source / C / GNUmakefile
CommitLineData
f51461c8
LG
1## @file\r
2# GNU/Linux makefile for C tools build.\r
3#\r
4# Copyright (c) 2007 - 2012, 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 ARCH\r
16 #\r
17 # If ARCH is not defined, then we use 'uname -m' to attempt\r
18 # try to figure out the appropriate ARCH.\r
19 #\r
20 uname_m = $(shell uname -m)\r
21 $(info Attempting to detect ARCH from 'uname -m': $(uname_m))\r
e4ac870f 22 ifneq (,$(strip $(filter $(uname_m), x86_64 amd64)))\r
f51461c8
LG
23 ARCH=X64\r
24 endif\r
25 ifeq ($(patsubst i%86,IA32,$(uname_m)),IA32)\r
26 ARCH=IA32\r
27 endif\r
28 ifndef ARCH\r
29 $(info Could not detected ARCH from uname results)\r
30 $(error ARCH is not defined!)\r
31 endif\r
32 $(info Detected ARCH of $(ARCH) using uname.)\r
33endif\r
34\r
35export ARCH\r
36\r
37MAKEROOT = .\r
38\r
39include Makefiles/header.makefile\r
40\r
41all: makerootdir subdirs $(MAKEROOT)/libs\r
42 @echo Finished building BaseTools C Tools with ARCH=$(ARCH)\r
43\r
44LIBRARIES = Common\r
45# NON_BUILDABLE_APPLICATIONS = GenBootSector BootSectImage\r
46APPLICATIONS = \\r
47 GnuGenBootSector \\r
48 BootSectImage \\r
49 EfiLdrImage \\r
50 EfiRom \\r
51 GenFfs \\r
52 GenFv \\r
53 GenFw \\r
54 GenPage \\r
55 GenSec \\r
56 GenCrc32 \\r
57 GenVtf \\r
58 LzmaCompress \\r
59 Split \\r
60 TianoCompress \\r
61 VolInfo \\r
62 VfrCompile\r
63\r
64SUBDIRS := $(LIBRARIES) $(APPLICATIONS)\r
65\r
66.PHONY: outputdirs\r
67makerootdir:\r
68 -mkdir -p $(MAKEROOT)\r
69\r
70.PHONY: subdirs $(SUBDIRS)\r
71subdirs: $(SUBDIRS)\r
72$(SUBDIRS):\r
73 $(MAKE) -C $@\r
74\r
75.PHONY: $(patsubst %,%-clean,$(sort $(SUBDIRS)))\r
76$(patsubst %,%-clean,$(sort $(SUBDIRS))):\r
77 -$(MAKE) -C $(@:-clean=) clean\r
78\r
79clean: $(patsubst %,%-clean,$(sort $(SUBDIRS)))\r
80\r
81clean: localClean\r
82\r
83localClean:\r
84 rm -f $(MAKEROOT)/bin/*\r
85 -rmdir $(MAKEROOT)/libs $(MAKEROOT)/bin\r
86\r
87include Makefiles/footer.makefile\r