Davide Pesavento | 3d01fa3 | 2021-10-03 17:13:38 -0400 | [diff] [blame] | 1 | Installation Instructions |
| 2 | ========================= |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 3 | |
| 4 | Prerequisites |
| 5 | ------------- |
| 6 | |
Davide Pesavento | dadbc3e | 2023-02-14 02:32:36 -0500 | [diff] [blame] | 7 | Install the `ndn-cxx library <https://docs.named-data.net/ndn-cxx/current/INSTALL.html>`__ |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 8 | and its prerequisites. |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 9 | |
Davide Pesavento | 423553e | 2022-08-19 20:46:06 -0400 | [diff] [blame] | 10 | Optionally, to build man pages and API documentation the following additional dependencies |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 11 | need to be installed: |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 12 | |
Davide Pesavento | 423553e | 2022-08-19 20:46:06 -0400 | [diff] [blame] | 13 | - doxygen |
| 14 | - graphviz |
Davide Pesavento | 872f18e | 2022-09-20 17:03:22 -0400 | [diff] [blame] | 15 | - sphinx >= 4.0 |
Davide Pesavento | 423553e | 2022-08-19 20:46:06 -0400 | [diff] [blame] | 16 | - sphinxcontrib-doxylink |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 17 | |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 18 | Build |
| 19 | ----- |
| 20 | |
Davide Pesavento | 423553e | 2022-08-19 20:46:06 -0400 | [diff] [blame] | 21 | The following commands should be used to build NDNS on Ubuntu: |
| 22 | |
| 23 | .. code-block:: sh |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 24 | |
| 25 | ./waf configure |
| 26 | ./waf |
| 27 | sudo ./waf install |
| 28 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 29 | Refer to ``./waf --help`` for more options that can be used during the ``configure`` stage. |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 30 | |
| 31 | Debug symbols |
| 32 | +++++++++++++ |
| 33 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 34 | The default compiler flags include debug symbols in binaries. This should provide |
| 35 | more meaningful debugging information if NDNS or other tools happen to crash. |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 36 | |
Davide Pesavento | 423553e | 2022-08-19 20:46:06 -0400 | [diff] [blame] | 37 | If this is not desired, the default flags can be overridden to disable debug symbols. |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 38 | The following example shows how to completely disable debug symbols and configure |
| 39 | NDNS to be installed into ``/usr`` with configuration in the ``/etc`` directory. |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 40 | |
Davide Pesavento | 423553e | 2022-08-19 20:46:06 -0400 | [diff] [blame] | 41 | .. code-block:: sh |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 42 | |
| 43 | CXXFLAGS="-O2" ./waf configure --prefix=/usr --sysconfdir=/etc |
| 44 | ./waf |
| 45 | sudo ./waf install |
| 46 | |
| 47 | Building documentation |
| 48 | ---------------------- |
| 49 | |
Davide Pesavento | 423553e | 2022-08-19 20:46:06 -0400 | [diff] [blame] | 50 | Tutorials and API documentation can be built using the following commands: |
| 51 | |
| 52 | .. code-block:: sh |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 53 | |
| 54 | # Full set of documentation (tutorials + API) in build/docs |
| 55 | ./waf docs |
| 56 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 57 | # Only tutorials in build/docs |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 58 | ./waf sphinx |
| 59 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 60 | # Only API docs in build/docs/doxygen |
| 61 | ./waf doxygen |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 62 | |
Davide Pesavento | 423553e | 2022-08-19 20:46:06 -0400 | [diff] [blame] | 63 | If ``sphinx-build`` is detected during ``./waf configure``, man pages will automatically |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 64 | be built and installed during the normal build process (i.e., during ``./waf`` and |
Davide Pesavento | 423553e | 2022-08-19 20:46:06 -0400 | [diff] [blame] | 65 | ``./waf install``). By default, man pages will be installed into ``${PREFIX}/share/man`` |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 66 | (the default value for ``PREFIX`` is ``/usr/local``). This location can be changed |
| 67 | during the ``./waf configure`` stage using the ``--prefix``, ``--datarootdir``, or |
| 68 | ``--mandir`` options. |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 69 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 70 | For further details, please refer to ``./waf --help``. |