next up previous contents index
Next: 4.5.4 Sample Calls of Up: 4.5 Fortran90 Previous: 4.5.2 Use of UIO   Contents   Index


4.5.3 Compiling and Makefiles

For a certain platform, it was necessary to change the name of the module file with the machine-dependent routines (uio_mac*_module.f90) in a Makefile for the UIO routines. For this purpose the environment variable UIOMAC had to be set to the name of the appropriate routine (see Sect. 3.3).

In the current version of CO5BOLD, there is only one file uio_mac_module.F90 - with a capital F90 - that can be changed during the compilation by preprocessor switches, see 3.6.

For CO5BOLD or the UIO Unix scripts the respective configure script takes care of either of these steps. Many compilers generate module information files with suffixes like .M, .mod, or .kmo. To clean up information files with other suffixes, they have to be included in the cleaning step.

Calling examples:

make
make UIO
make UIO "F90FLAGS=-g"
make clean
make cleanall
make remove
make removeall

A section of a typical makefile using the UIO routines may be

...
# -- Compiler options --
F90C=f90
F90FLAGS=
# -- Libraries --
UIOMAC=uio_mac_module
...
# -- Dependencies of exe-files on object files and libraries --
test.exe: test.o
        $(F90C) $(F90FLAGS) -o $@  

        $(UIOPATH)/f90/uio_base_module.o $(UIOPATH)/f90/$(UIOMAC).o  

        $(UIOPATH)/f90/uio_bulk_module.o

test.o: $(UIOPATH)/f90/UIO test.f90
        $(F90C) -c $(F90FLAGS)  
        -M$(UIOPATH)/f90  
        test.f90
...
# -- Dependencies on used modules --
$(UIOPATH)/f90/UIO:
        cd $UIOPATH/f90 ; make UIO "F90FLAGS=$F90FLAGS"


next up previous contents index
Next: 4.5.4 Sample Calls of Up: 4.5 Fortran90 Previous: 4.5.2 Use of UIO   Contents   Index