41.3. Compiling and Linking Fortran Programs

Figure shows a sample makefile that can be used for TAO Fortran programs. You can compile a debugging version of the program rosenbrock1f with make rosenbrock1f.


       CFLAGS    =  
       FFLAGS    =  
       CPPFLAGS  = 
       FPPFLAGS  = 
        
       include ${TAO_DIR}/bmake/tao_common 
    
       rosenbrock1f: rosenbrock1f.o  tao_chkopts 
                 -${FLINKER} -o rosenbrock1f rosenbrock1f.o ${TAO_FORTRAN_LIB} ${TAO_LIB} \ 
                                ${PETSC_FORTRAN_LIB} ${PETSC_SNES_LIB} 
        ${RM} rosenbrock1f.o 

Figure 8: Sample TAO makefile for a single Fortran program

Note that the TAO Fortran interface library, given by ${}TAO_FORTRAN_LIB, must precede the base TAO library, given by ${}TAO_LIB, on the link line.