18. Compile and Link Application Programs

18.1 Compiling an Application Program on UNIX

On UNIX the make utility is used to compile an application program. The commands are stored in the file named either makefile or Makefile. Whenever any of the independent modules is changed, executing the UNIX command:

     % make
ensures the executable file of the application program is up to date.

Note that an application program depends on several external files and object libraries. For example, a typical C application program depends on:

  1. Application program source file(s)
  2. Include files --> TAE, LAS, etc.
  3. Object libraries --> TAE, LAS, etc.
Therefore, if any of the previously listed dependencies are modified, the program is rebuilt.

As examples, the makefiles for the C application add2stat and the FORTRAN application edipsout may be used with the EROS Data Center's release procedure or with a global makefile. To install the executable files in the directory indicated by the environment variable DSTDIR, the following UNIX command should be run:

     % make las
To build a FORTRAN application please refer to Section 5.1 about the use of faim and fpp. The FORTRAN include file, las.mfi, includes the basic LAS include files. See Section 5.4 for information on FORTRAN include files.