# template for the Intel fortran compiler # typical use with mkmf # mkmf -t template.ifc -c"-Duse_libMPI -Duse_netCDF" path_names /usr/local/include # # FORTRAN compiler command FC = ifort # FORTAN linker command LD = ifort # C compiler command CC = icc # # C compiler flags # CFLAGS_BASE = -g -D__IFC CFLAGS_DEBUG = -ftrapuv -traceback CFLAGS = $(CFLAGS_BASE) -O2 # CPPFLAGS = # # FORTRAN compiler flags # FFLAGS_BASE = -what -fpp -fno-alias -stack_temps -safe_cray_ptr -ftz -i_dynamic -assume byterecl -g -i4 -r8 -Wp,-w # # Add $(FFLAGS_REPRO) to FFLAGS if you need floating point consistency to compare # the results of two runs. # Not recomended for production runs as it increases the runtime. # FFLAGS_REPRO = -fltconsistency # # Add $(FFLAGS_DEBUG) to FFLAGS and replace -O2 by -O0 only for making a debug executable. # Severely slows down the execution! # FFLAGS_DEBUG = -check bounds -check noarg_temp_created -check nopointer -warn -warn noerrors -debug variable_locations -inline_debug_info -fpe0 -traceback -ftrapuv # FFLAGS = $(FFLAGS_BASE) $(FFLAGS_REPRO) -O2 -nowarn # # Put together the linker flags # #netcdf_regular #LNETCDF = -lnetcdf #netcdf_hdf LNETCDF = -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lz # LDFLAGS = -Wl,-cref,-Map linker.map $(LNETCDF) -lmpi -lsma # # Do the following to compile using many processors (parallel). # MAKEFLAGS+=--jobs=8 #--------------------------------------------------------------------------- # you should never need to change any lines below. # see the MIPSPro F90 manual for more details on some of the file extensions # discussed here. # this makefile template recognizes fortran sourcefiles with extensions # .f, .f90, .F, .F90. Given a sourcefile ., where is one of # the above, this provides a number of default actions: # make .opt create an optimization report # make .o create an object file # make .s create an assembly listing # make .x create an executable file, assuming standalone # source # make .i create a preprocessed file (for .F) # make .i90 create a preprocessed file (for .F90) # The macro TMPFILES is provided to slate files like the above for removal. RM = rm -f SHELL = /bin/csh -f TMPFILES = .*.m *.B *.L *.i *.i90 *.l *.s *.mod *.opt .SUFFIXES: .F .F90 .H .L .T .f .f90 .h .i .i90 .l .o .s .opt .x .f.L: $(FC) $(FFLAGS) -c -listing $*.f .f.opt: $(FC) $(FFLAGS) -c -opt_report_level max -opt_report_phase all -opt_report_file $*.opt $*.f .f.l: $(FC) $(FFLAGS) -c $(LIST) $*.f .f.T: $(FC) $(FFLAGS) -c -cif $*.f .f.o: $(FC) $(FFLAGS) -c $*.f .f.s: $(FC) $(FFLAGS) -S $*.f .f.x: $(FC) $(FFLAGS) -o $*.x $*.f *.o $(LDFLAGS) .f90.L: $(FC) $(FFLAGS) -c -listing $*.f90 .f90.opt: $(FC) $(FFLAGS) -c -opt_report_level max -opt_report_phase all -opt_report_file $*.opt $*.f90 .f90.l: $(FC) $(FFLAGS) -c $(LIST) $*.f90 .f90.T: $(FC) $(FFLAGS) -c -cif $*.f90 .f90.o: $(FC) $(FFLAGS) -c $*.f90 .f90.s: $(FC) $(FFLAGS) -c -S $*.f90 .f90.x: $(FC) $(FFLAGS) -o $*.x $*.f90 *.o $(LDFLAGS) .F.L: $(FC) $(CPPDEFS) $(CPPFLAGS) $(FFLAGS) -c -listing $*.F .F.opt: $(FC) $(CPPDEFS) $(CPPFLAGS) $(FFLAGS) -c -opt_report_level max -opt_report_phase all -opt_report_file $*.opt $*.F .F.l: $(FC) $(CPPDEFS) $(CPPFLAGS) $(FFLAGS) -c $(LIST) $*.F .F.T: $(FC) $(CPPDEFS) $(CPPFLAGS) $(FFLAGS) -c -cif $*.F .F.f: $(FC) $(CPPDEFS) $(CPPFLAGS) -EP $*.F > $*.f .F.i: $(FC) $(CPPDEFS) $(CPPFLAGS) -P $*.F .F.o: $(FC) $(CPPDEFS) $(CPPFLAGS) $(FFLAGS) -c $*.F .F.s: $(FC) $(CPPDEFS) $(CPPFLAGS) $(FFLAGS) -c -S $*.F .F.x: $(FC) $(CPPDEFS) $(CPPFLAGS) $(FFLAGS) -o $*.x $*.F *.o $(LDFLAGS) .F90.L: $(FC) $(CPPDEFS) $(CPPFLAGS) $(FFLAGS) -c -listing $*.F90 .F90.opt: $(FC) $(CPPDEFS) $(CPPFLAGS) $(FFLAGS) -c -opt_report_level max -opt_report_phase all -opt_report_file $*.opt $*.F90 .F90.l: $(FC) $(CPPDEFS) $(CPPFLAGS) $(FFLAGS) -c $(LIST) $*.F90 .F90.T: $(FC) $(CPPDEFS) $(CPPFLAGS) $(FFLAGS) -c -cif $*.F90 .F90.f90: $(FC) $(CPPDEFS) $(CPPFLAGS) -EP $*.F90 > $*.f90 .F90.i90: $(FC) $(CPPDEFS) $(CPPFLAGS) -P $*.F90 .F90.o: $(FC) $(CPPDEFS) $(CPPFLAGS) $(FFLAGS) -c $*.F90 .F90.s: $(FC) $(CPPDEFS) $(CPPFLAGS) $(FFLAGS) -c -S $*.F90 .F90.x: $(FC) $(CPPDEFS) $(CPPFLAGS) $(FFLAGS) -o $*.x $*.F90 *.o $(LDFLAGS)