]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/Source/C/Makefiles/header.makefile
Fix build error.
[mirror_edk2.git] / BaseTools / Source / C / Makefiles / header.makefile
CommitLineData
52302d4d
LG
1## @file\r
2#\r
e56468c0 3# The makefile can be invoked with
4# ARCH = x86_64 or x64 for EM64T build
5# ARCH = ia32 or IA32 for IA32 build
6# ARCH = ia64 or IA64 for IA64 build
7#
40d841f6
LG
8# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
9# This program and the accompanying materials\r
52302d4d
LG
10# are licensed and made available under the terms and conditions of the BSD License\r
11# which accompanies this distribution. The full text of the license may be found at\r
12# http://opensource.org/licenses/bsd-license.php\r
13#\r
14# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
e56468c0 15# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16
17ARCH ?= IA32
18
19CYGWIN:=$(findstring CYGWIN, $(shell uname -s))
20LINUX:=$(findstring Linux, $(shell uname -s))
21DARWIN:=$(findstring Darwin, $(shell uname -s))
22
23CC = gcc
24CXX = g++
25AS = gcc
26AR = ar
27LD = ld
28LINKER ?= $(CC)
29ifeq ($(ARCH), IA32)
30ARCH_INCLUDE = -I $(MAKEROOT)/Include/Ia32/
31endif
32
33ifeq ($(ARCH), X64)
34ARCH_INCLUDE = -I $(MAKEROOT)/Include/X64/
35endif
36
37INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE)
38CPPFLAGS = $(INCLUDE)
39CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fno-merge-constants -nostdlib -Wall -Werror -c -g
40LFLAGS =
41
42#
43# Snow Leopard is a 32-bit and 64-bit environment. uname -m returns -i386, but gcc defaults
44# to x86_64. So make sure tools match uname -m
45#
46uname_s = $(shell uname -s)
47ifeq ($(uname_s),Darwin)
48 CFLAGS += -arch i386
49 CPPFLAGS += -arch i386
50 LFLAGS += -arch i386
51endif
52
53.PHONY: all
54.PHONY: install
55.PHONY: clean
56
57all:
58
59$(MAKEROOT)/libs:
60 mkdir $(MAKEROOT)/libs
61
62$(MAKEROOT)/bin:
63 mkdir $(MAKEROOT)/bin