From ef9c1ee32c0dfe26a50d20acf420d41564a64e0d Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 3 Nov 2009 16:07:13 -0700 Subject: [PATCH] specify -arch explicitly to compiler and liner on OS X On 10.6 the compiler generates x86_64 code by default, even though uname -m reports "i386", so we have to be explicit --- makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/makefile b/makefile index b6ce200fba..29840c8529 100644 --- a/makefile +++ b/makefile @@ -159,6 +159,18 @@ ifeq ($(platform),darwin) strip-all = -S -x so-suffix = .jnilib shared = -dynamiclib + + ifeq ($(arch),powerpc) + cflags += -arch ppc + asmflags += -arch ppc + lflags += -arch ppc + endif + + ifeq ($(arch),i386) + cflags += -arch i386 + asmflags += -arch i386 + lflags += -arch i386 + endif endif ifeq ($(platform),windows)