###############################################################################
#
#  Makefile :  try "make model" !
#
###############################################################################

F90 	= f95
RM      = /bin/rm -f

#  Compiler/linker options for test

FTEST   = -C -ansi -fnonstd
LTEST   = 

# Compiler/linker options for profiling

FPROF   = -O5 -p
LPROF   = -p

# Complier/linker options for running

FRUN    = -O5
LRUN	=

#------------------------------------------------------------------------------
#  Current options
#------------------------------------------------------------------------------

FFLAGS	= $(FTEST)
LINKFLAG= $(LTEST) 


OBJECTS	= clinic.o const.o config.o coords.o fields.o frees.o statio.o step.o \
          timer.o tracer.o unesco.o model.o


model:	$(OBJECTS)
	$(F90) -o $@ $(LINKFLAG) $(OBJECTS)


clean:
	$(RM) model *.o *mod

#------------------------------------------------------------------------------
#
#  Explicit dependencies for objects are set here.
#  Issue of f90 module files not addressed.
#
#  The main program is contained in model.f90; all other files
#  contain modules.
#
#  The modules are split into several groupings. A given module
#  can only use (and hence depend on) a module or modules from
#  a higher group or groups.
#
#  E.g., tracer.f90 can use module coords, but not module frees.
#  model.o depends upon everything via step.o and so on.
#
#------------------------------------------------------------------------------

const.o:

config.o:	const.o
timer.o:	const.o
unesco.o:       const.o

coords.o:	config.o
fields.o:       config.o

statio.o:	fields.o coords.o timer.o

clinic.o:	fields.o coords.o unesco.o
frees.o:	fields.o coords.o
tracer.o:	fields.o coords.o unesco.o

step.o:		tracer.o clinic.o frees.o statio.o timer.o

model.o:	step.o

#------------------------------------------------------------------------------
#  Changes to the Makefile itself cause complete recompilation.
#  (E.g., change in compiler options.)
#------------------------------------------------------------------------------

$(OBJECTS):	Makefile

#------------------------------------------------------------------------------
#  Implicit rule for compilation:
#------------------------------------------------------------------------------

.SUFFIXES:
.SUFFIXES: .f90 .o

.f90.o:
	$(F90) $(FFLAGS) -c $*.f90  




About this document:

Produced from the SGML: /home/isd/public_html/_compilers_unix_fortran/_reml_grp/makefileexample.reml_lib
On: 20/2/2002 at 9:56:3
Options: reml2 -i noindex -l long -o html -p multiple