# Lahey Makefile for program - wdmrx # # Last modified: 01/10/04 mcrouse # Usage: make [bindir=path_to_install_to] [install] [> compile.out] # # Examples: make # make install bindir=C:\bin # make install bindir=C:\my_dir\bin LDFLAGS = $(OptML) # linker options (OptML or DbgFL) FFLAGS = $(OptM) $(ImpF) # compile options (OptM or DbgF) + ImpF FC = lf90 # compiler #******************************************************************* #***** Some things may need to be changed below this line. ***** #******************************************************************* # Compiler flags # -ap - arithmetic precision; guarantee consistency of REAL, COMPLEX calc.s # -chk - check substring and array subscript bounds, argument types; # generates fatal runtime error; removes optimization by forcing -o0 # -g - generate source level symbolic debug information # -nhed - generate direct files w/o headers # -in - no implicit typing in effect, as if IMPLICIT NONE statement in code # -nin - Fortran implicit typing in effect # -o3 - perform production code optimizations # -tp - code optimized for target processor Intel Pentium # -trace - generate call traceback with runtime error messages # -trap - trap NDP exceptions: d=divide by 0, i=invalid operation, # o=overflow, u=underflow # -xref - include cross-reference information in listing file # (NOTES: to generate debug code - set FFLAGS to Dbgf # for production code - set FFLAGS to OptM DbgF = -ap -chk -g -nhed -tp -trace -trap diou -xref OptM = -ap -nhed -o3 -tp -trace -trap diou ImpF = -in # Linker flags: # -bind - bind in DOS-Extender and virtual memory manager # -g - generate source level symbolic debug information # -pack - compress executable # -nwin - generate 32-bit extended-DOS application # -vm - use virtual memory manager DbgFL = -bind -g -nwin -vm OptML = -bind -nwin -vm #******************************************************************* #***** You should not need to modify anything below this line. ***** #******************************************************************* program = wdmrxl.exe Objects = wdmrx.obj patch1.obj LibDir = ..\..\lib Libs = $(LibDir)\wdm.lib $(LibDir)\adwdm.lib $(LibDir)\util.lib bindir = ..\..\bin binary = ..\..\bin binMake = $(binary)\$(program) binInst = $(bindir)\$(program) # Rules all: $(binary) $(binMake) install @echo @echo Done making all for wdmrx, files are now up-to-date. @echo # program dependencies $(binMake): $(Objects) $(Libs) echo $(Objects) -EXE $@ $(LDFLAGS) -LIB $(Libs) > f90cmdln $(FC) @f90cmdln # suppress Lahey/Phar Lap sign-on display when executable is run cfig386 $@ -nosignon $(binary): !if ! -d $(binary) @mkdir $(binary) @echo Created directory $(binary) !endif install: # Create directory for binary file, if necessary !if ! -d $(bindir) @mkdir $(bindir) @echo Created directory $(bindir) !endif # Link executable to bindir if installing elsewhere !if (! -e $(binMake)) || (-z $(binMake)) @echo program $(binMake) does not exist, @echo use one of the following commands to generate it: @echo make @echo make all !else !if $(bindir) != $(binary) !if -e $(binInst) @del $(binInst) !endif @(cd ..\..; copy bin\$(program) $(binInst)) @echo @echo Program $(binInst) has been updated. !endif !endif clean: !if $(bindir) != $(binary) !if -e $(binInst) @del $(binInst) !endif !endif !if -e *.obj @del *.obj !endif !if -e $(binMake) @del $(binMake) !endif @echo Removed files generated by make. @echo # Define object file dependencies: wdmrx.obj: fversn.inc patch1.obj: fmsgwd.inc # Informational note: the wdmrx_launcher.cpp file contained in this # directory is a C++ file compiled separately from this Makefile to build # the launcher program wdmrx.exe. # end of make