next up previous contents
Next: Parameters Up: General remarks: PETSc within Previous: make.code.defn   Contents

make.configuration.defn

This file is not created by the when you use Cactus to create a new thorn by "gmake newthorn". For a template PETSc configuration file, have a look in ./CactusElliptic/EllPETSc/src/make.configuration.defn.

The first section checks if PETSC_DIR/PETSC_LIB are set. If they are not, the configuration process will be interrupted (otherwise you have to wait to the end of the compilation to find out that your program won't link).

Second section specifies the standard PETSc libs. eg.:

PETSC_LIB_DIR = $(PETSC_DIR)/lib/libg/$(PETSC_ARCH)
PETSC_LIBS    = petscts petscsnes petscsles petscdm

Third section adds platform dependent file, by checking PETSC_ARCH and assigning the appropriate libs.

In the end the variables are assigned to the variables that Cactus make process is using (note the incremental assignment "+=")

LIBDIRS    += $(PETSC_LIB_DIR) $(X_LIB_DIR)
LIBS       += $(PETSC_LIBS) $(PLATFORM_LIBS) X11
EXTRAFLAGS += -I$(PETSC_DIR)/include