blob: 31f279739faf2e0d00c8117a0b387125535bb8df [file] [log] [blame]
NDN-CPP: A Named Data Networking client library for C++ and C
-------------------------------------------------------------
Prerequisites
-------------
(These are prerequisites to build NDN-CPP. To do development of NDN-CPP code and update the build system, see Development.)
Required: libcrypto
Optional: libsqlite3 (for key storage)
Optional: OSX Security framework (for key storage)
Following are the detailed steps for each platform to install the prerequisites.
* Ubuntu 12.04
In a terminal, enter:
sudo apt-get install build-essential
sudo apt-get install libssl-dev
* Windows Cygwin
Cygwin is tested on Windows 7 64-bit with the "Devel" packages selected to install at the top level of the
cygwin installer. This includes libcrypto and libsqlite3.
* Mac OS X 10.7.3, Mac OS X 10.8.4
Install Xcode.
In Xcode Preferences > Downloads, install "Command Line Tools".
* Mac OS X 10.9
Install Xcode. (Xcode on OS X 10.9 seems to already have the Command Line Tools.)
Build
-----
(These are instructions to build NDN-CPP. To do development of NDN-CPP code and update the build system, see Development.)
To build in a terminal, change directory to the NDN-CPP root. Enter:
./configure
make
make install
To make documentation, enter:
make doxygen-doc
Files
-----
This makes the following libraries:
.libs/libndn-c.a: The core C code for encoding and communication.
.libs/libndn-cpp.a: The C++ library API. (If linking to libndn-cpp, don't link to libndn-c since it is included.)
This makes the following test files:
bin/test-get-async: Connect to one of the NDN testbed hubs, express an interest and display the received data.
bin/test-publish-async: Connect to the local NDN hub, accept interests with prefix /testecho and echo back a data packet.
bin/test-encode-decode-interest: Encode and decode an interest, testing interest selectors and the name URI.
bin/test-encode-decode-data: Encode and decode a data packet, including signing the data packet.
bin/test-encode-decode-forwarding-entry: Encode and decode a data packet, including signing the data packet.
Running make doxygen-doc puts code documentation in:
doc/html
Supported platforms
-------------------
NDN-CPP is tested on the following platforms:
Ubuntu 12.04 (gcc 4.6.3)
Mac OS X 10.8.4 (clang 4.2)
Mac OS X 10.8.4 (gcc 4.2)
Development
-----------
These steps are only needed to do development of NDN-CPP code and update the build system.
First follow the prerequisites above for your platforms.
* Mac OS X 10.8.4
Install MacPorts from http://www.macports.org/install.php
In a terminal, enter:
sudo port install automake
sudo port install autoconf
sudo port install libtool
aclocal --print
"aclocal --print" shows the directory for m4 macros. Download the the following into there (use sudo):
# http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_cxx_compile_stdcxx_11.m4
# http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_prog_doxygen.m4
# http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_check_openssl.m4
# http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_lib_sqlite3.m4
# http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_prefix_config_h.m4
Now you can add source code files and update Makefile.am.
After updating, change directory to the NDN-CPP root and enter the following to build the Makefile:
./autogen.sh