[Bf-committers] Allow python interpreter callbacks OS X

Douglas Bischoff bf-committers@blender.org
Tue, 24 Jun 2003 10:33:19 -0400


Hello, all!

With help from Kester Maddock, I've successfully compiled Blender (I'm 
back to NAN Makefiles since autoconf isn't keeping up... *sigh*) 
allowing callbacks from precompiled modules back to the interpreter. 
Here's the changed code from source/nan_link.mk
----
ifeq ($(OS),darwin)
     LLIBS    += -lGLU -lGL
     LLIBS    += -lz -framework Carbon -framework AGL
     ifeq ($(WITH_QUICKTIME), true)
		LLIBS += -framework QuickTime
     endif
     LDFLAGS += -L/System/Library/Frameworks/OpenGL.framework/Libraries
     DBG_LDFLAGS += 
-L/System/Library/Frameworks/OpenGL.framework/Libraries

     LDFLAGS += -u __dummy -u _PyMac_Error -framework System -framework 
Python -framework CoreServices -framework Foundation
     DBG_LDFLAGS += -u __dummy -u _PyMac_Error -framework System 
-framework Python -framework CoreServices -framework Foundation

endif
----
The changes are simply to add to the LD Flags and DBG_LD flags the 
include information necessary to allow the callbacks. NOTE! I have 
installed Python as a framework, and the default is to install it as a 
library on OS X. This code may have to be made smarter by someone more 
experienced than I to properly detect how Python was installed for the 
-framework calls to work, but the -u __dummy -u _PyMac_Error parts 
should work fine either way.

Hope this helps, and many thanks to Kester!

-Bish