From e6a33e9363f13fb1566522d51a65c18d26db299a Mon Sep 17 00:00:00 2001 From: Dave Schuyler Date: Wed, 31 Mar 2004 00:15:56 +0000 Subject: [PATCH] osx -framework added --- dtool/Config.pp | 19 +++++++++++++------ dtool/Package.pp | 2 ++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/dtool/Config.pp b/dtool/Config.pp index 93b6c11d7f..1ca27ee875 100644 --- a/dtool/Config.pp +++ b/dtool/Config.pp @@ -146,6 +146,8 @@ // is someplace standard like /usr/include, you may leave it blank.) #define PYTHON_IPATH /usr/local/include/python1.6 #define PYTHON_LPATH +#define PYTHON_FPATH +#define PYTHON_FRAMEWORK Python #defer HAVE_PYTHON $[isdir $[PYTHON_IPATH]] // Do you want to enable the "in_interpreter" global variable? This @@ -535,7 +537,8 @@ #define CXX g++ // gcc might run into template limits on some parts of Panda. - #define C++FLAGS_GEN -ftemplate-depth-25 + // I upped this from 25 to build on OS X (GCC 3.3) -- skyler. + #define C++FLAGS_GEN -ftemplate-depth-30 #else #define CC cc #define CXX CC @@ -584,13 +587,17 @@ // $[sources] is the list of .o files. $[libs] is a space-separated // list of dependent libraries, and $[lpath] is a space-separated list // of directories in which those libraries can be found. -#defer LINK_BIN_C $[cc_ld] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%] -#defer LINK_BIN_C++ $[cxx_ld] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%] +#defer LINK_BIN_C $[cc_ld] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]\ + $[fpath:%=-Wl,-F%] $[patsubst %,-framework %, $[frameworks]] +#defer LINK_BIN_C++ $[cxx_ld]\ + -o $[target] $[sources]\ + $[lpath:%=-L%] $[libs:%=-l%]\ + $[fpath:%=-Wl,-F%] $[patsubst %,-framework %, $[frameworks]] // How to generate a static C or C++ library. $[target] is the // name of the library to generate, and $[sources] is the list of .o // files that will go into the library. -#if $[eq $[PLATFORM], osx] +#if $[eq $[PLATFORM], osx] #defer STATIC_LIB_C libtool -static -o $[target] $[sources] #defer STATIC_LIB_C++ libtool -static -o $[target] $[sources] #else @@ -608,8 +615,8 @@ // libraries, and $[lpath] is a space-separated list of directories in // which those libraries can be found. #if $[eq $[PLATFORM], osx] - #defer SHARED_LIB_C $[cc_ld] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%] - #defer SHARED_LIB_C++ $[cxx_ld] -dynamic -dynamiclib -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%] + #defer SHARED_LIB_C $[cc_ld] -o $[target] -install_name $[notdir $[target]] $[sources] $[lpath:%=-L%] $[libs:%=-l%] $[patsubst %,-framework %, $[frameworks]] + #defer SHARED_LIB_C++ $[cxx_ld] -dynamic -dynamiclib -o $[target] -install_name $[notdir $[target]] $[sources] $[lpath:%=-L%] $[libs:%=-l%] $[patsubst %,-framework %, $[frameworks]] #else #defer SHARED_LIB_C $[cc_ld] -shared -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%] #defer SHARED_LIB_C++ $[cxx_ld] -shared -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%] diff --git a/dtool/Package.pp b/dtool/Package.pp index 851ba84899..0096833d17 100644 --- a/dtool/Package.pp +++ b/dtool/Package.pp @@ -88,6 +88,8 @@ // Config.pp. #set PYTHON_IPATH $[unixfilename $[PYTHON_IPATH]] #set PYTHON_LPATH $[unixfilename $[PYTHON_LPATH]] +#set PYTHON_FPATH $[unixfilename $[PYTHON_FPATH]] +#set PYTHON_FRAMEWORK $[unixfilename $[PYTHON_FRAMEWORK]] #set HAVE_PYTHON $[HAVE_PYTHON] #set NSPR_IPATH $[unixfilename $[NSPR_IPATH]]