]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/Makefiles/header.makefile
BaseTools: Actually plug in BaseTools build on AArch64
[mirror_edk2.git] / BaseTools / Source / C / Makefiles / header.makefile
index 006a0716caf93232745a2c43ffe66ef26cf02d13..6a759d94c7a6c04950ec670d2436b286b8825591 100644 (file)
@@ -1,63 +1,80 @@
 ## @file\r
 #\r
-# The makefile can be invoked with
-# ARCH = x86_64 or x64 for EM64T build
-# ARCH = ia32 or IA32 for IA32 build
-# ARCH = ia64 or IA64 for IA64 build
-#
-# Copyright (c) 2007 - 2010, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# The makefile can be invoked with\r
+# ARCH = x86_64 or x64 for EM64T build\r
+# ARCH = ia32 or IA32 for IA32 build\r
+# ARCH = ia64 or IA64 for IA64 build\r
+# ARCH = Arm or ARM for ARM build\r
+#\r
+# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.    The full text of the license may be found at\r
 # http://opensource.org/licenses/bsd-license.php\r
 #\r
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-ARCH ?= IA32
-
-CYGWIN:=$(findstring CYGWIN, $(shell uname -s))
-LINUX:=$(findstring Linux, $(shell uname -s))
-DARWIN:=$(findstring Darwin, $(shell uname -s))
-
-CC = gcc
-CXX = g++
-AS = gcc
-AR = ar
-LD = ld
-LINKER ?= $(CC)
-ifeq ($(ARCH), IA32)
-ARCH_INCLUDE = -I $(MAKEROOT)/Include/Ia32/
-endif
-
-ifeq ($(ARCH), X64)
-ARCH_INCLUDE = -I $(MAKEROOT)/Include/X64/
-endif
-
-INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE) 
-CPPFLAGS = $(INCLUDE)
-CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -fno-merge-constants -nostdlib -Wall -Werror -c -g
-LFLAGS =
-
-#
-# Snow Leopard  is a 32-bit and 64-bit environment. uname -m returns -i386, but gcc defaults 
-#  to x86_64. So make sure tools match uname -m
-#
-uname_s = $(shell uname -s)
-ifeq ($(uname_s),Darwin)
-  CFLAGS   += -arch i386
-  CPPFLAGS += -arch i386
-  LFLAGS   += -arch i386
-endif
-  
-.PHONY: all
-.PHONY: install
-.PHONY: clean
-
-all:
-
-$(MAKEROOT)/libs:
-       mkdir $(MAKEROOT)/libs 
-
-$(MAKEROOT)/bin:
-       mkdir $(MAKEROOT)/bin
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+ARCH ?= IA32\r
+\r
+CYGWIN:=$(findstring CYGWIN, $(shell uname -s))\r
+LINUX:=$(findstring Linux, $(shell uname -s))\r
+DARWIN:=$(findstring Darwin, $(shell uname -s))\r
+\r
+CC = gcc\r
+CXX = g++\r
+AS = gcc\r
+AR = ar\r
+LD = ld\r
+LINKER ?= $(CC)\r
+ifeq ($(ARCH), IA32)\r
+ARCH_INCLUDE = -I $(MAKEROOT)/Include/Ia32/\r
+endif\r
+\r
+ifeq ($(ARCH), X64)\r
+ARCH_INCLUDE = -I $(MAKEROOT)/Include/X64/\r
+endif\r
+\r
+ifeq ($(ARCH), ARM)\r
+ARCH_INCLUDE = -I $(MAKEROOT)/Include/Arm/\r
+endif\r
+\r
+ifeq ($(ARCH), AARCH64)\r
+ARCH_INCLUDE = -I $(MAKEROOT)/Include/AArch64/\r
+endif\r
+\r
+INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I . $(ARCH_INCLUDE) \r
+CPPFLAGS = $(INCLUDE)\r
+ifeq ($(DARWIN),Darwin)\r
+# assume clang or clang compatible flags on OS X\r
+CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -Wno-self-assign -nostdlib -c -g\r
+else\r
+CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -nostdlib -c -g\r
+endif\r
+LFLAGS =\r
+\r
+ifeq ($(ARCH), IA32)\r
+#\r
+# Snow Leopard  is a 32-bit and 64-bit environment. uname -m returns i386, but gcc defaults \r
+#  to x86_64. So make sure tools match uname -m. You can manual have a 64-bit kernal on Snow Leopard\r
+#  so only do this is uname -m returns i386.\r
+#\r
+ifeq ($(DARWIN),Darwin)\r
+  CFLAGS   += -arch i386\r
+  CPPFLAGS += -arch i386\r
+  LFLAGS   += -arch i386\r
+endif\r
+endif\r
+\r
+  \r
+.PHONY: all\r
+.PHONY: install\r
+.PHONY: clean\r
+\r
+all:\r
+\r
+$(MAKEROOT)/libs:\r
+       mkdir $(MAKEROOT)/libs \r
+\r
+$(MAKEROOT)/bin:\r
+       mkdir $(MAKEROOT)/bin\r