OpenSimMirror/libraries/ode-0.9/INSTALL.txt

119 lines
3.9 KiB
Plaintext

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`.