# Main make.code.defn file for thorn PETSc_Elliptic # $Header$ # on all systems: PETSc may have been build with X11 support, which # needs to included here. # on linux system: the lapack libs (in rpms) are compiled with f2c/g77 # and need the -lg2c or -lf2c to be linked # keep them at the end of lapack ### check if this was configured with MPI, bail out if not ifeq ($(strip $(MPI_LIBS)), ) $(NAME): MissingMPI .pseudo: MissingMPI MissingMPI: @echo "PETSc: requires MPI" @echo "PETSc: Please configure with MPI or remove EllPETSc from ThornList !" exit 2 endif ### check if PETSC_DIR/PETSC_ARCH are set, bail out if not ifeq ($(strip $(PETSC_DIR)), ) $(NAME): MissingPETSC_DIR .pseudo: MissingPETSC_DIR MissingPETSC_DIR: @echo "PETSc: need environment variable PETSC_DIR for compiling EllPETSc" @echo "PETSc: set PETSC_DIR or remove EllPETSc from ThornList" exit 2 endif ifeq ($(strip $(PETSC_ARCH)), ) $(NAME): MissingPETSC_ARCH .pseudo: MissingPETSC_ARCH MissingPETSC_ARCH: @echo "PETSc: need environment variable PETSC_ARCH for compiling EllPETSc" @echo "PETSc: set PETSC_ARCH or remove EllPETSc from ThornList" exit 2 endif PETSC_LIB_DIR = $(PETSC_DIR)/lib/libg/$(PETSC_ARCH) PETSC_LIBS = petscts petscsnes petscsles petscdm petscmat petscvec petsc PLATFORM_LIBS = ### PETSC on the Origin ifeq ($(PETSC_ARCH),IRIX64) PLATFORM_LIBS = blas complib.sgimath endif ### PETSC on linux ifeq ($(PETSC_ARCH),linux) PLATFORM_LIBS = flapack fblas g2c mpich endif ### Otherwise ifndef PLATFORM_LIBS UnknownArch: @echo "No Cactus/PETSc support for PETSC_ARCH=$(PETSC_ARCH)" exit 2 endif LIBDIRS += $(PETSC_LIB_DIR) $(X_LIB_DIR) LIBS += $(PETSC_LIBS) $(PLATFORM_LIBS) X11 $(MPI_LIBS) EXTRAFLAGS = -I$(PETSC_DIR)/include