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