Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Gartner <stefang@aon.at>2010-01-03 23:35:13 +0300
committerStefan Gartner <stefang@aon.at>2010-01-03 23:35:13 +0300
commit1f33d574c2d18f0037f5e168dbd1a54d23dad6d7 (patch)
treef1e74363273795545fc9a07992838da273068b53 /source/nan_definitions.mk
parentc6e40798fbbd6996310630198261fec194a2109e (diff)
OS X Makefiles:
* added some new variables (mostly the same as with scons): - USE_COCOA: use Cocoa for ghost (defaults to true) - MACOSX_ARCHITECTURE: can be ppc, ppc64, i386, x86_64. By default this is the host architecture (ppc for PowerPC Macs, i386 for Intel Macs). In theory this allows to cross compile blender for a different architecture, though cross compilation only works on Intel Macs, because makesdna and makesrna are built for the target architecture. For a 64 bit build, set MACOSX_ARCHITECTURE to x86_64 (Intel) or ppc64 (PowerPC). - MACOSX_MIN_VERS: minimum OS X version to run blender on (10.4 for 32 bit builds, 10.5 for 64 bit builds) - MACOSX_DEPLOYMENT_TARGET: needed by the linker to create an Application targeted for a specific OS version (defaults to 10.4 for 32 bit builds, 10.5 for 64 bit builds) - MACOSX_SDK: path to a specific SDK. currently not used - USE_QTKIT: use QTKit instead of QuickTime (defaults to true for 64 bit builds, as using QTKit is mandatory in that case)) * use the same compiler flags as scons * default compiler now is gcc-4.0 when building for 10.4 and gcc-4.2 when building for 10.5 * extract $(LCGDIR)/release/python_$(MACOSX_ARCHITECTURE).zip to Application bundle. This might break building on 10.4, to fix that, rename $(LCGDIR)/release/python.zip When compiling blender, only MACOSX_ARCHITECTURE might be of interest, as it allows doing 64 bit builds (or 32 bit PowerPC builds on Intel). All other variables are then set to reasonable defaults. For current users of the Makefile system, this commit shouldn't change much.
Diffstat (limited to 'source/nan_definitions.mk')
-rw-r--r--source/nan_definitions.mk53
1 files changed, 48 insertions, 5 deletions
diff --git a/source/nan_definitions.mk b/source/nan_definitions.mk
index 50df0e777cc..952b57601b7 100644
--- a/source/nan_definitions.mk
+++ b/source/nan_definitions.mk
@@ -24,7 +24,7 @@
#
# The Original Code is: all of this file.
#
-# Contributor(s): GSR
+# Contributor(s): GSR, Stefan Gartner
#
# ***** END GPL LICENSE BLOCK *****
#
@@ -108,7 +108,11 @@ ifndef CONFIG_GUESS
export NAN_FFMPEGLIBS ?= $(NAN_FFMPEG)/lib/libavformat.a $(NAN_FFMPEG)/lib/libavutil.a $(NAN_FFMPEG)/lib/libavcodec.a $(NAN_FFMPEG)/lib/libavdevice.a
else
export NAN_FFMPEG ?= $(LCGDIR)/ffmpeg
- export NAN_FFMPEGLIBS ?= $(NAN_FFMPEG)/lib/libavformat.a $(NAN_FFMPEG)/lib/libavcodec.a $(NAN_FFMPEG)/lib/libswscale.a $(NAN_FFMPEG)/lib/libavutil.a $(NAN_FFMPEG)/lib/libavdevice.a
+ ifeq ($(OS), darwin)
+ export NAN_FFMPEGLIBS ?= $(NAN_FFMPEG)/lib/libavformat.a $(NAN_FFMPEG)/lib/libavcodec.a $(NAN_FFMPEG)/lib/libswscale.a $(NAN_FFMPEG)/lib/libavutil.a $(NAN_FFMPEG)/lib/libavdevice.a $(NAN_FFMPEG)/lib/libmp3lame.a $(NAN_FFMPEG)/lib/libx264.a $(NAN_FFMPEG)/lib/libxvidcore.a
+ else
+ export NAN_FFMPEGLIBS ?= $(NAN_FFMPEG)/lib/libavformat.a $(NAN_FFMPEG)/lib/libavcodec.a $(NAN_FFMPEG)/lib/libswscale.a $(NAN_FFMPEG)/lib/libavutil.a $(NAN_FFMPEG)/lib/libavdevice.a
+ endif
endif
export NAN_FFMPEGCFLAGS ?= -I$(NAN_FFMPEG)/include -I$(NANBLENDERHOME)/extern/ffmpeg
@@ -155,6 +159,36 @@ ifndef CONFIG_GUESS
export ID = $(shell whoami)
export HOST = $(shell hostname -s)
+ # set target arch & os version
+ # architecture defaults to host arch, can be ppc, ppc64, i386, x86_64
+ ifeq ($(CPU),powerpc)
+ export MACOSX_ARCHITECTURE ?= ppc
+ else
+ export MACOSX_ARCHITECTURE ?= i386
+ endif
+ # target os version defaults to 10.4 for ppc & i386 (32 bit), 10.5 for ppc64, x86_64
+ ifeq (64,$(findstring 64, $(MACOSX_ARCHITECTURE)))
+ export MACOSX_MIN_VERS ?= 10.5
+ export MACOSX_DEPLOYMENT_TARGET ?= 10.5
+ export MACOSX_SDK ?= /Developer/SDKs/MacOSX10.5.sdk
+ else
+ export MACOSX_MIN_VERS ?= 10.4
+ export MACOSX_DEPLOYMENT_TARGET ?= 10.4
+ export MACOSX_SDK ?= /Developer/SDKs/MacOSX10.4u.sdk
+ endif
+
+ # useful for crosscompiling
+ ifeq ($(MACOSX_ARCHITECTURE),$(findstring $(MACOSX_ARCHITECTURE), "ppc ppc64"))
+ export CPU = powerpc
+ export LCGDIR = $(NAN_LIBDIR)/$(OS)-$(OS_VERSION)-$(CPU)
+ export OCGDIR = $(NAN_OBJDIR)/$(OS)-$(OS_VERSION)-$(CPU)
+ endif
+ ifeq ($(MACOSX_ARCHITECTURE),$(findstring $(MACOSX_ARCHITECTURE),"i386 x86_64"))
+ export CPU = i386
+ export LCGDIR = $(NAN_LIBDIR)/$(OS)-$(OS_VERSION)-$(CPU)
+ export OCGDIR = $(NAN_OBJDIR)/$(OS)-$(OS_VERSION)-$(CPU)
+ endif
+
export NAN_PYTHON_VERSION = 3.1
ifeq ($(NAN_PYTHON_VERSION),3.1)
@@ -199,9 +233,9 @@ ifndef CONFIG_GUESS
export NAN_NO_KETSJI=false
- ifeq ($(CPU), i386)
- export WITH_OPENAL=false
- endif
+ #ifeq ($(CPU), i386)
+ # export WITH_OPENAL=false
+ #endif
# Location of MOZILLA/Netscape header files...
export NAN_MOZILLA_INC ?= $(LCGDIR)/mozilla/include
@@ -222,6 +256,15 @@ ifndef CONFIG_GUESS
export NAN_SAMPLERATE ?= $(LCGDIR)/samplerate
export NAN_SAMPLERATE_LIBS ?= $(NAN_SAMPLERATE)/lib/libsamplerate.a
+ # enable building with Cocoa
+ export WITH_COCOA ?= true
+ export USE_QTKIT ?= false
+ # use cocoa and qtkit for 64bit builds
+ ifeq (64, $(findstring 64, $(MACOSX_ARCHITECTURE)))
+ export WITH_COCOA = true
+ export USE_QTKIT = true
+ endif
+
else
ifeq ($(OS),freebsd)