]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/Source/C/Makefiles/header.makefile
Fill AtaDeviceHeader field in ATA command block
[mirror_edk2.git] / BaseTools / Source / C / Makefiles / header.makefile
CommitLineData
52302d4d
LG
1## @file\r
2#\r
95ac6ef6 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
95ac6ef6 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
42#\r
43# Snow Leopard is a 32-bit and 64-bit environment. uname -m returns -i386, but gcc defaults \r
44# to x86_64. So make sure tools match uname -m\r
45#\r
46uname_s = $(shell uname -s)\r
47uname_m = $(shell uname -m)\r
48ifeq ($(uname_s),Darwin)\r
49ifeq ($(uname_m),i386)\r
50 CFLAGS += -arch i386\r
51 CPPFLAGS += -arch i386\r
52 LFLAGS += -arch i386\r
53endif\r
54endif\r
55 \r
56.PHONY: all\r
57.PHONY: install\r
58.PHONY: clean\r
59\r
60all:\r
61\r
62$(MAKEROOT)/libs:\r
63 mkdir $(MAKEROOT)/libs \r
64\r
65$(MAKEROOT)/bin:\r
66 mkdir $(MAKEROOT)/bin\r