diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-11-15 02:51:34 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-11-15 02:51:34 +0000 |
commit | 6780eef1f9ed0af24795708c3be7adafd7113691 (patch) | |
tree | 1a9fd2fca0bd71c4a64a8bf3f10e492f45a232d8 /BaseTools/Source/C/Makefiles | |
parent | 5460c4bbc5aa9d99d25c55c6b936166bea3dbea0 (diff) | |
download | edk2-platforms-6780eef1f9ed0af24795708c3be7adafd7113691.tar.xz |
Sync EDKII BaseTools to BaseTools project r2093.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11057 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/C/Makefiles')
-rw-r--r-- | BaseTools/Source/C/Makefiles/header.makefile | 112 | ||||
-rw-r--r-- | BaseTools/Source/C/Makefiles/lib.makefile | 18 |
2 files changed, 67 insertions, 63 deletions
diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile index 841803e51d..9aa83c0390 100644 --- a/BaseTools/Source/C/Makefiles/header.makefile +++ b/BaseTools/Source/C/Makefiles/header.makefile @@ -1,10 +1,10 @@ ## @file
#
-# 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 -# +# 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. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -12,52 +12,56 @@ # http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# 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.
+
+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 =
+
+ifeq ($(ARCH), IA32)
+#
+# 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. You can manual have a 64-bit kernal on Snow Leopard
+# so only do this is uname -m returns i386.
+#
+uname_s = $(shell uname -s)
+ifeq ($(uname_s),Darwin)
+ CFLAGS += -arch i386
+ CPPFLAGS += -arch i386
+ LFLAGS += -arch i386
+endif
+endif
+
+
+.PHONY: all
+.PHONY: install
+.PHONY: clean
+
+all:
+
+$(MAKEROOT)/libs:
+ mkdir $(MAKEROOT)/libs
+
+$(MAKEROOT)/bin:
+ mkdir $(MAKEROOT)/bin
diff --git a/BaseTools/Source/C/Makefiles/lib.makefile b/BaseTools/Source/C/Makefiles/lib.makefile index fe7a1cef8d..dc8d90ccca 100644 --- a/BaseTools/Source/C/Makefiles/lib.makefile +++ b/BaseTools/Source/C/Makefiles/lib.makefile @@ -7,12 +7,12 @@ # http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -include $(MAKEROOT)/Makefiles/header.makefile - -LIBRARY = $(MAKEROOT)/libs/lib$(LIBNAME).a - -all: $(MAKEROOT)/libs $(LIBRARY) - -include $(MAKEROOT)/Makefiles/footer.makefile +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+include $(MAKEROOT)/Makefiles/header.makefile
+
+LIBRARY = $(MAKEROOT)/libs/lib$(LIBNAME).a
+
+all: $(MAKEROOT)/libs $(LIBRARY)
+
+include $(MAKEROOT)/Makefiles/footer.makefile
|