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 | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 7 | Install the `ndn-cxx library <https://named-data.net/doc/ndn-cxx/current/INSTALL.html>`_ |
| 8 | and its prerequisites. |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 9 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 10 | Optionally, to build manpages and API documentation the following additional dependencies |
| 11 | need to be installed: |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 12 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 13 | - doxygen |
| 14 | - graphviz |
| 15 | - sphinx |
| 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 | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 21 | The following basic commands should be used to build NDNS on Ubuntu:: |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 22 | |
| 23 | ./waf configure |
| 24 | ./waf |
| 25 | sudo ./waf install |
| 26 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 27 | 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] | 28 | |
| 29 | Debug symbols |
| 30 | +++++++++++++ |
| 31 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 32 | The default compiler flags include debug symbols in binaries. This should provide |
| 33 | more meaningful debugging information if NDNS or other tools happen to crash. |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 34 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 35 | If this is undesirable, the default flags can be overridden to disable debug symbols. |
| 36 | The following example shows how to completely disable debug symbols and configure |
| 37 | NDNS to be installed into ``/usr`` with configuration in the ``/etc`` directory. |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 38 | |
| 39 | :: |
| 40 | |
| 41 | CXXFLAGS="-O2" ./waf configure --prefix=/usr --sysconfdir=/etc |
| 42 | ./waf |
| 43 | sudo ./waf install |
| 44 | |
| 45 | Building documentation |
| 46 | ---------------------- |
| 47 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 48 | NDNS tutorials and API documentation can be built using the following commands:: |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 49 | |
| 50 | # Full set of documentation (tutorials + API) in build/docs |
| 51 | ./waf docs |
| 52 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 53 | # Only tutorials in build/docs |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 54 | ./waf sphinx |
| 55 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 56 | # Only API docs in build/docs/doxygen |
| 57 | ./waf doxygen |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 58 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 59 | If ``sphinx-build`` is detected during ``./waf configure``, manpages will automatically |
| 60 | be 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 |
| 63 | during the ``./waf configure`` stage using the ``--prefix``, ``--datarootdir``, or |
| 64 | ``--mandir`` options. |
Alexander Afanasyev | bd5b67a | 2014-09-02 16:06:21 -0700 | [diff] [blame] | 65 | |
Davide Pesavento | fee7ee3 | 2020-04-15 02:45:07 -0400 | [diff] [blame] | 66 | For further details, please refer to ``./waf --help``. |