blob: 96f42e082f2f8140603d54f9c8a08214470df046 [file] [log] [blame]
Jeff Thompson9b282e02013-08-09 17:13:38 -07001NDN-CPP: A Named Data Networking client library for C++ and C
Jeff Thompson057d3182013-08-09 17:02:25 -07002-------------------------------------------------------------
3
4Prerequisites
5-------------
Jeff Thompson18f43e12013-11-21 12:45:12 -08006(These are prerequisites to build NDN-CPP. To do development of NDN-CPP code and update the build system, see Development.)
Jeff Thompson057d3182013-08-09 17:02:25 -07007
Jeff Thompsonc2da8c72013-10-10 16:30:25 -07008Required: libcrypto
9Optional: libsqlite3 (for key storage)
10Optional: OSX Security framework (for key storage)
11
12Following are the detailed steps for each platform to install the prerequisites.
13
14* Ubuntu 12.04
Jeff Thompson18f43e12013-11-21 12:45:12 -080015In a terminal, enter:
Jeff Thompsonc2da8c72013-10-10 16:30:25 -070016sudo apt-get install build-essential
17sudo apt-get install libssl-dev
Jeff Thompson057d3182013-08-09 17:02:25 -070018
Jeff Thompson1fd73652013-10-23 16:42:03 -070019* Windows Cygwin
20Cygwin is tested on Windows 7 64-bit with the "Devel" packages selected to install at the top level of the
21cygwin installer. This includes libcrypto and libsqlite3.
22
Jeff Thompson18f43e12013-11-21 12:45:12 -080023* Mac OS X 10.7.3, Mac OS X 10.8.4
24Install Xcode.
25In Xcode Preferences > Downloads, install "Command Line Tools".
26
27* Mac OS X 10.9
28Install Xcode. (Xcode on OS X 10.9 seems to already have the Command Line Tools.)
Jeff Thompson1fd73652013-10-23 16:42:03 -070029
Jeff Thompson057d3182013-08-09 17:02:25 -070030Build
31-----
Jeff Thompson18f43e12013-11-21 12:45:12 -080032(These are instructions to build NDN-CPP. To do development of NDN-CPP code and update the build system, see Development.)
Jeff Thompson057d3182013-08-09 17:02:25 -070033
Jeff Thompson18f43e12013-11-21 12:45:12 -080034To build in a terminal, change directory to the NDN-CPP root. Enter:
Jeff Thompson057d3182013-08-09 17:02:25 -070035
36./configure
37make
Jeff Thompsonc2da8c72013-10-10 16:30:25 -070038make install
Jeff Thompson057d3182013-08-09 17:02:25 -070039
Jeff Thompson2f951cf2013-08-11 16:04:09 -070040To make documentation, enter:
41make doxygen-doc
42
Jeff Thompson057d3182013-08-09 17:02:25 -070043Files
44-----
45
46This makes the following libraries:
47
48.libs/libndn-c.a: The core C code for encoding and communication.
Jeff Thompsonc2da8c72013-10-10 16:30:25 -070049.libs/libndn-cpp.a: The C++ library API. (If linking to libndn-cpp, don't link to libndn-c since it is included.)
Jeff Thompson057d3182013-08-09 17:02:25 -070050
51This makes the following test files:
52
53bin/test-get-async: Connect to one of the NDN testbed hubs, express an interest and display the received data.
Jeff Thompson13527ab2013-11-21 11:17:09 -080054bin/test-publish-async: Connect to the local NDN hub, accept interests with prefix /testecho and echo back a data packet.
Jeff Thompson057d3182013-08-09 17:02:25 -070055bin/test-encode-decode-interest: Encode and decode an interest, testing interest selectors and the name URI.
56bin/test-encode-decode-data: Encode and decode a data packet, including signing the data packet.
Jeff Thompsonc2da8c72013-10-10 16:30:25 -070057bin/test-encode-decode-forwarding-entry: Encode and decode a data packet, including signing the data packet.
Jeff Thompson057d3182013-08-09 17:02:25 -070058
Jeff Thompson2f951cf2013-08-11 16:04:09 -070059Running make doxygen-doc puts code documentation in:
60doc/html
61
Jeff Thompson057d3182013-08-09 17:02:25 -070062Supported platforms
63-------------------
64
Jeff Thompson9b282e02013-08-09 17:13:38 -070065NDN-CPP is tested on the following platforms:
Jeff Thompson057d3182013-08-09 17:02:25 -070066Ubuntu 12.04 (gcc 4.6.3)
67Mac OS X 10.8.4 (clang 4.2)
68Mac OS X 10.8.4 (gcc 4.2)
69
Jeff Thompson18f43e12013-11-21 12:45:12 -080070Development
71-----------
72These steps are only needed to do development of NDN-CPP code and update the build system.
73First follow the prerequisites above for your platforms.
Jeff Thompson057d3182013-08-09 17:02:25 -070074
Jeff Thompson97f4ade2013-11-22 12:06:49 -080075* Mac OS X 10.7.3, Mac OS X 10.8.4, Mac OS X 10.9
Jeff Thompson18f43e12013-11-21 12:45:12 -080076Install MacPorts from http://www.macports.org/install.php
77In a terminal, enter:
78sudo port install automake
79sudo port install autoconf
80sudo port install libtool
Jeff Thompsonb2b41e02013-11-22 12:10:23 -080081sudo port install doxygen
Jeff Thompson18f43e12013-11-21 12:45:12 -080082
83Now you can add source code files and update Makefile.am.
84After updating, change directory to the NDN-CPP root and enter the following to build the Makefile:
85./autogen.sh