From bc4789ae0ed1395ce2166bf12530f53cd5be7a40 Mon Sep 17 00:00:00 2001 From: skyformat99 <10938976+skyformat99@users.noreply.github.com> Date: Sat, 25 Dec 2021 03:33:39 +0800 Subject: [PATCH] updated building documentation (#911) * Update README.md update readme.md * moved detailed content to doc folder Co-authored-by: Logan oos Even --- README.md | 4 +--- doc/Building.md | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0a8a71a..958d214 100644 --- a/README.md +++ b/README.md @@ -64,9 +64,7 @@ make make install ``` -Some parts of the code significantly benefit from compiler optimizations and platform features such as NEON, SSE and AVX. To enable, use `./configure CFLAGS="-O3 -march=native"` for configuration instead of `./configure`. - -For Windows, MacOS and general building options, please check out [Building documentation](doc/Building.md) for compilation and running. +For Windows, MacOS, CMake, optimizations and general building options, please check out [Building documentation](doc/Building.md) for compilation and running. **IMPORTANT** It is generally recommended to use the [latest stable release](https://github.com/ntop/n2n/releases). Please note that the current _dev_ branch usually is not guaranteed to be backward compatible neither with the latest stable release nor with previous _dev_ states. On the other hand, if you dare to try bleeding edge features, you are encouraged to compile from _dev_ – just keep track of sometimes rapidly occuring changes. Feedback in the _Issues_ section is appreciated. diff --git a/doc/Building.md b/doc/Building.md index 92a5c1c..4d62a5d 100644 --- a/doc/Building.md +++ b/doc/Building.md @@ -48,6 +48,16 @@ In order to build from the command line, open a terminal window change to the directory where the git checkout of this repository is and run the following commands: +The `libnatpmp` and `libminiupnp` have been moved to separated repositories. +So the very first time, you should run this command in the n2n directory to +install them: + +```bash +git submodule update --init --recursive +``` + +Building using `cmake` works as follows: + ```batch cmake -E make_directory build cd build @@ -114,7 +124,10 @@ The `tools/n2n-benchmark` tool reports speed-ups of 200% or more! There is no kn ## Hardware Features -Some parts of the code can be compiled to benefit from available hardware acceleration. It needs to be decided at compile-time. So, if compiling for a specific platform with known features (maybe the local one), it should be specified to the compiler, for example through the `-march=sandybridge` (you name it) or just `-march=native` for local use. +Some parts of the code significantly benefit from compiler optimizations (`-O3`) and platform features +such as NEON, SSE and AVX. It needs to be decided at compile-time. Hence if compiling for a specific +platform with known features (maybe the local one), it should be specified to the compiler – for +example through the `-march=sandybridge` (you name it) or just `-march=native` for local use. So far, the following portions of n2n's code benefit from hardware features: