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 119 120 121 122 123 124 125 126 127 128 129 130 131
|
ODE has two new build systems, one for *nix systems and another for
just about everything else.
1. Building with Visual Studio
2. Building with Autotools (Linux, OS X, MSYS, etc.)
3. Building with Code::Blocks
4. Building with Something Else
1. BUILDING WITH VISUAL STUDIO (2002 and up)
============================================
If you downloaded this source code from Subversion you must first use
the Premake build system to generate project files.
Open a command prompt and enter into the build directory. Then run the
premake4.exe program with the appropriate options to generate the
project files. For example, to generate a project for VS2008:
> premake4.exe --with-tests --with-demos vs2008
To see a complete list of options use:
> premake4.exe --help
Note that Visual Studio 6 is not supported and users are advised to upgrade
to at least Visual Studio 2005 Express (it's free!)
2. BUILDING WITH AUTOTOOLS (Linux, OS X, MSYS, etc.)
====================================================
2.1 FROM SUBVERSION REPOSITORY
------------------------------
If you downloaded the source code from Subversion you must bootstrap the
process by running the command:
$ ./bootstrap
For this command to work you need a set of tools typically available
on BSD and Linux distributions with development packages installed. OS X
users may need to manually install libtool, autoconf, automake,
pkg-config, and maybe some more.
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.
2.2 FROM A RELEASED TARBALL
---------------------------
First extract the archive (e.g. tar xvfz <filename.tar.gz>) and enter
the created directory (ode-x.y).
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 with OPCODE, 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
--enabled-shared builds a shared library
To pass specific flags for an optimized build, you must do so
in the CFLAGS and CXXFLAGS enviroment variables, or as arguments
to ./configure. For example if you are building for an athlon xp processor
and you want the compiler to use SSE instructions you can run configure as
follows:
$ ./configure CFLAGS="-msse -march=atlon-xp" CXXFLAGS="-msse -march=atlon-xp"
Note that you must set both CFLAGS and CXXFLAGS as ODE contains a mixture of
C and C++ files.
Once configure has run successfully, build and install ODE:
$ make
$ make install
The latter command will also create a pkg-config script that provides
compilation and linking flags for programs. The old stand-alone
"ode-config" script is also installed for compatibility.
3. BUILDING WITH Code::Blocks
=============================
Because Code::Blocks supports so many different platforms, we do not
provide workspaces. Instead, use Premake to create a workspace tailored
for your platform and project. Like so:
$ cd build
$ premake4 --with-tests --with-demos codeblocks
To see a complete list of options:
$ cd build
$ premake4 --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 `codeblocks`.
|