Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 1 | .. _NDNS Installation Instructions: |
| 2 | |
| 3 | NDNS Installation Instructions |
| 4 | ============================== |
| 5 | |
| 6 | Prerequisites |
| 7 | ------------- |
| 8 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame^] | 9 | Install the `ndn-cxx library <https://named-data.net/doc/ndn-cxx/current/INSTALL.html>`_ |
| 10 | and its prerequisites. |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 11 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame^] | 12 | Optionally, to build manpages and API documentation the following additional dependencies |
| 13 | need to be installed: |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 14 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame^] | 15 | - doxygen |
| 16 | - graphviz |
| 17 | - sphinx |
| 18 | - sphinxcontrib-doxylink |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 19 | |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 20 | Build |
| 21 | ----- |
| 22 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame^] | 23 | The following basic commands should be used to build NDNS on Ubuntu:: |
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 | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame^] | 37 | If this is undesirable, the default flags can be overridden to disable debug symbols. |
| 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 | |
| 41 | :: |
| 42 | |
| 43 | CXXFLAGS="-O2" ./waf configure --prefix=/usr --sysconfdir=/etc |
| 44 | ./waf |
| 45 | sudo ./waf install |
| 46 | |
| 47 | Building documentation |
| 48 | ---------------------- |
| 49 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame^] | 50 | NDNS tutorials and API documentation can be built using the following commands:: |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 51 | |
| 52 | # Full set of documentation (tutorials + API) in build/docs |
| 53 | ./waf docs |
| 54 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame^] | 55 | # Only tutorials in build/docs |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 56 | ./waf sphinx |
| 57 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame^] | 58 | # Only API docs in build/docs/doxygen |
| 59 | ./waf doxygen |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 60 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame^] | 61 | If ``sphinx-build`` is detected during ``./waf configure``, manpages will automatically |
| 62 | be 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 |
| 65 | during the ``./waf configure`` stage using the ``--prefix``, ``--datarootdir``, or |
| 66 | ``--mandir`` options. |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 67 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame^] | 68 | For further details, please refer to ``./waf --help``. |