]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/Source/C/Makefiles/header.makefile
Sync EDKII BaseTools to BaseTools project r2093.
[mirror_edk2.git] / BaseTools / Source / C / Makefiles / header.makefile
CommitLineData
52302d4d
LG
1## @file\r
2#\r
6780eef1
LG
3# The makefile can be invoked with\r
4# ARCH = x86_64 or x64 for EM64T build\r
5# ARCH = ia32 or IA32 for IA32 build\r
6# ARCH = ia64 or IA64 for IA64 build\r
7#\r
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
6780eef1
LG
15# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
16\r
17ARCH ?= IA32\r
18\r
19CYGWIN:=$(findstring CYGWIN, $(shell uname -s))\r
20LINUX:=$(findstring Linux, $(shell uname -s))\r
21DARWIN:=$(findstring Darwin, $(shell uname -s))\r
22\r
23CC = gcc\r
24CXX = g++\r
25AS = gcc\r
26AR = ar\r
27LD = ld\r
28LINKER ?= $(CC)\r
29ifeq ($(ARCH), IA32)\r
30ARCH_INCLUDE = -I $(MAKEROOT)/Include/Ia32/\r
31endif\r
32\r
33ifeq ($(ARCH), X64)\r
34ARCH_INCLUDE = -I $(MAKEROOT)/Include/X64/\r
35endif\r
36\r
37INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE) \r
38CPPFLAGS = $(INCLUDE)\r
39CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fno-merge-constants -nostdlib -Wall -Werror -c -g\r
40LFLAGS =\r
41\r
42ifeq ($(ARCH), IA32)\r
43#\r
44# Snow Leopard is a 32-bit and 64-bit environment. uname -m returns i386, but gcc defaults \r
45# to x86_64. So make sure tools match uname -m. You can manual have a 64-bit kernal on Snow Leopard\r
46# so only do this is uname -m returns i386.\r
47#\r
48uname_s = $(shell uname -s)\r
49ifeq ($(uname_s),Darwin)\r
50 CFLAGS += -arch i386\r
51 CPPFLAGS += -arch i386\r
52 LFLAGS += -arch i386\r
53endif\r
54endif\r
55\r
56 \r
57.PHONY: all\r
58.PHONY: install\r
59.PHONY: clean\r
60\r
61all:\r
62\r
63$(MAKEROOT)/libs:\r
64 mkdir $(MAKEROOT)/libs \r
65\r
66$(MAKEROOT)/bin:\r
67 mkdir $(MAKEROOT)/bin\r