วันศุกร์ที่ 28 กุมภาพันธ์ พ.ศ. 2557

File: build.txt

The Waf build system is used to build ns-3.  Waf is a Python-based
build system (http://www.freehackers.org/~tnagy/waf.html)

Note:  We've added a wiki page with more complete build instructions
than the quick ones you find below:
http://www.nsnam.org/wiki/Installation

=== Installing Waf ===

The top-level ns-3 directory should contain a current waf script, so
there is no need to have WAF installed in the system.  We are using
some extensions to WAF, which can be found in the 'waf-tools'
directory. The upstream location for these WAF extensions is:

    https://code.launchpad.net/~gjc/waf/cmd


=== Building with Waf ===

To build ns-3 with waf type the commands from the top-level directory:
 1. ./waf configure [options]
 2. ./waf

To see valid configure options, type ./waf --help.  The most important
option is -d <debug level>.  Valid debug levels (which are listed in
waf --help) are: "debug" or "optimized", with debug being default.  It is
also possible to change the flags used for compilation with (e.g.):
CXXFLAGS="-O3" ./waf configure.  By default, ns-3 is built as debug code,
with examples and tests disabled, and with python bindings enabled.

[ Note:  Unlike some other build tools, to change the build target,
the option must be supplied during the configure stage rather than
the build stage (i.e., "./waf -d optimized" will not work; instead, do
"./waf -d optimized configure; ./waf" ]

The resulting executables and libraries are placed in build/.

Other waf usages include:
---------------------------------------------------------------------