From 4a4e4e0747175848f1a51b20e472334c1e8f052d Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 21 Jul 2006 00:22:52 +0000 Subject: more work on centralizing the CPU optimization flags. With GNU/Linux on PowerPC and Mac OS X on Intel, things are becoming more complicated... ;) svn path=/trunk/; revision=5389 --- packages/darwin_app/Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'packages/darwin_app/Makefile') diff --git a/packages/darwin_app/Makefile b/packages/darwin_app/Makefile index 1ea9e05e..3768c4a9 100644 --- a/packages/darwin_app/Makefile +++ b/packages/darwin_app/Makefile @@ -30,8 +30,9 @@ WISH_CONTENTS = "$(WISH)/Contents" include $(BUILDLAYOUT_DIR)/Makefile.buildlayout -# base level optimizations -OPT_CFLAGS = -O3 -funroll-loops -fomit-frame-pointer + +# which CPU to compile for +TARGET_PLATFORM := $(shell uname -p) # CPU-specific gleaned from http://developer.apple.com/releasenotes/DeveloperTools/GCC3.html # check this too: http://hpc.sourceforge.net/ @@ -46,8 +47,13 @@ OPT_CFLAGS = -O3 -funroll-loops -fomit-frame-pointer # PowerPC G5 (gcc-3.3) #OPT_CFLAGS += -fast -fPIC -faltivec -mpowerpc-gpopt -mpowerpc-gfxopt -# Package default, support older PowerPCs, but G4 (7450) is the most common -OPT_CFLAGS += -mcpu=powerpc -mtune=7450 -mpowerpc-gfxopt +# auto-vectorization would be nice: +# http://gcc.gnu.org/projects/tree-ssa/vectorization.html + +ifeq ($(TARGET_PLATFORM),powerpc) + # Package default, support older PowerPCs, but G4 (7450) is the most common + OPT_CFLAGS += -mcpu=powerpc -mtune=7450 -mpowerpc-gfxopt +endif # these are sent to all of the various Makefiles so that they all copy their -- cgit v1.2.1