blob: 9b0e57c31f9df26575eb08ee01762a07d8408a64 [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 Afanasyev2a8e6272014-03-17 19:36:50 -070021Required:
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
55Build
56-----
57
Alexander Afanasyev2a8e6272014-03-17 19:36:50 -070058(These are instructions to build ndn-cpp-dev. To do development of ndn-cpp-dev
59code and update the build system, see Development.)
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080060
Alexander Afanasyev2a8e6272014-03-17 19:36:50 -070061To build in a terminal, change directory to the ndn-cpp-dev root. Enter:
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080062
63 ./waf configure
64 ./waf
65 sudo ./waf install
66
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -070067This builds and installs the following items:
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080068
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -070069* `<LIBPATH>/libndn-cpp-dev.a`: static NDN C++ library
70* `<LIBPATH>/pkgconfig/libndn-cpp-dev.pc`: pkgconfig file storing all neccessary flags
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080071 to build against the library. For example, if pkgconfig or pkgconf package is
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -070072 installed and `PKG_CONFIG_PATH` is configured properly (or `<LIBPATH>/pkgconfig` is a
73 default path), `pkgconfig --libs --clflags libndn-cpp-dev` will return all necessary
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080074 compile and link flags for the library.
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -070075* `<BINPATH>/tlvdump`: a simple tool to dump contents of TLV-formatted data
76* `<BINPATH>/ndncatchunks3`: a simplified equivalent to ndncatchunks2 in NDNx package
77* `<BINPATH>/ndnputchunks3`: a simplified equivalent to ndnputchunks2 in NDNx package
78* `<BINPATH>/ndnsec`: tool to manage NDN keys and certificates
79* `<BINPATH>/ndnsec-*`: convenience scripts for `ndnsec` tools
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080080
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -070081If configured with tests: `./waf configure --with-tests`), the above commands will
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080082also produce:
83
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -070084* `build/unit-tests`: A unit test binary for the library
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080085
86Documentation
87-------------
88
89To make documentation, enter:
90
91 ./waf doxygen
92
93This will produce doxygen API code documentation in:
94
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -070095* `build/doc/html`
Alexander Afanasyev553d0c82014-01-28 19:19:39 -080096
97Development Prerequisites
98-------------------------
99
Alexander Afanasyev2a8e6272014-03-17 19:36:50 -0700100These steps are only needed to do development of ndn-cpp-dev code and update the build system.
Alexander Afanasyev553d0c82014-01-28 19:19:39 -0800101First follow the Prerequisites above for your platforms.
102
103* Mac OS X 10.7.3, Mac OS X 10.8.4, Mac OS X 10.9
104
105 Install MacPorts from http://www.macports.org/install.php
106 In a terminal, enter:
107
108 sudo port install doxygen
109
110* Ubuntu 12.04 (64 bit and 32 bit), Ubuntu 13.04 (64 bit)
111
112 In a terminal, enter:
113
114 sudo apt-get install doxygen
115
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -0700116Development Build
117-----------------
Alexander Afanasyev553d0c82014-01-28 19:19:39 -0800118
Alexander Afanasyev5e1288e2014-03-28 11:11:48 -0700119The following is the suggested configure commands for development build.
120
121 ./waf configure --debug --with-tests
122 ./waf
123 sudo ./waf install
124
125In the development build all compiler optimizations are disabled by default and all warnings are treated as error.
126The default behavior can be overridden by setting CXXFLAGS environment variable before running `./waf configure`:
127
128 CXXFLAGS="-O1 -g3" ./waf configure --debug --with-tests
129 ...