Step 6 of 8: Checking up before Compilation

The GNU C++ compiler (g++) must be used to compile the Adsmith source code. This is the compiler that was used to compile the Adsmith libraries. We could make use of the 'aimk' script just like for the PVM code. Make sure you read all about the PVM makefile using 'aimk'.


 
 

  • Adsmith source.c or .C files, and the Makefile.aimk file should be stored in the src directory. 
  • Edit the copy of the Makefile.aimk, so that it can compile the files. 
  • You must change all the file names in one set of the rules so as to match the name of your program. (Assuming the name of your program is rsort.C, your correct makefile should then look like this). 
  • You have to be in the src directory, when you compile your code.
  •  When you follow this structure, Makefile.aimk will compile your programs, and store the executable files in the proper directory under your bin sub-directory. 
  • To compile a program, type aimk . This will cause Makefile to try to compile using the rules provided for that file. 
  • You will see lines appear on the screen, notifying you of what aimk is doing. Once you get the prompt back, and there are no errors in the program, you are ready to run the task