aboutsummaryrefslogtreecommitdiff
path: root/packages/darwin_app/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'packages/darwin_app/Makefile')
-rw-r--r--packages/darwin_app/Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/darwin_app/Makefile b/packages/darwin_app/Makefile
index 98bd6a15..f49aca72 100644
--- a/packages/darwin_app/Makefile
+++ b/packages/darwin_app/Makefile
@@ -32,7 +32,13 @@ FAT_FLAGS = -mmacosx-version-min=10.4
# which CPU to compile for
TARGET_PLATFORM := $(shell uname -p)
ifeq ($(TARGET_PLATFORM),i386)
- OPT_CFLAGS += -march=pentium4 -msse3 -mfpmath=sse
+ # if on 10.6/Intel, then build as 64-bit with core2 as minimum CPU
+ ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 10)
+ OPT_CFLAGS += -march=core2 -msse3 -mssse3 -mfpmath=sse
+ FAT_FLAGS = -mmacosx-version-min=10.6
+ else
+ OPT_CFLAGS += -march=pentium4 -msse3 -mfpmath=sse
+ endif
else
OPT_CFLAGS += -mcpu=7450 -mtune=7450
endif