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