blob: 771a07c28111a6427cb347af326f50fd90020c83 [file] [log] [blame]
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -07001.. _NDNS Installation Instructions:
2
3NDNS Installation Instructions
4==============================
5
6Prerequisites
7-------------
8
Davide Pesaventofee7ee32020-04-15 02:45:07 -04009Install the `ndn-cxx library <https://named-data.net/doc/ndn-cxx/current/INSTALL.html>`_
10and its prerequisites.
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070011
Davide Pesaventofee7ee32020-04-15 02:45:07 -040012Optionally, to build manpages and API documentation the following additional dependencies
13need to be installed:
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070014
Davide Pesaventofee7ee32020-04-15 02:45:07 -040015- doxygen
16- graphviz
17- sphinx
18- sphinxcontrib-doxylink
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070019
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070020Build
21-----
22
Davide Pesaventofee7ee32020-04-15 02:45:07 -040023The following basic commands should be used to build NDNS on Ubuntu::
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070024
25 ./waf configure
26 ./waf
27 sudo ./waf install
28
Davide Pesaventofee7ee32020-04-15 02:45:07 -040029Refer to ``./waf --help`` for more options that can be used during the ``configure`` stage.
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070030
31Debug symbols
32+++++++++++++
33
Davide Pesaventofee7ee32020-04-15 02:45:07 -040034The default compiler flags include debug symbols in binaries. This should provide
35more meaningful debugging information if NDNS or other tools happen to crash.
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070036
Davide Pesaventofee7ee32020-04-15 02:45:07 -040037If this is undesirable, the default flags can be overridden to disable debug symbols.
38The following example shows how to completely disable debug symbols and configure
39NDNS to be installed into ``/usr`` with configuration in the ``/etc`` directory.
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070040
41::
42
43 CXXFLAGS="-O2" ./waf configure --prefix=/usr --sysconfdir=/etc
44 ./waf
45 sudo ./waf install
46
47Building documentation
48----------------------
49
Davide Pesaventofee7ee32020-04-15 02:45:07 -040050NDNS tutorials and API documentation can be built using the following commands::
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070051
52 # Full set of documentation (tutorials + API) in build/docs
53 ./waf docs
54
Davide Pesaventofee7ee32020-04-15 02:45:07 -040055 # Only tutorials in build/docs
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070056 ./waf sphinx
57
Davide Pesaventofee7ee32020-04-15 02:45:07 -040058 # Only API docs in build/docs/doxygen
59 ./waf doxygen
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070060
Davide Pesaventofee7ee32020-04-15 02:45:07 -040061If ``sphinx-build`` is detected during ``./waf configure``, manpages will automatically
62be built and installed during the normal build process (i.e., during ``./waf`` and
63``./waf install``). By default, manpages will be installed into ``${PREFIX}/share/man``
64(the default value for ``PREFIX`` is ``/usr/local``). This location can be changed
65during the ``./waf configure`` stage using the ``--prefix``, ``--datarootdir``, or
66``--mandir`` options.
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070067
Davide Pesaventofee7ee32020-04-15 02:45:07 -040068For further details, please refer to ``./waf --help``.