From 64ff9ae4a846deb780c186893267f11bc40465d5 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 3 Jul 2006 19:50:53 +0000 Subject: Mac intel commit - patch from Douglas with endian fixes - Makefile adds static libiconv.a from lib/ - this version will use OpenEXR libs from lib/ too, and is latest release with threading support - openAL is missing, added it as default to not include it --- source/Makefile | 3 +++ source/blender/imbuf/intern/imbuf.h | 2 +- source/nan_compile.mk | 9 +++++++-- source/nan_definitions.mk | 19 +++++++++++++++---- 4 files changed, 26 insertions(+), 7 deletions(-) (limited to 'source') diff --git a/source/Makefile b/source/Makefile index ba11ea2893d..f0273954440 100644 --- a/source/Makefile +++ b/source/Makefile @@ -201,6 +201,9 @@ ifeq ($(INTERNATIONAL), true) endif ifeq ($(OS), darwin) COMLIB += $(NAN_GETTEXT)/lib/libintl.a + ifeq ($(CPU), i386) + COMLIB += $(NAN_GETTEXT)/lib/libiconv.a + endif endif ifeq ($(OS), solaris) COMLIB += $(NAN_GETTEXT)/lib/libintl.a diff --git a/source/blender/imbuf/intern/imbuf.h b/source/blender/imbuf/intern/imbuf.h index 9af588bf7e2..1f17217459d 100644 --- a/source/blender/imbuf/intern/imbuf.h +++ b/source/blender/imbuf/intern/imbuf.h @@ -63,7 +63,7 @@ #define ENDIAN_NOP(x) (x) -#if defined(__sgi) || defined(__sparc) || defined(__sparc__) || defined (__PPC__) || defined (__APPLE__) +#if defined(__sgi) || defined(__sparc) || defined(__sparc__) || defined (__PPC__) || (defined (__APPLE__) && !defined(__LITTLE_ENDIAN__)) #define LITTLE_SHORT SWAP_SHORT #define LITTLE_LONG SWAP_LONG #define BIG_SHORT ENDIAN_NOP diff --git a/source/nan_compile.mk b/source/nan_compile.mk index 736a3c56ec8..d356d13be42 100644 --- a/source/nan_compile.mk +++ b/source/nan_compile.mk @@ -80,8 +80,13 @@ endif ifeq ($(OS),darwin) CC = gcc CCC = g++ - CFLAGS += -pipe -fPIC -ffast-math -mcpu=7450 -mtune=G5 - CCFLAGS += -pipe -fPIC + ifeq ($(CPU),powerpc) + CFLAGS += -pipe -fPIC -ffast-math -mcpu=7450 -mtune=G5 + CCFLAGS += -pipe -fPIC + else + CFLAGS += -pipe -fPIC -ffast-math -march=pentium-m + CCFLAGS += -pipe -fPIC + endif REL_CFLAGS += -O2 REL_CCFLAGS += -O2 CPPFLAGS += -D_THREAD_SAFE diff --git a/source/nan_definitions.mk b/source/nan_definitions.mk index 1a381fdefe5..6371b24efd0 100644 --- a/source/nan_definitions.mk +++ b/source/nan_definitions.mk @@ -112,9 +112,17 @@ endif export NAN_OPENEXR_INC ?= -I$(NAN_OPENEXR)/include -I$(NAN_OPENEXR)/include/IlmImf -I$(NAN_OPENEXR)/include/Imath -I$(NAN_OPENEXR)/include/Iex endif else - export NAN_OPENEXR ?= /usr/local + export NAN_OPENEXR ?= $(LCGDIR)/openexr export NAN_OPENEXR_INC ?= -I$(NAN_OPENEXR)/include -I$(NAN_OPENEXR)/include/OpenEXR - export NAN_OPENEXR_LIBS ?= $(NAN_OPENEXR)/lib/libIlmImf.a $(NAN_OPENEXR)/lib/libHalf.a $(NAN_OPENEXR)/lib/libIex.a + ifeq ($(OS),darwin) + ifeq ($(CPU),powerpc) + export NAN_OPENEXR_LIBS ?= $(NAN_OPENEXR)/lib/libIlmImf.a $(NAN_OPENEXR)/lib/libHalf.a $(NAN_OPENEXR)/lib/libIex.a + else + export NAN_OPENEXR_LIBS ?= $(NAN_OPENEXR)/lib/libIlmImf.a $(NAN_OPENEXR)/lib/libHalf.a $(NAN_OPENEXR)/lib/libIex.a $(NAN_OPENEXR)/lib/libIlmThread.a + endif + else + export NAN_OPENEXR_LIBS ?= $(NAN_OPENEXR)/lib/libIlmImf.a $(NAN_OPENEXR)/lib/libHalf.a $(NAN_OPENEXR)/lib/libIex.a + endif endif # Platform Dependent settings go below: @@ -199,9 +207,12 @@ endif export NAN_SDLCFLAGS ?= -I$(NAN_SDL)/include export NAN_SDLLIBS ?= $(NAN_SDL)/lib/libSDL.a -framework Cocoa -framework IOKit - export NAN_NO_KETSJI=false - + # export NAN_NO_KETSJI=true + ifeq ($(CPU), i386) + export NAN_NO_OPENAL=true + endif + # Uncomment the following line to use Mozilla inplace of netscape # CPPFLAGS +=-DMOZ_NOT_NET # Location of MOZILLA/Netscape header files... -- cgit v1.2.3