#Makefile for Sun Fortran Compiler version 6.2 .mod=.mod .fh=.fh .SUFFIXES: .SUFFIXES: .f90 .F90 $(.mod) .F .f .c .o ####################### Section 1 ####################### # Define your compilers and compiler flags here # ########################################################## F90=f90 FC=f90 F77=$(FC) CC=cc F90COPT=-fast FCOPT=-fast CCOPT=-fast # # Which flag does your compiler use for module inclusion? # Most compilers use -I but Sun uses -M # FIFLAG is for INCLUDE FMFLAG=-M FIFLAG=-I ####################### Section 2 ####################### # Define your linker and linker flags here # # Does your MPI provide mpi.mod or mpif.h? # # MPI_FINC=-DMPI_H or MPI_FINC=-DMPI_MOD # # If necessary add MPIINCDIR # ########################################################## F90LINK=mpf90 FLINK=mpf90 -lf77compat MPF90=mpf90 MPF77=mpf90 -lf77compat MPCC=mpcc MPI_FINC=-DMPI_H $(FIFLAG)/opt/SUNWhpc/include ####################### Section 3 ####################### # Specify paths to libraries # ########################################################## BLAS=-lblas BLACS=-lblacsCinit_MPI-SUN4SOL2-0.a -lblacsF77init_MPI-SUN4SOL2-0.a -lblacs_MPI-SUN4SOL2-0.a -L$(HOME)/LIB BLACS=$(HOME)/LIB/libblacs_MPI-SUN4SOL2-0.a $(HOME)/LIB/libblacsCinit_MPI-SUN4SOL2-0.a $(HOME)/LIB/libblacsF77init_MPI-SUN4SOL2-0.a $(HOME)/LIB/libblacs_MPI-SUN4SOL2-0.a -lmpi ####################### Section 4 ####################### # Other useful tools&defines # ########################################################## # # We are using the public domain tool METIS from U. Minnesota. To get it # check URL http://www.cs.umn.edu:~karypis # METIS_LIB = -L$(HOME)/NUMERICAL/metis-4.0 -lmetis PSBLDLIBS=$(BLACS) $(BLAS) $(METIS_LIB) # Add -DLargeFptr for 64-bit addresses # SUN compiler does not have MOVE_ALLOC. # -DHAVE_MOVE_ALLOC PSBCDEFINES=-DAdd_ PSBFDEFINES=-DNETLIB_BLACS $(MPI_FINC) AR=ar -cur RANLIB=ranlib ####################### Section 5 ####################### # Do not edit this # ########################################################## LIBDIR=lib BASELIBNAME=libpsb_base.a PRECLIBNAME=libpsb_prec.a METHDLIBNAME=libpsb_krylov.a UTILLIBNAME=libpsb_util.a CDEFINES=$(PSBCDEFINES) FDEFINES=$(PSBFDEFINES) # Under Linux/gmake there is a rule interpreting .mod as Modula source! $(.mod).o: .c.o: $(CC) $(CCOPT) $(CINCLUDES) $(CDEFINES) -c $< .f.o: $(FC) $(FCOPT) $(FINCLUDES) -c $< .f$(.mod): $(FC) $(FCOPT) $(FINCLUDES) -c $< .f90$(.mod): $(F90) $(F90COPT) $(FINCLUDES) -c $< .f90.o: $(F90) $(F90COPT) $(FINCLUDES) -c $< .F.o: $(FC) $(FCOPT) $(FINCLUDES) $(FDEFINES) -c $< .F90.o: $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $< .F90$(.mod): $(F90) $(F90COPT) $(FINCLUDES) $(FDEFINES) -c $<