next up previous
Next: Using other modules Up: APPENDIX E: Manipulating the Previous: Building the system

Making the library

Once the environment variables have been set by changing to the directory $CCSL and executing ``source environment" a default version of the whole system can be built by executing
make all
The local options used by this command are defined in the $CCSL/options directory. The example files given are those used at ILL on an SGI INDY running IRIX 6.5. They will need to be changed for other systems.

The ``make all" command first extracts the LIB and MAI sections from the master file, substitutes the chosen values for all the symbolic parameters, inserts the complete specifications of the COMMON blocks and includes chosen flagged lines by inserting an unflagged copy. The resulting files libmk4.f and maimk4.f are added to the $CCSL/source sub-directory.

In a second step the libmk4.f file is split into individual routines each of which is compiled separately and all the object modules are archived in the file $CCSL/libmk4.a. Modules which fail to compile are placed in the directory $CCSL/bad and the error messages from the compilation in $CCSL/fortran.errors. If compiled successfully both the source and object modules are deleted. The compiler commands are specified in the file $CCSL/options/f77_choices.

The main programs to be loaded are listed in the file $CCSL/options/list_of_progs. Programs which use graphics require some switches to be given. The currently recognised switches are:
-g         uses the graphics library specified in graphics_choices
-ps        uses the postscript version of CCSL graphics (pigpos.f)
-pg         uses the CCSL graphics driver chosen in graphics_choices

The make all command will extract the graphics part (PIG) from the master file and place the fortran source file containing all the different versions in $CCSL/graf/pigmk4.f. Then for each program in the list it gets the FORTAN code from maimk4.f, compiles it and links it with $CCSL/lib/libmk4.a. Where indicated by the switches the appropriate graphics routine and any associated graphics libraries are also included. The location of the graphics library must be defined in the file $CCSL/options/graphics_choices. The executable code corresponding to programs which have been successfully compiled and linked are transferred to the directory $CCSL/exe; they are identified by the name of the program.


next up previous
Next: Using other modules Up: APPENDIX E: Manipulating the Previous: Building the system
P.J. Brown - Institut Laue Langevin, Grenoble, FRANCE. e-mail: brown@ill.fr