1 ODE has two new build systems, one for *nix systems and another for
2 just about everything else.
4 1. Building with Visual Studio
5 2. Building with Autotools (Linux, OS X, MSYS, etc.)
6 3. Building with Code::Blocks
7 4. Building with Something Else
13 1. BUILDING WITH VISUAL STUDIO (2002 and up)
14 ============================================
16 If you downloaded this source code from Subversion you must first use
17 the Premake build system to generate project files.
19 Open a command prompt and enter into the build directory. Then run the
20 premake4.exe program with the appropriate options to generate the
21 project files. For example, to generate a project for VS2008:
23 > premake4.exe --with-tests --with-demos vs2008
25 To see a complete list of options use:
29 Note that Visual Studio 6 is not supported and users are advised to upgrade
30 to at least Visual Studio 2005 Express (it's free!)
32 Using CMake is another option for generating project files for Visual Studio.
33 See section 5 below for more details on this.
38 2. BUILDING WITH AUTOTOOLS (Linux, OS X, MSYS, etc.)
39 ====================================================
41 2.1 FROM SUBVERSION REPOSITORY
42 ------------------------------
44 If you downloaded the source code from Subversion you must bootstrap the
45 process by running the command:
49 For this command to work you need a set of tools typically available
50 on BSD and Linux distributions with development packages installed. OS X
51 users may need to manually install libtool, autoconf, automake,
52 pkg-config, and maybe some more.
54 If you downloaded a source code package from SourceForge this has
55 already been done for you. You may see some "underquoted definition"
56 warnings depending on your platform, these are (for now) harmless
57 warnings regarding scripts from other m4 installed packages.
59 2.2 FROM A RELEASED TARBALL
60 ---------------------------
62 First extract the archive (e.g. tar xvfz <filename.tar.gz>) and enter
63 the created directory (ode-x.y).
65 Run the configure script to autodetect your build environment:
69 By default this will build ODE as a static library with single-precision
70 math, trimesh support with OPCODE, and debug symbols enabled. You can
71 modify these defaults by passing additional parameters to
72 configure. For a full list of available options, type:
76 Some of the more popular options are
78 --enable-double-precision enable double-precision math
79 --with-trimesh=none disables the trimesh support
80 --with-trimesh=opcode use OPCODE for trimesh code
81 --with-trimesh=gimpact use GIMPACT for trimesh code
83 --enabled-shared builds a shared library
85 To pass specific flags for an optimized build, you must do so
86 in the CFLAGS and CXXFLAGS enviroment variables, or as arguments
87 to ./configure. For example if you are building for an athlon xp processor
88 and you want the compiler to use SSE instructions you can run configure as
91 $ ./configure CFLAGS="-msse -march=atlon-xp" CXXFLAGS="-msse -march=atlon-xp"
93 Note that you must set both CFLAGS and CXXFLAGS as ODE contains a mixture of
96 Once configure has run successfully, build and install ODE:
101 The latter command will also create a pkg-config script that provides
102 compilation and linking flags for programs. The old stand-alone
103 "ode-config" script is also installed for compatibility.
108 3. BUILDING WITH Code::Blocks
109 =============================
111 Because Code::Blocks supports so many different platforms, we do not
112 provide workspaces. Instead, use Premake to create a workspace tailored
113 for your platform and project. Like so:
116 $ premake4 --with-tests --with-demos codeblocks
118 To see a complete list of options:
123 Using CMake is another option for generating project files for Code::Blocks.
124 See section 5 below for more details on this.
129 4. BUILDING WITH SOMETHING ELSE
130 ===============================
132 ODE uses the Premake tool to provide support for several different toolsets.
133 Premake adds support for new toolsets on a regular basis, so yours might be
134 supported. Check the Premake website at http://premake.sourceforge.net/,
135 and then follow the directions for Code::Blocks above, substituting your
136 toolset target in place of `codeblocks`.
138 Using CMake is another option for generating project files for other
139 toolsets. See section 5 below for more details on this.
144 5. BUILDING WITH CMAKE
145 ======================
147 ODE includes support for CMake to generate project files for various platforms
148 and IDEs including Unix Makefiles, Ninja, Code::Blocks, Visual Studio. A full
149 overview of all supported generators can be found at the latest version of the
150 manual at https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html
152 CMake supports and encourages out-of-source builds. In order to generate build
153 files for your platform, create a build directory at your preferred location
154 and then call CMake with the path to ODE's source directory as argument, e.g.,
155 one level above the source directory:
161 The existing build directory in the source directory can also be used as a
162 location for the project files. A different generator than the default one
163 for the system can be specified as well:
166 $ cmake -G"Visual Studio 15 2017 Win64" ..
168 QtCreator, CLion, and Visual Studio 2017 also offer the option to open the
169 source directory with the CMakeLists.txt file directly in the IDE.