diff --git a/dtool/Config.osxppc.pp b/dtool/Config.osxppc.pp new file mode 100644 index 0000000000..f8a4457cf4 --- /dev/null +++ b/dtool/Config.osxppc.pp @@ -0,0 +1,213 @@ +// +// Config.osx.pp +// +// This file defines some custom config variables for the osx +// platform. It makes some initial guesses about compiler features, +// etc. +// + +// ******************************************************************* +// NOTE: you should not attempt to copy this file verbatim as your own +// personal Config.pp file. Instead, you should start with an empty +// Config.pp file, and add lines to it when you wish to override +// settings given in here. In the normal ppremake system, this file +// will always be read first, and then your personal Config.pp file +// will be read later, which gives you a chance to override the +// default settings found in this file. However, if you start by +// copying the entire file, it will be difficult to tell which +// settings you have customized, and it will be difficult to upgrade +// to a subsequent version of Panda. +// ******************************************************************* + +print $[PLATFORM] + +#define PYTHON_IPATH /Library/Frameworks/Python.framework/Headers + +#define HAVE_PYTHON 1 +#define PYTHON_FRAMEWORK Python + +// What additional flags should we pass to interrogate? +#define SYSTEM_IGATE_FLAGS -D__FLT_EVAL_METHOD__=0 -D__i386__ -D__const=const -Dvolatile -D__LITTLE_ENDIAN__ -D__inline__=inline -D__GNUC__ +#define HAVE_GL 1 +#define IS_OSX 1 + +//#define ZLIB_IPATH /usr/include +//#define ZLIB_LPATH /usr/lib/ +//#define ZLIB_LIBS libz.dylib + +#define HAVE_ZLIB 1 +#define HAVE_JPEG 1 +#define HAVE_FREETYPE 1 +#print Before Configure Miles +//#define HAVE_RAD_MSS 1 +//#define RAD_MSS_IPATH /Users/roger/Documents/M/include +//#define RAD_MSS_LPATH /Users/roger/Documents/M/redist/macho/ +//#define RAD_MSS_LIBS MilesMachO +//#define rad_mss_ipath $[RAD_MSS_IPATH] +//#define rad_mss_lpath $[RAD_MSS_LPATH] +//#define rad_mss_libs $[RAD_MSS_LIBS] + + +//#print -- $[RAD_MSS_IPATH] +//#print --- $[RAD_MSS_LPATH] +//#print ----$[RAD_MSS_LIBS] + + +//#print ---$[rad_mss_ipath] +//#print ---$[rad_mss_lpath] +//#print ---$[rad_mss_libs] + + + +#define PNG_IPATH /opt/local/include +#define PNG_LPATH /opt/local/lib +#define PNG_LIBS png +//#define HAVE_PNG 1 + + +#define HAVE_OPENSSL 1 + +// Is libfftw installed, and where? +#define FFTW_IPATH /opt/local/include +#define FFTW_LPATH /opt/local/lib +#define FFTW_LIBS drfftw dfftw +//#define HAVE_FFTW 1 + + +#define TIFF_IPATH /opt/local/include +#define TIFF_LPATH /opt/local/lib + +// Is the platform big-endian (like an SGI workstation) or +// little-endian (like a PC)? Define this to the empty string to +// indicate little-endian, or nonempty to indicate big-endian. +#define WORDS_BIGENDIAN + +// Does the C++ compiler support namespaces? +#define HAVE_NAMESPACE 1 + +// Does the C++ compiler support ios::binary? +#define HAVE_IOS_BINARY 1 + +// How about the typename keyword? +#define HAVE_TYPENAME 1 + +// Will the compiler avoid inserting extra bytes in structs between a +// base struct and its derived structs? It is safe to define this +// false if you don't know, but if you know that you can get away with +// this you may gain a tiny performance gain by defining this true. +// If you define this true incorrectly, you will get lots of +// assertion failures on execution. +#define SIMPLE_STRUCT_POINTERS + +// Do we have a gettimeofday() function? +#define HAVE_GETTIMEOFDAY 1 + +// Does gettimeofday() take only one parameter? +#define GETTIMEOFDAY_ONE_PARAM + +// Do we have getopt() and/or getopt_long_only() built into the +// system? +#define HAVE_GETOPT 1 +#define HAVE_GETOPT_LONG_ONLY + +// Are the above getopt() functions defined in getopt.h, or somewhere else? +#define HAVE_GETOPT_H 1 + +// Can we determine the terminal width by making an ioctl(TIOCGWINSZ) call? +#define IOCTL_TERMINAL_WIDTH 1 + +// Do the system headers define a "streamsize" typedef? How about the +// ios::binary enumerated value? And other ios typedef symbols like +// ios::openmode and ios::fmtflags? +#define HAVE_STREAMSIZE 1 +#define HAVE_IOS_BINARY 1 +#define HAVE_IOS_TYPEDEFS 1 + +// Can we safely call getenv() at static init time? +#define STATIC_INIT_GETENV 1 + +// Can we read the file /proc/self/environ to determine our +// environment variables at static init time? +#define HAVE_PROC_SELF_ENVIRON 1 + +// Do we have a global pair of argc/argv variables that we can read at +// static init time? Should we prototype them? What are they called? +#define HAVE_GLOBAL_ARGV +#define PROTOTYPE_GLOBAL_ARGV +#define GLOBAL_ARGV __Argv +#define GLOBAL_ARGC __Argc + +// Can we read the file /proc/self/cmdline to determine our +// command-line arguments at static init time? +#define HAVE_PROC_SELF_CMDLINE + +// Should we include or ? Define HAVE_IOSTREAM +// to nonempty if we should use , or empty if we should use +// . +#define HAVE_IOSTREAM 1 + +// Do we have a true stringstream class defined in ? +#define HAVE_SSTREAM 1 + +// Does fstream::open() require a third parameter, specifying the +// umask? Versions of gcc prior to 3.2 had this. +#define HAVE_OPEN_MASK + +// Do the compiler or system libraries define wchar_t for you? +#define HAVE_WCHAR_T 1 + +// Does define the typedef wstring? Most do, but for some +// reason, versions of gcc before 3.0 didn't do this. +#define HAVE_WSTRING 1 + +// Do we have ? +#define HAVE_NEW 1 + +// Do we have ? +#define HAVE_IO_H + +// Do we have ? +#define HAVE_MALLOC_H 1 + +// Do we have ? +#define HAVE_ALLOCA_H 1 + +// Do we have ? +#define HAVE_LOCALE_H 1 + +// Do we have ? +#define HAVE_MINMAX_H + +// Do we have ? +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_TIME_H 1 + +// Do we have ? +#define HAVE_UNISTD_H 1 + +// Do we have ? +#define HAVE_UTIME_H 1 + +// Do we have ? +#define HAVE_DIRENT_H 1 + +// Do we have (and do we want to use it instead of dirent.h)? +#define HAVE_GLOB_H 1 + +// Do we have (and presumably a Linux-style audio +// interface)? +#define HAVE_SYS_SOUNDCARD_H 1 + +// Do we have RTTI (and )? +#define HAVE_RTTI 1 + +// Must global operator new and delete functions throw exceptions? +#define GLOBAL_OPERATOR_NEW_EXCEPTIONS 1 + +// Modern versions of gcc do support the latest STL allocator +// definitions. +#define USE_STL_ALLOCATOR 1 + +// The dynamic library file extension (usually .so .dll or .dylib): +#define DYNAMIC_LIB_EXT .dylib +#define BUNDLE_EXT .so diff --git a/dtool/Config.pp b/dtool/Config.pp index 573cf7f3e6..29e67bd673 100644 --- a/dtool/Config.pp +++ b/dtool/Config.pp @@ -86,6 +86,10 @@ #define BUILD_TYPE gmsvc #elif $[eq $[PLATFORM], osx] #define BUILD_TYPE unix +#elif $[eq $[PLATFORM], osxppc] + #define BUILD_TYPE unix +#elif $[eq $[PLATFORM], osxintell] + #define BUILD_TYPE unix #else #define BUILD_TYPE unix #endif @@ -801,6 +805,10 @@ #define USE_COMPILER GCC #elif $[eq $[PLATFORM], osx] #define USE_COMPILER GCC +#elif $[eq $[PLATFORM], osxppc] + #define USE_COMPILER GCC +#elif $[eq $[PLATFORM], osxintell] + #define USE_COMPILER GCC #elif $[eq $[PLATFORM], FreeBSD] #define USE_COMPILER GCC #endif @@ -927,6 +935,12 @@ #if $[eq $[PLATFORM], osx] #defer STATIC_LIB_C libtool -static -o $[target] $[sources] #defer STATIC_LIB_C++ libtool -static -o $[target] $[sources] +#elif $[eq $[PLATFORM], osxppc] + #defer STATIC_LIB_C libtool -static -o $[target] $[sources] + #defer STATIC_LIB_C++ libtool -static -o $[target] $[sources] +#elif $[eq $[PLATFORM], osxintell] + #defer STATIC_LIB_C libtool -static -o $[target] $[sources] + #defer STATIC_LIB_C++ libtool -static -o $[target] $[sources] //#elif $[eq $[PLATFORM], FreeBSD] // #defer STATIC_LIB_C libtool --mode=link -static -o $[target] $[sources] // #defer STATIC_LIB_C++ libtool --mode=link -static -o $[target] $[sources] @@ -953,6 +967,14 @@ #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] -undefined dynamic_lookup -dynamic -dynamiclib -o $[target] -install_name $[notdir $[target]] $[sources] $[lpath:%=-L%] $[libs:%=-l%] $[patsubst %,-framework %, $[frameworks]] #defer BUNDLE_LIB_C++ $[cxx_ld] -undefined dynamic_lookup -bundle -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%] $[patsubst %,-framework %, $[frameworks]] +#elif $[eq $[PLATFORM], osxppc] + #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] -undefined dynamic_lookup -dynamic -dynamiclib -o $[target] -install_name $[notdir $[target]] $[sources] $[lpath:%=-L%] $[libs:%=-l%] $[patsubst %,-framework %, $[frameworks]] + #defer BUNDLE_LIB_C++ $[cxx_ld] -undefined dynamic_lookup -bundle -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%] $[patsubst %,-framework %, $[frameworks]] +#elif $[eq $[PLATFORM], osxintell] + #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] -undefined dynamic_lookup -dynamic -dynamiclib -o $[target] -install_name $[notdir $[target]] $[sources] $[lpath:%=-L%] $[libs:%=-l%] $[patsubst %,-framework %, $[frameworks]] + #defer BUNDLE_LIB_C++ $[cxx_ld] -undefined dynamic_lookup -bundle -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%] $[patsubst %,-framework %, $[frameworks]] #else #defer SHARED_LIB_C $[cc_ld] -shared $[LFLAGS] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%] #defer SHARED_LIB_C++ $[cxx_ld] -shared $[LFLAGS] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%] diff --git a/dtool/Package.pp b/dtool/Package.pp index 1d472926a4..838c382a19 100644 --- a/dtool/Package.pp +++ b/dtool/Package.pp @@ -63,7 +63,7 @@ #define WINDOWS_PLATFORM $[or $[eq $[PLATFORM],Win32],$[eq $[PLATFORM],Cygwin]] // True if we are building on some flavor of OS X. -#define OSX_PLATFORM $[or $[eq $[PLATFORM],Darwin],$[eq $[PLATFORM],osx]] +#define OSX_PLATFORM $[or $[eq $[PLATFORM],Darwin],$[eq $[PLATFORM],osxppc]] // True if we are building on some flavor of Unix. #define UNIX_PLATFORM $[and $[not $[WINDOWS_PLATFORM]],$[not $[OSX_PLATFORM]]]