blob: 9878470a469f6fbdf8a85b289e2564a21facd033 [file] [log] [blame] [view]
Alexander Afanasyev2a8e6272014-03-17 19:36:50 -07001ndn-cpp-dev: A dev version of Named Data Networking client library for C++
Alexander Afanasyev553d0c82014-01-28 19:19:39 -08002===========================================================================
3
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -07004Supported platforms
5-------------------
6
7ndn-cpp-dev is tested on the following platforms:
8
9* Ubuntu 12.04 (64 bit and 32 bit)
10* Ubuntu 13.10 (64 bit and 32 bit)
11* Mac OS X 10.8
12* Mac OS X 10.9
13
14
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080015Prerequisites
16-------------
17
Alexander Afanasyev2a8e6272014-03-17 19:36:50 -070018(These are prerequisites to build ndn-cpp-dev. To do development of ndn-cpp-dev code and update the build system,
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080019 see Development Prerequisites.)
20
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070021### Required:
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080022
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -070023* `python` >= 2.6
24* `libcrypto`
25* `libsqlite3`
26* `libcrypto++`
27* `pkg-config`
28* Boost libraries >= 1.48
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080029* OSX Security framework (on OSX platform only)
30
31Following are the detailed steps for each platform to install the prerequisites.
32
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -070033* Mac OS X
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080034
35 Install Xcode.
36 In Xcode Preferences > Downloads, install "Command Line Tools".
37
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080038 If using macports, dependencies can be installed using the following commands:
39
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -070040 sudo port install pkgconfig boost sqlite3 libcryptopp
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080041
Alexander Afanasyevdafdc372014-03-03 15:58:44 +000042* Ubuntu 12.04, Ubuntu 13.10
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080043
44 In a terminal, enter:
45
46 sudo apt-get install build-essential
Alexander Afanasyevdafdc372014-03-03 15:58:44 +000047 sudo apt-get install libssl-dev libsqlite3-dev libcrypto++-dev
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080048
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -070049 # For Ubuntu 12.04
50 sudo apt-get install libboost1.48-all-dev
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080051
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -070052 # For Ubuntu 13.10
53 sudo apt-get install libboost-all-dev
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080054
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -070055### Optional Dependencies:
56
57To build tutorials, manpages, and API documentation the following
58dependencies need to be installed:
59
60* `doxygen`
61* `graphviz`
62* `python-sphinx`
63
64The following lists steps for common platforms to install these prerequisites:
65
66* On OS X 10.8 and 10.9 with macports:
67
68 sudo port install doxygen graphviz py27-sphinx sphinx_select
69 sudo port select sphinx py27-sphinx
70
71* On Ubuntu >= 12.04:
72
73 sudo apt-get install doxygen graphviz python-sphinx
74
75
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080076Build
77-----
78
Alexander Afanasyev2a8e6272014-03-17 19:36:50 -070079(These are instructions to build ndn-cpp-dev. To do development of ndn-cpp-dev
80code and update the build system, see Development.)
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080081
Alexander Afanasyev2a8e6272014-03-17 19:36:50 -070082To build in a terminal, change directory to the ndn-cpp-dev root. Enter:
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080083
84 ./waf configure
85 ./waf
86 sudo ./waf install
87
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -070088This builds and installs the following items:
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080089
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -070090* `<LIBPATH>/libndn-cpp-dev.a`: static NDN C++ library
91* `<LIBPATH>/pkgconfig/libndn-cpp-dev.pc`: pkgconfig file storing all neccessary flags
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080092 to build against the library. For example, if pkgconfig or pkgconf package is
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -070093 installed and `PKG_CONFIG_PATH` is configured properly (or `<LIBPATH>/pkgconfig` is a
94 default path), `pkgconfig --libs --clflags libndn-cpp-dev` will return all necessary
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080095 compile and link flags for the library.
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -070096* `<BINPATH>/tlvdump`: a simple tool to dump contents of TLV-formatted data
97* `<BINPATH>/ndncatchunks3`: a simplified equivalent to ndncatchunks2 in NDNx package
98* `<BINPATH>/ndnputchunks3`: a simplified equivalent to ndnputchunks2 in NDNx package
99* `<BINPATH>/ndnsec`: tool to manage NDN keys and certificates
100* `<BINPATH>/ndnsec-*`: convenience scripts for `ndnsec` tools
Alexander Afanasyev553d0c82014-01-28 19:19:39 -0800101
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -0700102If configured with tests: `./waf configure --with-tests`), the above commands will
Alexander Afanasyev553d0c82014-01-28 19:19:39 -0800103also produce:
104
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -0700105* `build/unit-tests`: A unit test binary for the library
Alexander Afanasyev553d0c82014-01-28 19:19:39 -0800106
107Documentation
108-------------
109
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -0700110ndn-cpp-dev tutorials and API documentation can be built using the following commands:
Alexander Afanasyev553d0c82014-01-28 19:19:39 -0800111
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -0700112 # Full set of documentation (tutorials + API) in build/docs
113 ./waf docs
Alexander Afanasyev553d0c82014-01-28 19:19:39 -0800114
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -0700115 # Only tutorials in `build/docs`
116 ./waf sphinx
Alexander Afanasyev553d0c82014-01-28 19:19:39 -0800117
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -0700118 # Only API docs in `build/docs/doxygen`
119 ./waf doxgyen
Alexander Afanasyev553d0c82014-01-28 19:19:39 -0800120
Alexander Afanasyev553d0c82014-01-28 19:19:39 -0800121
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -0700122Manpages are automatically created and installed during the normal build process
123(e.g., during `./waf` and `./waf install`), if `python-sphinx` module is detected during
124`./waf configure` stage. By default, manpages are installed into `${PREFIX}/share/man`
125(where default value for `PREFIX` is `/usr/local`). This location can be changed during
126`./waf configure` stage using `--prefix`, `--datarootdir`, or `--mandir` options.
Alexander Afanasyev553d0c82014-01-28 19:19:39 -0800127
Alexander Afanasyev7c6aeb02014-04-10 19:59:19 -0700128For more details, refer to `./waf --help`.
Alexander Afanasyev553d0c82014-01-28 19:19:39 -0800129
Alexander Afanasyev553d0c82014-01-28 19:19:39 -0800130
Alexander Afanasyev553d0c82014-01-28 19:19:39 -0800131
Alexander Afanasyev553d0c82014-01-28 19:19:39 -0800132
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -0700133Development Build
134-----------------
Alexander Afanasyev553d0c82014-01-28 19:19:39 -0800135
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -0700136The following is the suggested configure commands for development build.
137
138 ./waf configure --debug --with-tests
139 ./waf
140 sudo ./waf install
141
142In the development build all compiler optimizations are disabled by default and all warnings are treated as error.
143The default behavior can be overridden by setting CXXFLAGS environment variable before running `./waf configure`:
144
145 CXXFLAGS="-O1 -g3" ./waf configure --debug --with-tests
146 ...