config.h

00001 /* This file was autogenerated by Premake */
00002 #ifndef _ODE_CONFIG_H_
00003 #define _ODE_CONFIG_H_
00004 
00005 
00006 /******************************************************************
00007  * CONFIGURATON SETTINGS - you can change these, and then rebuild
00008  *   ODE to modify the behavior of the library.
00009  *
00010  *   dSINGLE/dDOUBLE   - force ODE to use single-precision (float)
00011  *                       or double-precision (double) for numbers.
00012  *                       Only one should be defined.
00013  *
00014  *   dTRIMESH_ENABLED  - enable/disable trimesh support
00015  *   dTRIMESH_OPCODE   - use the OPCODE trimesh engine
00016  *   dTRIMESH_GIMPACT  - use the GIMPACT trimesh engine
00017  *
00018  *   dUSE_MALLOC_FOR_ALLOCA (experimental)- 
00019  *                       Use malloc() instead of alloca(). Slower, 
00020  *                       but allows for larger systems and more 
00021  *                       graceful out-of-memory handling.
00022  ******************************************************************/
00023 
00024 #define dSINGLE
00025 /* #define dDOUBLE */
00026 
00027 #define dTRIMESH_ENABLED 1
00028 #define dTRIMESH_OPCODE 1
00029 
00030 /* #define dUSE_MALLOC_FOR_ALLOCA */
00031 
00032 
00033 /******************************************************************
00034  * SYSTEM SETTINGS - you shouldn't need to change these. If you
00035  *   run into an issue with these settings, please report it to
00036  *   the ODE bug tracker at:
00037  *      http://sf.net/tracker/?group_id=24884&atid=382799
00038  ******************************************************************/
00039 
00040 /* Try to identify the platform */
00041 #if defined(_XENON)
00042   #define ODE_PLATFORM_XBOX360
00043 #elif defined(SN_TARGET_PSP_HW)
00044   #define ODE_PLATFORM_PSP
00045 #elif defined(SN_TARGET_PS3)
00046   #define ODE_PLATFORM_PS3
00047 #elif defined(_MSC_VER) || defined(__CYGWIN32__) || defined(__MINGW32__)
00048   #define ODE_PLATFORM_WINDOWS
00049 #elif defined(__linux__)
00050   #define ODE_PLATFORM_LINUX
00051 #elif defined(__APPLE__) && defined(__MACH__)
00052   #define ODE_PLATFORM_OSX
00053 #else
00054   #error "Need some help identifying the platform!"
00055 #endif
00056 
00057 /* Additional platform defines used in the code */
00058 #if defined(ODE_PLATFORM_WINDOWS) && !defined(WIN32)
00059   #define WIN32
00060 #endif
00061 
00062 #if defined(__CYGWIN32__) || defined(__MINGW32__)
00063   #define CYGWIN
00064 #endif
00065 
00066 #if defined(ODE_PLATFORM_OSX)
00067   #define macintosh
00068 #endif
00069 
00070 
00071 /* Define a DLL export symbol for those platforms that need it */
00072 #if defined(ODE_PLATFORM_WINDOWS)
00073   #if defined(ODE_DLL)
00074     #define ODE_API __declspec(dllexport)
00075   #elif !defined(ODE_LIB)
00076     #define ODE_DLL_API __declspec(dllimport)
00077   #endif
00078 #endif
00079 
00080 #if !defined(ODE_API)
00081   #define ODE_API
00082 #endif
00083 
00084 
00085 /* Pull in the standard headers */
00086 #include <stdio.h>
00087 #include <stdlib.h>
00088 #include <stdarg.h>
00089 #include <math.h>
00090 #include <string.h>
00091 #include <float.h>
00092 
00093 #if !defined(ODE_PLATFORM_PS3)
00094   #include <stdlib.h>
00095 #endif
00096 
00097 #if !defined(ODE_PLATFORM_WINDOWS)
00098   #include <alloca.h>
00099 #endif
00100 
00101 
00102 /* Visual C does not define these functions */
00103 #if defined(_MSC_VER)
00104   #define copysignf _copysign
00105   #define copysign _copysign
00106 #endif
00107 
00108 
00109 /* Define a value for infinity */
00110 #if defined(HUGE_VALF)
00111    #define ODE_INFINITY4 HUGE_VALF
00112    #define ODE_INFINITY8 HUGE_VAL
00113 #elif defined(FLT_MAX)
00114    #define ODE_INFINITY4 FLT_MAX
00115    #define ODE_INFINITY8 DBL_MAX
00116 #else
00117    static union { unsigned char __c[4]; float  __f; }  __ode_huge_valf = {{0,0,0x80,0x7f}};
00118    static union { unsigned char __c[8]; double __d; }  __ode_huge_val  = {{0,0,0,0,0,0,0xf0,0x7f}};
00119    #define ODE_INFINITY4 (__ode_huge_valf.__f)
00120    #define ODE_INFINITY8 (__ode_huge_val.__d)
00121 #endif
00122 
00123 #ifdef dSINGLE
00124    #define dInfinity ODE_INFINITY4
00125    #define dEpsilon  FLT_EPSILON
00126 #else
00127    #define dInfinity ODE_INFINITY8
00128    #define dEpsilon  DBL_EPSILON
00129 #endif
00130 
00131 
00132 /* Well-defined common data types...need to define for 64 bit systems */
00133 #if defined(_M_IA64) || defined(__ia64__) || defined(_M_AMD64) || defined(__x86_64__)
00134   #define X86_64_SYSTEM   1
00135   typedef int             int32;
00136   typedef unsigned int    uint32;
00137   typedef short           int16;
00138   typedef unsigned short  uint16;
00139   typedef char            int8;
00140   typedef unsigned char   uint8;
00141 #else
00142   typedef int             int32;
00143   typedef unsigned int    uint32;
00144   typedef short           int16;
00145   typedef unsigned short  uint16;
00146   typedef char            int8;
00147   typedef unsigned char   uint8;
00148 #endif
00149 
00150 /* An integer type that can be safely cast to a pointer. This definition
00151  * should be safe even on 64-bit systems */
00152 typedef size_t intP;
00153 
00154 
00155 /* The efficient alignment. most platforms align data structures to some
00156  * number of bytes, but this is not always the most efficient alignment.
00157  * for example, many x86 compilers align to 4 bytes, but on a pentium it is
00158  * important to align doubles to 8 byte boundaries (for speed), and the 4
00159  * floats in a SIMD register to 16 byte boundaries. many other platforms have
00160  * similar behavior. setting a larger alignment can waste a (very) small
00161  * amount of memory. NOTE: this number must be a power of two. */
00162 #define EFFICIENT_ALIGNMENT 16
00163 
00164 
00165 /* Define this if your system supports anonymous memory maps (linux does) */
00166 #define MMAP_ANONYMOUS
00167 
00168 #endif

Generated on Sun Feb 11 10:40:26 2007 for Open Dynamics Engine by  doxygen 1.5.1