summaryrefslogtreecommitdiff
path: root/BaseTools/Source/C/Makefiles
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-12-29 06:16:53 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-12-29 06:16:53 +0000
commita709adfaf0bebbaf3d989f56b500e3985687d0e3 (patch)
tree47d6f44e4afffe70535e492f8585f433efcbf24d /BaseTools/Source/C/Makefiles
parent4661d5df04ce804e454509922fd54f45332553da (diff)
downloadedk2-platforms-a709adfaf0bebbaf3d989f56b500e3985687d0e3.tar.xz
Sync tool code to BuildTools project r1783.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9623 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/C/Makefiles')
-rw-r--r--BaseTools/Source/C/Makefiles/app.makefile2
-rw-r--r--BaseTools/Source/C/Makefiles/header.makefile12
2 files changed, 13 insertions, 1 deletions
diff --git a/BaseTools/Source/C/Makefiles/app.makefile b/BaseTools/Source/C/Makefiles/app.makefile
index 7555556baa..2f95003646 100644
--- a/BaseTools/Source/C/Makefiles/app.makefile
+++ b/BaseTools/Source/C/Makefiles/app.makefile
@@ -8,6 +8,6 @@ APPLICATION = $(MAKEROOT)/bin/$(APPNAME)
all: $(MAKEROOT)/bin $(APPLICATION)
$(APPLICATION): $(OBJECTS)
- $(LINKER) -o $(APPLICATION) $(OBJECTS) -L$(MAKEROOT)/libs $(LIBS)
+ $(LINKER) -o $(APPLICATION) $(LFLAGS) $(OBJECTS) -L$(MAKEROOT)/libs $(LIBS)
include $(MAKEROOT)/Makefiles/footer.makefile
diff --git a/BaseTools/Source/C/Makefiles/header.makefile b/BaseTools/Source/C/Makefiles/header.makefile
index a4dc2255e7..5f69e7b04e 100644
--- a/BaseTools/Source/C/Makefiles/header.makefile
+++ b/BaseTools/Source/C/Makefiles/header.makefile
@@ -26,7 +26,19 @@ 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