#
# This software is part of the Digital Fortran kit.
# Copyright (C) 1996,1997 Digital Equipment Corporation.
# All rights reserved.
#
# This software is furnished to you under a license by  Digital Equipment
# Corporation and must be used only in  accordance with the terms and conditions
# of that license,  and only with the inclusion of the above copyright notice.
#
# This software is provided as an example that demonstrates a particular
# feature/function of the licensed product. The software is not intended to
# provide a complete solution to any application problem but rather is provided
# as a teaching mechanism.
#
# Users may incorporate any part of this sample into their own source after 
# making appropriate changes to make it suitable for the intended application.
#
# This makefile builds CALC.EXE.
#
# Instead of compiling each program seperately, you can allow more
# optimizations to occur by compiling and linking the entire set of
# three source files linked together with a single f90 command:
#
# f90 arraycal.f90 calcaver.f90 main.f90 /link /out:calc.exe
#
# The order in which the file names are specified is significant. This
# f90 command:
#
#  o  Compiles the file arraycal.f90, which contains the module definition,
#     and creates its object file and the file array_calculator.mod.
#
#  o  Compiles the file calc_aver.f90, which contains the external function
#     CALC_AVERAGE.
#
#  o  Compiles the file main.f90 (main program). The USE statement references
#     the module file array_calculator.mod.
#
#  o  Links the main program and all object files into an executable program
#     file named calc.
#
# Nmake macros for building DEC Fortran applications
#

!include <dfinc.mak>

all:    calc.exe

calc.exe: arraycal.f90 calcaver.f90 main.f90
	f90 $(fflags) arraycal.f90 calcaver.f90 main.f90 /link /out:calc.exe

#
#   Clean things up
#

clean:
	-del array_calculator.mod
	-del calc.exe

#
#   Execute
#

run:
	-calc

