From a0e252c25f356e13149840eb922595d06cd58eea Mon Sep 17 00:00:00 2001 From: Matt Ebb Date: Sun, 2 Aug 2009 06:22:53 +0000 Subject: NaN makefiles now support and build with precompiled Python 3.1 by default on Mac --- source/darwin/Makefile | 5 ++++- source/nan_definitions.mk | 36 +++++++++++++++++++----------------- 2 files changed, 23 insertions(+), 18 deletions(-) (limited to 'source') diff --git a/source/darwin/Makefile b/source/darwin/Makefile index 35ecc6de8f1..35842b43eae 100644 --- a/source/darwin/Makefile +++ b/source/darwin/Makefile @@ -51,8 +51,11 @@ ifeq ($(APPLICATION), blender) @cp -R $(NANBLENDERHOME)/release/scripts $(DIR)/bin/$(APPLICATION).app/Contents/MacOS/.blender/ @echo "---> copying ui scripts" @cp -R $(NANBLENDERHOME)/release/ui $(DIR)/bin/$(APPLICATION).app/Contents/MacOS/.blender/ + @echo "---> copying python modules" + @mkdir $(DIR)/bin/$(APPLICATION).app/Contents/MacOS/.blender/python + @unzip -q $(LCGDIR)/release/python.zip -d $(DIR)/bin/$(APPLICATION).app/Contents/MacOS/.blender/python/ endif - @echo "---> removing SNV directories and Mac hidden files from distribution" + @echo "---> removing SVN directories and Mac hidden files from distribution" @find $(DIR)/bin/$(APPLICATION).app -name CVS -prune -exec rm -rf {} \; @find $(DIR)/bin/$(APPLICATION).app -name .DS_Store -exec rm -f {} \; @find $(DIR)/bin/$(APPLICATION).app -name .svn -prune -exec rm -rf {} \; diff --git a/source/nan_definitions.mk b/source/nan_definitions.mk index 4724c740ffc..a70bd057d38 100644 --- a/source/nan_definitions.mk +++ b/source/nan_definitions.mk @@ -136,18 +136,24 @@ endif export ID = $(shell whoami) export HOST = $(shell hostname -s) - export PY_FRAMEWORK ?= 1 + export NAN_PYTHON_VERSION = 3.1 - ifdef PY_FRAMEWORK - export NAN_PYTHON ?= /System/Library/Frameworks/Python.framework/Versions/2.3 - export NAN_PYTHON_VERSION ?= 2.3 - export NAN_PYTHON_BINARY ?= $(NAN_PYTHON)/bin/python$(NAN_PYTHON_VERSION) - export NAN_PYTHON_LIB ?= -framework Python + ifeq ($(NAN_PYTHON_VERSION),3.1) + export PY_FRAMEWORK ?= 0 + export NAN_PYTHON ?= $(LCGDIR)/python + export NAN_PYTHON_LIB ?= $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/libpython$(NAN_PYTHON_VERSION).a else - export NAN_PYTHON ?= /sw - export NAN_PYTHON_VERSION ?= 2.3 - export NAN_PYTHON_BINARY ?= $(NAN_PYTHON)/bin/python$(NAN_PYTHON_VERSION) - export NAN_PYTHON_LIB ?= $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a + export PY_FRAMEWORK ?= 1 + ifdef PY_FRAMEWORK + export NAN_PYTHON ?= /System/Library/Frameworks/Python.framework/Versions/2.5 + export NAN_PYTHON_VERSION ?= 2.5 + export NAN_PYTHON_BINARY ?= $(NAN_PYTHON)/bin/python$(NAN_PYTHON_VERSION) + export NAN_PYTHON_LIB ?= -framework Python + else + export NAN_PYTHON ?= /sw + export NAN_PYTHON_BINARY ?= $(NAN_PYTHON)/bin/python$(NAN_PYTHON_VERSION) + export NAN_PYTHON_LIB ?= $(NAN_PYTHON)/lib/python$(NAN_PYTHON_VERSION)/config/libpython$(NAN_PYTHON_VERSION).a + endif endif export NAN_OPENAL ?= $(LCGDIR)/openal @@ -171,13 +177,9 @@ endif export NAN_OPENEXR ?= $(LCGDIR)/openexr export NAN_OPENEXR_INC ?= -I$(NAN_OPENEXR)/include -I$(NAN_OPENEXR)/include/OpenEXR - 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 - - # export NAN_NO_KETSJI=true + export NAN_OPENEXR_LIBS ?= $(NAN_OPENEXR)/lib/libIlmImf.a $(NAN_OPENEXR)/lib/libHalf.a $(NAN_OPENEXR)/lib/libIex.a $(NAN_OPENEXR)/lib/libIlmThread.a + + export NAN_NO_KETSJI=false ifeq ($(CPU), i386) export NAN_NO_OPENAL=true -- cgit v1.2.3