blob: 35cd53b7d89eafc381716b84f2dd07fe75ad6d99 [file] [log] [blame]
Davide Pesavento3d01fa32021-10-03 17:13:38 -04001Installation Instructions
2=========================
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -07003
4Prerequisites
5-------------
6
Davide Pesaventofee7ee32020-04-15 02:45:07 -04007Install the `ndn-cxx library <https://named-data.net/doc/ndn-cxx/current/INSTALL.html>`_
8and its prerequisites.
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -07009
Davide Pesaventofee7ee32020-04-15 02:45:07 -040010Optionally, to build manpages and API documentation the following additional dependencies
11need to be installed:
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070012
Davide Pesaventofee7ee32020-04-15 02:45:07 -040013- doxygen
14- graphviz
15- sphinx
16- sphinxcontrib-doxylink
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070017
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070018Build
19-----
20
Davide Pesaventofee7ee32020-04-15 02:45:07 -040021The following basic commands should be used to build NDNS on Ubuntu::
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070022
23 ./waf configure
24 ./waf
25 sudo ./waf install
26
Davide Pesaventofee7ee32020-04-15 02:45:07 -040027Refer to ``./waf --help`` for more options that can be used during the ``configure`` stage.
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070028
29Debug symbols
30+++++++++++++
31
Davide Pesaventofee7ee32020-04-15 02:45:07 -040032The default compiler flags include debug symbols in binaries. This should provide
33more meaningful debugging information if NDNS or other tools happen to crash.
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070034
Davide Pesaventofee7ee32020-04-15 02:45:07 -040035If this is undesirable, the default flags can be overridden to disable debug symbols.
36The following example shows how to completely disable debug symbols and configure
37NDNS to be installed into ``/usr`` with configuration in the ``/etc`` directory.
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070038
39::
40
41 CXXFLAGS="-O2" ./waf configure --prefix=/usr --sysconfdir=/etc
42 ./waf
43 sudo ./waf install
44
45Building documentation
46----------------------
47
Davide Pesaventofee7ee32020-04-15 02:45:07 -040048NDNS tutorials and API documentation can be built using the following commands::
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070049
50 # Full set of documentation (tutorials + API) in build/docs
51 ./waf docs
52
Davide Pesaventofee7ee32020-04-15 02:45:07 -040053 # Only tutorials in build/docs
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070054 ./waf sphinx
55
Davide Pesaventofee7ee32020-04-15 02:45:07 -040056 # Only API docs in build/docs/doxygen
57 ./waf doxygen
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070058
Davide Pesaventofee7ee32020-04-15 02:45:07 -040059If ``sphinx-build`` is detected during ``./waf configure``, manpages will automatically
60be built and installed during the normal build process (i.e., during ``./waf`` and
61``./waf install``). By default, manpages will be installed into ``${PREFIX}/share/man``
62(the default value for ``PREFIX`` is ``/usr/local``). This location can be changed
63during the ``./waf configure`` stage using the ``--prefix``, ``--datarootdir``, or
64``--mandir`` options.
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070065
Davide Pesaventofee7ee32020-04-15 02:45:07 -040066For further details, please refer to ``./waf --help``.