blob: b2a5a09dc1252c0a16bc6399e80e054c97526da1 [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 Pesaventodadbc3e2023-02-14 02:32:36 -05007Install the `ndn-cxx library <https://docs.named-data.net/ndn-cxx/current/INSTALL.html>`__
Davide Pesaventofee7ee32020-04-15 02:45:07 -04008and its prerequisites.
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -07009
Davide Pesavento423553e2022-08-19 20:46:06 -040010Optionally, to build man pages and API documentation the following additional dependencies
Davide Pesaventofee7ee32020-04-15 02:45:07 -040011need to be installed:
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070012
Davide Pesavento423553e2022-08-19 20:46:06 -040013- doxygen
14- graphviz
Davide Pesavento872f18e2022-09-20 17:03:22 -040015- sphinx >= 4.0
Davide Pesavento423553e2022-08-19 20:46:06 -040016- sphinxcontrib-doxylink
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070017
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070018Build
19-----
20
Davide Pesavento423553e2022-08-19 20:46:06 -040021The following commands should be used to build NDNS on Ubuntu:
22
23.. code-block:: sh
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 Pesavento423553e2022-08-19 20:46:06 -040037If this is not desired, the default flags can be overridden to disable debug symbols.
Davide Pesaventofee7ee32020-04-15 02:45:07 -040038The 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
Davide Pesavento423553e2022-08-19 20:46:06 -040041.. code-block:: sh
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070042
43 CXXFLAGS="-O2" ./waf configure --prefix=/usr --sysconfdir=/etc
44 ./waf
45 sudo ./waf install
46
47Building documentation
48----------------------
49
Davide Pesavento423553e2022-08-19 20:46:06 -040050Tutorials and API documentation can be built using the following commands:
51
52.. code-block:: sh
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070053
54 # Full set of documentation (tutorials + API) in build/docs
55 ./waf docs
56
Davide Pesaventofee7ee32020-04-15 02:45:07 -040057 # Only tutorials in build/docs
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070058 ./waf sphinx
59
Davide Pesaventofee7ee32020-04-15 02:45:07 -040060 # Only API docs in build/docs/doxygen
61 ./waf doxygen
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070062
Davide Pesavento423553e2022-08-19 20:46:06 -040063If ``sphinx-build`` is detected during ``./waf configure``, man pages will automatically
Davide Pesaventofee7ee32020-04-15 02:45:07 -040064be built and installed during the normal build process (i.e., during ``./waf`` and
Davide Pesavento423553e2022-08-19 20:46:06 -040065``./waf install``). By default, man pages will be installed into ``${PREFIX}/share/man``
Davide Pesaventofee7ee32020-04-15 02:45:07 -040066(the default value for ``PREFIX`` is ``/usr/local``). This location can be changed
67during the ``./waf configure`` stage using the ``--prefix``, ``--datarootdir``, or
68``--mandir`` options.
Alexander Afanasyevbd5b67a2014-09-02 16:06:21 -070069
Davide Pesaventofee7ee32020-04-15 02:45:07 -040070For further details, please refer to ``./waf --help``.