INSTALL.txt 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. ODE has two new build systems, one for *nix systems and another for
  2. just about everything else.
  3. 1. Building with Visual Studio
  4. 2. Building with Autotools (Linux, OS X, MSYS, etc.)
  5. 3. Building with Code::Blocks
  6. 4. Building with Something Else
  7. 1. BUILDING WITH VISUAL STUDIO (2002 and up)
  8. ============================================
  9. If you downloaded this source code from Subversion you must first use
  10. the Premake build system to generate project files.
  11. Open a command prompt and enter into the build directory. Then run the
  12. premake4.exe program with the appropriate options to generate the
  13. project files. For example, to generate a project for VS2008:
  14. > premake4.exe --with-tests --with-demos vs2008
  15. To see a complete list of options use:
  16. > premake4.exe --help
  17. Note that Visual Studio 6 is not supported and users are advised to upgrade
  18. to at least Visual Studio 2005 Express (it's free!)
  19. 2. BUILDING WITH AUTOTOOLS (Linux, OS X, MSYS, etc.)
  20. ====================================================
  21. 2.1 FROM SUBVERSION REPOSITORY
  22. ------------------------------
  23. If you downloaded the source code from Subversion you must bootstrap the
  24. process by running the command:
  25. $ ./bootstrap
  26. For this command to work you need a set of tools typically available
  27. on BSD and Linux distributions with development packages installed. OS X
  28. users may need to manually install libtool, autoconf, automake,
  29. pkg-config, and maybe some more.
  30. If you downloaded a source code package from SourceForge this has
  31. already been done for you. You may see some "underquoted definition"
  32. warnings depending on your platform, these are (for now) harmless
  33. warnings regarding scripts from other m4 installed packages.
  34. 2.2 FROM A RELEASED TARBALL
  35. ---------------------------
  36. First extract the archive (e.g. tar xvfz <filename.tar.gz>) and enter
  37. the created directory (ode-x.y).
  38. Run the configure script to autodetect your build environment:
  39. $ ./configure
  40. By default this will build ODE as a static library with single-precision
  41. math, trimesh support with OPCODE, and debug symbols enabled. You can
  42. modify these defaults by passing additional parameters to
  43. configure. For a full list of available options, type:
  44. $ ./configure --help
  45. Some of the more popular options are
  46. --enable-double-precision enable double-precision math
  47. --with-trimesh=none disables the trimesh support
  48. --with-trimesh=opcode use OPCODE for trimesh code
  49. --with-trimesh=gimpact use GIMPACT for trimesh code
  50. --enabled-shared builds a shared library
  51. To pass specific flags for an optimized build, you must do so
  52. in the CFLAGS and CXXFLAGS enviroment variables, or as arguments
  53. to ./configure. For example if you are building for an athlon xp processor
  54. and you want the compiler to use SSE instructions you can run configure as
  55. follows:
  56. $ ./configure CFLAGS="-msse -march=atlon-xp" CXXFLAGS="-msse -march=atlon-xp"
  57. Note that you must set both CFLAGS and CXXFLAGS as ODE contains a mixture of
  58. C and C++ files.
  59. Once configure has run successfully, build and install ODE:
  60. $ make
  61. $ make install
  62. The latter command will also create a pkg-config script that provides
  63. compilation and linking flags for programs. The old stand-alone
  64. "ode-config" script is also installed for compatibility.
  65. 3. BUILDING WITH Code::Blocks
  66. =============================
  67. Because Code::Blocks supports so many different platforms, we do not
  68. provide workspaces. Instead, use Premake to create a workspace tailored
  69. for your platform and project. Like so:
  70. $ cd build
  71. $ premake4 --with-tests --with-demos codeblocks
  72. To see a complete list of options:
  73. $ cd build
  74. $ premake4 --help
  75. 4. BUILDING WITH SOMETHING ELSE
  76. ===============================
  77. ODE uses the Premake tool to provide support for several different toolsets.
  78. Premake adds support for new toolsets on a regular basis, so yours might be
  79. supported. Check the Premake website at http://premake.sourceforge.net/,
  80. and then follow the directions for Code::Blocks above, substituting your
  81. toolset target in place of `codeblocks`.