Sun S3L 3.0 Programming and Reference Guide

Compiling and Running the Examples

Each example subdirectory has a makefile. Each makefile references the file ../Make.simple. If you are copying the example sources and makefiles to one of your own subdirectories, you should also copy Make.simple to your subdirectory's parent directory. Make.simple contains definitions of compilers, compiler flags and other variables that are needed to compile and run the examples. Note that the compiler flags in this file will not provide you with highly optimized executables. Information on optimization flags is best obtained from the documentation for the compiler of interest.

Each makefile has several targets that are meant to simplify the compilation and execution of examples. If you want to compile the source codes and create all executables in a particular example directory, use the command make.

If you wish to run the executables, enter make run. This command will also perform any necessary compilation and linking steps, so you need not issue make before entering make run.

By default, your executables will be run on two processes. You can change this by specifying the NPROCS variable on the command line. For example,

% make run NPROCS=4

will start your runs on four processes.

Executables and object files can be deleted by make clean.