~ubuntu-branches/debian/jessie/libccd/jessie

« back to all changes in this revision

Viewing changes to doc/compile-and-install.rst

  • Committer: Package Import Robot
  • Author(s): Jose Luis Rivero
  • Date: 2014-03-24 16:51:48 UTC
  • Revision ID: package-import@ubuntu.com-20140324165148-mfno979f58rv322z
Tags: upstream-2.0
ImportĀ upstreamĀ versionĀ 2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Compile And Install
 
2
====================
 
3
 
 
4
libccd contains several mechanisms how to compile and install it.
 
5
Using a simple Makefile, using autotools and using CMake.
 
6
 
 
7
 
 
8
1. Using Makefile
 
9
------------------
 
10
Directory ``src/`` contains Makefile that should contain everything needed for compilation and installation:
 
11
 
 
12
.. code-block:: bash
 
13
 
 
14
    $ cd src/
 
15
    $ make
 
16
    $ make install
 
17
 
 
18
Library libccd is by default compiled in double precision of floating point
 
19
numbers - you can change this by options ``USE_SINGLE``/``USE_DOUBLE``, i.e.:
 
20
 
 
21
.. code-block:: bash
 
22
 
 
23
    $ make USE_SINGLE=yes
 
24
 
 
25
will compile library in single precision.
 
26
Installation directory can be changed by options ``PREFIX``, ``INCLUDEDIR``
 
27
and ``LIBDIR``. 
 
28
For more info type '``make help``'.
 
29
 
 
30
 
 
31
2. Using Autotools
 
32
-------------------
 
33
libccd also contains support for autotools:
 
34
Generate configure script etc.:
 
35
 
 
36
.. code-block:: bash
 
37
 
 
38
    $ ./bootstrap
 
39
 
 
40
Create new ``build/`` directory:
 
41
 
 
42
.. code-block:: bash
 
43
 
 
44
    $ mkdir build && cd build
 
45
 
 
46
Run configure script:
 
47
 
 
48
.. code-block:: bash
 
49
 
 
50
    $ ../configure
 
51
 
 
52
Run make and make install:
 
53
 
 
54
.. code-block:: bash
 
55
 
 
56
    $ make && make install
 
57
 
 
58
configure script can change the way libccd is compiled and installed, most
 
59
significant option is ``--enable-double-precision`` which enables double
 
60
precision (single is default in this case).
 
61
 
 
62
3. Using CMake
 
63
---------------
 
64
TODO