Jeff Thompson | 9b282e0 | 2013-08-09 17:13:38 -0700 | [diff] [blame] | 1 | NDN-CPP: A Named Data Networking client library for C++ and C |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 2 | ------------------------------------------------------------- |
| 3 | |
| 4 | Prerequisites |
| 5 | ------------- |
Jeff Thompson | 18f43e1 | 2013-11-21 12:45:12 -0800 | [diff] [blame^] | 6 | (These are prerequisites to build NDN-CPP. To do development of NDN-CPP code and update the build system, see Development.) |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 7 | |
Jeff Thompson | c2da8c7 | 2013-10-10 16:30:25 -0700 | [diff] [blame] | 8 | Required: libcrypto |
| 9 | Optional: libsqlite3 (for key storage) |
| 10 | Optional: OSX Security framework (for key storage) |
| 11 | |
| 12 | Following are the detailed steps for each platform to install the prerequisites. |
| 13 | |
| 14 | * Ubuntu 12.04 |
Jeff Thompson | 18f43e1 | 2013-11-21 12:45:12 -0800 | [diff] [blame^] | 15 | In a terminal, enter: |
Jeff Thompson | c2da8c7 | 2013-10-10 16:30:25 -0700 | [diff] [blame] | 16 | sudo apt-get install build-essential |
| 17 | sudo apt-get install libssl-dev |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 18 | |
Jeff Thompson | 1fd7365 | 2013-10-23 16:42:03 -0700 | [diff] [blame] | 19 | * Windows Cygwin |
| 20 | Cygwin is tested on Windows 7 64-bit with the "Devel" packages selected to install at the top level of the |
| 21 | cygwin installer. This includes libcrypto and libsqlite3. |
| 22 | |
Jeff Thompson | 18f43e1 | 2013-11-21 12:45:12 -0800 | [diff] [blame^] | 23 | * Mac OS X 10.7.3, Mac OS X 10.8.4 |
| 24 | Install Xcode. |
| 25 | In Xcode Preferences > Downloads, install "Command Line Tools". |
| 26 | |
| 27 | * Mac OS X 10.9 |
| 28 | Install Xcode. (Xcode on OS X 10.9 seems to already have the Command Line Tools.) |
Jeff Thompson | 1fd7365 | 2013-10-23 16:42:03 -0700 | [diff] [blame] | 29 | |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 30 | Build |
| 31 | ----- |
Jeff Thompson | 18f43e1 | 2013-11-21 12:45:12 -0800 | [diff] [blame^] | 32 | (These are instructions to build NDN-CPP. To do development of NDN-CPP code and update the build system, see Development.) |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 33 | |
Jeff Thompson | 18f43e1 | 2013-11-21 12:45:12 -0800 | [diff] [blame^] | 34 | To build in a terminal, change directory to the NDN-CPP root. Enter: |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 35 | |
| 36 | ./configure |
| 37 | make |
Jeff Thompson | c2da8c7 | 2013-10-10 16:30:25 -0700 | [diff] [blame] | 38 | make install |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 39 | |
Jeff Thompson | 2f951cf | 2013-08-11 16:04:09 -0700 | [diff] [blame] | 40 | To make documentation, enter: |
| 41 | make doxygen-doc |
| 42 | |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 43 | Files |
| 44 | ----- |
| 45 | |
| 46 | This makes the following libraries: |
| 47 | |
| 48 | .libs/libndn-c.a: The core C code for encoding and communication. |
Jeff Thompson | c2da8c7 | 2013-10-10 16:30:25 -0700 | [diff] [blame] | 49 | .libs/libndn-cpp.a: The C++ library API. (If linking to libndn-cpp, don't link to libndn-c since it is included.) |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 50 | |
| 51 | This makes the following test files: |
| 52 | |
| 53 | bin/test-get-async: Connect to one of the NDN testbed hubs, express an interest and display the received data. |
Jeff Thompson | 13527ab | 2013-11-21 11:17:09 -0800 | [diff] [blame] | 54 | bin/test-publish-async: Connect to the local NDN hub, accept interests with prefix /testecho and echo back a data packet. |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 55 | bin/test-encode-decode-interest: Encode and decode an interest, testing interest selectors and the name URI. |
| 56 | bin/test-encode-decode-data: Encode and decode a data packet, including signing the data packet. |
Jeff Thompson | c2da8c7 | 2013-10-10 16:30:25 -0700 | [diff] [blame] | 57 | bin/test-encode-decode-forwarding-entry: Encode and decode a data packet, including signing the data packet. |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 58 | |
Jeff Thompson | 2f951cf | 2013-08-11 16:04:09 -0700 | [diff] [blame] | 59 | Running make doxygen-doc puts code documentation in: |
| 60 | doc/html |
| 61 | |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 62 | Supported platforms |
| 63 | ------------------- |
| 64 | |
Jeff Thompson | 9b282e0 | 2013-08-09 17:13:38 -0700 | [diff] [blame] | 65 | NDN-CPP is tested on the following platforms: |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 66 | Ubuntu 12.04 (gcc 4.6.3) |
| 67 | Mac OS X 10.8.4 (clang 4.2) |
| 68 | Mac OS X 10.8.4 (gcc 4.2) |
| 69 | |
Jeff Thompson | 18f43e1 | 2013-11-21 12:45:12 -0800 | [diff] [blame^] | 70 | Development |
| 71 | ----------- |
| 72 | These steps are only needed to do development of NDN-CPP code and update the build system. |
| 73 | First follow the prerequisites above for your platforms. |
Jeff Thompson | 057d318 | 2013-08-09 17:02:25 -0700 | [diff] [blame] | 74 | |
Jeff Thompson | 18f43e1 | 2013-11-21 12:45:12 -0800 | [diff] [blame^] | 75 | * Mac OS X 10.8.4 |
| 76 | Install MacPorts from http://www.macports.org/install.php |
| 77 | In a terminal, enter: |
| 78 | sudo port install automake |
| 79 | sudo port install autoconf |
| 80 | sudo port install libtool |
| 81 | aclocal --print |
| 82 | |
| 83 | "aclocal --print" shows the directory for m4 macros. Download the the following into there (use sudo): |
| 84 | # http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_cxx_compile_stdcxx_11.m4 |
| 85 | # http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_prog_doxygen.m4 |
| 86 | # http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_check_openssl.m4 |
| 87 | # http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_lib_sqlite3.m4 |
| 88 | # http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_prefix_config_h.m4 |
| 89 | |
| 90 | Now you can add source code files and update Makefile.am. |
| 91 | After updating, change directory to the NDN-CPP root and enter the following to build the Makefile: |
| 92 | ./autogen.sh |