blob: 2f545a48c765ef0aed339c77b5128d371c188043 [file] [log] [blame]
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -07001.. _NDNS Installation Instructions:
2
3NDNS Installation Instructions
4==============================
5
6Prerequisites
7-------------
8
9- Install the `ndn-cxx library <http://named-data.net/doc/ndn-cxx/current/INSTALL.html>`_
10 and its requirements
11
12To build manpages and API documentation:
13
14- ``doxygen``
15- ``graphviz``
16- ``python-sphinx``
17
18 On OS X 10.8 and 10.9 with MacPorts:
19
20 ::
21
22 sudo port install doxygen graphviz py27-sphinx sphinx_select
23 sudo port select sphinx py27-sphinx
24
25 On Ubuntu >= 12.04:
26
27 ::
28
29 sudo apt-get install doxygen graphviz python-sphinx
30
31Build
32-----
33
34The following basic commands should be used to build NDNS on Ubuntu:
35
36::
37
38 ./waf configure
39 ./waf
40 sudo ./waf install
41
42Some platforms, such as OS X with MacPorts and certain Linux distributions (e.g., Fedora)
43require setting the ``PKG_CONFIG_PATH`` before running configure.
44
45For example, on OS X with MacPorts (assuming the default ``/opt/local`` MacPorts path):
46
47::
48
49 export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:$PKG_CONFIG_PATH
50 ./waf configure
51 ./waf
52 sudo ./waf install
53
54or some Linux distributions:
55
56::
57
58 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig:$PKG_CONFIG_PATH
59 ./waf configure
60 ./waf
61 sudo ./waf install
62
63
64Refer to ``./waf --help`` for more options that can be used during ``configure`` stage and
65how to properly configure and run NFD.
66
67Debug symbols
68+++++++++++++
69
70The default compiler flags enable debug symbols to be included in binaries. This
71potentially allows more meaningful debugging if NDNS or other tools happen to crash.
72
73If it is undesirable, default flags can be easily overridden. The following example shows
74how to completely disable debug symbols and configure NDNS to be installed into ``/usr``
75with configuration in ``/etc`` folder.
76
77::
78
79 CXXFLAGS="-O2" ./waf configure --prefix=/usr --sysconfdir=/etc
80 ./waf
81 sudo ./waf install
82
83Building documentation
84----------------------
85
86NDNS tutorials and API documentation can be built using the following commands:
87
88::
89
90 # Full set of documentation (tutorials + API) in build/docs
91 ./waf docs
92
93 # Only tutorials in `build/docs`
94 ./waf sphinx
95
96 # Only API docs in `build/docs/doxygen`
97 ./waf doxgyen
98
99
100Manpages are automatically created and installed during the normal build process
101(e.g., during ``./waf`` and ``./waf install``), if ``python-sphinx`` module is detected
102during ``./waf configure`` stage. By default, manpages are installed into
103``${PREFIX}/share/man`` (where default value for ``PREFIX`` is ``/usr/local``). This
104location can be changed during ``./waf configure`` stage using ``--prefix``,
105``--datarootdir``, or ``--mandir`` options.
106
107For more details, refer to ``./waf --help``.