1 As of version 0.6, ODE has two new build systems, one for Visual Studio
2 and another for just about everything else.
4 1. Building with Visual Studio
5 2. Building with Autotools (Linux, OS X, etc.)
6 3. Building with Code::Blocks
7 4. Building with Something Else
10 1. BUILDING WITH VISUAL STUDIO (2002 and up)
12 If you downloaded this source code from Subversion you must first use
13 the Premake build system to generate project files. See build/readme.txt
14 for more details. If you downloaded this source code package from
15 SourceForge this has already been done for you.
17 The directory ode/build contains project files for all supported
18 versions of Visual Studio. Note that Visual Studio 6 is not supported
19 and users are advised to upgrade to Visual C++ 2005 Express (it's free!)
21 Open the appropriate solution for your version, pick the build
22 configuration you want, and build!
24 The build configuration choices are:
27 Single or Double precision
28 Static Library (Lib) or Shared Library (DLL)
31 2. BUILDING WITH AUTOTOOLS (Linux, OS X, etc.)
33 If you downloaded the source code from Subversion you must bootstrap the
34 process by running the command:
38 If you downloaded a source code package from SourceForge this has
39 already been done for you. You may see some "underquoted definition"
40 warnings depending on your platform, these are (for now) harmless
41 warnings regarding scripts from other m4 installed packages.
43 Run the configure script to autodetect your build environment.
47 By default this will build ODE as a static library with single-precision
48 math, trimesh support, and debug symbols enabled. You can modify these
49 defaults by passing additional parameters to configure. For a full list
50 of available options, type
54 Some of the more popular options are
56 --enable-double-precision enable double-precision math
57 --with-trimesh=none disables the trimesh support
58 --with-trimesh=opcode use OPCODE for trimesh code
59 --with-trimesh=gimpact use GIMPACT for trimesh code
61 --enabled-shared builds a shared library
63 To pass specific flags for an optimized build, you must do so
64 in the CPPFLAGS CFLAGS and CXXFLAGS enviroment variables,
65 you can set these with the export command before running configure
66 or by defining them on the same call to configure, so for example
67 if you are building for an athlon xp processor and you want the
68 compiler to use SSE instructions you can run configure as follows:
70 $ CFLAGS="-msse -march=atlon-xp" CXXFLAGS="-msse -march=atlon-xp" ./configure
72 Note that you must set both CFLAGS and CXXFLAGS as ODE contains a mixture of C and C++ files.
73 For preprocessor flags such as -L and -I to define library and header paths
74 respectively use CPPFLAGS.
76 Once configure has run successfully, build and install ODE:
81 The latter command will also create an `ode-config` script which you can
82 use to pass cflags and ldflags to your projects. run `ode-config` from a
83 command prompt to find out how it works.
85 In addition the option `--with-arch=` allows the user to pass the -march
86 flag to GCC, in order to tune the library for a particular architecture.
87 The arguments for --with-arch are listed on this page for -mtune:
89 http://gcc.gnu.org/onlinedocs/gcc-3.4.1/gcc/i386-and-x86-64-Options.html#i386%20and%20x86-64%20Options
91 Note that the link points to posible values for Intel processors, but
92 other processors are also supported, check the page for your particular
93 processor to see what parameters can be passed to -march in your case.
96 3. Building with Code::Blocks
98 Because Code::Blocks supports so many different platforms, we do not
99 provide workspaces. Instead, use Premake to create a workspace tailored
100 for your platform and project. Like so:
103 $ premake --with-tests --target cb-gcc
105 To see a complete list of options:
111 4. Building with Something Else
113 ODE uses the Premake tool to provide support for several different toolsets.
114 Premake adds support for new toolsets on a regular basis, so yours might be
115 supported. Check the Premake website at http://premake.sourceforge.net/,
116 and then follow the directions for Code::Blocks above, substituting your
117 toolset target in place of `cb-gcc`.