Many of you have tried to change the source codes in NS-2 but researchers find it difficult to reflect these changes. This article will guide you to the steps which are necessary for it.
However all these steps are not always necessary. All the steps should only be done when some changes in makefile.in have been made. If no changes done in makefile.in but some changes are made in any header file then Step 2, 3 and 4 are required. If only .cc files are modified then it will require only Step 3 and 4.
Always performing all the steps will not cause any harm but after step 2, step 3 takes much longer time to execute since all the object files are removed by step 2.
There are four steps to reflect changes that have been done in the source codes of NS-2.
- Open terminal, go to ns-allinone-2.35/ns-2.35 folder by issuing cd command. Type sudo ./configure. It will ask for your computer password. Type it and press Enter.
- Now issue the following command: sudo make clean This command will remove all the existing object files from C++ source code.
- Now type: sudo make It will take around 2 minutes to process this command. It may vary depending upon your computer speed.
- Now issue the following command: sudo make install
If these 4 steps are successfully completed then your changes done in the source codes will be reflected. If you are doubtful whether changes have been reflected or not. I advise you to put one printf(“changes have been reflected”); command in somewhere in the code that you have been modifying. When you will run any Tcl file, this statement will be printed on terminal. It will verify that changes have been reflected.