blob: ea9d8b0990d1bc7e8a0f6f3cf230201573adc6c8 [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 Thompson9f908dc2013-11-22 14:27:17 -08006(These are prerequisites to build NDN-CPP. To do development of NDN-CPP code and update the build system,
7 see Development Prerequisites.)
Jeff Thompson057d3182013-08-09 17:02:25 -07008
Jeff Thompsonc2da8c72013-10-10 16:30:25 -07009Required: libcrypto
10Optional: libsqlite3 (for key storage)
11Optional: OSX Security framework (for key storage)
12
13Following are the detailed steps for each platform to install the prerequisites.
14
Jeff Thompson9f908dc2013-11-22 14:27:17 -080015* Mac OS X 10.7.3, Mac OS X 10.8.4
16Install Xcode.
17In Xcode Preferences > Downloads, install "Command Line Tools".
18
19* Mac OS X 10.9
20Install Xcode. (Xcode on OS X 10.9 seems to already have the Command Line Tools.)
21
22* Ubuntu 12.04 (64 bit and 32 bit), Ubuntu 13.04 (64 bit)
Jeff Thompson18f43e12013-11-21 12:45:12 -080023In a terminal, enter:
Jeff Thompsonc2da8c72013-10-10 16:30:25 -070024sudo apt-get install build-essential
25sudo apt-get install libssl-dev
Jeff Thompson057d3182013-08-09 17:02:25 -070026
Jeff Thompson1fd73652013-10-23 16:42:03 -070027* Windows Cygwin
28Cygwin is tested on Windows 7 64-bit with the "Devel" packages selected to install at the top level of the
29cygwin installer. This includes libcrypto and libsqlite3.
30
Jeff Thompson057d3182013-08-09 17:02:25 -070031Build
32-----
Jeff Thompson18f43e12013-11-21 12:45:12 -080033(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 -070034
Jeff Thompson18f43e12013-11-21 12:45:12 -080035To build in a terminal, change directory to the NDN-CPP root. Enter:
Jeff Thompson057d3182013-08-09 17:02:25 -070036
37./configure
38make
Jeff Thompsonc2da8c72013-10-10 16:30:25 -070039make install
Jeff Thompson057d3182013-08-09 17:02:25 -070040
Jeff Thompson2f951cf2013-08-11 16:04:09 -070041To make documentation, enter:
42make doxygen-doc
43
Jeff Thompson057d3182013-08-09 17:02:25 -070044Files
45-----
46
47This makes the following libraries:
48
49.libs/libndn-c.a: The core C code for encoding and communication.
Jeff Thompsonc2da8c72013-10-10 16:30:25 -070050.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 -070051
52This makes the following test files:
53
54bin/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 -080055bin/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 -070056bin/test-encode-decode-interest: Encode and decode an interest, testing interest selectors and the name URI.
57bin/test-encode-decode-data: Encode and decode a data packet, including signing the data packet.
Jeff Thompsonc2da8c72013-10-10 16:30:25 -070058bin/test-encode-decode-forwarding-entry: Encode and decode a data packet, including signing the data packet.
Jeff Thompson057d3182013-08-09 17:02:25 -070059
Jeff Thompson2f951cf2013-08-11 16:04:09 -070060Running make doxygen-doc puts code documentation in:
61doc/html
62
Jeff Thompson057d3182013-08-09 17:02:25 -070063Supported platforms
64-------------------
65
Jeff Thompson9b282e02013-08-09 17:13:38 -070066NDN-CPP is tested on the following platforms:
Jeff Thompson9f908dc2013-11-22 14:27:17 -080067Ubuntu 12.04 (64 bit and 32 bit) (gcc 4.6.3)
68Ubuntu 13.04 (64 bit) (gcc 4.7.3)
Jeff Thompson057d3182013-08-09 17:02:25 -070069Mac OS X 10.8.4 (clang 4.2)
70Mac OS X 10.8.4 (gcc 4.2)
71
Jeff Thompson9f908dc2013-11-22 14:27:17 -080072Development Prerequisites
73-------------------------
Jeff Thompson18f43e12013-11-21 12:45:12 -080074These steps are only needed to do development of NDN-CPP code and update the build system.
Jeff Thompson9f908dc2013-11-22 14:27:17 -080075First follow the Prerequisites above for your platforms.
Jeff Thompson057d3182013-08-09 17:02:25 -070076
Jeff Thompson97f4ade2013-11-22 12:06:49 -080077* Mac OS X 10.7.3, Mac OS X 10.8.4, Mac OS X 10.9
Jeff Thompson18f43e12013-11-21 12:45:12 -080078Install MacPorts from http://www.macports.org/install.php
79In a terminal, enter:
80sudo port install automake
81sudo port install autoconf
82sudo port install libtool
Jeff Thompsonb2b41e02013-11-22 12:10:23 -080083sudo port install doxygen
Jeff Thompson18f43e12013-11-21 12:45:12 -080084
Jeff Thompson9f908dc2013-11-22 14:27:17 -080085* Ubuntu 12.04 (64 bit and 32 bit), Ubuntu 13.04 (64 bit)
86In a terminal, enter:
87sudo apt-get install automake
88sudo apt-get install libtool
89sudo apt-get install doxygen
90
91Development
92-----------
93Follow Development Prerequisites above for your platform.
Jeff Thompson18f43e12013-11-21 12:45:12 -080094Now you can add source code files and update Makefile.am.
95After updating, change directory to the NDN-CPP root and enter the following to build the Makefile:
96./autogen.sh