doc/tutorial/source/getting-started.rst
changeset 7024 4392d52b3536
parent 6998 1c2b8cfb71d2
child 7025 32212c736ab4
equal deleted inserted replaced
7023:af9c5ac72f2c 7024:4392d52b3536
   262 ``ns-allinone-3.10`` under your ``~/tarballs`` directory.  Take a deep
   262 ``ns-allinone-3.10`` under your ``~/tarballs`` directory.  Take a deep
   263 breath and type the following:
   263 breath and type the following:
   264 
   264 
   265 ::
   265 ::
   266 
   266 
   267   ./build.py --enable-tests
   267   ./build.py --enable-examples --enable-tests
   268 
   268 
   269 Because we are working with tests in this tutorial, and because they
   269 Because we are working with examples and tests in this tutorial, and
   270 are not built by default in |ns3|, the argument for build.py tells it
   270 because they are not built by default in |ns3|, the arguments for
   271 to build them for us.  In the future you can build |ns3| without tests
   271 build.py tells it to build them for us.  In the future you can build
   272 if you wish.
   272 |ns3| without examples and tests if you wish.
   273 
   273 
   274 You will see lots of typical compiler output messages displayed as the build
   274 You will see lots of typical compiler output messages displayed as the build
   275 script builds the various pieces you downloaded.  Eventually you should see the
   275 script builds the various pieces you downloaded.  Eventually you should see the
   276 following magic words:
   276 following magic words:
   277 
   277 
   298 detour and look at how to make changes to the configuration of the project.
   298 detour and look at how to make changes to the configuration of the project.
   299 Probably the most useful configuration change you can make will be to 
   299 Probably the most useful configuration change you can make will be to 
   300 build the optimized version of the code.  By default you have configured
   300 build the optimized version of the code.  By default you have configured
   301 your project to build the debug version.  Let's tell the project to 
   301 your project to build the debug version.  Let's tell the project to 
   302 make an optimized build.  To explain to Waf that it should do optimized
   302 make an optimized build.  To explain to Waf that it should do optimized
   303 builds that include the tests, you will need to execute the 
   303 builds that include the examples and tests, you will need to execute the 
   304 following command,
   304 following command,
   305 
   305 
   306 ::
   306 ::
   307 
   307 
   308   ./waf -d optimized --enable-tests configure
   308   ./waf -d optimized --enable-examples --enable-tests configure
   309 
   309 
   310 This runs Waf out of the local directory (which is provided as a convenience
   310 This runs Waf out of the local directory (which is provided as a convenience
   311 for you).  As the build system checks for various dependencies you should see
   311 for you).  As the build system checks for various dependencies you should see
   312 output that looks similar to the following,
   312 output that looks similar to the following,
   313 
   313 
   377 system.  If this library were not found, the corresponding |ns3| feature 
   377 system.  If this library were not found, the corresponding |ns3| feature 
   378 would not be enabled and a message would be displayed.  Note further that there is 
   378 would not be enabled and a message would be displayed.  Note further that there is 
   379 a feature to use the program ``sudo`` to set the suid bit of certain programs.
   379 a feature to use the program ``sudo`` to set the suid bit of certain programs.
   380 This is not enabled by default and so this feature is reported as "not enabled."
   380 This is not enabled by default and so this feature is reported as "not enabled."
   381 
   381 
   382 Now go ahead and switch back to the debug build that includes the tests.
   382 Now go ahead and switch back to the debug build that includes the examples and tests.
   383 
   383 
   384 ::
   384 ::
   385 
   385 
   386   ./waf -d debug --enable-tests configure
   386   ./waf -d debug --enable-examples --enable-tests configure
   387 
   387 
   388 The build system is now configured and you can build the debug versions of 
   388 The build system is now configured and you can build the debug versions of 
   389 the |ns3| programs by simply typing,
   389 the |ns3| programs by simply typing,
   390 
   390 
   391 ::
   391 ::
   394 
   394 
   395 Some waf commands are meaningful during the build phase and some commands are valid
   395 Some waf commands are meaningful during the build phase and some commands are valid
   396 in the configuration phase.  For example, if you wanted to use the emulation 
   396 in the configuration phase.  For example, if you wanted to use the emulation 
   397 features of |ns3|, you might want to enable setting the suid bit using
   397 features of |ns3|, you might want to enable setting the suid bit using
   398 sudo as described above.  This turns out to be a configuration-time command, and so 
   398 sudo as described above.  This turns out to be a configuration-time command, and so 
   399 you could reconfigure using the following command that also includes the tests
   399 you could reconfigure using the following command that also includes the examples and tests
   400 
   400 
   401 ::
   401 ::
   402 
   402 
   403   ./waf -d debug --enable-sudo --enable-tests configure
   403   ./waf -d debug --enable-sudo --enable-examples --enable-tests configure
   404 
   404 
   405 If you do this, waf will have run sudo to change the socket creator programs of the
   405 If you do this, waf will have run sudo to change the socket creator programs of the
   406 emulation code to run as root.  There are many other configure- and build-time options
   406 emulation code to run as root.  There are many other configure- and build-time options
   407 available in waf.  To explore these options, type:
   407 available in waf.  To explore these options, type:
   408 
   408 
   497 "optimized out."  If you don't see the "Hello Simulator" output,
   497 "optimized out."  If you don't see the "Hello Simulator" output,
   498 type the following,
   498 type the following,
   499 
   499 
   500 ::
   500 ::
   501 
   501 
   502   ./waf -d debug --enable-tests configure
   502   ./waf -d debug --enable-examples --enable-tests configure
   503 
   503 
   504 to tell ``waf`` to build the debug versions of the |ns3| 
   504 to tell ``waf`` to build the debug versions of the |ns3| 
   505 programs that includes the tests.  You must still build 
   505 programs that includes the examples and tests.  You must still build 
   506 the actual debug version of the code by typing,
   506 the actual debug version of the code by typing,
   507 
   507 
   508 ::
   508 ::
   509 
   509 
   510   ./waf
   510   ./waf