aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ode-0.9/INSTALL.txt
blob: 36746cbdfb3aaa03143d6fd1a584a23646cbfa69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
As of version 0.6, ODE has two new build systems, one for Visual Studio
and another for just about everything else. 

1. Building with Visual Studio
2. Building with Autotools (Linux, OS X, etc.)
3. Building with Code::Blocks
4. Building with Something Else

 
1. BUILDING WITH VISUAL STUDIO (2002 and up)

 If you downloaded the source code from Subversion you must first copy 
 the file build/config-default.h to include/ode/config.h. If you 
 downloaded a source code package from SourceForge this has already 
 been done for you.
 
 The directory ode/build contains project files for all supported versions
 of Visual Studio. Open the appropriate solution for your version, build,
 and go! 
 
 Single-precision math is used by default. If you would like to switch to
 doubles instead, edit ode/include/ode/config.h and replace 
 
   #define dSINGLE 1
   
 with the line
 
   #define dDOUBLE 1
   
 and the rebuild everything.
 
 Note that Visual Studio 6 is no longer supported; please upgrade to 
 Visual Studio 2005 C++ Express (it's free!).
  
 
2. BUILDING WITH AUTOTOOLS (Linux, OS X, etc.)

 If you downloaded the source code from Subversion you must bootstrap the
 process by running the command:
 
   $ sh autogen.sh
   
 If you downloaded a source code package from SourceForge this has 
 already been done for you. You may see some "underquoted definition" 
 warnings depending on your platform, these are (for now) harmless 
 warnings regarding scripts from other m4 installed packages.
 
 Run the configure script to autodetect your build environment.
 
   $ ./configure
    
 By default this will build ODE as a static library with single-precision
 math, trimesh support, and debug symbols enabled. You can modify these 
 defaults by passing additional parameters to configure. For a full list 
 of available options, type
 
   $ ./configure --help
   
 Some of the more popular options are
 
   --enable-double-precision enable double-precision math
   --with-trimesh=none disables the trimesh support
   --with-trimesh=opcode use OPCODE for trimesh code
   --with-trimesh=gimpact use GIMPACT for trimesh code

   --enable-release builds an optimized library
   --enabled-shared builds a shared library
    
 Once configure has run successfully, build and install ODE:
 
   $ make
   $ make install
    
 The latter command will also create an `ode-config` script which you can
 use to pass cflags and ldflags to your projects. run `ode-config` from a
 command prompt to find out how it works.
 
 In addition the option `--with-arch=` allows the user to pass the -march
 flag to GCC, in order to tune the library for a particular architecture.
 The arguments for --with-arch are listed on this page for -mtune: 
    
 http://gcc.gnu.org/onlinedocs/gcc-3.4.1/gcc/i386-and-x86-64-Options.html#i386%20and%20x86-64%20Options
 
 Note that the link points to posible values for Intel processors, but 
 other processors are also supported, check the page for your particular
 processor to see what parameters can be passed to -march in your case.

 
3. Building with Code::Blocks

 Because Code::Blocks supports so many different platforms, we do not
 provide workspaces. Instead, use Premake (http://www.premake.sourceforge.net/)
 to create a workspace tailored for your platform and project.
 
 Download Premake and place it on your system path (or anywhere convenient).
 Then create a workspace like so:
 
   $ cd ode/build
   $ premake --with-tests --target cb-gcc
   
 To see a complete list of options:
 
   $ cd ode/build
   $ premake --help
   
   
4. Building with Something Else

 ODE uses the Premake tool to provide support for several different toolsets.
 Premake adds support for new toolsets on a regular basis, so yours might be
 supported. Check the Premake website at http://premake.sourceforge.net/, 
 and then follow the directions for Code::Blocks above, substituting your
 toolset target in place of `cb-gcc`.