# Makefile template for SX cross compiler #typical use with netCDF: # mkmf -t template.nec -c"-Duse_libMPI -Duse_netCDF" path_names /opt/sx/netcdf/include FC = sxmpif90 LD = sxmpif90 CC = sxmpic++ TOTALVIEW = NETCDF = /SX/opt/netcdf CPPFLAGS = -D__SX FFLAGS = -Wf"-A idbl4" -R2 -ts. -Chopt -I$(NETCDF)/include CFLAGS = -Xa LDFLAGS = $(LIBS) LIST = -R2 # LIBS needs to be customized per site LIBS = $(TOTALVIEW) -L$(NETCDF)/lib -lnetcdf # you should never need to change any lines below. # see the SX 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 .T create a CIF file # make .L create a compiler listing # make .o create an object file # make .s create an assembly listing # make .x create an executable file, assuming standalone # source # The macro TMPFILES is provided to slate files like the above for removal. RM = rm -f SHELL = /bin/csh TMPFILES = *.L i.* *.s *.mod .SUFFIXES: .F .F90 .L .T .f .f90 .h .o .s .x .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 $(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 $(LIST) $*.F .F.T: $(FC) $(CPPDEFS) $(CPPFLAGS) $(FFLAGS) -c -cif $*.F .F.f: $(CPP) $(CPPDEFS) $(CPPFLAGS) $*.F > $*.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 $(LIST) $*.F90 .F90.T: $(FC) $(CPPDEFS) $(CPPFLAGS) $(FFLAGS) -c -cif $*.F90 .F90.f90: $(CPP) $(CPPDEFS) $(CPPFLAGS) $*.F90 > $*.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)