You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
104 lines
2.9 KiB
Groff
104 lines
2.9 KiB
Groff
#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 #
|
|
##########################################################
|
|
#
|
|
# The examples can make use of METIS from U. Minnesota.
|
|
# http://www.cs.umn.edu:~karypis
|
|
# but it's optional
|
|
#
|
|
#METIS_LIB = -L$(HOME)/NUMERICAL/metis-4.0 -lmetis
|
|
PSBLDLIBS=$(BLACS) $(BLAS) $(METIS_LIB)
|
|
|
|
# Add -DLargeFptr for 64-bit addresses
|
|
PSBCDEFINES=-DAdd_
|
|
# SUN compiler does not have MOVE_ALLOC.
|
|
PSBFDEFINES=-DHAVE_KSENDID $(MPI_FINC)
|
|
# -DHAVE_MOVE_ALLOC
|
|
# -DHAVE_METIS
|
|
|
|
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 $<
|
|
|
|
|
|
|
|
|