Next: Isys Graphics User Interface Up: Modifying ASTERIX Code Prev: 2 Modifying the files

3 Compiling the files

The code is compiled and linked using the Starlink utility alink (see SUN144).

  $alink gdraw.f -g `grf_link_adam` `ast_link_adam`
  
The first argument to alink should be the file containing the top-level subroutine. The root name of this file ("gdraw") will become the name of the resulting executable.

Use of the flag "-g" is recommended to produce debugger-friendly code.

Then follows a list of other subroutines and libraries that gdraw requires. In this example the graphics libraries are included with the command "$AST_BIN/grf_link_adam". This link command produces a list of required libraries and compiler option necessary. This is passed to the alink command by use of the reverse apostrophe "`", which executes the enclosed command and places the result in-situ.

Each application needs to be finally linked with "ast_link_adam", and firstly with "???_link_adam" depending upon which monolith/section the command is associated with. The choices for "???" are: grf, hed, interface, rosxrt, spec, src, time and util.

If these scripts are not available at your site then point you web browser at the following page,

http://www.sr.bham.ac.uk/asterix-docs/scripts

The interface file gdraw.ifl is compiled using the command "compifl" (see SUN144),

  $compifl gdraw.ifl
  


Next: Isys Graphics User Interface Up: Modifying ASTERIX Code Prev: 2 Modifying the files