diff --git a/direct/src/plugin/Sources.pp b/direct/src/plugin/Sources.pp index 6cf56867b6..eebdfc78b4 100644 --- a/direct/src/plugin/Sources.pp +++ b/direct/src/plugin/Sources.pp @@ -131,10 +131,6 @@ #define SOURCES p3dCert.cxx #define OSX_SYS_FRAMEWORKS Carbon - #if $[OSX_PLATFORM] - // Squelch objections about ___dso_handle. - #define LFLAGS $[LFLAGS] -undefined dynamic_lookup - #endif #end bin_target @@ -202,13 +198,6 @@ #define EXTRA_LIBS $[EXTRA_P3DPYTHON_LIBS] #define OSX_SYS_FRAMEWORKS Carbon - #if $[OSX_PLATFORM] - // Not entirely sure why this option is required for OSX, but we - // get objections about ___dso_handle otherwise--but only when - // building universal binaries. - #define LFLAGS $[LFLAGS] -undefined dynamic_lookup - #endif - #define WIN_SYS_LIBS user32.lib #end bin_target @@ -256,13 +245,6 @@ #define EXTRA_LIBS $[EXTRA_P3DPYTHON_LIBS] #define OSX_SYS_FRAMEWORKS Carbon - #if $[OSX_PLATFORM] - // Not entirely sure why this option is required for OSX, but we - // get objections about ___dso_handle otherwise--but only when - // building universal binaries. - #define LFLAGS $[LFLAGS] -undefined dynamic_lookup - #endif - #define WIN_SYS_LIBS user32.lib #end bin_target diff --git a/direct/src/plugin_standalone/Sources.pp b/direct/src/plugin_standalone/Sources.pp index 395b96e8c9..082d6475fc 100644 --- a/direct/src/plugin_standalone/Sources.pp +++ b/direct/src/plugin_standalone/Sources.pp @@ -1,5 +1,7 @@ -// This directory is still experimental. Define HAVE_P3D_PLUGIN in -// your Config.pp to build it. +// This directory contains the code for the panda3d.exe executable, +// the "standalone" part of the Panda3D plugin/runtime system. Define +// HAVE_P3D_PLUGIN in your Config.pp to build it. + #define BUILD_DIRECTORY $[and $[HAVE_P3D_PLUGIN],$[HAVE_OPENSSL],$[HAVE_ZLIB],$[HAVE_TINYXML]] #begin bin_target @@ -20,10 +22,6 @@ panda3d.cxx panda3d.h panda3d.I #define WIN_SYS_LIBS user32.lib gdi32.lib shell32.lib ole32.lib - #if $[OSX_PLATFORM] - // Squelch objections about ___dso_handle. - #define LFLAGS $[LFLAGS] -undefined dynamic_lookup - #endif #end bin_target diff --git a/dtool/Config.OSX.pp b/dtool/Config.OSX.pp index 0eefda692b..4373e36df3 100644 --- a/dtool/Config.OSX.pp +++ b/dtool/Config.OSX.pp @@ -85,14 +85,16 @@ // $[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] $[ARCH_FLAGS] $[OSX_CFLAGS] -o $[target] $[sources] $[flags] $[lpath:%=-L%] $[libs:%=-l%]\ - $[fpath:%=-Wl,-F%] $[patsubst %,-framework %, $[bin_frameworks]] -#defer LINK_BIN_C++ $[cxx_ld] $[ARCH_FLAGS] $[OSX_CFLAGS] \ +#defer link_bin_opts $[ARCH_FLAGS] $[OSX_CFLAGS] \ + $[if $[not $[LINK_ALL_STATIC]],-undefined dynamic_lookup] \ -o $[target] $[sources]\ $[flags]\ $[lpath:%=-L%] $[libs:%=-l%]\ $[fpath:%=-Wl,-F%] $[patsubst %,-framework %, $[bin_frameworks]] +#defer LINK_BIN_C $[cc_ld] $[link_bin_opts] +#defer LINK_BIN_C++ $[cxx_ld] $[link_bin_opts] + // 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. diff --git a/dtool/pptempl/Global.pp b/dtool/pptempl/Global.pp index 0e4c40609a..ac5855541d 100644 --- a/dtool/pptempl/Global.pp +++ b/dtool/pptempl/Global.pp @@ -505,10 +505,9 @@ // into a dylib *and* a bundle. #defer bundle_ext $[BUNDLE_EXT] #defer link_as_bundle $[and $[OSX_PLATFORM],$[LINK_AS_BUNDLE]] -//#defer link_extra_bundle $[and $[OSX_PLATFORM],$[LINK_EXTRA_BUNDLE],$[not $[LINK_AS_BUNDLE]]] -// temp hack for people with old OSXTOOLS. -#defer link_extra_bundle $[and $[OSX_PLATFORM],$[or $[LINK_EXTRA_BUNDLE],$[BUNDLE_EXT]],$[not $[LINK_AS_BUNDLE]]] +// On OSX 10.4, we need to have both a .dylib and an .so file. +#defer link_extra_bundle $[and $[OSX_PLATFORM],$[or $[LINK_EXTRA_BUNDLE],$[BUNDLE_EXT]],$[not $[LINK_AS_BUNDLE]],$[not $[LINK_ALL_STATIC]]] // The default library extension various based on the OS. #defer dynamic_lib_ext $[DYNAMIC_LIB_EXT]