00001
00002 #ifndef _ODE_CONFIG_H_
00003 #define _ODE_CONFIG_H_
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #define dSINGLE
00031
00032
00033 #define dTRIMESH_ENABLED 1
00034 #define dTRIMESH_OPCODE 1
00035
00036 #define dTRIMESH_OPCODE_USE_NEW_TRIMESH_TRIMESH_COLLIDER 0
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049 #if defined(_XENON)
00050 #define ODE_PLATFORM_XBOX360
00051 #elif defined(SN_TARGET_PSP_HW)
00052 #define ODE_PLATFORM_PSP
00053 #elif defined(SN_TARGET_PS3)
00054 #define ODE_PLATFORM_PS3
00055 #elif defined(_MSC_VER) || defined(__CYGWIN32__) || defined(__MINGW32__)
00056 #define ODE_PLATFORM_WINDOWS
00057 #elif defined(__linux__)
00058 #define ODE_PLATFORM_LINUX
00059 #elif defined(__APPLE__) && defined(__MACH__)
00060 #define ODE_PLATFORM_OSX
00061 #else
00062 #error "Need some help identifying the platform!"
00063 #endif
00064
00065
00066 #if defined(ODE_PLATFORM_WINDOWS) && !defined(WIN32)
00067 #define WIN32
00068 #endif
00069
00070 #if defined(__CYGWIN32__) || defined(__MINGW32__)
00071 #define CYGWIN
00072 #endif
00073
00074 #if defined(ODE_PLATFORM_OSX)
00075 #define macintosh
00076 #endif
00077
00078
00079
00080 #if defined(ODE_PLATFORM_WINDOWS)
00081 #if defined(ODE_DLL)
00082 #define ODE_API __declspec(dllexport)
00083 #elif !defined(ODE_LIB)
00084 #define ODE_DLL_API __declspec(dllimport)
00085 #endif
00086 #endif
00087
00088 #if !defined(ODE_API)
00089 #define ODE_API
00090 #endif
00091
00092
00093
00094 #include <stdio.h>
00095 #include <stdlib.h>
00096 #include <stdarg.h>
00097 #include <math.h>
00098 #include <string.h>
00099 #include <float.h>
00100
00101 #if !defined(ODE_PLATFORM_PS3)
00102 #include <malloc.h>
00103 #endif
00104
00105 #if !defined(ODE_PLATFORM_WINDOWS)
00106 #include <alloca.h>
00107 #endif
00108
00109
00110
00111 #if defined(_MSC_VER)
00112 #define copysignf _copysign
00113 #define copysign _copysign
00114 #endif
00115
00116
00117
00118 #if defined(HUGE_VALF)
00119 #define ODE_INFINITY4 HUGE_VALF
00120 #define ODE_INFINITY8 HUGE_VAL
00121 #elif defined(FLT_MAX)
00122 #define ODE_INFINITY4 FLT_MAX
00123 #define ODE_INFINITY8 DBL_MAX
00124 #else
00125 static union { unsigned char __c[4]; float __f; } __ode_huge_valf = {{0,0,0x80,0x7f}};
00126 static union { unsigned char __c[8]; double __d; } __ode_huge_val = {{0,0,0,0,0,0,0xf0,0x7f}};
00127 #define ODE_INFINITY4 (__ode_huge_valf.__f)
00128 #define ODE_INFINITY8 (__ode_huge_val.__d)
00129 #endif
00130
00131 #ifdef dSINGLE
00132 #define dInfinity ODE_INFINITY4
00133 #define dEpsilon FLT_EPSILON
00134 #else
00135 #define dInfinity ODE_INFINITY8
00136 #define dEpsilon DBL_EPSILON
00137 #endif
00138
00139
00140
00141 #if defined(_M_IA64) || defined(__ia64__) || defined(_M_AMD64) || defined(__x86_64__)
00142 #define X86_64_SYSTEM 1
00143 typedef int int32;
00144 typedef unsigned int uint32;
00145 typedef short int16;
00146 typedef unsigned short uint16;
00147 typedef char int8;
00148 typedef unsigned char uint8;
00149 #else
00150 typedef int int32;
00151 typedef unsigned int uint32;
00152 typedef short int16;
00153 typedef unsigned short uint16;
00154 typedef char int8;
00155 typedef unsigned char uint8;
00156 #endif
00157
00158
00159
00160 typedef size_t intP;
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170 #define EFFICIENT_ALIGNMENT 16
00171
00172
00173
00174 #define MMAP_ANONYMOUS
00175
00176 #endif