summaryrefslogtreecommitdiff
path: root/libs/ode-0.16.1/INSTALL.txt
blob: 567e061532982802512611d6523268db63985e8e (plain)
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
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
5. Building with CMake



 
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!)

 Using CMake is another option for generating project files for Visual Studio.
 See section 5 below for more details on this.



 
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

 Using CMake is another option for generating project files for Code::Blocks.
 See section 5 below for more details on this.




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

 Using CMake is another option for generating project files for other
 toolsets. See section 5 below for more details on this.




5. BUILDING WITH CMAKE
======================

 ODE includes support for CMake to generate project files for various platforms
 and IDEs including Unix Makefiles, Ninja, Code::Blocks, Visual Studio. A full
 overview of all supported generators can be found at the latest version of the
 manual at https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html

 CMake supports and encourages out-of-source builds. In order to generate build
 files for your platform, create a build directory at your preferred location
 and then call CMake with the path to ODE's source directory as argument, e.g.,
 one level above the source directory:
 
   $ cd ..
   $ mkdir ode-build 
   $ cmake ../ode-src

 The existing build directory in the source directory can also be used as a
 location for the project files. A different generator than the default one
 for the system can be specified as well:

   $ cd build
   $ cmake -G"Visual Studio 15 2017 Win64" ..

 QtCreator, CLion, and Visual Studio 2017 also offer the option to open the
 source directory with the CMakeLists.txt file directly in the IDE.