#!/usr/bin/env make

########################################################################
#                                                                      #
#                   FINITE ELEMENT ANALYSIS TOOLS 2                    #
#                                                                      #
# Authors: M. Koester, M. Moeller, S. Turek, S. Buijssen               #
#                                                                      #
#                                                                      #
# Contact: Applied Mathematics, TU Dortmund University                 #
#          Vogelpothsweg 87, 44227 Dortmund                            #
#          Germany                                                     #
#                                                                      #
# Web:     http://www.featflow.de/en/software/featflow2.html           #
#          mailto:featflow@featflow.de                                 #
#                                                                      #
########################################################################
#                                                                      #
# Makefile for application cc2d_elastBPM for architecture:             #
#          pc64-sandybridge-linux-gcc-openblas                         #
#                                                                      #
# Automatically generated by:                                          #
#          FEAT2-configure script revision 12115                       #
# on host stark                                                        #
########################################################################

# Get name of Makefile for recursive make invocations
MAKEFILE_NAME         = $(firstword $(MAKEFILE_LIST))

# Fix a particular build ID, do not use the default one
# (There are Makefile rules that will verify that the given build ID
#  fits to the archicecture, cpu and operating system at make runtime.)
ID                   := pc64-sandybridge-linux-gcc-openblas

# Path to this FEAT2 installation
FEAT2BASEDIR          = ../..

# Location of Makefile.buildID.inc
MAKEFILE_BUILDID_INC  = $(FEAT2BASEDIR)/Makefile.buildID.inc

# Location of Makefile.cpu.inc
MAKEFILE_CPU_INC      = $(FEAT2BASEDIR)/Makefile.cpu.inc

# For development and debugging turn this to "NO", for good
# optimisation to "YES". To squeeze out the last bit of performance out
# of your machine (at the expense of a possibly drastic increase in compile
# compile time) enable full optimisation with "EXPENSIVE".
# If you want to compile your code to run maybe exclusively on the build host
# use "NATIVE" or "NATIVE-EXPENSIVE" to enable
OPT                 = YES

# Create binary with AGMG support?
AGMG                = NO

# Application name
APPNAME             = cc2d_elastBPM

# Defines the binary type.
# =STD : Standard code environment of the system.
# =32  : Force 32-bit code environment.
# =64  : Force 64-bit code environment.
BINARY              = STD

# Create executable?
EXECUTABLE          = YES

# Create shared application?
SHARED              = NO

# Add trailing underscore?
UNDERSCORE          = YES

# Force using given build ID, skip tests that verify that the given
# build ID fits to the current archicecture, cpu and operating system
FORCE_ID            = NO

# Defines the size of integers.
# =STD  : Standard integer size (32 bit integers).
# =LARGE: Large integers (64 bit integers). Supports arrays with > 4GB size and
#         enables the 64 bit interface of UMFPACK.
INTSIZE             = STD

# Enable checks whether compiler modification dates or compiler settings for
# current build ID have changed since last invocation of make?
MONITOR_COMPILE_ENV = YES

# Relink application every time make is invoked
# (i.e. regardless whether a source file has changed?)
# (Might be useful when developing on multiple platforms.)
RELINK_ALWAYS       = YES

# Create binary with OpenMP support?
OPENMP              = NO

# Create binary for use with MPI?
MPI                 = NO

# Create binary with or without MPI wrappers
MPIWRAPPERS         = NO

# Create binary with Coprocessor support?
COPROC              = NO


# Create binary with warnings enabled?

# source directories of sparse banded blas, kernel and application files
SRCDIR_KERNEL = $(FEAT2BASEDIR)/kernel
SRCDIR_ARCH   = $(FEAT2BASEDIR)/kernel/arch-specific
SRCDIR_APP    = .

# Create an appropriate directory name for object files, based on build
# ID, OpenMP mode and optimisation level.  
#
# Object directory for FEAT2 object files. Build ID already contains
# most of the necessary information (even choice of MPI in case of parallel mode)
# we simply have to distinguish here the optimisation level (on/off aka yes/no)
OBJDIR = object/$(ID)-coproc$(COPROC)-openmp$(OPENMP)-opt$(OPT)

# Object directory for libraries (third party tools)
OBJDIR_LIB = ../../object/$(LIBID)-coproc$(COPROC)-openmp$(OPENMP)-opt$(OPT)

# names of files for sparse banded blas, kernel (also platform specific)
# and application
SRCLIST_KERNEL = \
        Adaptivity/hadaptaux.f90 Adaptivity/hadaptaux1d.f90 \
        Adaptivity/hadaptaux2d.f90 Adaptivity/hadaptaux3d.f90 \
        Adaptivity/hadaptivity.f90 BasicGeometry/basicgeometry.f90 \
        BasicGeometry/geometry.f90 BasicGeometry/geometryaux.f90 \
        Boundary/boundary.f90 Boundary/fictitiousboundary.f90 \
        ContinuousFormulation/boundarycondition.f90 \
        ContinuousFormulation/scalarpde.f90 \
        DataStructures/arraylistbase.f90 \
        DataStructures/arraylistInt.f90 \
        DataStructures/arraylistInt_threaded.f90 \
        DataStructures/arraylistInt_Int.f90 \
        DataStructures/arraylistInt_Int_threaded.f90 \
        DataStructures/arraylistInt_DP.f90 \
        DataStructures/arraylistInt_DP_threaded.f90 \
        DataStructures/arraylistInt_SP.f90 \
        DataStructures/arraylistInt_SP_threaded.f90 \
        DataStructures/arraylistDP.f90 \
        DataStructures/arraylistDP_threaded.f90 \
        DataStructures/arraylistDP_Int.f90 \
        DataStructures/arraylistDP_Int_threaded.f90 \
        DataStructures/arraylistDP_DP.f90 \
        DataStructures/arraylistDP_DP_threaded.f90 \
        DataStructures/arraylistDP_SP.f90 \
        DataStructures/arraylistDP_SP_threaded.f90 \
        DataStructures/arraylistSP.f90 \
        DataStructures/arraylistSP_threaded.f90 \
        DataStructures/arraylistSP_Int.f90 \
        DataStructures/arraylistSP_Int_threaded.f90 \
        DataStructures/arraylistSP_DP.f90 \
        DataStructures/arraylistSP_DP_threaded.f90 \
        DataStructures/arraylistSP_SP.f90 \
        DataStructures/arraylistSP_SP_threaded.f90 \
        DataStructures/listbase.f90 DataStructures/listInt.f90 \
        DataStructures/listInt_Int.f90 DataStructures/listInt_DP.f90 \
        DataStructures/listInt_SP.f90 DataStructures/listDP.f90 \
        DataStructures/listDP_Int.f90 DataStructures/listDP_DP.f90 \
        DataStructures/listDP_SP.f90 DataStructures/listSP.f90 \
        DataStructures/listSP_Int.f90 DataStructures/listSP_DP.f90 \
        DataStructures/listSP_SP.f90 DataStructures/mapbase.f90 \
        DataStructures/mapInt.f90 DataStructures/mapInt_Int.f90 \
        DataStructures/mapInt_DP.f90 DataStructures/mapInt_SP.f90 \
        DataStructures/mapDP.f90 DataStructures/mapDP_Int.f90 \
        DataStructures/mapDP_DP.f90 DataStructures/mapDP_SP.f90 \
        DataStructures/mapSP.f90 DataStructures/mapSP_Int.f90 \
        DataStructures/mapSP_DP.f90 DataStructures/mapSP_SP.f90 \
        DataStructures/quadtreebase.f90 DataStructures/quadtreeDP.f90 \
        DataStructures/quadtreeSP.f90 DataStructures/octreebase.f90 \
        DataStructures/octreeDP.f90 DataStructures/octreeSP.f90 \
        DataStructures/stackInt.f90 \
        DataStructures/stackInt_threaded.f90 \
        DataStructures/stackDP.f90 DataStructures/stackDP_threaded.f90 \
        DataStructures/stackSP.f90 DataStructures/stackSP_threaded.f90 \
        DataStructures/graph.f90 DataStructures/numbersets.f90 \
        DataStructures/geneticalgorithm.f90 \
        DataStructures/intgroupset.f90 DOFMaintenance/bcassembly.f90 \
        DOFMaintenance/bcassemblybase.f90 \
        DOFMaintenance/bilinearformevaluation.f90 \
        DOFMaintenance/extstdassemblyinfo.f90 \
        DOFMaintenance/discretebc.f90 DOFMaintenance/discretefbc.f90 \
        DOFMaintenance/dofmapping.f90 \
        DOFMaintenance/domainintegration.f90 \
        DOFMaintenance/feevaluation.f90 \
        DOFMaintenance/linearformevaluation.f90 \
        DOFMaintenance/matrixfilters.f90 \
        DOFMaintenance/multileveloperators.f90 \
        DOFMaintenance/multilevelprojection.f90 \
        DOFMaintenance/sortstrategybase.f90 \
        DOFMaintenance/sortstrategy.f90 \
        DOFMaintenance/spatialdiscretisation.f90 \
        DOFMaintenance/trilinearformevaluation.f90 \
        DOFMaintenance/vectorfilters.f90 \
        DOFMaintenance/boundaryaux.f90 DOFMaintenance/ufci.f90 \
        DOFMaintenance/dofpreprocessing.f90 \
        DOFMaintenance/feevaluation2.f90 \
        DOFMaintenance/blockmatassemblybase.f90 \
        DOFMaintenance/blockmatassembly.f90 \
        DOFMaintenance/blockmatassemblystdop.f90 \
        ElementCubature/cubature.f90 ElementCubature/derivatives.f90 \
        ElementCubature/element.f90 \
        ElementCubature/adaptivecubature.f90 \
        ElementCubature/element_hexa3d.f90 \
        ElementCubature/element_line1d.f90 \
        ElementCubature/element_prism3d.f90 \
        ElementCubature/element_pyra3d.f90 \
        ElementCubature/element_quad2d.f90 \
        ElementCubature/element_tetra3d.f90 \
        ElementCubature/element_tri2d.f90 \
        ElementCubature/elementbase.f90 \
        ElementCubature/elementpreprocessing.f90 \
        ElementCubature/transformation.f90 \
        Hierarchies/fespacehierarchybase.f90 \
        Hierarchies/fespacehierarchy.f90 Hierarchies/meshhierarchy.f90 \
        Hierarchies/timescalehierarchy.f90 \
        LinearAlgebra/linearalgebra.f90 LinearSolver/agmgdummy.f90 \
        LinearSolver/coarsegridcorrection.f90 \
        LinearSolver/filtersupport.f90 LinearSolver/iluk.f90 \
        LinearSolver/linearsolver.f90 \
        LinearSolver/linearsolverautoinitialise.f90 \
        LinearSolver/quicksolver.f90 LinearSolver/vanka.f90 \
        LinearSolver/vanka_bouss2d.f90 \
        LinearSolver/vanka_optcontrol.f90 \
        LinearSolver/vanka_navst2d.f90 LinearSolver/spsor.f90 \
        LinearSystem/globalsystem.f90 \
        LinearSystem/linearsystemblock.f90 \
        LinearSystem/linearsystemscalar.f90 \
        LinearSystem/matrixmodification.f90 \
        LinearSystem/lsyssc_scalarMatVecAux.f90 \
        LinearSystem/matrixcheck.f90 Mathematics/adjacency.f90 \
        Mathematics/mprimitives.f90 Mathematics/random.f90 \
        NonlinearSolver/nonlinearsolver.f90 \
        PDEOperators/afcstabbase.f90 PDEOperators/afcstabscalar.f90 \
        PDEOperators/afcstabsystem.f90 \
        PDEOperators/afcstabscalarfct.f90 \
        PDEOperators/afcstabscalartvd.f90 \
        PDEOperators/afcstabscalargp.f90 \
        PDEOperators/afcstabscalarsymm.f90 \
        PDEOperators/afcstabscalarlpt.f90 \
        PDEOperators/afcstabsystemfct.f90 \
        PDEOperators/afcstabsystemtvd.f90 \
        PDEOperators/groupfembase.f90 PDEOperators/groupfemscalar.f90 \
        PDEOperators/groupfemsystem.f90 \
        PDEOperators/matrixrestriction.f90 \
        PDEOperators/stdoperators.f90 PDEOperators/convection.f90 \
        PDEOperators/jumpstabilisation.f90 PDEOperators/lumping.f90 \
        Postprocessing/boundaryintegral.f90 Postprocessing/mapleio.f90 \
        Postprocessing/matrixio.f90 Postprocessing/pprocerror.f90 \
        Postprocessing/pprocgradients.f90 \
        Postprocessing/pprocindicator.f90 \
        Postprocessing/pprocnavierstokes.f90 Postprocessing/ucd.f90 \
        Postprocessing/vectorio.f90 Postprocessing/geometryoutput.f90 \
        Postprocessing/pprocintegrals.f90 \
        Postprocessing/lineariser.f90 \
        Postprocessing/convergencetable.f90 \
        Preprocessing/pprocsolution.f90 ProblemSupport/collection.f90 \
        ProblemSupport/iterationcontrol.f90 \
        Projection/analyticprojection.f90 \
        Projection/spdiscprojection.f90 Projection/schurapprox.f90 \
        System/externalstorage.f90 System/fparser.f90 \
        System/fpersistence.f90 System/fsystem.f90 \
        System/genoutput.f90 System/io.f90 System/paramlist.f90 \
        System/signals.f90 System/sort.f90 System/statistics.f90 \
        System/storage.f90 System/textstream.f90 System/uuid.f90 \
        System/perfconfig.f90 TimeDependence/timestepping.f90 \
        TimeDependence/timediscretisation.f90 \
        Triangulation/griddeform.f90 Triangulation/meshadjacency.f90 \
        Triangulation/meshmodification.f90 \
        Triangulation/meshgeneration.f90 Triangulation/meshregion.f90 \
        Triangulation/triangulation.f90 Triangulation/triasearch.f90
SRCLIST_ARCH   = 
SRCLIST_APP    = \
        src/adaptivetimestep.f90 src/ccbasic.f90 \
        src/ccboundarycondition.f90 src/ccboundaryconditionparser.f90 \
        src/cccallback.f90 src/ccgeneraldiscretisation.f90 \
        src/ccinitgeneralparameters.f90 src/ccinitparamtriang.f90 \
        src/ccmainproblem.f90 src/ccmatvecassembly.f90 \
        src/ccmatvecassembly_backup.f90 src/ccnonlinearcore.f90 \
        src/ccnonlinearcoreinit.f90 src/ccnonstationary.f90 \
        src/ccpostprocessing.f90 src/ccstationary.f90 \
        src/cctimeanalysis.f90
SRCEXTRA_APP   = 
PROGRAM_FILE   = \
        src/cc2d.f90

# Files included in source files that need to be copied, not evaluated by cpp
INCLUDED_FILES_TO_COPY = \
        $(FEAT2BASEDIR)/kernel/DataStructures/arraylist.h \
        $(FEAT2BASEDIR)/kernel/DataStructures/casttogenobject.h \
        $(FEAT2BASEDIR)/kernel/DataStructures/list.h \
        $(FEAT2BASEDIR)/kernel/DataStructures/map.h \
        $(FEAT2BASEDIR)/kernel/DataStructures/octree.h \
        $(FEAT2BASEDIR)/kernel/DataStructures/quadtree.h \
        $(FEAT2BASEDIR)/kernel/DataStructures/stack.h \
        $(FEAT2BASEDIR)/kernel/DataStructures/uncastfromgenobject.h \
        $(FEAT2BASEDIR)/kernel/LinearSystem/lsyssc_scalarMatVecAux.h \
        $(FEAT2BASEDIR)/kernel/LinearSystem/lsyssc_scalarMatVec_latxd.h \
        $(FEAT2BASEDIR)/kernel/LinearSystem/lsyssc_scalarMatVec_lax79.h \
        $(FEAT2BASEDIR)/kernel/LinearSystem/lsyssc_scalarMatVec_lax79_padded.h \
        $(FEAT2BASEDIR)/kernel/LinearSystem/lsyssc_scalarMatVec_lax79intl1.h \
        $(FEAT2BASEDIR)/kernel/LinearSystem/lsyssc_scalarMatVec_lax79intld.h \
        $(FEAT2BASEDIR)/kernel/LinearSystem/lsyssc_scalarMatVec_lax9rowc.h \
        $(FEAT2BASEDIR)/kernel/LinearSystem/lsyssc_scalarMatVec_ltx79.h \
        $(FEAT2BASEDIR)/kernel/PDEOperators/afc.h \
        $(FEAT2BASEDIR)/kernel/PDEOperators/afcsc_buildFluxFCTScalar_doDifferences.h \
        $(FEAT2BASEDIR)/kernel/PDEOperators/afcsc_buildFluxFCTScalar_doFluxesByCoeffs.h \
        $(FEAT2BASEDIR)/kernel/PDEOperators/afcsc_buildFluxFCTScalar_doFluxesByMatrix.h \
        $(FEAT2BASEDIR)/kernel/PDEOperators/afcsc_buildVectorFCTScalar_doADIncrements.h \
        $(FEAT2BASEDIR)/kernel/PDEOperators/afcsc_buildVectorFCTScalar_doBounds.h \
        $(FEAT2BASEDIR)/kernel/PDEOperators/afcsc_buildVectorFCTScalar_doCorrect.h \
        $(FEAT2BASEDIR)/kernel/PDEOperators/afcsc_buildVectorFCTScalar_doCorrectScaleByMass.h \
        $(FEAT2BASEDIR)/kernel/PDEOperators/afcsc_buildVectorFCTScalar_doLimitEdgewise.h \
        $(FEAT2BASEDIR)/kernel/PDEOperators/afcsc_buildVectorFCTScalar_doLimitEdgewiseConstrained.h \
        $(FEAT2BASEDIR)/kernel/PDEOperators/afcsc_buildVectorFCTScalar_doLimitNodal.h \
        $(FEAT2BASEDIR)/kernel/PDEOperators/afcsc_buildVectorFCTScalar_doLimitNodalConstrained.h \
        $(FEAT2BASEDIR)/kernel/PDEOperators/afcsc_buildVectorFCTScalar_doMinModPrelimit.h \
        $(FEAT2BASEDIR)/kernel/PDEOperators/afcsc_buildVectorFCTScalar_doStdPrelimit.h \
        $(FEAT2BASEDIR)/kernel/System/fmath.h \
        $(FEAT2BASEDIR)/kernel/System/idxmanager.h \
        $(FEAT2BASEDIR)/kernel/feat2constants.h \
        $(FEAT2BASEDIR)/kernel/feat2macros.h \
        $(FEAT2BASEDIR)/kernel/openmp.h \
        $(FEAT2BASEDIR)/kernel/template.h

# Files included in source files that need to be evaluated by cpp
INCLUDED_FILES_TO_EVALUATE_WITH_CPP = \
        $(FEAT2BASEDIR)/kernel/Adaptivity/intf_hadaptcallback.inc \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_bcassembly.inc \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_coefficientMatrixSc.inc \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_coefficientMatrixScBdr1D.inc \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_coefficientMatrixScBdr2D.inc \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_coefficientTrilMatrixSc.inc \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_coefficientVectorBl.inc \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_coefficientVectorBlBdr1D.inc \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_coefficientVectorBlBdr2D.inc \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_coefficientVectorSc.inc \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_coefficientVectorScBdr1D.inc \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_coefficientVectorScBdr2D.inc \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_discretebc.inc \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_fbcassembly.inc \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_fecoefficient_sim.inc \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_sdcoefficient.inc \
        $(FEAT2BASEDIR)/kernel/NonlinearSolver/intf_nlsolcallback.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcADFluxes.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcADIncrements.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcBounds.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcCharacteristics_sim.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcCorrection.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcDiffTransformation_sim.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcFailsafe.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcFluxFCTSc_sim.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcFluxFCTSys_sim.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcFluxSc_sim.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcFluxSys_sim.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcFluxTransformation_sim.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcMatrixDiagSc_sim.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcMatrixDiagSys_sim.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcMatrixSc_sim.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcMatrixSys_sim.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcOperatorEdgeSc.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcOperatorEdgeSys.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcOperatorNodeSc.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcOperatorNodeSys.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcVectorEdgeSc.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcVectorEdgeSys.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcVectorNodeSc.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcVectorNodeSys.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcVectorSc_sim.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcVectorSys_sim.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_extractVariable.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_limitEdgewise.inc \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_limitNodal.inc \
        $(FEAT2BASEDIR)/kernel/Postprocessing/intf_functionScBdr2D.inc \
        $(FEAT2BASEDIR)/kernel/Postprocessing/intf_functionScSimple.inc \
        $(FEAT2BASEDIR)/kernel/Postprocessing/intf_refFunctionSc.inc \
        $(FEAT2BASEDIR)/kernel/Postprocessing/intf_refFunctionScBdr2D.inc \
        $(FEAT2BASEDIR)/kernel/Postprocessing/intf_refFunctionScVec.inc \
        $(FEAT2BASEDIR)/kernel/Triangulation/intf_monitorfct.inc \
        $(FEAT2BASEDIR)/kernel/Triangulation/intf_mshreghittest.inc

# List of all Fortran 77 source files
SRCF77   = $(filter %.f, \
		$(SRCLIST_KERNEL:%=$(SRCDIR_KERNEL)/%) \
		$(SRCLIST_ARCH:%=$(SRCDIR_ARCH)/%) \
		$(SRCLIST_APP:%=$(SRCDIR_APP)/%))

# List of all Fortran 90 source files (without program file)
SRCF90   = $(filter %.f90, \
		$(SRCLIST_KERNEL:%=$(SRCDIR_KERNEL)/%) \
		$(SRCLIST_ARCH:%=$(SRCDIR_ARCH)/%) \
		$(SRCLIST_APP:%=$(SRCDIR_APP)/%))

# List of all object files from Fortran 77 source files
OBJF77   = $(patsubst %.f, $(OBJDIR)/%.o, $(notdir $(SRCF77)))

# List of all object files from Fortran 90 source files (only modules)
OBJF90   = $(patsubst %.f90, $(OBJDIR)/%.o, $(notdir $(SRCF90)))

# List of object files only needed for current build ID
OBJEXTRA = $(patsubst %.f,   $(OBJDIR)/%.o, $(filter %.f,   $(notdir $(SRCEXTRA) $(SRCEXTRA_APP)))) \
	   $(patsubst %.f90, $(OBJDIR)/%.o, $(filter %.f90, $(notdir $(SRCEXTRA) $(SRCEXTRA_APP)))) \
	   $(patsubst %.c,   $(OBJDIR)/%.o, $(filter %.c,   $(notdir $(SRCEXTRA) $(SRCEXTRA_APP)))) \
	   $(patsubst %.cc,  $(OBJDIR)/%.o, $(filter %.cc,  $(notdir $(SRCEXTRA) $(SRCEXTRA_APP)))) \
	   $(patsubst %.cu,  $(OBJDIR)/%.o, $(filter %.cu,  $(notdir $(SRCEXTRA) $(SRCEXTRA_APP)))) 

# Main object file (i.e. file containing the 'program' statement)
OBJPRG = $(patsubst %.f90, $(OBJDIR)/%.o, $(notdir $(PROGRAM_FILE)))

# List of header files to be copied to object directory
OBJHEADERCOPY = $(patsubst %, $(OBJDIR)/%, $(notdir $(INCLUDED_FILES_TO_COPY)))

# List of header files to be evaluated and stored to object directory
OBJHEADEREVAL = $(patsubst %, $(OBJDIR)/%, $(notdir $(INCLUDED_FILES_TO_EVALUATE_WITH_CPP)))

# List of all object files (dynamically generated from the list
# of .f90 and .f files)
#OBJ = $(OBJF77) $(OBJF90) $(OBJEXTRA) $(OBJPRG)

# Minimal list of object files needed to build the application
OBJ = $(OBJDIR)/adaptivetimestep.o $(OBJDIR)/afcstabbase.o \
      $(OBJDIR)/afcstabscalar.o $(OBJDIR)/afcstabscalarfct.o \
      $(OBJDIR)/agmgdummy.o $(OBJDIR)/analyticprojection.o \
      $(OBJDIR)/arraylistInt.o $(OBJDIR)/arraylistInt_Int.o \
      $(OBJDIR)/arraylistbase.o $(OBJDIR)/basicgeometry.o \
      $(OBJDIR)/bcassembly.o $(OBJDIR)/bcassemblybase.o \
      $(OBJDIR)/bilinearformevaluation.o $(OBJDIR)/boundary.o \
      $(OBJDIR)/boundaryaux.o $(OBJDIR)/boundarycondition.o \
      $(OBJDIR)/cc2d.o $(OBJDIR)/ccbasic.o \
      $(OBJDIR)/ccboundarycondition.o \
      $(OBJDIR)/ccboundaryconditionparser.o $(OBJDIR)/cccallback.o \
      $(OBJDIR)/ccgeneraldiscretisation.o \
      $(OBJDIR)/ccinitgeneralparameters.o \
      $(OBJDIR)/ccinitparamtriang.o $(OBJDIR)/ccmainproblem.o \
      $(OBJDIR)/ccmatvecassembly.o $(OBJDIR)/ccnonlinearcore.o \
      $(OBJDIR)/ccnonlinearcoreinit.o $(OBJDIR)/ccnonstationary.o \
      $(OBJDIR)/ccpostprocessing.o $(OBJDIR)/ccstationary.o \
      $(OBJDIR)/cctimeanalysis.o $(OBJDIR)/coarsegridcorrection.o \
      $(OBJDIR)/collection.o $(OBJDIR)/convection.o \
      $(OBJDIR)/cubature.o $(OBJDIR)/derivatives.o \
      $(OBJDIR)/discretebc.o $(OBJDIR)/discretefbc.o \
      $(OBJDIR)/dofmapping.o $(OBJDIR)/domainintegration.o \
      $(OBJDIR)/element.o $(OBJDIR)/element_hexa3d.o \
      $(OBJDIR)/element_line1d.o $(OBJDIR)/element_prism3d.o \
      $(OBJDIR)/element_pyra3d.o $(OBJDIR)/element_quad2d.o \
      $(OBJDIR)/element_tetra3d.o $(OBJDIR)/element_tri2d.o \
      $(OBJDIR)/elementbase.o $(OBJDIR)/elementpreprocessing.o \
      $(OBJDIR)/extstdassemblyinfo.o $(OBJDIR)/feevaluation.o \
      $(OBJDIR)/fespacehierarchybase.o $(OBJDIR)/fictitiousboundary.o \
      $(OBJDIR)/filtersupport.o $(OBJDIR)/fparser.o \
      $(OBJDIR)/fpersistence.o $(OBJDIR)/fsystem.o \
      $(OBJDIR)/genoutput.o $(OBJDIR)/geometry.o \
      $(OBJDIR)/geometryaux.o $(OBJDIR)/globalsystem.o \
      $(OBJDIR)/graph.o $(OBJDIR)/groupfembase.o \
      $(OBJDIR)/groupfemscalar.o $(OBJDIR)/hadaptaux.o \
      $(OBJDIR)/iluk.o $(OBJDIR)/io.o $(OBJDIR)/jumpstabilisation.o \
      $(OBJDIR)/linearalgebra.o $(OBJDIR)/linearformevaluation.o \
      $(OBJDIR)/linearsolver.o $(OBJDIR)/linearsolverautoinitialise.o \
      $(OBJDIR)/linearsystemblock.o $(OBJDIR)/linearsystemscalar.o \
      $(OBJDIR)/lsyssc_scalarMatVecAux.o $(OBJDIR)/mapInt_DP.o \
      $(OBJDIR)/mapInt_Int.o $(OBJDIR)/mapbase.o \
      $(OBJDIR)/matrixfilters.o $(OBJDIR)/matrixio.o \
      $(OBJDIR)/matrixmodification.o $(OBJDIR)/matrixrestriction.o \
      $(OBJDIR)/meshhierarchy.o $(OBJDIR)/meshmodification.o \
      $(OBJDIR)/meshregion.o $(OBJDIR)/mprimitives.o \
      $(OBJDIR)/multileveloperators.o $(OBJDIR)/multilevelprojection.o \
      $(OBJDIR)/nonlinearsolver.o $(OBJDIR)/numbersets.o \
      $(OBJDIR)/octreeDP.o $(OBJDIR)/octreebase.o \
      $(OBJDIR)/paramlist.o $(OBJDIR)/perfconfig.o \
      $(OBJDIR)/pprocerror.o $(OBJDIR)/pprocintegrals.o \
      $(OBJDIR)/pprocnavierstokes.o $(OBJDIR)/quadtreeDP.o \
      $(OBJDIR)/quadtreebase.o $(OBJDIR)/quicksolver.o \
      $(OBJDIR)/scalarpde.o $(OBJDIR)/sort.o \
      $(OBJDIR)/sortstrategybase.o $(OBJDIR)/spatialdiscretisation.o \
      $(OBJDIR)/spdiscprojection.o $(OBJDIR)/spsor.o \
      $(OBJDIR)/stackInt.o $(OBJDIR)/statistics.o \
      $(OBJDIR)/stdoperators.o $(OBJDIR)/storage.o \
      $(OBJDIR)/timediscretisation.o $(OBJDIR)/timescalehierarchy.o \
      $(OBJDIR)/timestepping.o $(OBJDIR)/transformation.o \
      $(OBJDIR)/triangulation.o $(OBJDIR)/triasearch.o \
      $(OBJDIR)/trilinearformevaluation.o $(OBJDIR)/ucd.o \
      $(OBJDIR)/uuid.o $(OBJDIR)/vanka.o $(OBJDIR)/vanka_bouss2d.o \
      $(OBJDIR)/vanka_navst2d.o $(OBJDIR)/vanka_optcontrol.o \
      $(OBJDIR)/vectorfilters.o $(OBJDIR)/vectorio.o $(OBJF77) \
      $(OBJEXTRA)

# List of library files
LIB = $(BUILDLIB:%=$(OBJDIR_LIB)/lib%.a)



##############################################################################
# Import a default build ID setting in case no build ID has been set yet.
include $(MAKEFILE_BUILDID_INC)

# Import settings for compiler, linker etc.
include $(MAKEFILE_CPU_INC)

# Settings from configure command line which override settings from Makefile.inc
# (none given on command line)


##############################################################################
# assemble settings for include paths, library search path and libraries to
# link against, depending on whether we have a parallel or sequential build
# (has to be done in every application's Makefile to allow override of
#  settings on the command line or as a configure option.)
##############################################################################

ifeq ($(strip $(MPI)), YES)
LIBDIR := $(MPILIBDIR) $(LIBDIR)
LIBS   := $(MPILIBS)   $(LIBS)
endif



##############################################################################
# Functions

# Define a function as a switch whether to move newly created module information
# files (extension: $(MODEXTENSION)) to $(OBJDIR) or not. Some compilers don't do
# that automatically and mess up the working directory instead with those files.
ifeq ($(strip $(MOVEMOD)), YES)
MOVE_MOD_FILES = && \
    mv $(patsubst %.f90,%.$(MODEXTENSION),$(filter %.f90,$(notdir $<))) $(dir $@)
else
MOVE_MOD_FILES =
endif

# Functions to delete a single file / directory at once
# (The reason why we need this and the magic why this works lies within
#  the blank line after the remove command. This way the remove commands
#  in a foreach-loop are triggered one after another - in separate
#  sub-shells. Not in a single sub-shell command. As this may result
#  on some machines in error messages of type:
#  execvp: rm: Arg list too long)
define remove_file
    rm -f $(file)

endef

# Recursively remove directories. For the first two directory levels
# print an error message if removal failed. (The restriction to two
# levels is rather arbitrary. It's the least number of directory levels
# created by a FEAT2 Makefile. To show an error message unconditionally
# is not desired as one would eventually always get an error message, at
# least when trying to remove /)
# The for loop is to deal with given directory wildcards like object/pc-*-*-*.
define remove_directory
    @rmdirFailures=""; \
     for dir in $(dir); do \
	depth=0; \
	while test -d "$${dir}" -a "$${dir}" != '.' -a "$${dir}" != '/'; do \
	    if rmdir "$${dir}" 2>/dev/null; then \
		echo "rmdir $${dir}"; \
		dir=`dirname $${dir}`; \
	    else \
		test $${depth} -lt 2 && rmdirFailures="$${rmdirFailures} $${dir}"; \
		dir='.'; \
	    fi; \
	    depth=`expr $${depth} + 1`; \
	done; \
    done; \
    for dir in $${rmdirFailures}; do \
	if test -d "$${dir}"; then \
	    $(print_directory_not_empty); \
	fi; \
    done

endef

# Function to be called if directory removal did not work unexpectedly.
define print_directory_not_empty
    (echo; \
     echo '# ---------------------------------------------------------------------'; \
     echo '# This Makefile previously created the directory '; \
     echo '#'; \
     echo "# $${dir}"; \
     echo '#'; \
     echo '# and was about to remove it. Since there are files in that directory'; \
     echo '# that this Makefile did not create, it will not be removed.'; \
     echo '# ---------------------------------------------------------------------')
endef



##############################################################################
# Final sanity checks

# Ensure there are no modules (stored in different directories) with identical names.
ifneq ($(shell echo $(notdir $(SRCF90)) | tr ' ' '\n' | sort -u),$(shell echo $(notdir $(SRCF90)) | tr ' ' '\n' | sort))
MESSAGE := $(MESSAGE) \
	   echo; \
	   echo '*** Error: There are at least two modules that share the same name.'; \
	   echo '***        This is not feasible given that all object files will be created in one common directory.'; \
	   echo '***        Look out for Makefile warnings "<file> given more than once in the same rule." for a list'; \
	   echo '***        of a all identically named modules.'; \
	   echo '***        Cowardly refusing compilation.'; \
	   echo; \
	   exit 1;
# The trailing 'echo' in the next command definition is necessary to catch
# all the command line options a compile command usually gets.
F77  = $(MESSAGE) echo
F90  = $(F77)
CC   = $(F77)
CUDA = $(F77)
CXX  = $(F77)
LD   = $(F77)
endif

# Makefile variable AGMG must have exactly one out of two possible values:
# YES or NO
# In case neither YES nor NO are given as mode, unset all compiler
# definitions in order to always raise an error when make is invoked.
ifneq ($(strip $(AGMG)), YES)
ifneq ($(strip $(AGMG)), NO)
MESSAGE := $(MESSAGE) \
	   echo; \
	   echo '*** Error: Build type AGMG=$(AGMG) unknown.'; \
	   echo '***        Valid keywords are YES or NO.'; \
	   echo '***        Cowardly refusing compilation.'; \
	   echo; \
	   exit 1;
# The trailing 'echo' in the next command definition is necessary to catch
# all the command line options a compile command usually gets.
F77 = $(MESSAGE) echo
F90 = $(F77)
CC  = $(F77)
CXX = $(F77)
LD  = $(F77)
endif
endif


# Makefile variable BINARY must have exactly one out of three possible values:
# STD, 32 or 64
# In case neither STD, 32 nor 64 is specified, unset all compiler
# definitions in order to always raise an error when make is invoked.
ifneq ($(strip $(BINARY)), STD)
ifneq ($(strip $(BINARY)), 32)
ifneq ($(strip $(BINARY)), 64)
MESSAGE := $(MESSAGE) \
	   echo; \
	   echo '*** Error: Binary type BINARY=$(BINARY) unknown.'; \
	   echo '***        Valid keywords are STD, 32 or 64.'; \
	   echo '***        Cowardly refusing compilation.'; \
	   echo; \
	   exit 1;
# The trailing 'echo' in the next command definition is necessary to catch
# all the command line options a compile command usually gets.
F77 = $(MESSAGE) echo
F90 = $(F77)
CC  = $(F77)
CXX = $(F77)
LD  = $(F77)
endif
endif
endif


# Makefile variable EXECUTABLE must have exactly one out of two possible values:
# YES or NO
# In case neither YES nor NO are given as mode, unset all compiler
# definitions in order to always raise an error when make is invoked.
ifneq ($(strip $(EXECUTABLE)), YES)
ifneq ($(strip $(EXECUTABLE)), NO)
MESSAGE := $(MESSAGE) \
	   echo; \
	   echo '*** Error: Build type EXECUTABLE=$(EXETUABLE) unknown.'; \
	   echo '***        Valid keywords are YES or NO.'; \
	   echo '***        Cowardly refusing compilation.'; \
	   echo; \
	   exit 1;
# The trailing 'echo' in the next command definition is necessary to catch
# all the command line options a compile command usually gets.
F77 = $(MESSAGE) echo
F90 = $(F77)
CC  = $(F77)
CXX = $(F77)
LD  = $(F77)
endif
endif


# Makefile variable UNDERSCORE must have exactly one out of two possible values:
# YES or NO
# In case neither YES nor NO are given as mode, unset all compiler
# definitions in order to always raise an error when make is invoked.
ifneq ($(strip $(UNDERSCORE)), YES)
ifneq ($(strip $(UNDERSCORE)), NO)
MESSAGE := $(MESSAGE) \
	   echo; \
	   echo '*** Error: Build type UNDERSCORE=$(UNDERSCORE) unknown.'; \
	   echo '***        Valid keywords are YES or NO.'; \
	   echo '***        Cowardly refusing compilation.'; \
	   echo; \
	   exit 1;
# The trailing 'echo' in the next command definition is necessary to catch
# all the command line options a compile command usually gets.
F77 = $(MESSAGE) echo
F90 = $(F77)
CC  = $(F77)
CXX = $(F77)
LD  = $(F77)
endif
endif


# Makefile variable SHARED must have exactly one out of two possible values:
# YES or NO.
# In case neither APPLICATION, LIBRARY or NO is specified, unset all compiler
# definitions in order to always raise an error when make is invoked.
ifneq ($(strip $(SHARED)), YES)
ifneq ($(strip $(SHARED)), NO)
MESSAGE := $(MESSAGE) \
	   echo; \
	   echo '*** Error: Compile type SHARED=$(SHARED) unknown.'; \
	   echo '***        Valid keywords are YES or NO.'; \
	   echo '***        Cowardly refusing compilation.'; \
	   echo; \
	   exit 1;
# The trailing 'echo' in the next command definition is necessary to catch
# all the command line options a compile command usually gets.
F77 = $(MESSAGE) echo
F90 = $(F77)
CC  = $(F77)
CXX = $(F77)
LD  = $(F77)
endif
endif


# Makefile variable OPT must have exactly one out of five possible values:
# NO, YES, EXPENSIVE, NATIVE, or NATIVE-EXPENSIVE. If that requirement is not
# met, unset all compiler definitions in order to always raise an error when
# make is invoked.
ifneq ($(strip $(OPT)), NATIVE-EXPENSIVE)
ifneq ($(strip $(OPT)), NATIVE)
ifneq ($(strip $(OPT)), EXPENSIVE)
ifneq ($(strip $(OPT)), YES)
ifneq ($(strip $(OPT)), NO)
MESSAGE := $(MESSAGE) \
	   echo; \
	   echo '*** Error: Optimisation level keyword OPT=$(OPT) unknown.'; \
	   echo '***        Valid keywords are NO, YES, EXPENSIVE, NATIVE and NATIVE-EXPENSIVE.'; \
	   echo '***        Cowardly refusing compilation.'; \
	   echo; \
	   exit 1;
# The trailing 'echo' in the next command definition is necessary to catch
# all the command line options a compile command usually gets.
F77  = $(MESSAGE) echo
F90  = $(F77)
CC   = $(F77)
CUDA = $(F77)
CXX  = $(F77)
LD   = $(F77)
endif
endif
endif
endif
endif


# Makefile variable INTSIZE must have exactly one out of two possible values:
# STD or LARGE
# In case neither STD nor LARGE is specified, unset all compiler
# definitions in order to always raise an error when make is invoked.
ifneq ($(strip $(INTSIZE)), STD)
ifneq ($(strip $(INTSIZE)), LARGE)
MESSAGE := $(MESSAGE) \
	   echo; \
	   echo '*** Error: Integer size INTSIZE=$(INTSIZE) unknown.'; \
	   echo '***        Valid keywords are STD or LARGE.'; \
	   echo '***        Cowardly refusing compilation.'; \
	   echo; \
	   exit 1;
# The trailing 'echo' in the next command definition is necessary to catch
# all the command line options a compile command usually gets.
F77 = $(MESSAGE) echo
F90 = $(F77)
CC  = $(F77)
CXX = $(F77)
LD  = $(F77)
endif
endif


# Makefile variable MPI must have exactly one out of two possible values:
# YES or NO
# In case neither YES nor NO are given as mode, unset all compiler
# definitions in order to always raise an error when make is invoked.
ifneq ($(strip $(MPI)), YES)
ifneq ($(strip $(MPI)), NO)
MESSAGE := $(MESSAGE) \
	   echo; \
	   echo '*** Error: Build type MPI=$(MPI) unknown.'; \
	   echo '***        Valid keywords are YES or NO.'; \
	   echo '***        Cowardly refusing compilation.'; \
	   echo; \
	   exit 1;
# The trailing 'echo' in the next command definition is necessary to catch
# all the command line options a compile command usually gets.
F77 = $(MESSAGE) echo
F90 = $(F77)
CC  = $(F77)
CXX = $(F77)
LD  = $(F77)
endif
endif


# Makefile variable OPENMP must have exactly one out of two possible values:
# YES or NO
# In case neither YES nor NO are given as mode, unset all compiler
# definitions in order to always raise an error when make is invoked.
ifneq ($(strip $(OPENMP)), YES)
ifneq ($(strip $(OPENMP)), NO)
MESSAGE := $(MESSAGE) \
	   echo; \
	   echo '*** Error: Build type OPENMP=$(OPENMP) unknown.'; \
	   echo '***        Valid keywords are YES or NO.'; \
	   echo '***        Cowardly refusing compilation.'; \
	   echo; \
	   exit 1;
# The trailing 'echo' in the next command definition is necessary to catch
# all the command line options a compile command usually gets.
F77 = $(MESSAGE) echo
F90 = $(F77)
CC  = $(F77)
CXX = $(F77)
LD  = $(F77)
endif
endif


# If a parallel application should be built, but preprocessor switch
# -DENABLE_SERIAL_BUILD appears among compiler flags, unset all compiler definitions
# in order to always raise an error when make is invoked.
ifeq ($(strip $(MPI)), YES)
ifneq (,$(findstring -DENABLE_SERIAL_BUILD ,\
	$(APPONLYFLAGS) $(CFLAGSF77) $(CFLAGSF90) $(CFLAGSC) $(CFLAGSCOPROC) $(CFLAGSCUDA) $(CFLAGSCXX) ))
MESSAGE := $(MESSAGE) \
	   echo; \
	   echo '*** Error: Build type MPI=YES cannot be used in combination'; \
	   echo '***        with preprocessor switch -DENABLE_SERIAL_BUILD.'; \
	   echo '***        Please choose for either one. Cowardly refusing compilation.'; \
	   echo; \
	   exit 1;
# The trailing 'echo' in the next command definition is necessary to catch
# all the command line options a compile command usually gets.
F77 = $(MESSAGE) echo
F90 = $(F77)
CC  = $(F77)
CXX = $(F77)
LD  = $(F77)
endif
endif


# Warn about deprecated Makefile variable MODE=PARALLEL|SERIAL
ifneq ($(strip $(MODE)),)
MESSAGE := $(MESSAGE) \
	   echo; \
	   echo '*** Warning: Use of Makefile variable MODE=$(MODE) is deprecated.'; \
	   echo '***          Use MPI=<YES|NO> instead.'; \
	   exit 1;
# The trailing 'echo' in the next command definition is necessary to catch
# all the command line options a compile command usually gets.
F77 = $(MESSAGE) echo
F90 = $(F77)
CC  = $(F77)
CXX = $(F77)
LD  = $(F77)
endif


# Catch case that a build ID has been given for which
# compiler settings are not (fully) set up.
DETAIL := 
ifneq ($(TOKEN1)$(TOKEN2)$(TOKEN3)$(TOKEN4)$(TOKEN5), 11111)
ifneq ($(TOKEN1), 1)
DETAIL := $(DETAIL) echo '***        1st token not matched against any rule in $(MAKEFILE_CPU_INC).';
endif
ifneq ($(TOKEN2), 1)
DETAIL := $(DETAIL) echo '***        2nd token not matched against any rule in $(MAKEFILE_CPU_INC)';
endif
ifneq ($(TOKEN3), 1)
DETAIL := $(DETAIL) echo '***        3rd token not matched against any rule in $(MAKEFILE_CPU_INC)';
endif
ifneq ($(TOKEN4), 1)
DETAIL := $(DETAIL) echo '***        4th token not matched against any rule in $(MAKEFILE_CPU_INC).';
endif
ifneq ($(TOKEN5), 1)
DETAIL := $(DETAIL) echo '***        5th token not matched against any rule in $(MAKEFILE_CPU_INC).';
endif
endif


# Test for 6th token in case of MPI=YES
ifeq ($(strip $(MPI)), YES)
ifneq ($(TOKEN6), 1)
DETAIL := $(DETAIL) echo '***        6th token not matched against any rule in $(MAKEFILE_CPU_INC).';
endif
endif


# Now, override any compiler settings in case any token is unset
ifneq ($(DETAIL),)
MESSAGE := $(MESSAGE) \
	   echo; \
	   echo '*** Error: Invalid build ID $(ID)'; \
	   $(DETAIL) \
	   echo; \
	   exit 1;
# The trailing 'echo' in the next command definition is necessary to catch
# all the command line options a compile command usually gets.
F77 = $(MESSAGE) echo
F90 = $(F77)
CC  = $(F77)
CXX = $(F77)
LD  = $(F77)
endif


# Catch case (coproc-bail-out) that coprocessor support is not available for all build IDs
ifneq (,$(findstring -DENABLE_COPROCESSOR_SUPPORT ,\
	$(APPONLYFLAGS) $(CFLAGSF77) $(CFLAGSF90) $(CFLAGSC) $(CFLAGSCOPROC) $(CFLAGSCUDA) $(CFLAGSCXX) ))
# Initialise value
DETAIL :=
ifneq (, $(findstring -DUSE_COMPILER_PATHSCALE ,\
	$(APPONLYFLAGS) $(CFLAGSF77) $(CFLAGSF90) $(CFLAGSC) $(CFLAGSCOPROC) $(CFLAGSCUDA) $(CFLAGSCXX) ))
DETAIL := $(DETAIL) echo '*** because cross-language linking is not possible with the Pathscale compiler suite:';
endif
ifneq (, $(findstring -DUSE_COMPILER_OPEN64 ,\
	$(APPONLYFLAGS) $(CFLAGSF77) $(CFLAGSF90) $(CFLAGSC) $(CFLAGSCOPROC) $(CFLAGSCUDA) $(CFLAGSCXX) ))
DETAIL := $(DETAIL) echo '*** because cross-language linking is not possible with the Open64 compiler suite:';
endif
ifneq (, $(findstring -DUSE_COMPILER_NEC ,\
	$(APPONLYFLAGS) $(CFLAGSF77) $(CFLAGSF90) $(CFLAGSC) $(CFLAGSCOPROC) $(CFLAGSCUDA) $(CFLAGSCXX) ))
DETAIL := $(DETAIL) echo '*** because cross-language linking is not possible with NEC compilers:';
endif
# Throw error if value is set by now
ifneq (,$(DETAIL))
MESSAGE := $(MESSAGE) \
	   echo; \
	   echo '*** Error: Coprocessor support not available for build ID $(ID)'; \
	   $(DETAIL) \
	   echo '*** Symbol names generated by its Fortran compiler lead to incompilable C code.'; \
	   echo; \
	   exit 51;
# The trailing 'echo' in the next command definition is necessary to catch
# all the command line options a compile command usually gets.
F77  = $(MESSAGE) echo
F90  = $(F77)
CC   = $(F77)
CUDA = $(F77)
CXX  = $(F77)
LD   = $(F77)
endif
endif



##############################################################################
# Default target if make is invoked without any argument:
# compile the application
default: all



##############################################################################
# Dependencies of each object file

$(OBJDIR)/hadaptaux.o: \
        $(SRCDIR_KERNEL)/Adaptivity/hadaptaux.f90 \
        $(OBJDIR)/arraylistInt.o $(OBJDIR)/basicgeometry.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/mapInt_DP.o \
        $(OBJDIR)/octreeDP.o $(OBJDIR)/quadtreeDP.o $(OBJDIR)/sort.o \
        $(OBJDIR)/storage.o $(OBJDIR)/triangulation.o

$(OBJDIR)/hadaptaux1d.o: \
        $(SRCDIR_KERNEL)/Adaptivity/hadaptaux1d.f90 \
        $(OBJDIR)/arraylistInt.o $(OBJDIR)/collection.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/hadaptaux.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/storage.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/intf_hadaptcallback.inc

$(OBJDIR)/hadaptaux2d.o: \
        $(SRCDIR_KERNEL)/Adaptivity/hadaptaux2d.f90 \
        $(OBJDIR)/arraylistInt.o $(OBJDIR)/basicgeometry.o \
        $(OBJDIR)/collection.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/hadaptaux.o $(OBJDIR)/io.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/mapInt_DP.o \
        $(OBJDIR)/quadtreeDP.o $(OBJDIR)/quadtreebase.o \
        $(OBJDIR)/sort.o $(OBJDIR)/storage.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/intf_hadaptcallback.inc

$(OBJDIR)/hadaptaux3d.o: \
        $(SRCDIR_KERNEL)/Adaptivity/hadaptaux3d.f90 \
        $(OBJDIR)/collection.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/hadaptaux.o

$(OBJDIR)/hadaptivity.o: \
        $(SRCDIR_KERNEL)/Adaptivity/hadaptivity.f90 \
        $(OBJDIR)/arraylistInt.o $(OBJDIR)/basicgeometry.o \
        $(OBJDIR)/boundary.o $(OBJDIR)/collection.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/hadaptaux.o $(OBJDIR)/hadaptaux1d.o \
        $(OBJDIR)/hadaptaux2d.o $(OBJDIR)/io.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/mapInt_DP.o \
        $(OBJDIR)/octreeDP.o $(OBJDIR)/paramlist.o \
        $(OBJDIR)/quadtreeDP.o $(OBJDIR)/sort.o $(OBJDIR)/storage.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/intf_hadaptcallback.inc

$(OBJDIR)/basicgeometry.o: \
        $(SRCDIR_KERNEL)/BasicGeometry/basicgeometry.f90 \
        $(OBJDIR)/fsystem.o

$(OBJDIR)/geometry.o: \
        $(SRCDIR_KERNEL)/BasicGeometry/geometry.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/linearsystemscalar.o

$(OBJDIR)/geometryaux.o: \
        $(SRCDIR_KERNEL)/BasicGeometry/geometryaux.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/basicgeometry.o \
        $(OBJDIR)/genoutput.o

$(OBJDIR)/boundary.o: \
        $(SRCDIR_KERNEL)/Boundary/boundary.f90 $(OBJDIR)/storage.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/io.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/fparser.o

$(OBJDIR)/fictitiousboundary.o: \
        $(SRCDIR_KERNEL)/Boundary/fictitiousboundary.f90 \
        $(OBJDIR)/fsystem.o

$(OBJDIR)/boundarycondition.o: \
        $(SRCDIR_KERNEL)/ContinuousFormulation/boundarycondition.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/fictitiousboundary.o

$(OBJDIR)/scalarpde.o: \
        $(SRCDIR_KERNEL)/ContinuousFormulation/scalarpde.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/derivatives.o

$(OBJDIR)/arraylistbase.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistbase.f90 \
        $(OBJDIR)/fsystem.o

$(OBJDIR)/arraylistInt.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistInt.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistInt_threaded.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistInt_threaded.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistInt_Int.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistInt_Int.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistInt_Int_threaded.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistInt_Int_threaded.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistInt_DP.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistInt_DP.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistInt_DP_threaded.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistInt_DP_threaded.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistInt_SP.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistInt_SP.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistInt_SP_threaded.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistInt_SP_threaded.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistDP.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistDP.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistDP_threaded.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistDP_threaded.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistDP_Int.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistDP_Int.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistDP_Int_threaded.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistDP_Int_threaded.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistDP_DP.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistDP_DP.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistDP_DP_threaded.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistDP_DP_threaded.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistDP_SP.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistDP_SP.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistDP_SP_threaded.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistDP_SP_threaded.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistSP.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistSP.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistSP_threaded.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistSP_threaded.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistSP_Int.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistSP_Int.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistSP_Int_threaded.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistSP_Int_threaded.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistSP_DP.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistSP_DP.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistSP_DP_threaded.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistSP_DP_threaded.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistSP_SP.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistSP_SP.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/arraylistSP_SP_threaded.o: \
        $(SRCDIR_KERNEL)/DataStructures/arraylistSP_SP_threaded.f90 \
        $(OBJDIR)/arraylistbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/arraylist.h

$(OBJDIR)/listbase.o: \
        $(SRCDIR_KERNEL)/DataStructures/listbase.f90 \
        $(OBJDIR)/fsystem.o

$(OBJDIR)/listInt.o: \
        $(SRCDIR_KERNEL)/DataStructures/listInt.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/listbase.o \
        $(OBJDIR)/storage.o $(OBJDIR)/list.h

$(OBJDIR)/listInt_Int.o: \
        $(SRCDIR_KERNEL)/DataStructures/listInt_Int.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/listbase.o \
        $(OBJDIR)/storage.o $(OBJDIR)/list.h

$(OBJDIR)/listInt_DP.o: \
        $(SRCDIR_KERNEL)/DataStructures/listInt_DP.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/listbase.o \
        $(OBJDIR)/storage.o $(OBJDIR)/list.h

$(OBJDIR)/listInt_SP.o: \
        $(SRCDIR_KERNEL)/DataStructures/listInt_SP.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/listbase.o \
        $(OBJDIR)/storage.o $(OBJDIR)/list.h

$(OBJDIR)/listDP.o: \
        $(SRCDIR_KERNEL)/DataStructures/listDP.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/listbase.o $(OBJDIR)/storage.o \
        $(OBJDIR)/list.h

$(OBJDIR)/listDP_Int.o: \
        $(SRCDIR_KERNEL)/DataStructures/listDP_Int.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/listbase.o \
        $(OBJDIR)/storage.o $(OBJDIR)/list.h

$(OBJDIR)/listDP_DP.o: \
        $(SRCDIR_KERNEL)/DataStructures/listDP_DP.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/listbase.o \
        $(OBJDIR)/storage.o $(OBJDIR)/list.h

$(OBJDIR)/listDP_SP.o: \
        $(SRCDIR_KERNEL)/DataStructures/listDP_SP.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/listbase.o \
        $(OBJDIR)/storage.o $(OBJDIR)/list.h

$(OBJDIR)/listSP.o: \
        $(SRCDIR_KERNEL)/DataStructures/listSP.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/listbase.o $(OBJDIR)/storage.o \
        $(OBJDIR)/list.h

$(OBJDIR)/listSP_Int.o: \
        $(SRCDIR_KERNEL)/DataStructures/listSP_Int.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/listbase.o \
        $(OBJDIR)/storage.o $(OBJDIR)/list.h

$(OBJDIR)/listSP_DP.o: \
        $(SRCDIR_KERNEL)/DataStructures/listSP_DP.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/listbase.o \
        $(OBJDIR)/storage.o $(OBJDIR)/list.h

$(OBJDIR)/listSP_SP.o: \
        $(SRCDIR_KERNEL)/DataStructures/listSP_SP.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/listbase.o \
        $(OBJDIR)/storage.o $(OBJDIR)/list.h

$(OBJDIR)/mapbase.o: \
        $(SRCDIR_KERNEL)/DataStructures/mapbase.f90 \
        $(OBJDIR)/fsystem.o

$(OBJDIR)/mapInt.o: \
        $(SRCDIR_KERNEL)/DataStructures/mapInt.f90 $(OBJDIR)/mapbase.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/map.h

$(OBJDIR)/mapInt_Int.o: \
        $(SRCDIR_KERNEL)/DataStructures/mapInt_Int.f90 \
        $(OBJDIR)/mapbase.o $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/storage.o $(OBJDIR)/map.h

$(OBJDIR)/mapInt_DP.o: \
        $(SRCDIR_KERNEL)/DataStructures/mapInt_DP.f90 \
        $(OBJDIR)/mapbase.o $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/storage.o $(OBJDIR)/map.h

$(OBJDIR)/mapInt_SP.o: \
        $(SRCDIR_KERNEL)/DataStructures/mapInt_SP.f90 \
        $(OBJDIR)/mapbase.o $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/storage.o $(OBJDIR)/map.h

$(OBJDIR)/mapDP.o: \
        $(SRCDIR_KERNEL)/DataStructures/mapDP.f90 $(OBJDIR)/mapbase.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/map.h

$(OBJDIR)/mapDP_Int.o: \
        $(SRCDIR_KERNEL)/DataStructures/mapDP_Int.f90 \
        $(OBJDIR)/mapbase.o $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/storage.o $(OBJDIR)/map.h

$(OBJDIR)/mapDP_DP.o: \
        $(SRCDIR_KERNEL)/DataStructures/mapDP_DP.f90 \
        $(OBJDIR)/mapbase.o $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/storage.o $(OBJDIR)/map.h

$(OBJDIR)/mapDP_SP.o: \
        $(SRCDIR_KERNEL)/DataStructures/mapDP_SP.f90 \
        $(OBJDIR)/mapbase.o $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/storage.o $(OBJDIR)/map.h

$(OBJDIR)/mapSP.o: \
        $(SRCDIR_KERNEL)/DataStructures/mapSP.f90 $(OBJDIR)/mapbase.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/map.h

$(OBJDIR)/mapSP_Int.o: \
        $(SRCDIR_KERNEL)/DataStructures/mapSP_Int.f90 \
        $(OBJDIR)/mapbase.o $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/storage.o $(OBJDIR)/map.h

$(OBJDIR)/mapSP_DP.o: \
        $(SRCDIR_KERNEL)/DataStructures/mapSP_DP.f90 \
        $(OBJDIR)/mapbase.o $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/storage.o $(OBJDIR)/map.h

$(OBJDIR)/mapSP_SP.o: \
        $(SRCDIR_KERNEL)/DataStructures/mapSP_SP.f90 \
        $(OBJDIR)/mapbase.o $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/storage.o $(OBJDIR)/map.h

$(OBJDIR)/quadtreebase.o: \
        $(SRCDIR_KERNEL)/DataStructures/quadtreebase.f90 \
        $(OBJDIR)/fsystem.o

$(OBJDIR)/quadtreeDP.o: \
        $(SRCDIR_KERNEL)/DataStructures/quadtreeDP.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/quadtreebase.o $(OBJDIR)/storage.o \
        $(OBJDIR)/quadtree.h

$(OBJDIR)/quadtreeSP.o: \
        $(SRCDIR_KERNEL)/DataStructures/quadtreeSP.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/quadtreebase.o $(OBJDIR)/storage.o \
        $(OBJDIR)/quadtree.h

$(OBJDIR)/octreebase.o: \
        $(SRCDIR_KERNEL)/DataStructures/octreebase.f90 \
        $(OBJDIR)/fsystem.o

$(OBJDIR)/octreeDP.o: \
        $(SRCDIR_KERNEL)/DataStructures/octreeDP.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/octreebase.o $(OBJDIR)/storage.o $(OBJDIR)/octree.h

$(OBJDIR)/octreeSP.o: \
        $(SRCDIR_KERNEL)/DataStructures/octreeSP.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/octreebase.o $(OBJDIR)/storage.o $(OBJDIR)/octree.h

$(OBJDIR)/stackInt.o: \
        $(SRCDIR_KERNEL)/DataStructures/stackInt.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/stack.h

$(OBJDIR)/stackInt_threaded.o: \
        $(SRCDIR_KERNEL)/DataStructures/stackInt_threaded.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/stack.h

$(OBJDIR)/stackDP.o: \
        $(SRCDIR_KERNEL)/DataStructures/stackDP.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/stack.h

$(OBJDIR)/stackDP_threaded.o: \
        $(SRCDIR_KERNEL)/DataStructures/stackDP_threaded.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/stack.h

$(OBJDIR)/stackSP.o: \
        $(SRCDIR_KERNEL)/DataStructures/stackSP.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/stack.h

$(OBJDIR)/stackSP_threaded.o: \
        $(SRCDIR_KERNEL)/DataStructures/stackSP_threaded.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/stack.h

$(OBJDIR)/graph.o: \
        $(SRCDIR_KERNEL)/DataStructures/graph.f90 \
        $(OBJDIR)/arraylistInt.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/mapInt_Int.o \
        $(OBJDIR)/mapbase.o $(OBJDIR)/storage.o

$(OBJDIR)/numbersets.o: \
        $(SRCDIR_KERNEL)/DataStructures/numbersets.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o

$(OBJDIR)/geneticalgorithm.o: \
        $(SRCDIR_KERNEL)/DataStructures/geneticalgorithm.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/sort.o

$(OBJDIR)/intgroupset.o: \
        $(SRCDIR_KERNEL)/DataStructures/intgroupset.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/sort.o $(OBJDIR)/linearalgebra.o

$(OBJDIR)/bcassembly.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/bcassembly.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/bcassemblybase.o \
        $(OBJDIR)/boundary.o $(OBJDIR)/collection.o \
        $(OBJDIR)/discretebc.o $(OBJDIR)/discretefbc.o \
        $(OBJDIR)/dofmapping.o $(OBJDIR)/element.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/meshregion.o \
        $(OBJDIR)/mprimitives.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/sort.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/storage.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/cubature.o $(OBJDIR)/intf_bcassembly.inc \
        $(OBJDIR)/intf_fbcassembly.inc $(OBJDIR)/intf_discretebc.inc

$(OBJDIR)/bcassemblybase.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/bcassemblybase.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/dofmapping.o $(OBJDIR)/element.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/storage.o $(OBJDIR)/triangulation.o

$(OBJDIR)/bilinearformevaluation.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/bilinearformevaluation.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/boundaryaux.o $(OBJDIR)/collection.o \
        $(OBJDIR)/cubature.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/dofmapping.o $(OBJDIR)/domainintegration.o \
        $(OBJDIR)/element.o $(OBJDIR)/elementpreprocessing.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/mprimitives.o $(OBJDIR)/scalarpde.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/storage.o \
        $(OBJDIR)/transformation.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/intf_coefficientMatrixSc.inc \
        $(OBJDIR)/intf_coefficientMatrixScBdr1D.inc \
        $(OBJDIR)/intf_coefficientMatrixScBdr2D.inc

$(OBJDIR)/extstdassemblyinfo.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/extstdassemblyinfo.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/boundaryaux.o $(OBJDIR)/cubature.o \
        $(OBJDIR)/scalarpde.o $(OBJDIR)/element.o \
        $(OBJDIR)/transformation.o $(OBJDIR)/spatialdiscretisation.o

$(OBJDIR)/discretebc.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/discretebc.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o $(OBJDIR)/dofmapping.o

$(OBJDIR)/discretefbc.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/discretefbc.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o \
        $(OBJDIR)/boundarycondition.o $(OBJDIR)/dofmapping.o

$(OBJDIR)/dofmapping.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/dofmapping.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/element.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/storage.o \
        $(OBJDIR)/triangulation.o

$(OBJDIR)/domainintegration.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/domainintegration.f90 \
        $(OBJDIR)/collection.o $(OBJDIR)/element.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/transformation.o \
        $(OBJDIR)/triangulation.o

$(OBJDIR)/feevaluation.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/feevaluation.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/boundaryaux.o $(OBJDIR)/collection.o \
        $(OBJDIR)/derivatives.o $(OBJDIR)/dofmapping.o \
        $(OBJDIR)/domainintegration.o $(OBJDIR)/element.o \
        $(OBJDIR)/elementbase.o $(OBJDIR)/elementpreprocessing.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/mprimitives.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/spdiscprojection.o $(OBJDIR)/storage.o \
        $(OBJDIR)/transformation.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/triasearch.o $(OBJDIR)/extstdassemblyinfo.o \
        $(OBJDIR)/intf_fecoefficient_sim.inc

$(OBJDIR)/linearformevaluation.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/linearformevaluation.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/boundaryaux.o $(OBJDIR)/collection.o \
        $(OBJDIR)/cubature.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/dofmapping.o $(OBJDIR)/domainintegration.o \
        $(OBJDIR)/element.o $(OBJDIR)/elementpreprocessing.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/mprimitives.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/scalarpde.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/storage.o \
        $(OBJDIR)/transformation.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/intf_coefficientVectorSc.inc \
        $(OBJDIR)/intf_coefficientVectorScBdr1D.inc \
        $(OBJDIR)/intf_coefficientVectorScBdr2D.inc \
        $(OBJDIR)/intf_coefficientVectorBlBdr1D.inc \
        $(OBJDIR)/intf_coefficientVectorBlBdr2D.inc \
        $(OBJDIR)/intf_coefficientVectorBl.inc

$(OBJDIR)/matrixfilters.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/matrixfilters.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/discretebc.o \
        $(OBJDIR)/discretefbc.o $(OBJDIR)/dofmapping.o \
        $(OBJDIR)/matrixmodification.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/sortstrategybase.o

$(OBJDIR)/multileveloperators.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/multileveloperators.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/collection.o \
        $(OBJDIR)/cubature.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/dofmapping.o $(OBJDIR)/domainintegration.o \
        $(OBJDIR)/element.o $(OBJDIR)/elementpreprocessing.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/scalarpde.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/storage.o \
        $(OBJDIR)/transformation.o $(OBJDIR)/triangulation.o

$(OBJDIR)/multilevelprojection.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/multilevelprojection.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/geometryaux.o \
        $(OBJDIR)/element.o $(OBJDIR)/quicksolver.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/dofmapping.o

$(OBJDIR)/sortstrategybase.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/sortstrategybase.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o $(OBJDIR)/genoutput.o

$(OBJDIR)/sortstrategy.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/sortstrategy.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/linearalgebra.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/element.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/sortstrategybase.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/adjacency.o \
        $(OBJDIR)/dofmapping.o $(OBJDIR)/sort.o $(OBJDIR)/random.o \
        $(OBJDIR)/fespacehierarchybase.o

$(OBJDIR)/spatialdiscretisation.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/spatialdiscretisation.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/basicgeometry.o \
        $(OBJDIR)/boundary.o $(OBJDIR)/transformation.o \
        $(OBJDIR)/element.o $(OBJDIR)/cubature.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/sort.o

$(OBJDIR)/trilinearformevaluation.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/trilinearformevaluation.f90 \
        $(OBJDIR)/bilinearformevaluation.o $(OBJDIR)/collection.o \
        $(OBJDIR)/cubature.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/dofmapping.o $(OBJDIR)/domainintegration.o \
        $(OBJDIR)/element.o $(OBJDIR)/elementpreprocessing.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/scalarpde.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/storage.o \
        $(OBJDIR)/transformation.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/intf_coefficientTrilMatrixSc.inc \
        $(OBJDIR)/basicgeometry.o

$(OBJDIR)/vectorfilters.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/vectorfilters.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/element.o \
        $(OBJDIR)/elementbase.o $(OBJDIR)/elementpreprocessing.o \
        $(OBJDIR)/element_quad2d.o $(OBJDIR)/discretebc.o \
        $(OBJDIR)/discretefbc.o $(OBJDIR)/dofmapping.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/derivatives.o $(OBJDIR)/transformation.o \
        $(OBJDIR)/sortstrategybase.o

$(OBJDIR)/boundaryaux.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/boundaryaux.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/storage.o \
        $(OBJDIR)/triangulation.o

$(OBJDIR)/ufci.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/ufci.f90 $(OBJDIR)/fsystem.o

$(OBJDIR)/dofpreprocessing.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/dofpreprocessing.f90 \
        $(OBJDIR)/element.o $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/domainintegration.o

$(OBJDIR)/feevaluation2.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/feevaluation2.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/collection.o \
        $(OBJDIR)/derivatives.o $(OBJDIR)/element.o \
        $(OBJDIR)/elementpreprocessing.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/scalarpde.o $(OBJDIR)/dofmapping.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/transformation.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/linearsystemblock.o

$(OBJDIR)/blockmatassemblybase.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/blockmatassemblybase.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/elementbase.o $(OBJDIR)/cubature.o \
        $(OBJDIR)/transformation.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/feevaluation2.o

$(OBJDIR)/blockmatassembly.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/blockmatassembly.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o $(OBJDIR)/collection.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/boundaryaux.o \
        $(OBJDIR)/boundary.o $(OBJDIR)/cubature.o \
        $(OBJDIR)/transformation.o $(OBJDIR)/element.o \
        $(OBJDIR)/elementpreprocessing.o $(OBJDIR)/domainintegration.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/linearalgebra.o \
        $(OBJDIR)/scalarpde.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/feevaluation2.o $(OBJDIR)/blockmatassemblybase.o

$(OBJDIR)/blockmatassemblystdop.o: \
        $(SRCDIR_KERNEL)/DOFMaintenance/blockmatassemblystdop.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/geometryaux.o $(OBJDIR)/collection.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/boundary.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/derivatives.o $(OBJDIR)/feevaluation2.o \
        $(OBJDIR)/blockmatassemblybase.o

$(OBJDIR)/cubature.o: \
        $(SRCDIR_KERNEL)/ElementCubature/cubature.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/basicgeometry.o \
        $(OBJDIR)/geometryaux.o $(OBJDIR)/genoutput.o

$(OBJDIR)/derivatives.o: \
        $(SRCDIR_KERNEL)/ElementCubature/derivatives.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o

$(OBJDIR)/element.o: \
        $(SRCDIR_KERNEL)/ElementCubature/element.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/mprimitives.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/transformation.o $(OBJDIR)/elementbase.o \
        $(OBJDIR)/element_line1d.o $(OBJDIR)/element_tri2d.o \
        $(OBJDIR)/element_quad2d.o $(OBJDIR)/element_tetra3d.o \
        $(OBJDIR)/element_hexa3d.o $(OBJDIR)/element_pyra3d.o \
        $(OBJDIR)/element_prism3d.o

$(OBJDIR)/adaptivecubature.o: \
        $(SRCDIR_KERNEL)/ElementCubature/adaptivecubature.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/collection.o \
        $(OBJDIR)/cubature.o $(OBJDIR)/element.o \
        $(OBJDIR)/elementpreprocessing.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/intf_functionScSimple.inc

$(OBJDIR)/element_hexa3d.o: \
        $(SRCDIR_KERNEL)/ElementCubature/element_hexa3d.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/basicgeometry.o \
        $(OBJDIR)/elementbase.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/mprimitives.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/transformation.o

$(OBJDIR)/element_line1d.o: \
        $(SRCDIR_KERNEL)/ElementCubature/element_line1d.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/elementbase.o \
        $(OBJDIR)/derivatives.o $(OBJDIR)/perfconfig.o

$(OBJDIR)/element_prism3d.o: \
        $(SRCDIR_KERNEL)/ElementCubature/element_prism3d.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/elementbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/perfconfig.o

$(OBJDIR)/element_pyra3d.o: \
        $(SRCDIR_KERNEL)/ElementCubature/element_pyra3d.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/basicgeometry.o \
        $(OBJDIR)/elementbase.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/transformation.o $(OBJDIR)/perfconfig.o

$(OBJDIR)/element_quad2d.o: \
        $(SRCDIR_KERNEL)/ElementCubature/element_quad2d.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/elementbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/mprimitives.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/transformation.o

$(OBJDIR)/element_tetra3d.o: \
        $(SRCDIR_KERNEL)/ElementCubature/element_tetra3d.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/elementbase.o \
        $(OBJDIR)/derivatives.o $(OBJDIR)/perfconfig.o

$(OBJDIR)/element_tri2d.o: \
        $(SRCDIR_KERNEL)/ElementCubature/element_tri2d.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/elementbase.o \
        $(OBJDIR)/derivatives.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/mprimitives.o

$(OBJDIR)/elementbase.o: \
        $(SRCDIR_KERNEL)/ElementCubature/elementbase.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/transformation.o $(OBJDIR)/triangulation.o

$(OBJDIR)/elementpreprocessing.o: \
        $(SRCDIR_KERNEL)/ElementCubature/elementpreprocessing.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/element.o $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/storage.o \
        $(OBJDIR)/transformation.o $(OBJDIR)/triangulation.o

$(OBJDIR)/transformation.o: \
        $(SRCDIR_KERNEL)/ElementCubature/transformation.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/geometryaux.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/storage.o \
        $(OBJDIR)/triangulation.o

$(OBJDIR)/fespacehierarchybase.o: \
        $(SRCDIR_KERNEL)/Hierarchies/fespacehierarchybase.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/meshhierarchy.o $(OBJDIR)/spatialdiscretisation.o

$(OBJDIR)/fespacehierarchy.o: \
        $(SRCDIR_KERNEL)/Hierarchies/fespacehierarchy.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/meshhierarchy.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/collection.o $(OBJDIR)/dofmapping.o \
        $(OBJDIR)/fespacehierarchybase.o

$(OBJDIR)/meshhierarchy.o: \
        $(SRCDIR_KERNEL)/Hierarchies/meshhierarchy.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/triangulation.o

$(OBJDIR)/timescalehierarchy.o: \
        $(SRCDIR_KERNEL)/Hierarchies/timescalehierarchy.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/timediscretisation.o

$(OBJDIR)/linearalgebra.o: \
        $(SRCDIR_KERNEL)/LinearAlgebra/linearalgebra.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/perfconfig.o

$(OBJDIR)/agmgdummy.o: \
        $(SRCDIR_KERNEL)/LinearSolver/agmgdummy.f90 \
        $(OBJDIR)/genoutput.o $(OBJDIR)/fsystem.o

$(OBJDIR)/coarsegridcorrection.o: \
        $(SRCDIR_KERNEL)/LinearSolver/coarsegridcorrection.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/filtersupport.o

$(OBJDIR)/filtersupport.o: \
        $(SRCDIR_KERNEL)/LinearSolver/filtersupport.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/matrixfilters.o \
        $(OBJDIR)/vectorfilters.o $(OBJDIR)/discretebc.o \
        $(OBJDIR)/discretefbc.o

$(OBJDIR)/iluk.o: \
        $(SRCDIR_KERNEL)/LinearSolver/iluk.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/storage.o $(OBJDIR)/linearalgebra.o

$(OBJDIR)/linearsolver.o: \
        $(SRCDIR_KERNEL)/LinearSolver/linearsolver.f90 \
        $(OBJDIR)/agmgdummy.o $(OBJDIR)/coarsegridcorrection.o \
        $(OBJDIR)/filtersupport.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/globalsystem.o \
        $(OBJDIR)/iluk.o $(OBJDIR)/linearalgebra.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/matrixio.o $(OBJDIR)/mprimitives.o \
        $(OBJDIR)/multilevelprojection.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/spsor.o \
        $(OBJDIR)/statistics.o $(OBJDIR)/storage.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/vanka.o \
        $(OBJDIR)/element.o $(OBJDIR)/dofmapping.o

$(OBJDIR)/linearsolverautoinitialise.o: \
        $(SRCDIR_KERNEL)/LinearSolver/linearsolverautoinitialise.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/linearsolver.o \
        $(OBJDIR)/multilevelprojection.o $(OBJDIR)/filtersupport.o \
        $(OBJDIR)/paramlist.o

$(OBJDIR)/quicksolver.o: \
        $(SRCDIR_KERNEL)/LinearSolver/quicksolver.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/mprimitives.o $(OBJDIR)/perfconfig.o

$(OBJDIR)/vanka.o: \
        $(SRCDIR_KERNEL)/LinearSolver/vanka.f90 $(OBJDIR)/dofmapping.o \
        $(OBJDIR)/element.o $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/mprimitives.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/quicksolver.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/storage.o $(OBJDIR)/sortstrategybase.o \
        $(OBJDIR)/vanka_navst2d.o $(OBJDIR)/vanka_bouss2d.o \
        $(OBJDIR)/vanka_optcontrol.o

$(OBJDIR)/vanka_bouss2d.o: \
        $(SRCDIR_KERNEL)/LinearSolver/vanka_bouss2d.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/mprimitives.o $(OBJDIR)/element.o \
        $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/linearsystemblock.o

$(OBJDIR)/vanka_optcontrol.o: \
        $(SRCDIR_KERNEL)/LinearSolver/vanka_optcontrol.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/mprimitives.o $(OBJDIR)/element.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/dofmapping.o

$(OBJDIR)/vanka_navst2d.o: \
        $(SRCDIR_KERNEL)/LinearSolver/vanka_navst2d.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/mprimitives.o $(OBJDIR)/element.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/dofmapping.o

$(OBJDIR)/spsor.o: \
        $(SRCDIR_KERNEL)/LinearSolver/spsor.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/mprimitives.o $(OBJDIR)/element.o \
        $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/linearsystemblock.o

$(OBJDIR)/globalsystem.o: \
        $(SRCDIR_KERNEL)/LinearSystem/globalsystem.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/linearalgebra.o

$(OBJDIR)/linearsystemblock.o: \
        $(SRCDIR_KERNEL)/LinearSystem/linearsystemblock.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/discretebc.o \
        $(OBJDIR)/discretefbc.o $(OBJDIR)/dofmapping.o \
        $(OBJDIR)/fpersistence.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/linearalgebra.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/storage.o \
        $(OBJDIR)/sortstrategybase.o $(OBJDIR)/uuid.o

$(OBJDIR)/linearsystemscalar.o: \
        $(SRCDIR_KERNEL)/LinearSystem/linearsystemscalar.f90 \
        $(OBJDIR)/arraylistInt.o $(OBJDIR)/arraylistInt_Int.o \
        $(OBJDIR)/dofmapping.o $(OBJDIR)/fpersistence.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/graph.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/mapInt_Int.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/storage.o $(OBJDIR)/sortstrategybase.o \
        $(OBJDIR)/uuid.o $(OBJDIR)/lsyssc_scalarMatVecAux.o

$(OBJDIR)/matrixmodification.o: \
        $(SRCDIR_KERNEL)/LinearSystem/matrixmodification.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/genoutput.o

$(OBJDIR)/lsyssc_scalarMatVecAux.o: \
        $(SRCDIR_KERNEL)/LinearSystem/lsyssc_scalarMatVecAux.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/linearalgebra.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/lsyssc_scalarMatVecAux.h

$(OBJDIR)/matrixcheck.o: \
        $(SRCDIR_KERNEL)/LinearSystem/matrixcheck.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/stackInt.o $(OBJDIR)/storage.o

$(OBJDIR)/adjacency.o: \
        $(SRCDIR_KERNEL)/Mathematics/adjacency.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o

$(OBJDIR)/mprimitives.o: \
        $(SRCDIR_KERNEL)/Mathematics/mprimitives.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/linearalgebra.o

$(OBJDIR)/random.o: \
        $(SRCDIR_KERNEL)/Mathematics/random.f90 $(OBJDIR)/fsystem.o

$(OBJDIR)/nonlinearsolver.o: \
        $(SRCDIR_KERNEL)/NonlinearSolver/nonlinearsolver.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/linearsolver.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/collection.o $(OBJDIR)/intf_nlsolcallback.inc

$(OBJDIR)/afcstabbase.o: \
        $(SRCDIR_KERNEL)/PDEOperators/afcstabbase.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/groupfembase.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/paramlist.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/storage.o $(OBJDIR)/triangulation.o

$(OBJDIR)/afcstabscalar.o: \
        $(SRCDIR_KERNEL)/PDEOperators/afcstabscalar.f90 \
        $(OBJDIR)/afcstabbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/groupfembase.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/storage.o

$(OBJDIR)/afcstabsystem.o: \
        $(SRCDIR_KERNEL)/PDEOperators/afcstabsystem.f90 \
        $(OBJDIR)/afcstabbase.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/groupfembase.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/storage.o

$(OBJDIR)/afcstabscalarfct.o: \
        $(SRCDIR_KERNEL)/PDEOperators/afcstabscalarfct.f90 \
        $(OBJDIR)/feat2macros.h $(OBJDIR)/afcstabbase.o \
        $(OBJDIR)/afcstabscalar.o $(OBJDIR)/basicgeometry.o \
        $(OBJDIR)/collection.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/groupfembase.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/storage.o $(OBJDIR)/intf_calcADIncrements.inc \
        $(OBJDIR)/intf_calcBounds.inc $(OBJDIR)/intf_limitNodal.inc \
        $(OBJDIR)/intf_limitEdgewise.inc \
        $(OBJDIR)/intf_calcCorrection.inc \
        $(OBJDIR)/afcsc_buildVectorFCTScalar_doStdPrelimit.h \
        $(OBJDIR)/afcsc_buildVectorFCTScalar_doMinModPrelimit.h \
        $(OBJDIR)/afcsc_buildVectorFCTScalar_doADIncrements.h \
        $(OBJDIR)/afcsc_buildVectorFCTScalar_doBounds.h \
        $(OBJDIR)/afcsc_buildVectorFCTScalar_doLimitNodal.h \
        $(OBJDIR)/afcsc_buildVectorFCTScalar_doLimitNodalConstrained.h \
        $(OBJDIR)/afcsc_buildVectorFCTScalar_doLimitEdgewise.h \
        $(OBJDIR)/afcsc_buildVectorFCTScalar_doLimitEdgewiseConstrained.h \
        $(OBJDIR)/afcsc_buildVectorFCTScalar_doCorrect.h \
        $(OBJDIR)/afcsc_buildVectorFCTScalar_doCorrectScaleByMass.h \
        $(OBJDIR)/intf_calcFluxFCTSc_sim.inc \
        $(OBJDIR)/afcsc_buildFluxFCTScalar_doFluxesByCoeffs.h \
        $(OBJDIR)/afcsc_buildFluxFCTScalar_doFluxesByMatrix.h \
        $(OBJDIR)/afcsc_buildFluxFCTScalar_doDifferences.h \
        $(OBJDIR)/intf_calcMatrixSc_sim.inc \
        $(OBJDIR)/intf_calcFluxTransformation_sim.inc \
        $(OBJDIR)/intf_calcDiffTransformation_sim.inc

$(OBJDIR)/afcstabscalartvd.o: \
        $(SRCDIR_KERNEL)/PDEOperators/afcstabscalartvd.f90 \
        $(OBJDIR)/afcstabbase.o $(OBJDIR)/afcstabscalar.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/collection.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/groupfembase.o $(OBJDIR)/linearalgebra.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/storage.o \
        $(OBJDIR)/intf_calcADFluxes.inc \
        $(OBJDIR)/intf_calcADIncrements.inc \
        $(OBJDIR)/intf_calcBounds.inc $(OBJDIR)/intf_limitNodal.inc \
        $(OBJDIR)/intf_limitEdgewise.inc \
        $(OBJDIR)/intf_calcCorrection.inc \
        $(OBJDIR)/intf_calcMatrixSc_sim.inc

$(OBJDIR)/afcstabscalargp.o: \
        $(SRCDIR_KERNEL)/PDEOperators/afcstabscalargp.f90 \
        $(OBJDIR)/afcstabbase.o $(OBJDIR)/afcstabscalar.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/collection.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/groupfembase.o $(OBJDIR)/linearalgebra.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/storage.o \
        $(OBJDIR)/intf_calcMatrixSc_sim.inc

$(OBJDIR)/afcstabscalarsymm.o: \
        $(SRCDIR_KERNEL)/PDEOperators/afcstabscalarsymm.f90 \
        $(OBJDIR)/afcstabbase.o $(OBJDIR)/afcstabscalar.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/collection.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/groupfembase.o $(OBJDIR)/linearalgebra.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/storage.o

$(OBJDIR)/afcstabscalarlpt.o: \
        $(SRCDIR_KERNEL)/PDEOperators/afcstabscalarlpt.f90 \
        $(OBJDIR)/afcstabbase.o $(OBJDIR)/afcstabscalar.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/collection.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/groupfembase.o $(OBJDIR)/linearalgebra.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/storage.o

$(OBJDIR)/afcstabsystemfct.o: \
        $(SRCDIR_KERNEL)/PDEOperators/afcstabsystemfct.f90 \
        $(OBJDIR)/openmp.h $(OBJDIR)/afcstabbase.o \
        $(OBJDIR)/afcstabsystem.o $(OBJDIR)/basicgeometry.o \
        $(OBJDIR)/collection.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/groupfembase.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/storage.o \
        $(OBJDIR)/intf_calcFluxTransformation_sim.inc \
        $(OBJDIR)/intf_calcDiffTransformation_sim.inc \
        $(OBJDIR)/intf_calcADIncrements.inc \
        $(OBJDIR)/intf_calcBounds.inc $(OBJDIR)/intf_limitNodal.inc \
        $(OBJDIR)/intf_limitEdgewise.inc \
        $(OBJDIR)/intf_calcCorrection.inc \
        $(OBJDIR)/intf_calcFluxFCTSys_sim.inc \
        $(OBJDIR)/intf_extractVariable.inc \
        $(OBJDIR)/intf_calcFailsafe.inc

$(OBJDIR)/afcstabsystemtvd.o: \
        $(SRCDIR_KERNEL)/PDEOperators/afcstabsystemtvd.f90 \
        $(OBJDIR)/afcstabbase.o $(OBJDIR)/afcstabsystem.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/collection.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/groupfembase.o $(OBJDIR)/linearalgebra.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/storage.o \
        $(OBJDIR)/intf_calcFluxSys_sim.inc \
        $(OBJDIR)/intf_calcCharacteristics_sim.inc

$(OBJDIR)/groupfembase.o: \
        $(SRCDIR_KERNEL)/PDEOperators/groupfembase.f90 \
        $(OBJDIR)/bcassemblybase.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/storage.o

$(OBJDIR)/groupfemscalar.o: \
        $(SRCDIR_KERNEL)/PDEOperators/groupfemscalar.f90 \
        $(OBJDIR)/afcstabbase.o $(OBJDIR)/basicgeometry.o \
        $(OBJDIR)/collection.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/groupfembase.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/storage.o \
        $(OBJDIR)/intf_calcMatrixDiagSc_sim.inc \
        $(OBJDIR)/intf_calcOperatorNodeSc.inc \
        $(OBJDIR)/intf_calcMatrixSc_sim.inc \
        $(OBJDIR)/intf_calcOperatorEdgeSc.inc \
        $(OBJDIR)/intf_calcVectorSc_sim.inc \
        $(OBJDIR)/intf_calcVectorNodeSc.inc \
        $(OBJDIR)/intf_calcFluxSc_sim.inc \
        $(OBJDIR)/intf_calcVectorEdgeSc.inc

$(OBJDIR)/groupfemsystem.o: \
        $(SRCDIR_KERNEL)/PDEOperators/groupfemsystem.f90 \
        $(OBJDIR)/openmp.h $(OBJDIR)/afcstabbase.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/collection.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/groupfembase.o $(OBJDIR)/linearalgebra.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/storage.o $(OBJDIR)/intf_calcMatrixDiagSys_sim.inc \
        $(OBJDIR)/intf_calcOperatorNodeSys.inc \
        $(OBJDIR)/intf_calcMatrixSys_sim.inc \
        $(OBJDIR)/intf_calcOperatorEdgeSys.inc \
        $(OBJDIR)/intf_calcVectorSys_sim.inc \
        $(OBJDIR)/intf_calcVectorNodeSys.inc \
        $(OBJDIR)/intf_calcFluxSys_sim.inc \
        $(OBJDIR)/intf_calcVectorEdgeSys.inc

$(OBJDIR)/matrixrestriction.o: \
        $(SRCDIR_KERNEL)/PDEOperators/matrixrestriction.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/matrixmodification.o $(OBJDIR)/basicgeometry.o \
        $(OBJDIR)/geometryaux.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/element.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/linearsystemscalar.o

$(OBJDIR)/stdoperators.o: \
        $(SRCDIR_KERNEL)/PDEOperators/stdoperators.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/scalarpde.o \
        $(OBJDIR)/derivatives.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/bilinearformevaluation.o $(OBJDIR)/perfconfig.o

$(OBJDIR)/convection.o: \
        $(SRCDIR_KERNEL)/PDEOperators/convection.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/bilinearformevaluation.o \
        $(OBJDIR)/collection.o $(OBJDIR)/cubature.o \
        $(OBJDIR)/derivatives.o $(OBJDIR)/dofmapping.o \
        $(OBJDIR)/domainintegration.o $(OBJDIR)/element.o \
        $(OBJDIR)/elementpreprocessing.o \
        $(OBJDIR)/extstdassemblyinfo.o $(OBJDIR)/feevaluation.o \
        $(OBJDIR)/geometryaux.o $(OBJDIR)/jumpstabilisation.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/matrixio.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/statistics.o $(OBJDIR)/storage.o \
        $(OBJDIR)/transformation.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/vectorio.o $(OBJDIR)/intf_sdcoefficient.inc \
        $(OBJDIR)/scalarpde.o

$(OBJDIR)/jumpstabilisation.o: \
        $(SRCDIR_KERNEL)/PDEOperators/jumpstabilisation.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/bilinearformevaluation.o \
        $(OBJDIR)/cubature.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/dofmapping.o $(OBJDIR)/domainintegration.o \
        $(OBJDIR)/element.o $(OBJDIR)/elementpreprocessing.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/storage.o $(OBJDIR)/transformation.o \
        $(OBJDIR)/triangulation.o

$(OBJDIR)/lumping.o: \
        $(SRCDIR_KERNEL)/PDEOperators/lumping.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/linearsystemscalar.o

$(OBJDIR)/boundaryintegral.o: \
        $(SRCDIR_KERNEL)/Postprocessing/boundaryintegral.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/collection.o $(OBJDIR)/cubature.o \
        $(OBJDIR)/derivatives.o $(OBJDIR)/domainintegration.o \
        $(OBJDIR)/feevaluation.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/mprimitives.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/storage.o \
        $(OBJDIR)/transformation.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/intf_functionScBdr2D.inc $(OBJDIR)/scalarpde.o

$(OBJDIR)/mapleio.o: \
        $(SRCDIR_KERNEL)/Postprocessing/mapleio.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o $(OBJDIR)/io.o \
        $(OBJDIR)/basicgeometry.o

$(OBJDIR)/matrixio.o: \
        $(SRCDIR_KERNEL)/Postprocessing/matrixio.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/io.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/globalsystem.o

$(OBJDIR)/pprocerror.o: \
        $(SRCDIR_KERNEL)/Postprocessing/pprocerror.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/boundaryaux.o $(OBJDIR)/collection.o \
        $(OBJDIR)/cubature.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/dofmapping.o $(OBJDIR)/domainintegration.o \
        $(OBJDIR)/element.o $(OBJDIR)/elementpreprocessing.o \
        $(OBJDIR)/feevaluation.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/linearalgebra.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/mprimitives.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/scalarpde.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/storage.o $(OBJDIR)/transformation.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/extstdassemblyinfo.o \
        $(OBJDIR)/intf_refFunctionScVec.inc \
        $(OBJDIR)/intf_refFunctionSc.inc \
        $(OBJDIR)/intf_refFunctionScBdr2D.inc

$(OBJDIR)/pprocgradients.o: \
        $(SRCDIR_KERNEL)/Postprocessing/pprocgradients.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/collection.o $(OBJDIR)/cubature.o \
        $(OBJDIR)/derivatives.o $(OBJDIR)/dofmapping.o \
        $(OBJDIR)/domainintegration.o $(OBJDIR)/element.o \
        $(OBJDIR)/elementpreprocessing.o $(OBJDIR)/feevaluation.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/mprimitives.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/pprocerror.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/storage.o \
        $(OBJDIR)/transformation.o $(OBJDIR)/triangulation.o

$(OBJDIR)/pprocindicator.o: \
        $(SRCDIR_KERNEL)/Postprocessing/pprocindicator.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/element.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/storage.o \
        $(OBJDIR)/triangulation.o

$(OBJDIR)/pprocnavierstokes.o: \
        $(SRCDIR_KERNEL)/Postprocessing/pprocnavierstokes.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/bcassemblybase.o \
        $(OBJDIR)/boundary.o $(OBJDIR)/collection.o \
        $(OBJDIR)/cubature.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/dofmapping.o $(OBJDIR)/domainintegration.o \
        $(OBJDIR)/element.o $(OBJDIR)/elementpreprocessing.o \
        $(OBJDIR)/feevaluation.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/linearalgebra.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/meshregion.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/pprocintegrals.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/storage.o $(OBJDIR)/transformation.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/intf_refFunctionSc.inc

$(OBJDIR)/ucd.o: \
        $(SRCDIR_KERNEL)/Postprocessing/ucd.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/storage.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/linearalgebra.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/paramlist.o $(OBJDIR)/io.o \
        $(OBJDIR)/geometry.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/spdiscprojection.o

$(OBJDIR)/vectorio.o: \
        $(SRCDIR_KERNEL)/Postprocessing/vectorio.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/io.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/sortstrategybase.o

$(OBJDIR)/geometryoutput.o: \
        $(SRCDIR_KERNEL)/Postprocessing/geometryoutput.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/io.o

$(OBJDIR)/pprocintegrals.o: \
        $(SRCDIR_KERNEL)/Postprocessing/pprocintegrals.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/cubature.o \
        $(OBJDIR)/mprimitives.o $(OBJDIR)/basicgeometry.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/triasearch.o \
        $(OBJDIR)/collection.o $(OBJDIR)/intf_functionScSimple.inc

$(OBJDIR)/lineariser.o: \
        $(SRCDIR_KERNEL)/Postprocessing/lineariser.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/derivatives.o $(OBJDIR)/dofmapping.o \
        $(OBJDIR)/element.o $(OBJDIR)/elementpreprocessing.o \
        $(OBJDIR)/feevaluation.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/geometryaux.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/storage.o \
        $(OBJDIR)/transformation.o $(OBJDIR)/triangulation.o

$(OBJDIR)/convergencetable.o: \
        $(SRCDIR_KERNEL)/Postprocessing/convergencetable.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/io.o \
        $(OBJDIR)/storage.o

$(OBJDIR)/pprocsolution.o: \
        $(SRCDIR_KERNEL)/Preprocessing/pprocsolution.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/io.o $(OBJDIR)/linearalgebra.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/linearsystemblock.o

$(OBJDIR)/collection.o: \
        $(SRCDIR_KERNEL)/ProblemSupport/collection.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/io.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/paramlist.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/boundarycondition.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/discretebc.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/linearsolver.o $(OBJDIR)/multilevelprojection.o \
        $(OBJDIR)/filtersupport.o $(OBJDIR)/fparser.o \
        $(OBJDIR)/geometry.o $(OBJDIR)/hadaptaux.o \
        $(OBJDIR)/afcstabbase.o $(OBJDIR)/statistics.o \
        $(OBJDIR)/graph.o $(OBJDIR)/meshhierarchy.o \
        $(OBJDIR)/timescalehierarchy.o \
        $(OBJDIR)/fespacehierarchybase.o $(OBJDIR)/groupfembase.o

$(OBJDIR)/iterationcontrol.o: \
        $(SRCDIR_KERNEL)/ProblemSupport/iterationcontrol.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/paramlist.o

$(OBJDIR)/analyticprojection.o: \
        $(SRCDIR_KERNEL)/Projection/analyticprojection.f90 \
        $(OBJDIR)/afcstabbase.o $(OBJDIR)/afcstabscalar.o \
        $(OBJDIR)/afcstabscalarfct.o $(OBJDIR)/basicgeometry.o \
        $(OBJDIR)/boundary.o $(OBJDIR)/collection.o \
        $(OBJDIR)/cubature.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/dofmapping.o $(OBJDIR)/domainintegration.o \
        $(OBJDIR)/element.o $(OBJDIR)/elementpreprocessing.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/groupfemscalar.o $(OBJDIR)/linearalgebra.o \
        $(OBJDIR)/linearformevaluation.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/scalarpde.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/storage.o $(OBJDIR)/transformation.o \
        $(OBJDIR)/triangulation.o \
        $(OBJDIR)/intf_coefficientVectorSc.inc \
        $(OBJDIR)/intf_refFunctionSc.inc

$(OBJDIR)/spdiscprojection.o: \
        $(SRCDIR_KERNEL)/Projection/spdiscprojection.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/dofmapping.o $(OBJDIR)/element.o \
        $(OBJDIR)/elementpreprocessing.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/linearalgebra.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/perfconfig.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/storage.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/cubature.o

$(OBJDIR)/schurapprox.o: \
        $(SRCDIR_KERNEL)/Projection/schurapprox.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/perfconfig.o

$(OBJDIR)/externalstorage.o: \
        $(SRCDIR_KERNEL)/System/externalstorage.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/io.o $(OBJDIR)/linearalgebra.o

$(OBJDIR)/fparser.o: \
        $(SRCDIR_KERNEL)/System/fparser.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/io.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/storage.o $(OBJDIR)/stackInt.o

$(OBJDIR)/fpersistence.o: \
        $(SRCDIR_KERNEL)/System/fpersistence.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/io.o $(OBJDIR)/uuid.o

$(OBJDIR)/fsystem.o: \
        $(SRCDIR_KERNEL)/System/fsystem.f90

$(OBJDIR)/genoutput.o: \
        $(SRCDIR_KERNEL)/System/genoutput.f90 $(OBJDIR)/fsystem.o

$(OBJDIR)/io.o: \
        $(SRCDIR_KERNEL)/System/io.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o

$(OBJDIR)/paramlist.o: \
        $(SRCDIR_KERNEL)/System/paramlist.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/io.o $(OBJDIR)/genoutput.o

$(OBJDIR)/signals.o: \
        $(SRCDIR_KERNEL)/System/signals.f90 $(OBJDIR)/feat2macros.h \
        $(OBJDIR)/genoutput.o

$(OBJDIR)/sort.o: \
        $(SRCDIR_KERNEL)/System/sort.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o

$(OBJDIR)/statistics.o: \
        $(SRCDIR_KERNEL)/System/statistics.f90 $(OBJDIR)/feat2macros.h \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o

$(OBJDIR)/storage.o: \
        $(SRCDIR_KERNEL)/System/storage.f90 $(OBJDIR)/feat2macros.h \
        $(OBJDIR)/feat2constants.h $(OBJDIR)/fsystem.o \
        $(OBJDIR)/fpersistence.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/uuid.o

$(OBJDIR)/textstream.o: \
        $(SRCDIR_KERNEL)/System/textstream.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/io.o $(OBJDIR)/genoutput.o

$(OBJDIR)/uuid.o: \
        $(SRCDIR_KERNEL)/System/uuid.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o

$(OBJDIR)/perfconfig.o: \
        $(SRCDIR_KERNEL)/System/perfconfig.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/paramlist.o

$(OBJDIR)/timestepping.o: \
        $(SRCDIR_KERNEL)/TimeDependence/timestepping.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o

$(OBJDIR)/timediscretisation.o: \
        $(SRCDIR_KERNEL)/TimeDependence/timediscretisation.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o

$(OBJDIR)/griddeform.o: \
        $(SRCDIR_KERNEL)/Triangulation/griddeform.f90 \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/bcassembly.o \
        $(OBJDIR)/bilinearformevaluation.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/cubature.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/dofmapping.o $(OBJDIR)/element.o \
        $(OBJDIR)/elementpreprocessing.o $(OBJDIR)/feevaluation.o \
        $(OBJDIR)/filtersupport.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/geometryaux.o \
        $(OBJDIR)/linearformevaluation.o $(OBJDIR)/linearsolver.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/matrixfilters.o $(OBJDIR)/perfconfig.o \
        $(OBJDIR)/pprocerror.o $(OBJDIR)/pprocgradients.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/spdiscprojection.o \
        $(OBJDIR)/stdoperators.o $(OBJDIR)/storage.o \
        $(OBJDIR)/transformation.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/triasearch.o $(OBJDIR)/ucd.o \
        $(OBJDIR)/vectorfilters.o $(OBJDIR)/intf_monitorfct.inc

$(OBJDIR)/meshadjacency.o: \
        $(SRCDIR_KERNEL)/Triangulation/meshadjacency.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/triangulation.o

$(OBJDIR)/meshmodification.o: \
        $(SRCDIR_KERNEL)/Triangulation/meshmodification.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o \
        $(OBJDIR)/triangulation.o

$(OBJDIR)/meshgeneration.o: \
        $(SRCDIR_KERNEL)/Triangulation/meshgeneration.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/triangulation.o

$(OBJDIR)/meshregion.o: \
        $(SRCDIR_KERNEL)/Triangulation/meshregion.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/geometryaux.o $(OBJDIR)/basicgeometry.o \
        $(OBJDIR)/storage.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/fparser.o $(OBJDIR)/numbersets.o \
        $(OBJDIR)/collection.o $(OBJDIR)/intf_mshreghittest.inc

$(OBJDIR)/triangulation.o: \
        $(SRCDIR_KERNEL)/Triangulation/triangulation.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/genoutput.o $(OBJDIR)/storage.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/linearalgebra.o \
        $(OBJDIR)/boundary.o $(OBJDIR)/geometryaux.o $(OBJDIR)/sort.o \
        $(OBJDIR)/io.o

$(OBJDIR)/triasearch.o: \
        $(SRCDIR_KERNEL)/Triangulation/triasearch.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/geometryaux.o $(OBJDIR)/genoutput.o

$(OBJDIR)/adaptivetimestep.o: \
        $(SRCDIR_APP)/src/adaptivetimestep.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/genoutput.o $(OBJDIR)/paramlist.o \
        $(OBJDIR)/timestepping.o $(OBJDIR)/collection.o

$(OBJDIR)/cc2d.o: \
        $(SRCDIR_APP)/src/cc2d.f90 $(OBJDIR)/ccmainproblem.o

$(OBJDIR)/ccbasic.o: \
        $(SRCDIR_APP)/src/ccbasic.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/storage.o $(OBJDIR)/linearsolver.o \
        $(OBJDIR)/boundary.o $(OBJDIR)/bilinearformevaluation.o \
        $(OBJDIR)/linearformevaluation.o $(OBJDIR)/cubature.o \
        $(OBJDIR)/matrixfilters.o $(OBJDIR)/vectorfilters.o \
        $(OBJDIR)/bcassembly.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/coarsegridcorrection.o $(OBJDIR)/spdiscprojection.o \
        $(OBJDIR)/nonlinearsolver.o $(OBJDIR)/paramlist.o \
        $(OBJDIR)/timestepping.o $(OBJDIR)/discretebc.o \
        $(OBJDIR)/discretefbc.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/linearsystemblock.o $(OBJDIR)/collection.o \
        $(OBJDIR)/adaptivetimestep.o

$(OBJDIR)/ccboundarycondition.o: \
        $(SRCDIR_APP)/src/ccboundarycondition.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/storage.o $(OBJDIR)/linearsolver.o \
        $(OBJDIR)/boundary.o $(OBJDIR)/bilinearformevaluation.o \
        $(OBJDIR)/linearformevaluation.o $(OBJDIR)/cubature.o \
        $(OBJDIR)/matrixfilters.o $(OBJDIR)/vectorfilters.o \
        $(OBJDIR)/discretebc.o $(OBJDIR)/bcassembly.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/coarsegridcorrection.o $(OBJDIR)/spdiscprojection.o \
        $(OBJDIR)/nonlinearsolver.o $(OBJDIR)/paramlist.o \
        $(OBJDIR)/collection.o $(OBJDIR)/convection.o \
        $(OBJDIR)/ccbasic.o $(OBJDIR)/ccboundaryconditionparser.o \
        $(OBJDIR)/cccallback.o

$(OBJDIR)/ccboundaryconditionparser.o: \
        $(SRCDIR_APP)/src/ccboundaryconditionparser.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o \
        $(OBJDIR)/linearsolver.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/bilinearformevaluation.o \
        $(OBJDIR)/linearformevaluation.o $(OBJDIR)/cubature.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/matrixfilters.o \
        $(OBJDIR)/vectorfilters.o $(OBJDIR)/discretebc.o \
        $(OBJDIR)/bcassembly.o $(OBJDIR)/bcassemblybase.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/coarsegridcorrection.o $(OBJDIR)/spdiscprojection.o \
        $(OBJDIR)/nonlinearsolver.o $(OBJDIR)/paramlist.o \
        $(OBJDIR)/fparser.o $(OBJDIR)/collection.o \
        $(OBJDIR)/convection.o $(OBJDIR)/ccbasic.o \
        $(OBJDIR)/cccallback.o

$(OBJDIR)/cccallback.o: \
        $(SRCDIR_APP)/src/cccallback.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/storage.o $(OBJDIR)/linearsolver.o \
        $(OBJDIR)/boundary.o $(OBJDIR)/bilinearformevaluation.o \
        $(OBJDIR)/linearformevaluation.o $(OBJDIR)/cubature.o \
        $(OBJDIR)/matrixfilters.o $(OBJDIR)/vectorfilters.o \
        $(OBJDIR)/discretebc.o $(OBJDIR)/bcassembly.o \
        $(OBJDIR)/mprimitives.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/feevaluation.o $(OBJDIR)/ccbasic.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/collection.o $(OBJDIR)/scalarpde.o \
        $(OBJDIR)/domainintegration.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/discretefbc.o

$(OBJDIR)/ccgeneraldiscretisation.o: \
        $(SRCDIR_APP)/src/ccgeneraldiscretisation.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o \
        $(OBJDIR)/linearsolver.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/cubature.o $(OBJDIR)/matrixfilters.o \
        $(OBJDIR)/vectorfilters.o $(OBJDIR)/bcassembly.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/element.o \
        $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/bilinearformevaluation.o \
        $(OBJDIR)/linearformevaluation.o \
        $(OBJDIR)/coarsegridcorrection.o $(OBJDIR)/spdiscprojection.o \
        $(OBJDIR)/nonlinearsolver.o $(OBJDIR)/paramlist.o \
        $(OBJDIR)/scalarpde.o $(OBJDIR)/stdoperators.o \
        $(OBJDIR)/multileveloperators.o $(OBJDIR)/analyticprojection.o \
        $(OBJDIR)/feevaluation.o $(OBJDIR)/matrixio.o \
        $(OBJDIR)/collection.o $(OBJDIR)/convection.o \
        $(OBJDIR)/vectorio.o $(OBJDIR)/ccbasic.o \
        $(OBJDIR)/cccallback.o $(OBJDIR)/ccnonlinearcoreinit.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/domainintegration.o

$(OBJDIR)/ccinitgeneralparameters.o: \
        $(SRCDIR_APP)/src/ccinitgeneralparameters.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o \
        $(OBJDIR)/linearsolver.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/bilinearformevaluation.o \
        $(OBJDIR)/linearformevaluation.o $(OBJDIR)/cubature.o \
        $(OBJDIR)/matrixfilters.o $(OBJDIR)/vectorfilters.o \
        $(OBJDIR)/bcassembly.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/coarsegridcorrection.o $(OBJDIR)/spdiscprojection.o \
        $(OBJDIR)/nonlinearsolver.o $(OBJDIR)/paramlist.o \
        $(OBJDIR)/vectorio.o $(OBJDIR)/collection.o \
        $(OBJDIR)/convection.o $(OBJDIR)/ccbasic.o \
        $(OBJDIR)/ccnonstationary.o

$(OBJDIR)/ccinitparamtriang.o: \
        $(SRCDIR_APP)/src/ccinitparamtriang.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/storage.o $(OBJDIR)/linearsolver.o \
        $(OBJDIR)/boundary.o $(OBJDIR)/bilinearformevaluation.o \
        $(OBJDIR)/linearformevaluation.o $(OBJDIR)/cubature.o \
        $(OBJDIR)/matrixfilters.o $(OBJDIR)/vectorfilters.o \
        $(OBJDIR)/bcassembly.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/coarsegridcorrection.o $(OBJDIR)/spdiscprojection.o \
        $(OBJDIR)/nonlinearsolver.o $(OBJDIR)/paramlist.o \
        $(OBJDIR)/statistics.o $(OBJDIR)/meshmodification.o \
        $(OBJDIR)/collection.o $(OBJDIR)/convection.o \
        $(OBJDIR)/ccbasic.o

$(OBJDIR)/ccmainproblem.o: \
        $(SRCDIR_APP)/src/ccmainproblem.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/storage.o $(OBJDIR)/linearsolver.o \
        $(OBJDIR)/boundary.o $(OBJDIR)/bilinearformevaluation.o \
        $(OBJDIR)/linearformevaluation.o $(OBJDIR)/cubature.o \
        $(OBJDIR)/matrixfilters.o $(OBJDIR)/vectorfilters.o \
        $(OBJDIR)/discretebc.o $(OBJDIR)/bcassembly.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/coarsegridcorrection.o $(OBJDIR)/spdiscprojection.o \
        $(OBJDIR)/nonlinearsolver.o $(OBJDIR)/paramlist.o \
        $(OBJDIR)/statistics.o $(OBJDIR)/dofmapping.o \
        $(OBJDIR)/collection.o $(OBJDIR)/convection.o \
        $(OBJDIR)/ccbasic.o $(OBJDIR)/ccinitgeneralparameters.o \
        $(OBJDIR)/ccinitparamtriang.o \
        $(OBJDIR)/ccgeneraldiscretisation.o \
        $(OBJDIR)/ccpostprocessing.o $(OBJDIR)/ccstationary.o \
        $(OBJDIR)/ccnonstationary.o $(OBJDIR)/ccboundarycondition.o

$(OBJDIR)/ccmatvecassembly.o: \
        $(SRCDIR_APP)/src/ccmatvecassembly.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/storage.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/cubature.o $(OBJDIR)/matrixfilters.o \
        $(OBJDIR)/vectorfilters.o $(OBJDIR)/bcassembly.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/coarsegridcorrection.o $(OBJDIR)/spdiscprojection.o \
        $(OBJDIR)/nonlinearsolver.o $(OBJDIR)/paramlist.o \
        $(OBJDIR)/matrixrestriction.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/bilinearformevaluation.o \
        $(OBJDIR)/linearformevaluation.o \
        $(OBJDIR)/trilinearformevaluation.o $(OBJDIR)/matrixio.o \
        $(OBJDIR)/statistics.o $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/linearsolver.o \
        $(OBJDIR)/linearsolverautoinitialise.o $(OBJDIR)/collection.o \
        $(OBJDIR)/feevaluation.o $(OBJDIR)/convection.o \
        $(OBJDIR)/stdoperators.o $(OBJDIR)/scalarpde.o \
        $(OBJDIR)/ccbasic.o $(OBJDIR)/cccallback.o \
        $(OBJDIR)/pprocnavierstokes.o $(OBJDIR)/domainintegration.o

$(OBJDIR)/ccmatvecassembly_backup.o: \
        $(SRCDIR_APP)/src/ccmatvecassembly_backup.f90 \
        $(OBJDIR)/fsystem.o $(OBJDIR)/storage.o $(OBJDIR)/genoutput.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/cubature.o $(OBJDIR)/matrixfilters.o \
        $(OBJDIR)/vectorfilters.o $(OBJDIR)/bcassembly.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/derivatives.o \
        $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/coarsegridcorrection.o $(OBJDIR)/spdiscprojection.o \
        $(OBJDIR)/nonlinearsolver.o $(OBJDIR)/paramlist.o \
        $(OBJDIR)/matrixrestriction.o $(OBJDIR)/linearsystemscalar.o \
        $(OBJDIR)/bilinearformevaluation.o \
        $(OBJDIR)/linearformevaluation.o \
        $(OBJDIR)/trilinearformevaluation.o $(OBJDIR)/matrixio.o \
        $(OBJDIR)/statistics.o $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/linearsolver.o \
        $(OBJDIR)/linearsolverautoinitialise.o $(OBJDIR)/collection.o \
        $(OBJDIR)/feevaluation.o $(OBJDIR)/convection.o \
        $(OBJDIR)/stdoperators.o $(OBJDIR)/scalarpde.o \
        $(OBJDIR)/ccbasic.o $(OBJDIR)/cccallback.o \
        $(OBJDIR)/pprocnavierstokes.o $(OBJDIR)/domainintegration.o

$(OBJDIR)/ccnonlinearcore.o: \
        $(SRCDIR_APP)/src/ccnonlinearcore.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/storage.o $(OBJDIR)/linearsolver.o \
        $(OBJDIR)/boundary.o $(OBJDIR)/linearalgebra.o \
        $(OBJDIR)/cubature.o $(OBJDIR)/matrixfilters.o \
        $(OBJDIR)/vectorfilters.o $(OBJDIR)/discretebc.o \
        $(OBJDIR)/bcassembly.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/coarsegridcorrection.o $(OBJDIR)/spdiscprojection.o \
        $(OBJDIR)/nonlinearsolver.o $(OBJDIR)/paramlist.o \
        $(OBJDIR)/multilevelprojection.o $(OBJDIR)/filtersupport.o \
        $(OBJDIR)/linearsolverautoinitialise.o \
        $(OBJDIR)/bilinearformevaluation.o \
        $(OBJDIR)/linearformevaluation.o $(OBJDIR)/matrixrestriction.o \
        $(OBJDIR)/matrixmodification.o \
        $(OBJDIR)/trilinearformevaluation.o $(OBJDIR)/matrixio.o \
        $(OBJDIR)/statistics.o $(OBJDIR)/collection.o \
        $(OBJDIR)/convection.o $(OBJDIR)/ccmatvecassembly.o \
        $(OBJDIR)/cccallback.o $(OBJDIR)/linearsystemblock.o

$(OBJDIR)/ccnonlinearcoreinit.o: \
        $(SRCDIR_APP)/src/ccnonlinearcoreinit.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/storage.o $(OBJDIR)/linearsolver.o \
        $(OBJDIR)/boundary.o $(OBJDIR)/bilinearformevaluation.o \
        $(OBJDIR)/linearformevaluation.o $(OBJDIR)/cubature.o \
        $(OBJDIR)/matrixfilters.o $(OBJDIR)/vectorfilters.o \
        $(OBJDIR)/discretebc.o $(OBJDIR)/bcassembly.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/coarsegridcorrection.o $(OBJDIR)/spdiscprojection.o \
        $(OBJDIR)/filtersupport.o $(OBJDIR)/nonlinearsolver.o \
        $(OBJDIR)/paramlist.o $(OBJDIR)/linearsolverautoinitialise.o \
        $(OBJDIR)/multilevelprojection.o $(OBJDIR)/matrixrestriction.o \
        $(OBJDIR)/statistics.o $(OBJDIR)/collection.o \
        $(OBJDIR)/convection.o $(OBJDIR)/ccbasic.o \
        $(OBJDIR)/ccnonlinearcore.o

$(OBJDIR)/ccnonstationary.o: \
        $(SRCDIR_APP)/src/ccnonstationary.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/storage.o $(OBJDIR)/linearsolver.o \
        $(OBJDIR)/boundary.o $(OBJDIR)/bilinearformevaluation.o \
        $(OBJDIR)/linearformevaluation.o $(OBJDIR)/cubature.o \
        $(OBJDIR)/matrixfilters.o $(OBJDIR)/vectorfilters.o \
        $(OBJDIR)/discretebc.o $(OBJDIR)/bcassembly.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/coarsegridcorrection.o $(OBJDIR)/spdiscprojection.o \
        $(OBJDIR)/nonlinearsolver.o $(OBJDIR)/paramlist.o \
        $(OBJDIR)/linearsolverautoinitialise.o \
        $(OBJDIR)/matrixrestriction.o $(OBJDIR)/timestepping.o \
        $(OBJDIR)/collection.o $(OBJDIR)/convection.o \
        $(OBJDIR)/ccbasic.o $(OBJDIR)/cccallback.o \
        $(OBJDIR)/ccnonlinearcore.o $(OBJDIR)/ccnonlinearcoreinit.o \
        $(OBJDIR)/ccstationary.o $(OBJDIR)/adaptivetimestep.o \
        $(OBJDIR)/cctimeanalysis.o $(OBJDIR)/ccgeneraldiscretisation.o \
        $(OBJDIR)/ccpostprocessing.o $(OBJDIR)/ccboundarycondition.o

$(OBJDIR)/ccpostprocessing.o: \
        $(SRCDIR_APP)/src/ccpostprocessing.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/storage.o $(OBJDIR)/linearsolver.o \
        $(OBJDIR)/boundary.o $(OBJDIR)/linearalgebra.o \
        $(OBJDIR)/cubature.o $(OBJDIR)/matrixfilters.o \
        $(OBJDIR)/vectorfilters.o $(OBJDIR)/discretebc.o \
        $(OBJDIR)/bcassembly.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/coarsegridcorrection.o $(OBJDIR)/spdiscprojection.o \
        $(OBJDIR)/nonlinearsolver.o $(OBJDIR)/paramlist.o \
        $(OBJDIR)/bilinearformevaluation.o \
        $(OBJDIR)/linearformevaluation.o $(OBJDIR)/statistics.o \
        $(OBJDIR)/element.o $(OBJDIR)/multilevelprojection.o \
        $(OBJDIR)/vectorio.o $(OBJDIR)/io.o $(OBJDIR)/collection.o \
        $(OBJDIR)/convection.o $(OBJDIR)/ucd.o \
        $(OBJDIR)/pprocnavierstokes.o $(OBJDIR)/pprocerror.o \
        $(OBJDIR)/ccboundaryconditionparser.o \
        $(OBJDIR)/ccgeneraldiscretisation.o \
        $(OBJDIR)/ccmatvecassembly.o $(OBJDIR)/ccbasic.o \
        $(OBJDIR)/cccallback.o $(OBJDIR)/analyticprojection.o \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/scalarpde.o \
        $(OBJDIR)/domainintegration.o

$(OBJDIR)/ccstationary.o: \
        $(SRCDIR_APP)/src/ccstationary.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/storage.o $(OBJDIR)/linearsolver.o \
        $(OBJDIR)/boundary.o $(OBJDIR)/bilinearformevaluation.o \
        $(OBJDIR)/linearformevaluation.o $(OBJDIR)/cubature.o \
        $(OBJDIR)/matrixfilters.o $(OBJDIR)/vectorfilters.o \
        $(OBJDIR)/bcassembly.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/coarsegridcorrection.o $(OBJDIR)/spdiscprojection.o \
        $(OBJDIR)/nonlinearsolver.o $(OBJDIR)/paramlist.o \
        $(OBJDIR)/linearsolverautoinitialise.o \
        $(OBJDIR)/matrixrestriction.o $(OBJDIR)/collection.o \
        $(OBJDIR)/convection.o $(OBJDIR)/ccbasic.o \
        $(OBJDIR)/cccallback.o $(OBJDIR)/ccnonlinearcore.o \
        $(OBJDIR)/ccnonlinearcoreinit.o

$(OBJDIR)/cctimeanalysis.o: \
        $(SRCDIR_APP)/src/cctimeanalysis.f90 $(OBJDIR)/fsystem.o \
        $(OBJDIR)/linearalgebra.o $(OBJDIR)/linearsystemblock.o

$(OBJDIR)/cc2d.o: \
        src/cc2d.f90 $(OBJDIR)/ccmainproblem.o

# Dependencies of Fortran 90 files listed in Makefile variable $(SRCEXTRA)
# can not be determined unfortunately at configure time and incorporated into
# this Makefile. Because the path to these files or the files themselves may
# be defined using Makefile variables (e.g. $(FEAT2BASEDIR)/kernel/arch/amub.f90)
# whose value cannnot easily be expanded by configure.



##############################################################################
# Dependencies of header files to be copied or evaluated and stored in
# object directory

$(OBJDIR)/feat2constants.h: \
        $(SRCDIR_KERNEL)/feat2constants.h

$(OBJDIR)/feat2macros.h: \
        $(SRCDIR_KERNEL)/feat2macros.h $(OBJDIR)/feat2constants.h

$(OBJDIR)/openmp.h: \
        $(SRCDIR_KERNEL)/openmp.h

$(OBJDIR)/template.h: \
        $(SRCDIR_KERNEL)/template.h

$(OBJDIR)/arraylist.h: \
        $(SRCDIR_KERNEL)/DataStructures/arraylist.h \
        $(OBJDIR)/template.h

$(OBJDIR)/list.h: \
        $(SRCDIR_KERNEL)/DataStructures/list.h $(OBJDIR)/template.h

$(OBJDIR)/map.h: \
        $(SRCDIR_KERNEL)/DataStructures/map.h $(OBJDIR)/template.h

$(OBJDIR)/quadtree.h: \
        $(SRCDIR_KERNEL)/DataStructures/quadtree.h \
        $(OBJDIR)/template.h $(OBJDIR)/fsystem.o

$(OBJDIR)/octree.h: \
        $(SRCDIR_KERNEL)/DataStructures/octree.h $(OBJDIR)/template.h \
        $(OBJDIR)/fsystem.o

$(OBJDIR)/stack.h: \
        $(SRCDIR_KERNEL)/DataStructures/stack.h $(OBJDIR)/template.h

$(OBJDIR)/casttogenobject.h: \
        $(SRCDIR_KERNEL)/DataStructures/casttogenobject.h

$(OBJDIR)/uncastfromgenobject.h: \
        $(SRCDIR_KERNEL)/DataStructures/uncastfromgenobject.h

$(OBJDIR)/lsyssc_scalarMatVec_latxd.h: \
        $(SRCDIR_KERNEL)/LinearSystem/lsyssc_scalarMatVec_latxd.h

$(OBJDIR)/lsyssc_scalarMatVec_lax79.h: \
        $(SRCDIR_KERNEL)/LinearSystem/lsyssc_scalarMatVec_lax79.h

$(OBJDIR)/lsyssc_scalarMatVec_lax79_padded.h: \
        $(SRCDIR_KERNEL)/LinearSystem/lsyssc_scalarMatVec_lax79_padded.h

$(OBJDIR)/lsyssc_scalarMatVec_lax79intl1.h: \
        $(SRCDIR_KERNEL)/LinearSystem/lsyssc_scalarMatVec_lax79intl1.h

$(OBJDIR)/lsyssc_scalarMatVec_lax79intld.h: \
        $(SRCDIR_KERNEL)/LinearSystem/lsyssc_scalarMatVec_lax79intld.h

$(OBJDIR)/lsyssc_scalarMatVec_lax9rowc.h: \
        $(SRCDIR_KERNEL)/LinearSystem/lsyssc_scalarMatVec_lax9rowc.h

$(OBJDIR)/lsyssc_scalarMatVec_ltx79.h: \
        $(SRCDIR_KERNEL)/LinearSystem/lsyssc_scalarMatVec_ltx79.h

$(OBJDIR)/lsyssc_scalarMatVecAux.h: \
        $(SRCDIR_KERNEL)/LinearSystem/lsyssc_scalarMatVecAux.h \
        $(OBJDIR)/feat2constants.h \
        $(OBJDIR)/lsyssc_scalarMatVec_lax79.h \
        $(OBJDIR)/lsyssc_scalarMatVec_lax9rowc.h \
        $(OBJDIR)/lsyssc_scalarMatVec_lax79intl1.h \
        $(OBJDIR)/lsyssc_scalarMatVec_lax79intld.h \
        $(OBJDIR)/lsyssc_scalarMatVec_latxd.h \
        $(OBJDIR)/lsyssc_scalarMatVec_ltx79.h

$(OBJDIR)/afc.h: \
        $(SRCDIR_KERNEL)/PDEOperators/afc.h $(OBJDIR)/feat2constants.h

$(OBJDIR)/afcsc_buildVectorFCTScalar_doADIncrements.h: \
        $(SRCDIR_KERNEL)/PDEOperators/afcsc_buildVectorFCTScalar_doADIncrements.h \
        $(OBJDIR)/feat2macros.h $(OBJDIR)/template.h $(OBJDIR)/afc.h

$(OBJDIR)/afcsc_buildVectorFCTScalar_doBounds.h: \
        $(SRCDIR_KERNEL)/PDEOperators/afcsc_buildVectorFCTScalar_doBounds.h \
        $(OBJDIR)/feat2macros.h $(OBJDIR)/template.h $(OBJDIR)/afc.h

$(OBJDIR)/afcsc_buildVectorFCTScalar_doCorrect.h: \
        $(SRCDIR_KERNEL)/PDEOperators/afcsc_buildVectorFCTScalar_doCorrect.h \
        $(OBJDIR)/feat2macros.h $(OBJDIR)/template.h $(OBJDIR)/afc.h

$(OBJDIR)/afcsc_buildVectorFCTScalar_doCorrectScaleByMass.h: \
        $(SRCDIR_KERNEL)/PDEOperators/afcsc_buildVectorFCTScalar_doCorrectScaleByMass.h \
        $(OBJDIR)/feat2macros.h $(OBJDIR)/template.h $(OBJDIR)/afc.h

$(OBJDIR)/afcsc_buildVectorFCTScalar_doLimitEdgewise.h: \
        $(SRCDIR_KERNEL)/PDEOperators/afcsc_buildVectorFCTScalar_doLimitEdgewise.h \
        $(OBJDIR)/feat2macros.h $(OBJDIR)/template.h $(OBJDIR)/afc.h

$(OBJDIR)/afcsc_buildVectorFCTScalar_doLimitEdgewiseConstrained.h: \
        $(SRCDIR_KERNEL)/PDEOperators/afcsc_buildVectorFCTScalar_doLimitEdgewiseConstrained.h \
        $(OBJDIR)/feat2macros.h $(OBJDIR)/template.h $(OBJDIR)/afc.h

$(OBJDIR)/afcsc_buildVectorFCTScalar_doLimitNodal.h: \
        $(SRCDIR_KERNEL)/PDEOperators/afcsc_buildVectorFCTScalar_doLimitNodal.h \
        $(OBJDIR)/feat2macros.h $(OBJDIR)/template.h $(OBJDIR)/afc.h

$(OBJDIR)/afcsc_buildVectorFCTScalar_doLimitNodalConstrained.h: \
        $(SRCDIR_KERNEL)/PDEOperators/afcsc_buildVectorFCTScalar_doLimitNodalConstrained.h \
        $(OBJDIR)/feat2macros.h $(OBJDIR)/template.h $(OBJDIR)/afc.h

$(OBJDIR)/afcsc_buildVectorFCTScalar_doMinModPrelimit.h: \
        $(SRCDIR_KERNEL)/PDEOperators/afcsc_buildVectorFCTScalar_doMinModPrelimit.h \
        $(OBJDIR)/feat2macros.h $(OBJDIR)/template.h $(OBJDIR)/afc.h

$(OBJDIR)/afcsc_buildVectorFCTScalar_doStdPrelimit.h: \
        $(SRCDIR_KERNEL)/PDEOperators/afcsc_buildVectorFCTScalar_doStdPrelimit.h \
        $(OBJDIR)/feat2macros.h $(OBJDIR)/template.h $(OBJDIR)/afc.h

$(OBJDIR)/afcsc_buildFluxFCTScalar_doFluxesByMatrix.h: \
        $(SRCDIR_KERNEL)/PDEOperators/afcsc_buildFluxFCTScalar_doFluxesByMatrix.h \
        $(OBJDIR)/feat2macros.h $(OBJDIR)/template.h $(OBJDIR)/afc.h

$(OBJDIR)/afcsc_buildFluxFCTScalar_doFluxesByCoeffs.h: \
        $(SRCDIR_KERNEL)/PDEOperators/afcsc_buildFluxFCTScalar_doFluxesByCoeffs.h \
        $(OBJDIR)/feat2macros.h $(OBJDIR)/template.h $(OBJDIR)/afc.h

$(OBJDIR)/afcsc_buildFluxFCTScalar_doDifferences.h: \
        $(SRCDIR_KERNEL)/PDEOperators/afcsc_buildFluxFCTScalar_doDifferences.h \
        $(OBJDIR)/feat2macros.h $(OBJDIR)/template.h $(OBJDIR)/afc.h

$(OBJDIR)/fmath.h: \
        $(SRCDIR_KERNEL)/System/fmath.h $(OBJDIR)/feat2constants.h \
        $(OBJDIR)/feat2macros.h

$(OBJDIR)/idxmanager.h: \
        $(SRCDIR_KERNEL)/System/idxmanager.h \
        $(OBJDIR)/feat2constants.h $(OBJDIR)/feat2macros.h

$(OBJDIR)/intf_bcassembly.inc: \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_bcassembly.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/boundary.o \
        $(OBJDIR)/collection.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/discretebc.o

$(OBJDIR)/intf_calcADFluxes.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcADFluxes.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_calcADIncrements.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcADIncrements.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o \
        $(OBJDIR)/intf_calcFluxTransformation_sim.inc

$(OBJDIR)/intf_calcBounds.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcBounds.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o \
        $(OBJDIR)/intf_calcDiffTransformation_sim.inc

$(OBJDIR)/intf_calcCharacteristics_sim.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcCharacteristics_sim.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_calcCorrection.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcCorrection.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_calcDiffTransformation_sim.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcDiffTransformation_sim.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_calcFailsafe.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcFailsafe.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_calcFluxFCTSc_sim.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcFluxFCTSc_sim.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_calcFluxFCTSys_sim.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcFluxFCTSys_sim.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_calcFluxSc_sim.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcFluxSc_sim.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_calcFluxSys_sim.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcFluxSys_sim.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_calcFluxTransformation_sim.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcFluxTransformation_sim.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_calcMatrixDiagSc_sim.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcMatrixDiagSc_sim.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_calcMatrixDiagSys_sim.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcMatrixDiagSys_sim.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_calcMatrixSc_sim.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcMatrixSc_sim.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_calcMatrixSys_sim.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcMatrixSys_sim.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_calcOperatorEdgeSc.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcOperatorEdgeSc.inc \
        $(OBJDIR)/afcstabbase.o $(OBJDIR)/collection.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/groupfembase.o \
        $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/intf_calcMatrixDiagSc_sim.inc \
        $(OBJDIR)/intf_calcMatrixSc_sim.inc

$(OBJDIR)/intf_calcOperatorEdgeSys.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcOperatorEdgeSys.inc \
        $(OBJDIR)/afcstabbase.o $(OBJDIR)/collection.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/groupfembase.o \
        $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/intf_calcMatrixDiagSys_sim.inc \
        $(OBJDIR)/intf_calcMatrixSys_sim.inc

$(OBJDIR)/intf_calcOperatorNodeSc.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcOperatorNodeSc.inc \
        $(OBJDIR)/afcstabbase.o $(OBJDIR)/collection.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/groupfembase.o \
        $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/intf_calcMatrixDiagSc_sim.inc

$(OBJDIR)/intf_calcOperatorNodeSys.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcOperatorNodeSys.inc \
        $(OBJDIR)/afcstabbase.o $(OBJDIR)/collection.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/groupfembase.o \
        $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/intf_calcMatrixDiagSys_sim.inc

$(OBJDIR)/intf_calcVectorEdgeSc.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcVectorEdgeSc.inc \
        $(OBJDIR)/afcstabbase.o $(OBJDIR)/collection.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/groupfembase.o \
        $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/intf_calcFluxSc_sim.inc

$(OBJDIR)/intf_calcVectorEdgeSys.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcVectorEdgeSys.inc \
        $(OBJDIR)/afcstabbase.o $(OBJDIR)/collection.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/groupfembase.o \
        $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/intf_calcFluxSys_sim.inc

$(OBJDIR)/intf_calcVectorNodeSc.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcVectorNodeSc.inc \
        $(OBJDIR)/afcstabbase.o $(OBJDIR)/collection.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/groupfembase.o \
        $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/intf_calcVectorSc_sim.inc

$(OBJDIR)/intf_calcVectorNodeSys.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcVectorNodeSys.inc \
        $(OBJDIR)/afcstabbase.o $(OBJDIR)/collection.o \
        $(OBJDIR)/fsystem.o $(OBJDIR)/groupfembase.o \
        $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/intf_calcVectorSys_sim.inc

$(OBJDIR)/intf_calcVectorSc_sim.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcVectorSc_sim.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_calcVectorSys_sim.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_calcVectorSys_sim.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_coefficientMatrixSc.inc: \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_coefficientMatrixSc.inc \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/collection.o \
        $(OBJDIR)/domainintegration.o $(OBJDIR)/scalarpde.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/fsystem.o

$(OBJDIR)/intf_coefficientMatrixScBdr1D.inc: \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_coefficientMatrixScBdr1D.inc \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/collection.o \
        $(OBJDIR)/domainintegration.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/scalarpde.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/triangulation.o

$(OBJDIR)/intf_coefficientMatrixScBdr2D.inc: \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_coefficientMatrixScBdr2D.inc \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/collection.o \
        $(OBJDIR)/domainintegration.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/scalarpde.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/spatialdiscretisation.o

$(OBJDIR)/intf_coefficientTrilMatrixSc.inc: \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_coefficientTrilMatrixSc.inc \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/collection.o \
        $(OBJDIR)/domainintegration.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/scalarpde.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/triangulation.o

$(OBJDIR)/intf_coefficientVectorBl.inc: \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_coefficientVectorBl.inc \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/collection.o \
        $(OBJDIR)/domainintegration.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/scalarpde.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/triangulation.o

$(OBJDIR)/intf_coefficientVectorBlBdr1D.inc: \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_coefficientVectorBlBdr1D.inc \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/collection.o \
        $(OBJDIR)/domainintegration.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/scalarpde.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/triangulation.o

$(OBJDIR)/intf_coefficientVectorBlBdr2D.inc: \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_coefficientVectorBlBdr2D.inc \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/collection.o \
        $(OBJDIR)/domainintegration.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/scalarpde.o $(OBJDIR)/triangulation.o \
        $(OBJDIR)/spatialdiscretisation.o

$(OBJDIR)/intf_coefficientVectorSc.inc: \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_coefficientVectorSc.inc \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/collection.o \
        $(OBJDIR)/domainintegration.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/scalarpde.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/triangulation.o

$(OBJDIR)/intf_coefficientVectorScBdr1D.inc: \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_coefficientVectorScBdr1D.inc \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/collection.o \
        $(OBJDIR)/domainintegration.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/scalarpde.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/triangulation.o

$(OBJDIR)/intf_coefficientVectorScBdr2D.inc: \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_coefficientVectorScBdr2D.inc \
        $(OBJDIR)/basicgeometry.o $(OBJDIR)/collection.o \
        $(OBJDIR)/domainintegration.o $(OBJDIR)/fsystem.o \
        $(OBJDIR)/scalarpde.o $(OBJDIR)/spatialdiscretisation.o \
        $(OBJDIR)/triangulation.o

$(OBJDIR)/intf_discretebc.inc: \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_discretebc.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/meshregion.o

$(OBJDIR)/intf_extractVariable.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_extractVariable.inc \
        $(OBJDIR)/linearsystemscalar.o $(OBJDIR)/linearsystemblock.o

$(OBJDIR)/intf_fbcassembly.inc: \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_fbcassembly.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/discretefbc.o

$(OBJDIR)/intf_fecoefficient_sim.inc: \
        $(FEAT2BASEDIR)/kernel/DOFMaintenance/intf_fecoefficient_sim.inc \
        $(OBJDIR)/collection.o $(OBJDIR)/fsystem.o

$(OBJDIR)/intf_functionScBdr2D.inc: \
        $(FEAT2BASEDIR)/kernel/Postprocessing/intf_functionScBdr2D.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/basicgeometry.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/collection.o \
        $(OBJDIR)/scalarpde.o $(OBJDIR)/domainintegration.o

$(OBJDIR)/intf_functionScSimple.inc: \
        $(FEAT2BASEDIR)/kernel/ElementCubature/../Postprocessing/intf_functionScSimple.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_hadaptcallback.inc: \
        $(FEAT2BASEDIR)/kernel/Adaptivity/intf_hadaptcallback.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o \
        $(OBJDIR)/triangulation.o

$(OBJDIR)/intf_limitEdgewise.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_limitEdgewise.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o \
        $(OBJDIR)/intf_calcFluxTransformation_sim.inc

$(OBJDIR)/intf_limitNodal.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/intf_limitNodal.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_monitorfct.inc: \
        $(FEAT2BASEDIR)/kernel/Triangulation/intf_monitorfct.inc \
        $(OBJDIR)/triangulation.o $(OBJDIR)/linearformevaluation.o \
        $(OBJDIR)/spdiscprojection.o $(OBJDIR)/pprocerror.o \
        $(OBJDIR)/element.o $(OBJDIR)/elementpreprocessing.o \
        $(OBJDIR)/pprocgradients.o $(OBJDIR)/fsystem.o

$(OBJDIR)/intf_mshreghittest.inc: \
        $(FEAT2BASEDIR)/kernel/Triangulation/intf_mshreghittest.inc \
        $(OBJDIR)/collection.o $(OBJDIR)/fsystem.o

$(OBJDIR)/intf_nlsolcallback.inc: \
        $(FEAT2BASEDIR)/kernel/NonlinearSolver/intf_nlsolcallback.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/linearsystemblock.o \
        $(OBJDIR)/collection.o

$(OBJDIR)/intf_refFunctionSc.inc: \
        $(FEAT2BASEDIR)/kernel/Postprocessing/intf_refFunctionSc.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/basicgeometry.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/scalarpde.o \
        $(OBJDIR)/domainintegration.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_refFunctionScBdr2D.inc: \
        $(FEAT2BASEDIR)/kernel/Postprocessing/intf_refFunctionScBdr2D.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/basicgeometry.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/scalarpde.o \
        $(OBJDIR)/domainintegration.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_refFunctionScVec.inc: \
        $(FEAT2BASEDIR)/kernel/Postprocessing/intf_refFunctionScVec.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/basicgeometry.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/scalarpde.o \
        $(OBJDIR)/domainintegration.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/collection.o

$(OBJDIR)/intf_sdcoefficient.inc: \
        $(FEAT2BASEDIR)/kernel/PDEOperators/../DOFMaintenance/intf_sdcoefficient.inc \
        $(OBJDIR)/fsystem.o $(OBJDIR)/basicgeometry.o \
        $(OBJDIR)/triangulation.o $(OBJDIR)/scalarpde.o \
        $(OBJDIR)/domainintegration.o \
        $(OBJDIR)/spatialdiscretisation.o $(OBJDIR)/collection.o



##############################################################################
# Compilation and link directives

# default target: compile the FEAT2 application
all:	greeting $(APPNAME)

# 'make debug' will compile without optimisation and with debug symbols
debug:
	@$(MAKE) OPT=NO

# Create all libraries
libs:	$(LIB)

# Compile all object files
obj:	$(OBJ)

# Link statement for application
$(APPNAME): | $(OBJDIR) $(LIB)
$(APPNAME): $(OBJ)
ifeq ($(EXECUTABLE),YES)
ifeq ($(SHARED),YES)
	@echo "# Linking FEAT2 application <$(APPNAME)> dynamically"
	$(PRELD) $(LD) $(LDFLAGS) $(LDFLAGS_LIB) $(filter-out $(OBJPGM), $(OBJ)) $(LIBDIR) $(LIBS) -o lib$(APPNAME).$(SHAREDLIB_EXT)
	$(PRELD) $(LD) $(LDFLAGS) $(OBJPGM) -L. -l$(APPNAME) -o $(APPNAME)
else
	@echo "# Linking FEAT2 application <$(APPNAME)> statically"
	$(PRELD) $(LD) $(LDFLAGS) $(OBJ) $(LIBDIR) $(LIBS) -o $(APPNAME)
endif

else
ifeq ($(SHARED),YES)
	@echo "# Linking FEAT2 library <$(APPNAME)> dynamically"
	$(PRELD) $(LD) $(LDFLAGS) $(LDFLAGS_LIB) $(OBJ) $(LIBDIR) $(LIBS) -o lib$(APPNAME).$(SHAREDLIB_EXT)
else
	@echo "# Linking FEAT2 library <$(APPNAME)> statically"
	$(PRELD) $(LD) $(LDFLAGS) $(OBJ) $(LIBDIR) $(LIBS) -o lib$(APPNAME).a
endif

endif

ifneq ($(MESSAGE),)
	@$(MESSAGE)
endif

# Just link the program, without considering dependencies
# (For cases where you just made a few changes to a code that
#  will not harm other modules. Then, use this make target to
#  shortcut the build.)
link: | $(OBJDIR)
ifeq ($(EXECUTABLE),YES)
ifeq ($(SHARED),YES)
	@echo "# Linking FEAT2 application <$(APPNAME)> dynamically"
	$(PRELD) $(LD) $(LDFLAGS) $(LDFLAGS_LIB) $(filter-out $(OBJPGM), $(OBJ)) $(LIBDIR) $(LIBS) -o lib$(APPNAME).$(SHAREDLIB_EXT)
	$(PRELD) $(LD) $(LDFLAGS) $(OBJPGM) -L. -l$(APPNAME) -o $(APPNAME)
else
	@echo "# Linking FEAT2 application <$(APPNAME)> statically"
	$(PRELD) $(LD) $(LDFLAGS) $(OBJ) $(LIBDIR) $(LIBS) -o $(APPNAME)
endif

else
ifeq ($(SHARED),YES)
	@echo "# Linking FEAT2 library <$(APPNAME)> dynamically"
	$(PRELD) $(LD) $(LDFLAGS) $(LDFLAGS_LIB) $(OBJ) $(LIBDIR) $(LIBS) -o lib$(APPNAME).$(SHAREDLIB_EXT)
else
	@echo "# Linking FEAT2 library <$(APPNAME)> statically"
	$(PRELD) $(LD) $(LDFLAGS) $(OBJ) $(LIBDIR) $(LIBS) -o lib$(APPNAME).a
endif

endif

# Global dependencies for object files
$(OBJ): | $(OBJDIR_LIB) $(OBJDIR)
$(OBJ): | check-or-store-settings

# Please keep in mind:
# GNU Make 3.80 requires that an order-only prerequisite shall not be
# put on the same line as a prerequisite of an implicit rule. $< would
# will be set to the first order-only prerequisite. Potentially this
# leads to rebuilding the target every time make is invoked. Or the
# target can not be built at all.

# Compile statement for each object file from Fortran 77 source
$(OBJF77): | $(OBJDIR)
$(OBJF77):
	$(PREF77) $(F77) $(CFLAGSF77) $(MPIINC) $(INC) -c $< -o $@

# Create build rule for object files from Fortran 90 source
$(OBJF90): | $(OBJDIR)
$(OBJF90):
	CPPFLAGS="$(CPPFLAGS)" \
$(F90CPP) $(PREF90) $(F90) $(APPONLYFLAGS) $(CFLAGSF90) $(MODOPTION)$(OBJDIR) $(MPIINC) $(INC) -c $< -o $@ $(call MOVE_MOD_FILES)

# Compile statement for source file containing program start
# (a separate statement is needed because it defines a program, not a module
#  and, hence, we should not try to move a .mod file as we do with any module.)
$(OBJPRG): | $(OBJDIR)
$(OBJPRG):
	CPPFLAGS="$(CPPFLAGS)" \
$(F90CPP) $(PREF90) $(F90) $(APPONLYFLAGS) $(CFLAGSF90) $(MODOPTION)$(OBJDIR) $(MPIINC) $(INC) -c $< -o $@

# Include implicit rules for files only needed for specific
# build IDs. They are listed in $(SRCEXTRA) and are
# supposed to be located in $(SRCDIR_ARCH).
$(OBJDIR)/%.o: | $(OBJDIR)
# Generic rule for *.f files out of SRCEXTRA and SRCEXTRA_APP
$(patsubst %.f, $(OBJDIR)/%.o, $(filter %.f, $(notdir $(SRCEXTRA) $(SRCEXTRA_APP)))): $(SRCEXTRA) $(SRCEXTRA_APP)
	$(PREF77) $(F77) $(APPONLYFLAGS) $(CFLAGSF77) $(MPIINC) $(INC) -c $(filter %/$(notdir $(basename $@)).f, $(SRCEXTRA) $(SRCEXTRA_APP)) -o $@

# Generic rule for *.f90 files out of SRCEXTRA and SRCEXTRA_APP
# Note 1:
# Remember that those files are supposed to provide no Fortran module
# - otherwise they would be on the normal kernel file list - and as
# such do not try to move a .mod file upon compilation as a workaround
# for compilers that do not create .mod files in the object directory,
# in the working directory.
# Note 2:
# Fortran 90 source files listed in SRCEXTRA and SRCEXTRA_APP may try to
# 'use' Fortran 90 modules from the kernel. Add the complete list of object
# files generated from the kernel's Fortran 90 sources to the dependency
# list of the SRCEXTRA's and SRCEXTRA_APP's Fortran 90 source files to prevent
# them from being compiled prematurely, e.g. in a highly parallel make run
# (make -j N, with N>32 or N missing).
$(patsubst %.f90, $(OBJDIR)/%.o, $(filter %.f90, $(notdir $(SRCEXTRA) $(SRCEXTRA_APP)))): $(SRCEXTRA) $(SRCEXTRA_APP) $(filter-out $(OBJEXTRA), $(OBJ))
	CPPFLAGS="$(CPPFLAGS)" \
$(F90CPP) $(PREF90) $(F90) $(APPONLYFLAGS) $(CFLAGSF90) $(MODOPTION)$(OBJDIR) $(MPIINC) $(INC) -c $(filter %/$(notdir $(basename $@)).f90, $(SRCEXTRA) $(SRCEXTRA_APP)) -o $@

# Generic rule for *.c files out of SRCEXTRA and SRCEXTRA_APP
$(patsubst %.c, $(OBJDIR)/%.o, $(filter %.c, $(notdir $(SRCEXTRA) $(SRCEXTRA_APP)))): $(SRCEXTRA) $(SRCEXTRA_APP)
	$(PRECC) $(CC) $(APPONLYFLAGS) $(CFLAGSC) $(MPIINC) $(INC) -c $(filter %/$(notdir $(basename $@)).c, $(SRCEXTRA) $(SRCEXTRA_APP)) -o $@

# Generic rule for *.cc files out of SRCEXTRA and SRCEXTRA_APP
$(patsubst %.cc, $(OBJDIR)/%.o, $(filter %.cc, $(notdir $(SRCEXTRA) $(SRCEXTRA_APP)))): $(SRCEXTRA) $(SRCEXTRA_APP)
	$(PRECXX) $(CXX) $(APPONLYFLAGS) $(CFLAGSCXX) $(MPIINC) $(INC) -c $(filter %/$(notdir $(basename $@)).cc, $(SRCEXTRA) $(SRCEXTRA_APP)) -o $@

# Generic rule for *.cu files out of SRCEXTRA and SRCEXTRA_APP
$(patsubst %.cu, $(OBJDIR)/%.o, $(filter %.cu, $(notdir $(SRCEXTRA) $(SRCEXTRA_APP)))): $(SRCEXTRA) $(SRCEXTRA_APP)
	$(PRECUDA) $(CUDA) $(APPONLYFLAGS) $(CFLAGSCUDA) $(INC) -c $(filter %/$(notdir $(basename $@)).cu, $(SRCEXTRA) $(SRCEXTRA_APP)) -o $@

# All files listed in $(SRCEXTRA) should be compiled, but depending on
# their extension with a separate rule. Fortran, Fortran90, C, C++ and
# CUDA source files have been dealt with above. Due to all object files in
# $(OBJEXTRA) depending on all source files in $(SRCEXTRA) and
# $(SRCEXTRA_APP), an error will get raised by GNU Make if one of the
# source files listed in $(SRCEXTRA) or $(SRCEXTRA_APP) does not
# exist. But it might be that e.g. some Fortran module, referenced by a
# 'use' statement in a kernel or application source file, was neither
# included in $(SRCLIST_KERNEL) nor $(SRCLIST_APP). Try to catch these
# cases and raise a meaningful error message:
#
# File from SRCEXTRA and SRCEXTRA_APP that can not be found?
define srcextra_file_not_found
    echo;
    echo "ERROR: <$(filter $*.%, $(SRCEXTRA) $(SRCEXTRA_APP))> not found.";
    echo;
    echo "<$(filter $*.%, $(SRCEXTRA) $(SRCEXTRA_APP))> is specified in";
    echo "SRCEXTRA or SRCEXTRA_APP (defined in $(MAKEFILE_CPU_INC) or";
    echo "$(dir $(MAKEFILE_CPU_INC))/templates/*.mk";
    echo "and as such is to be compiled additionally for this build ID.";
    echo "It is supposed to reside in directory";
    echo "$(SRCDIR_ARCH),";
    echo "but does not.";
    echo;
    exit 1;
endef
# No file from SRCEXTRA or SRCEXTRA_APP? Then probably a file is missing from SRCLIST_KERNEL.
define kernel_file_not_on_the_list
    echo;
    echo "ERROR: No rule to make target <$*.o>.";
    echo;
    echo "You might have forgotten to add the corresponding source file to any";
    echo "of the Makefile variables SRCLIST_KERNEL, SRCLIST_ARCH, SRCLIST_APP or SRCEXTRA_APP.";
    echo;
    exit 1
endef
$(OBJDIR)/%.o:
	@$(if $(strip $(filter $*.%, $(SRCEXTRA) $(SRCEXTRA_APP))), \
		$(srcextra_file_not_found), $(kernel_file_not_on_the_list))


##############################################################################
# Create, copy or evaluate header files to be included in Fortran 90 source files

# Copy some header files to object directory (but remove path information from
# include statements)
$(OBJHEADERCOPY): | $(OBJDIR)
$(OBJHEADERCOPY):
	sed -e 's|include ".*/\([^/]*\)"|include "\1"|' $< > $@

# Others need to be evaluated with cpp first before being stored there.
$(OBJHEADEREVAL): | $(OBJDIR)
$(OBJHEADEREVAL): | $(OBJHEADERCOPY)
$(OBJHEADEREVAL): TMPFILE=$(OBJDIR)/$(notdir $<).tmp
$(OBJHEADEREVAL):
	@echo "# Preprocessing $<"
	$(CPP) $(CPPFLAGS) -I$(OBJDIR) \
	      $< \
	    > $(TMPFILE)
	@echo "# Compensating for line number changes in preprocessed $<"
	awk -f $(FEAT2BASEDIR)/bin/postprocess_cppoutput.awk \
	      $(TMPFILE) \
	    > $(OBJDIR)/$(notdir $<)
	rm -f $(TMPFILE)


##############################################################################
# Cleaning up things

# Clean all object files for current architecture
clean:	clean-libs clean-app

# Clean all FEAT2 object files for current architecture
clean-app:
	@echo "# Removing application binary"
	-rm -f $(APPNAME) lib$(APPNAME).a lib$(APPNAME).$(SHAREDLIB_EXT) core
	@echo "# Removing generated source files"
	-$(foreach file, \
	    $(patsubst %, $(OBJDIR)/%, \
                $(FILE_F77_INFO).version $(FILE_F77_INFO).ls \
                $(FILE_F90_INFO).version $(FILE_F90_INFO).ls \
                $(FILE_CC_INFO).version $(FILE_CC_INFO).ls \
                $(FILE_CXX_INFO).version $(FILE_CXX_INFO).ls \
                $(FILE_CUDA_INFO).version $(FILE_CUDA_INFO).ls \
                $(COMPILER_SETTINGS)), \
	    $(remove_file))
	@echo "# Removing wrapped source and header files"
	-$(foreach file, $(OBJHEADERCOPY) $(OBJHEADEREVAL), $(remove_file))
	-$(foreach file, \
	    $(patsubst %.o, %.f90, $(OBJF90) $(OBJPRG)) \
	    $(patsubst %, $(OBJDIR)/%, $(notdir $(filter %.f90, $(SRCEXTRA) $(SRCEXTRA_APP)))), \
	    $(remove_file))
	@echo "# Removing object files"
	-$(foreach file, \
	    $(OBJF77) $(OBJF90) $(OBJEXTRA) $(OBJPRG), \
	    $(remove_file))
	@echo "# Removing module information files"
	-rm -f $(OBJDIR)/*.$(MODEXTENSION)
	@echo "# Removing object directories"
	$(foreach dir, $(OBJDIR), $(remove_directory))

# Clean all external libraries for current architecture
clean-libs: $(BUILDLIB:%=clean-%)
	-$(foreach file, \
	    $(patsubst %, $(OBJDIR_LIB)/%, \
                $(FILE_F77_INFO).version $(FILE_F77_INFO).ls \
                $(FILE_F90_INFO).version $(FILE_F90_INFO).ls \
                $(FILE_CC_INFO).version $(FILE_CC_INFO).ls \
                $(FILE_CXX_INFO).version $(FILE_CXX_INFO).ls \
                $(FILE_CUDA_INFO).version $(FILE_CUDA_INFO).ls \
                $(COMPILER_SETTINGS)), \
	    $(remove_file))
	-$(foreach file, $(LIB), $(remove_file))
	@echo "# Removing object directories"
	$(foreach dir, $(OBJDIR_LIB), $(remove_directory))

# Clean all object files for all architectures
# (But be utmost restrictive by only removing files created by a (recent) FEAT2 Makefile.)
purge:	purge-libs purge-app
	@echo "# Removing Makefile"
	-rm -f GNUmakefile GNUmakefile.bak $(MAKEFILE_NAME)

# Clean all FEAT2 object files for all architectures
# (But be utmost restrictive by only removing files created by a (recent) FEAT2 Makefile.)
purge-app: PURGEDIR = $(dir $(OBJDIR))
purge-app:
        # Go to the directories that contain the architecture-specific
        # object sub-directories and delete in those sub-directories
        # * all object files in those where made from FEAT2 source files.
        # * all module information files in those where made from FEAT2
        #   Fortran 90 source files.
	@echo
	@echo "# Removing application binary"
	-rm -f $(APPNAME) lib$(APPNAME).a lib$(APPNAME).$(SHAREDLIB_EXT) core
	@echo "# Cleaning up in FEAT2 object directory:"
	@echo "# Removing wrapped source files, object files and"
	@echo "# module information files."
	-$(foreach file, \
	    $(patsubst %.f,  $(PURGEDIR)*-*-*-*-*-coproc*-openmp*-opt*/%.o, $(notdir $(SRCF77))) \
	    $(patsubst %,$(PURGEDIR)*-*-*-*-*-opt*/%, \
                    $(notdir $(SRCF90)) $(notdir $(PROGRAM_FILE)) \
                    $(FILE_F77_INFO).version $(FILE_F77_INFO).ls \
                    $(FILE_F90_INFO).version $(FILE_F90_INFO).ls \
                    $(FILE_CC_INFO).version $(FILE_CC_INFO).ls \
                    $(FILE_CXX_INFO).version $(FILE_CXX_INFO).ls \
                    $(FILE_CUDA_INFO).version $(FILE_CUDA_INFO).ls \
                    $(COMPILER_SETTINGS) $(filter %.f90, $(notdir \
                    $(SRCEXTRA))) $(notdir $(INCLUDED_FILES_TO_COPY)) \
                    $(notdir $(INCLUDED_FILES_TO_EVALUATE_WITH_CPP))) \
	    $(patsubst %.f90,$(PURGEDIR)*-*-*-*-*-coproc*-openmp*-opt*/%.o, $(notdir $(SRCF90)) $(notdir $(PROGRAM_FILE))) \
	    $(patsubst %.f,  $(PURGEDIR)*-*-*-*-*-coproc*-openmp*-opt*/%.o, $(filter %.f,   $(notdir $(SRCEXTRA) $(SRCEXTRA_APP)))) \
	    $(patsubst %.f90,$(PURGEDIR)*-*-*-*-*-coproc*-openmp*-opt*/%.o, $(filter %.f90, $(notdir $(SRCEXTRA) $(SRCEXTRA_APP)))) \
	    $(patsubst %.c,  $(PURGEDIR)*-*-*-*-*-coproc*-openmp*-opt*/%.o, $(filter %.c,   $(notdir $(SRCEXTRA) $(SRCEXTRA_APP)))) \
	    $(patsubst %.cc, $(PURGEDIR)*-*-*-*-*-coproc*-openmp*-opt*/%.o, $(filter %.cc,  $(notdir $(SRCEXTRA) $(SRCEXTRA_APP)))) \
	    $(patsubst %.cu, $(PURGEDIR)*-*-*-*-*-coproc*-openmp*-opt*/%.o, $(filter %.cu,  $(notdir $(SRCEXTRA) $(SRCEXTRA_APP)))) \
	    $(patsubst %.f90,$(PURGEDIR)*-*-*-*-*-coproc*-openmp*-opt*/%.$(MODEXTENSION), \
		$(notdir $(SRCF90)) $(notdir $(PROGRAM_FILE))), \
	    $(remove_file))
	@echo "# Removing object directories"
	$(foreach dir, $(PURGEDIR)*-*-*-*-*-coproc*-openmp*-opt*, $(remove_directory))
	@echo "# Removing profiling and core file"
	-rm -f gmon.out core

# Clean all object files of all external libraries for all architectures
# (But be utmost restrictive by only removing files created by a (recent) FEAT2 Makefile.)
purge-libs: PURGEDIR = $(dir $(OBJDIR_LIB))
# Ensure that all libraries are removed that have possibly been compiled
purge-libs: $(ALLLIB:%=purge-%)
        # Go to the directories that contain the architecture-specific
        # object sub-directories and delete in those sub-directories
        # * all libraries shipped with FEAT2.
	@echo "# Removing $(ALLLIB) libraries"
	@echo "# for all build IDs"
	-$(foreach file, \
	    $(patsubst %, $(PURGEDIR)*-*-*-*-*-coproc*-openmp*-opt*/lib%.a, $(ALLLIB)) \
	    $(patsubst %, $(PURGEDIR)*-*-*-*-*-coproc*-openmp*-opt*/%, \
                $(FILE_F77_INFO).version $(FILE_F77_INFO).ls \
                $(FILE_F90_INFO).version $(FILE_F90_INFO).ls \
                $(FILE_CC_INFO).version $(FILE_CC_INFO).ls \
                $(FILE_CXX_INFO).version $(FILE_CXX_INFO).ls \
                $(FILE_CUDA_INFO).version $(FILE_CUDA_INFO).ls \
                $(COMPILER_SETTINGS)), \
	    $(remove_file))
	$(foreach dir, $(PURGEDIR)*-*-*-*-*-coproc*-openmp*-opt*, $(remove_directory))

# shortcut to delete an object file in the current object directory
# (useful if you do not want to remember that directory name)
delete:
	@if test -z "$(FILE)"; then \
	    echo "ERROR: No file specified to delete in directory"; \
	    echo "       $(OBJDIR)."; \
	    echo "Usage: $(MAKE) -f $(MAKEFILE_NAME) delete FILE=<module.o>"; \
	else \
	    if test -f "$(OBJDIR)/$(FILE)"; then \
		echo "# Removing $(OBJDIR)/$(FILE)"; \
		rm -f $(OBJDIR)/$(FILE); \
	    else \
		echo "No file found that could be removed!"; \
	    fi; \
	fi;



##############################################################################
# Libraries (AGMG, AMD, blas, coproc, lapack, splib, umfpack)

# A prerequisite for all libraries is that the object directory
# to store should exist. The pipe is to determine that we want
# a order-only prerequisite. Thus, no recompiling happens when
# the time stamp of the object directory is newer than the files
# within!
$(LIB): | $(OBJDIR_LIB)
# Check also whether compiler or compile settings changed
$(LIB): | check-or-store-settings

# separate rule to download third party library tarballs
getlibs:	$(ALLLIB:%=get-%)

# coproc library path settings
$(OBJDIR_LIB)/libcoproc.a clean-coproc get-coproc purge-coproc: \
	DIR = $(FEAT2BASEDIR)/thirdparty/coproc

# Create coproc library
.PHONY: $(OBJDIR_LIB)/libcoproc.a
$(OBJDIR_LIB)/libcoproc.a:
	@echo "# Building unified coproc library"
	(cd $(DIR) && \
	    $(MAKE) -f Makefile.FEAT2 $@ \
		CC="$(PRECC) $(CC)" \
		CUDA="$(PRECUDA) $(CUDA)" \
		OPT="$(OPT)" \
		CFLAGSCOPROC_FROM_FEAT2="$(CFLAGSCOPROC)" \
		CFLAGSCUDA="$(CFLAGSCUDA)" \
		CFLAGSF90="$(CFLAGSF90) $(MODOPTION)$(OBJDIR)" \
		APPONLYFLAGS="$(APPONLYFLAGS)" \
		ARCH="$(AR)" RANLIB="$(RANLIB)" \
		OBJDIR="$(OBJDIR_LIB)" \
		)

# umfpack library path settings
$(OBJDIR_LIB)/libumfpack.a clean-umfpack get-umfpack purge-umfpack: \
	DIR = $(FEAT2BASEDIR)/thirdparty/UMFPACK

# Create umfpack library
.PHONY: $(OBJDIR_LIB)/libumfpack.a
$(OBJDIR_LIB)/libumfpack.a:
	@echo "# Building umfpack library"
	(cd $(DIR) && \
	    $(MAKE) -f Makefile.FEAT2 $@ \
		CC="$(PRECC) $(CC)" CXXVERSION="$(CXXVERSION)" CFLAGS="$(CFLAGSC)" \
		ARCH="$(AR)" RANLIB="$(RANLIB)" \
		OBJDIR="$(OBJDIR_LIB)" ID="$(ID)")

# AMD library path settings
$(OBJDIR_LIB)/libamd.a clean-amd get-amd purge-amd: \
	DIR = $(FEAT2BASEDIR)/thirdparty/AMD

# Create AMD library
.PHONY: $(OBJDIR_LIB)/libamd.a
$(OBJDIR_LIB)/libamd.a:
	@echo "# Building amd library"
	(cd $(DIR) && \
	    $(MAKE) -f Makefile.FEAT2 $@ \
		CC="$(PRECC) $(CC)" CFLAGS="$(CFLAGSC)" \
		ARCH="$(AR)" RANLIB="$(RANLIB)" \
		OBJDIR="$(OBJDIR_LIB)")

# blas library path settings
$(OBJDIR_LIB)/libblas.a clean-blas get-blas purge-blas: \
	DIR = $(FEAT2BASEDIR)/thirdparty/BLAS

# Create blas library
.PHONY: $(OBJDIR_LIB)/libblas.a
$(OBJDIR_LIB)/libblas.a:
	@echo "# Building blas library"
	(cd $(DIR) && \
	    $(MAKE) -f Makefile.FEAT2 $@ \
		FORTRAN="$(PREF77) $(F77)" OPTS="$(CFLAGSF77)" \
		ARCH="$(AR)" RANLIB="$(RANLIB)" \
		OBJDIR="$(OBJDIR_LIB)")

# lapack library path settings
$(OBJDIR_LIB)/liblapack.a clean-lapack get-lapack purge-lapack: \
	DIR = $(FEAT2BASEDIR)/thirdparty/lapack-3.5.0

# Create lapack library
.PHONY: $(OBJDIR_LIB)/liblapack.a
ifeq ($(GOTOBLAS_PATCH_FOR_LAPACK),)
$(OBJDIR_LIB)/liblapack.a: GOTOBLAS_PATCH_FOR_LAPACK = NOT_REQUIRED
endif
$(OBJDIR_LIB)/liblapack.a:
	@echo "# Building lapack library"
	(cd $(DIR) && \
	    $(MAKE) -f Makefile.FEAT2 $@ \
		F95="eval $(PREF90) $(F90)" OPTS="$(CFLAGSF90) $(MODOPTION)$(OBJDIR_LIB)" \
		ARCH="$(AR)" RANLIB="$(RANLIB)" GOTOBLAS_PATCH_FOR_LAPACK="$(GOTOBLAS_PATCH_FOR_LAPACK)" \
		OBJDIR="$(OBJDIR_LIB)")

# splib library path settings
$(OBJDIR_LIB)/libsplib.a clean-splib get-splib purge-splib: \
	DIR = $(FEAT2BASEDIR)/thirdparty/splib

# Create splib library
.PHONY: $(OBJDIR_LIB)/libsplib.a
$(OBJDIR_LIB)/libsplib.a:
	@echo "# Building splib library"
	(cd $(DIR) && \
	    $(MAKE) -f Makefile.FEAT2 $@ \
		FORTRAN="$(PREF77) $(F77)" OPTS="$(CFLAGSF77)" \
		ARCH="$(AR)" RANLIB="$(RANLIB)" \
		OBJDIR="$(OBJDIR_LIB)")

# AGMG library path settings
$(OBJDIR_LIB)/libagmg.a clean-agmg get-agmg purge-agmg: \
	DIR = $(FEAT2BASEDIR)/thirdparty/AGMG_3.1.2

# Create AGMG library
.PHONY: $(OBJDIR_LIB)/libagmg.a
$(OBJDIR_LIB)/libagmg.a:
	@echo "# Building AGMG library"
	(cd $(DIR) && \
	    $(MAKE) -f Makefile.FEAT2 $@ \
		FORTRAN="$(PREF90) eval $(F90)" OPTS="$(CFLAGSF90) $(MODOPTION)$(OBJDIR_LIB)" \
		ARCH="$(AR)" RANLIB="$(RANLIB)" MODEXTENSION="$(MODEXTENSION)" \
		OBJDIR="$(OBJDIR_LIB)")

# Download rule for every library
$(ALLLIB:%=get-%):
	(cd $(DIR) && $(MAKE) -f Makefile.FEAT2 getlibs)

# Clean rule for every library
$(patsubst %,clean-%,$(filter-out coproc, $(BUILDLIB))):
	@-( cd $(DIR) && \
	    $(MAKE) -f Makefile.FEAT2 OBJDIR="$(OBJDIR_LIB)" MODEXTENSION="$(MODEXTENSION)" clean )
clean-coproc:
	@-( cd $(DIR) && \
	    $(MAKE) -f Makefile.FEAT2 OBJDIR="$(OBJDIR_LIB)" MODEXTENSION="$(MODEXTENSION)" clean )

# Purge rule for every library
$(ALLLIB:%=purge-%): PURGEDIR = $(dir $(OBJDIR_LIB))
$(patsubst %,purge-%,$(filter-out coproc, $(ALLLIB))):
	@-( cd $(DIR) && \
	    $(MAKE) -f Makefile.FEAT2 OBJDIR="$(PURGEDIR)*-*-*-*-*-coproc*-openmp*-opt*" MODEXTENSION="$(MODEXTENSION)" purge )
purge-coproc:
	@-( cd $(DIR) && \
	    $(MAKE) -f Makefile.FEAT2 OBJDIR="$(PURGEDIR)*-*-*-*-*-coproc*-openmp*-opt*" MODEXTENSION="$(MODEXTENSION)" purge )



##############################################################################
# Shortcuts

# Shortcuts for all libraries:
# e.g. invoke 'make umfpack', 'make libumfpack' or 'make libumfpack.a' to
#      have $(OBJDIR_LIB)/libumfpack.a' built
.PHONY: $(BUILDLIB) \
	$(patsubst %, lib%, $(BUILDLIB)) \
	$(patsubst %, lib%.a, $(BUILDLIB))
$(BUILDLIB):
	@$(MAKE) -f $(MAKEFILE_NAME) $(OBJDIR_LIB)/lib$@.a
$(patsubst %, lib%, $(BUILDLIB)):
	@$(MAKE) -f $(MAKEFILE_NAME) $(OBJDIR_LIB)/$@.a
$(patsubst %, lib%.a, $(BUILDLIB)):
	@$(MAKE) -f $(MAKEFILE_NAME) $(OBJDIR_LIB)/$@

# Shortcuts for all FEAT2 object files:
# e.g. invoke 'make assembly.o' to have 'make $(OBJDIR)/assembly.o' built
.PHONY: $(patsubst %.f, %.o, $(notdir $(SRCF77))) \
	$(patsubst %.f90, %.o, $(notdir $(SRCF90) $(notdir $(PROGRAM_FILE)))) \
	$(notdir $(OBJEXTRA))
$(patsubst %.f, %.o, $(notdir $(SRCF77))) \
$(patsubst %.f90, %.o, $(notdir $(SRCF90) $(notdir $(PROGRAM_FILE)))) \
$(notdir $(OBJEXTRA)):
	@$(MAKE) -f $(MAKEFILE_NAME) $(OBJDIR)/$@



##############################################################################
# Targets to check whether compilers and compile settings are consistent
# among subsequent make invocations.

OBJDIR_LOCKFILE     = $(OBJDIR)/LOCK.compile-env-settings
OBJDIR_LIB_LOCKFILE = $(OBJDIR_LIB)/LOCK.compile-env-settings

.PHONY:    check-or-store-settings
check-or-store-settings: WAITTIME = 1
check-or-store-settings: RETRIES  = 10
check-or-store-settings: | $(OBJDIR_LIB) $(OBJDIR)
ifeq ($(strip $(MONITOR_COMPILE_ENV)),YES)
	@trap "rm -f $(OBJDIR_LOCKFILE)" 2 3 9; \
	if test -f $(OBJDIR_LOCKFILE); then \
	    if test $(MAKELEVEL) -lt $(RETRIES); then \
		echo; \
		echo "#"; \
		echo "# Detected concurrent read/write access to those files storing compile"; \
		echo "# environment settings. Waiting for the other process to finish."; \
		echo "#"; \
		echo "# If you are sure that this is a false alarm, simply remove the file"; \
		echo "# <$(OBJDIR_LOCKFILE)>."; \
		echo "# Then, compilation will proceed automatically."; \
		echo "#"; \
		echo; \
		sleep $(WAITTIME); \
		$(MAKE) -f $(MAKEFILE_NAME) check-or-store-settings; \
	    else \
		echo; \
		echo "#"; \
		echo "# Lock for read access to those files storing compile environment"; \
		echo "# has not been released within "`expr $(WAITTIME) \* $(RETRIES)`" seconds."; \
		echo "# Giving up."; \
		echo "#"; \
		echo "# In case of a false alarm please manually remove file"; \
		echo "# <$(OBJDIR_LOCKFILE)>."; \
		echo "#"; \
		echo; \
		exit 1; \
	    fi; \
	else \
	    touch $(OBJDIR_LOCKFILE); \
	    error=0; \
	    if test -s $(OBJDIR)/$(COMPILER_SETTINGS); then \
		$(MAKE) -f $(MAKEFILE_NAME) check-settings-objdir || error=1; \
	    else \
		$(MAKE) -f $(MAKEFILE_NAME) store-settings-objdir || error=1; \
	    fi; \
	    rm -f $(OBJDIR_LOCKFILE); \
	    if test $${error} = 1; then \
		exit 1; \
	    fi; \
	fi; \
	trap - 2 3 9;
	@trap "rm -f $(OBJDIR_LIB_LOCKFILE)" 2 3 9; \
	if test -f $(OBJDIR_LIB_LOCKFILE); then \
	    if test $(MAKELEVEL) -lt $(RETRIES); then \
		echo; \
		echo "#"; \
		echo "# Detected concurrent read/write access to those files storing compile"; \
		echo "# environment settings. Waiting for the other process to finish."; \
		echo "#"; \
		echo "# If you are sure that this is a false alarm, simply remove the file"; \
		echo "# <$(OBJDIR_LIB_LOCKFILE)>."; \
		echo "# Then, compilation will proceed automatically."; \
		echo "#"; \
		echo; \
		sleep $(WAITTIME); \
		$(MAKE) -f $(MAKEFILE_NAME) check-or-store-settings; \
	    else \
		echo; \
		echo "#"; \
		echo "# Lock for read access to those files storing compile environment"; \
		echo "# has not been released within "`expr $(WAITTIME) \* $(RETRIES)`" seconds."; \
		echo "# Giving up."; \
		echo "#"; \
		echo "# In case of a false alarm please manually remove file"; \
		echo "# <$(OBJDIR_LIB_LOCKFILE)>."; \
		echo "#"; \
		echo; \
		exit 1; \
	    fi; \
	else \
	    touch $(OBJDIR_LIB_LOCKFILE); \
	    error=0; \
	    if test -s $(OBJDIR_LIB)/$(COMPILER_SETTINGS); then \
		$(MAKE) -f $(MAKEFILE_NAME) check-settings-objdir_lib || error=1; \
	    else \
		$(MAKE) -f $(MAKEFILE_NAME) store-settings-objdir_lib || error=1; \
	    fi; \
	    rm -f $(OBJDIR_LIB_LOCKFILE); \
	    if test $${error} = 1; then \
		exit 1; \
	    fi; \
	fi; \
	trap - 2 3 9;
endif

# Check whether compiler modification dates or compiler settings for
# current build ID have changed since last invocation of make.
# If so, force re-compilation.
.PHONY:    check-settings-objdir
check-settings-objdir: DIR = $(OBJDIR)
check-settings-objdir: $(OBJDIR)
        # Checking whether compiler or compiler command line settings
        # used to build the application have changed since last time
        # 'make' was run for this build ID.
        # What exactly is done here?
        # In total, 11 files are created in the current object directory.
        # 2 per compiler, 1 for the compiler command line settings. These
        # settings are compared to previously stored ones.
        # For every compiler the output of 'ls -lLd <absolute_path_to_compiler>'
        # is stored in one file. To a separate file, the output of '<compiler>
        # <get-version-info>' is stored. As the syntax to retrieve the compiler
        # version is different for most compilers, the variables F77VERSION,
        # F90VERSION, CCVERSION and CXXVERSION are evaluated. They are defined
        # in one of templates/*.mk files. These 8 files should catch
        # all cases where a compiler has been updated, swapped for another and
        # similar. In general, it is not recommended to mix object files created
        # by different compiler or compiler versions.
        # Compiler command line settings are stored as well. This is done to
        # catch altered preprocessor macros: '-DFOO -DBAR' is used the first
        # time an application is compiled while for the second compilation
        # settings have been changed to '-DBAZ'. Ordinary Makefile don't detect
        # this despite the change possibly having a big impact on which code
        # is compiled. The same holds true for different kind of optimisation
        # flags. The mechanism ensures that all object files have been compiled
        # with the very same settings when it comes to linking. The settings
        # stored are:
        # CFLAGSF77     = [...]
        # CFLAGSF90     = [...]
        # CFLAGSC       = [...]
        # CFLAGSCOPROC  = [...]
        # CFLAGSCXX     = [...]
        # CFLAGSCUDA    = [...]
        # APPONLYFLAGS  = [...]
        # INC           = [...]
        # The output is similar to the corresponding lines of 'make id' output.
        # Path information, however, needs to be removed from these settings.
        # Otherwise, it would not be possible to share libraries among FEAT2
        # applications as the settings above often contain absolute paths to
        # object directories which would lead to conflicts, e.g.:
        # CFLAGSF90    = [...] -moddir=/home/foo/nobackup/feat2obj/benchmark/apps_poisson/object
        # CFLAGSF90    = [...] -moddir=/home/foo/nobackup/feat2obj/benchmark/apps_stokes/object
	@+\
	LC_ALL=C; \
	hostname >> "$(DIR)/compile.host"; \
	additionalflags="APPONLYFLAGS  = $(APPONLYFLAGS)"; \
	message=""; \
	COMPILERNAME="F77"; COMPILER="$(PREF77) $(F77)"; \
	COMPILERVERSION="$(F77VERSION)"; \
	FILE="$(DIR)/$(FILE_F77_INFO).version"; $(version-info-compiler-foo); \
	FILE="$(DIR)/$(FILE_F77_INFO).ls";      $(ls-lLd-for-compiler-foo); \
	COMPILERNAME="F90"; COMPILER="$(PREF90) $(F90)"; \
	COMPILERVERSION="$(F90VERSION)"; \
	FILE="$(DIR)/$(FILE_F90_INFO).version"; $(version-info-compiler-foo); \
	FILE="$(DIR)/$(FILE_F90_INFO).ls";      $(ls-lLd-for-compiler-foo); \
	COMPILERNAME="C"; COMPILER="$(PRECC) $(CC)"; \
	COMPILERVERSION="$(CCVERSION)"; \
	FILE="$(DIR)/$(FILE_CC_INFO).version";  $(version-info-compiler-foo); \
	FILE="$(DIR)/$(FILE_CC_INFO).ls";       $(ls-lLd-for-compiler-foo); \
	COMPILERNAME="C++"; COMPILER="$(PRECXX) $(CXX)"; \
	COMPILERVERSION="$(CXXVERSION)"; \
	FILE="$(DIR)/$(FILE_CXX_INFO).version"; $(version-info-compiler-foo); \
	FILE="$(DIR)/$(FILE_CXX_INFO).ls";      $(ls-lLd-for-compiler-foo); \
	COMPILERNAME="CUDA"; COMPILER="$(PRECUDA) $(CUDA)"; \
	COMPILERVERSION="$(CUDAVERSION)"; \
	FILE="$(DIR)/$(FILE_CUDA_INFO).version"; $(version-info-compiler-foo); \
	FILE="$(DIR)/$(FILE_CUDA_INFO).ls";      $(ls-lLd-for-compiler-foo); \
	recompile=no; \
	test -n "$${message}" && recompile=yes; \
	diffflags=no; \
	if test -s $(DIR)/$(COMPILER_SETTINGS); then \
	    (echo 'CFLAGSF77     =' $(CFLAGSF77); \
	     echo 'CFLAGSF90     =' $(CFLAGSF90); \
	     echo 'CFLAGSC       =' $(CFLAGSC); \
	     echo 'CFLAGSCOPROC  =' $(CFLAGSCOPROC); \
	     echo 'CFLAGSCXX     =' $(CFLAGSCXX); \
	     echo 'CFLAGSCUDA    =' $(CFLAGSCUDA); \
	     echo $${additionalflags}; \
	     echo 'INC           =' $(INC) ) | \
		sed -e "s^-DENABLE_SERIAL_BUILD[ ]*^^g; \
			s^$(OBJDIR)^<path information intentionally removed by make>^g; \
			s^$(OBJDIR_LIB)^<path information intentionally removed by make>^g;" | \
		diff -q -w $(DIR)/$(COMPILER_SETTINGS) - || diffflags=yes; \
	    test "$${diffflags}" = "yes" && recompile=yes; \
	fi; \
	if test $${recompile} = "yes"; then \
	    echo; \
	    echo "#######################################################################"; \
	    echo "# It seems this application's source code has been compiled before -"; \
	    echo "# or at least one of the self-compiled libraries the application uses"; \
	    echo "# - because object files from a previous compilation still linger."; \
	    echo "# Either you did compile it before or the person from which you"; \
	    echo "# copied the source code did. The problem is that this time a"; \
	    echo "# different compiler or compiler version (or even an entirely"; \
	    echo "# different operating system) than before is being used or that"; \
	    echo "# compiler options were passed to the compiler that differ from those"; \
	    echo "# used before."; \
	    echo "#"; \
	    echo "# As a result, you would have mixed potentially incompatible object"; \
	    echo "# files in the final build step of linking your application. It could"; \
	    echo "# have worked, but just as well even have failed - at compile or,"; \
	    echo "# even worse, (sometimes) at run time - in unpredictable, unexpected,"; \
	    echo "# very subtle ways."; \
	    echo "#"; \
	    echo "# Which is why the Featflow2 build system intercepted compilation and"; \
	    echo "# presents you this error message. To resolve the issue, do a clean"; \
	    echo "# build."; \
	    echo "#"; \
	    overwrittenmakevars="`echo $(MAKEFLAGS) | awk '/^.* -- / { sub(/^.* -- /, ""); print $0}'`"; \
	    echo "#     % $(MAKE) -f $(MAKEFILE_NAME) $${overwrittenmakevars} clean; $(MAKE) -f $(MAKEFILE_NAME) $${overwrittenmakevars}"; \
	    echo "#"; \
	    echo "# ---------------------------------------------------------------------"; \
	    echo "#"; \
	    echo "# Technical details on the conflicts found:"; \
	    if test $${diffflags} = "yes"; then \
		echo "#"; \
		echo "# The following output is raw 'diff' output of the previous vs. current"; \
		echo "# compiler settings:"; \
		echo "#"; \
		(echo 'CFLAGSF77     =' $(CFLAGSF77); \
		 echo 'CFLAGSF90     =' $(CFLAGSF90); \
		 echo 'CFLAGSC       =' $(CFLAGSC); \
		 echo 'CFLAGSCOPROC  =' $(CFLAGSCOPROC); \
		 echo 'CFLAGSCXX     =' $(CFLAGSCXX); \
		 echo 'CFLAGSCUDA    =' $(CFLAGSCUDA); \
		 echo $${additionalflags}; \
		 echo 'INC           =' $(INC) ) | \
		    sed -e "s^-DENABLE_SERIAL_BUILD[ ]*^^g; \
			    s^$(OBJDIR)^<path information intentionally removed by make>^g; \
			    s^$(OBJDIR_LIB)^<path information intentionally removed by make>^g;" | \
		    diff -w $(DIR)/$(COMPILER_SETTINGS) -; \
		if test -n "$${message}"; then \
		    echo "#"; \
		    echo "#"; \
		    echo "# Additionally holds:"; \
		fi; \
	    fi; \
	    if test -n "$${message}"; then \
	        echo $${message} | LC_ALL=C perl -pe 's/NEWLINE /\n/g; s/NEWLINE//g;'; \
	        message=""; \
	    fi; \
	    echo "#";  \
	    echo "#";  \
	    echo "# Once again: This FEAT2 application SHOULD BE RECOMPILED."; \
	    echo "# Please issue at least a"; \
	    echo "#     % $(MAKE) -f $(MAKEFILE_NAME) $${overwrittenmakevars} clean-app; $(MAKE) -f $(MAKEFILE_NAME) $${overwrittenmakevars} obj"; \
	    echo "# or if you prefer tabula rasa"; \
	    echo "#     % $(MAKE) -f $(MAKEFILE_NAME) $${overwrittenmakevars} clean; $(MAKE) -f $(MAKEFILE_NAME) $${overwrittenmakevars}"; \
	    echo "#";  \
	    echo "# (Note: If you believe this is a false positive result and know what"; \
	    echo "#        you are doing you can deactivate this object files"; \
	    echo "#        compatibility check - at your own risk - by compiling with"; \
	    echo "#        'MONITOR_COMPILE_ENV=NO'.)"; \
	    echo "#######################################################################"; \
	    rm -f $(OBJDIR_LOCKFILE); \
	    exit 1; \
	fi;

.PHONY:    check-settings-objdir_lib
check-settings-objdir_lib: DIR = $(OBJDIR_LIB)
check-settings-objdir_lib: $(OBJDIR_LIB)
ifneq ($(OBJDIR_LIB), $(OBJDIR))
        # Checking whether compiler or compiler command line settings
        # used to build the libraries have changed since last time
        # 'make' was run for this build ID.
        # What exactly is done here? See comment in target check-settings-objdir.
	@+\
	LC_ALL=C; \
	hostname >> "$(DIR)/compile.host"; \
	additionalflags=""; \
	message=""; \
	COMPILERNAME="F77"; COMPILER="$(PREF77) $(F77)"; \
	COMPILERVERSION="$(F77VERSION)"; \
	FILE="$(DIR)/$(FILE_F77_INFO).version"; $(version-info-compiler-foo); \
	COMPILERNAME="F90"; COMPILER="$(PREF90) $(F90)"; \
	COMPILERVERSION="$(F90VERSION)"; \
	FILE="$(DIR)/$(FILE_F90_INFO).version"; $(version-info-compiler-foo); \
	COMPILERNAME="C"; COMPILER="$(PRECC) $(CC)"; \
	COMPILERVERSION="$(CCVERSION)"; \
	FILE="$(DIR)/$(FILE_CC_INFO).version";  $(version-info-compiler-foo); \
	COMPILERNAME="C++"; COMPILER="$(PRECXX) $(CXX)"; \
	COMPILERVERSION="$(CXXVERSION)"; \
	FILE="$(DIR)/$(FILE_CXX_INFO).version"; $(version-info-compiler-foo); \
	COMPILERNAME="CUDA"; COMPILER="$(PRECUDA) $(CUDA)"; \
	COMPILERVERSION="$(CUDAVERSION)"; \
	FILE="$(DIR)/$(FILE_CUDA_INFO).version"; $(version-info-compiler-foo); \
	recompile=no; \
	test -n "$${message}" && recompile=yes; \
	diffflags=no; \
	if test -s $(DIR)/$(COMPILER_SETTINGS); then \
	    (echo 'CFLAGSF77     =' $(CFLAGSF77); \
	     echo 'CFLAGSF90     =' $(CFLAGSF90); \
	     echo 'CFLAGSC       =' $(CFLAGSC); \
	     echo 'CFLAGSCOPROC  =' $(CFLAGSCOPROC); \
	     echo 'CFLAGSCXX     =' $(CFLAGSCXX); \
	     echo 'CFLAGSCUDA    =' $(CFLAGSCUDA); \
	     echo $${additionalflags}; \
	     echo 'INC           =' $(INC) ) | \
		sed -e "s^-DENABLE_SERIAL_BUILD[ ]*^^g; \
			s^$(OBJDIR)^<path information intentionally removed by make>^g; \
			s^$(OBJDIR_LIB)^<path information intentionally removed by make>^g;" | \
		diff -q -w $(DIR)/$(COMPILER_SETTINGS) - || diffflags=yes; \
	    test "$${diffflags}" = "yes" && recompile=yes; \
	fi; \
	if test $${recompile} = "yes"; then \
	    echo; \
	    echo "#######################################################################"; \
	    echo "# It seems (at least) one of the libraries this application uses and"; \
	    echo "# that are about to be compiled along with the application has been"; \
	    echo "# compiled before, because object files from a previous compilation"; \
	    echo "# still linger. Either you did compile it before or the person from"; \
	    echo "# which you copied the source code did. The problem is that this time"; \
	    echo "# a different compiler or compiler version (or even an entirely"; \
	    echo "# different operating system) than before is being used or that"; \
	    echo "# compiler options were passed to the compiler that differ from those"; \
	    echo "# used before."; \
	    echo "#"; \
	    echo "# As a result, you would have mixed potentially incompatible object"; \
	    echo "# files in the final build step of linking your application. It could"; \
	    echo "# have worked, but just as well even have failed - at compile or,"; \
	    echo "# even worse, (sometimes) at run time - in unpredictable, unexpected,"; \
	    echo "# very subtle ways."; \
	    echo "#"; \
	    echo "# Which is why the Featflow2 build system intercepted compilation and"; \
	    echo "# presents you this error message. To resolve the issue, do a clean"; \
	    echo "# build."; \
	    echo "#"; \
	    overwrittenmakevars="`echo $(MAKEFLAGS) | awk '/^.* -- / { sub(/^.* -- /, ""); print $0}'`"; \
	    echo "#     % $(MAKE) -f $(MAKEFILE_NAME) $${overwrittenmakevars} clean-libs; $(MAKE) -f $(MAKEFILE_NAME) $${overwrittenmakevars} libs"; \
	    echo "#"; \
	    echo "# ---------------------------------------------------------------------"; \
	    echo "#"; \
	    echo "# Technical details on the conflicts found:"; \
	    if test $${diffflags} = "yes"; then \
		echo "#"; \
		echo "# The following output is raw 'diff' output of the previous vs. current"; \
		echo "# compiler settings:"; \
		echo "#"; \
		(echo 'CFLAGSF77     =' $(CFLAGSF77); \
		 echo 'CFLAGSF90     =' $(CFLAGSF90); \
		 echo 'CFLAGSC       =' $(CFLAGSC); \
		 echo 'CFLAGSCOPROC  =' $(CFLAGSCOPROC); \
		 echo 'CFLAGSCXX     =' $(CFLAGSCXX); \
		 echo 'CFLAGSCUDA    =' $(CFLAGSCUDA); \
		 echo $${additionalflags}; \
		 echo 'INC           =' $(INC) ) | \
		    sed -e "s^-DENABLE_SERIAL_BUILD[ ]*^^g; \
			    s^$(OBJDIR)^<path information intentionally removed by make>^g; \
			    s^$(OBJDIR_LIB)^<path information intentionally removed by make>^g;" | \
		    diff -w $(DIR)/$(COMPILER_SETTINGS) -; \
		if test -n "$${message}"; then \
		    echo "#"; \
		    echo "#"; \
		    echo "# Additionally holds:"; \
		fi; \
	    fi; \
	    if test -n "$${message}"; then \
		echo $${message} | LC_ALL=C perl -pe 's/NEWLINE /\n/g; s/NEWLINE//g;'; \
		message=""; \
	    fi; \
	    echo "#";  \
	    echo "#";  \
	    echo "# Once again: The libraries this FEAT2 application relies on SHOULD BE"; \
	    echo "# RECOMPILED. Please issue at least a"; \
	    echo "#     % $(MAKE) -f $(MAKEFILE_NAME) $${overwrittenmakevars} clean-libs; $(MAKE) -f $(MAKEFILE_NAME) $${overwrittenmakevars} libs"; \
	    echo "# or if you prefer tabula rasa"; \
	    echo "#     % $(MAKE) -f $(MAKEFILE_NAME) $${overwrittenmakevars} clean; $(MAKE) -f $(MAKEFILE_NAME) $${overwrittenmakevars}"; \
	    echo "#";  \
	    echo "# (Note: If you believe this is a false positive result and know what"; \
	    echo "#        you are doing you can deactivate this object files"; \
	    echo "#        compatibility check - at your own risk - by compiling with"; \
	    echo "#        'MONITOR_COMPILE_ENV=NO'.)"; \
	    echo "#######################################################################"; \
	    rm -f $(OBJDIR_LIB_LOCKFILE); \
	    exit 1; \
	fi;
endif

# Function to check whether the version string of program <foo>,
# obtainable via variable ${FOOVERSION}, differs from the
# information stored in ${FILE}.
#
# When parallel compiling several applications that share the same
# object directory for libraries, it can happen that make process A
# starts to create ${FILE} (so ${FILE} being empty, but existing)
# while make process B tries already to check settings inside.
# So, we do not check with 'test -f', but 'test -s'.
define version-info-compiler-foo
    recompile=no; \
    if test -s $${FILE}; then \
	if test -n "$${COMPILERVERSION}"; then \
	    eval $${COMPILERVERSION} | \
	    diff -w $${FILE} - > /dev/null || \
	    recompile=yes; \
	else \
	    echo; echo "Error: $${COMPILER} not found."; echo; \
	    rm -f $(OBJDIR_LOCKFILE); exit 1; \
	fi; \
	if test $${recompile} = "yes"; then \
	    message=`echo $${message}; echo "#NEWLINE"`; \
	    message=`echo $${message}; echo "# Version information of $${COMPILERNAME} compiler has changed:NEWLINE"`; \
	    message=`echo $${message}; echo "#  previously: \`cat $${FILE}\`NEWLINE"`; \
	    message=`echo $${message}; echo "#  currently : \`eval $${COMPILERVERSION}\`NEWLINE"`; \
	    message=`echo $${message}; echo "#  (command used to determine this: $${COMPILERVERSION})NEWLINE"`; \
	fi; \
    fi
endef


# Function to check whether the output of 'ls -lLd <foo>' differs
# from the information stored in ${FILE}.
#
# (When parallel compiling several applications that share the same
#  object directory for libraries, it can happen that make process A
#  starts to create ${FILE} (so ${FILE} being empty, but existing)
#  while make process B tries already to check settings inside.
#  So, we do not check with 'test -f', but 'test -s'.)
define ls-lLd-for-compiler-foo
    LC_ALL=C; \
    recompile=no; \
    if test -s $${FILE}; then \
	compilerpath=`which $${COMPILER} 2> /dev/null`; \
	if test -n "$${compilerpath}"; then \
	    ls -lLd $${compilerpath} | \
	    diff -w $${FILE} - > /dev/null || \
	    recompile=yes; \
	else \
	    echo; echo "Error: $${COMPILER} not found."; echo; \
	    rm -f $(OBJDIR_LOCKFILE) $(OBJDIR_LIB_LOCKFILE); \
	    exit 1; \
	fi; \
	if test $${recompile} = "yes"; then \
	    message=`echo $${message}; echo "#NEWLINE"`; \
	    message=`echo $${message}; echo "# File information of $${COMPILERNAME} compiler has changed:NEWLINE"`; \
	    message=`echo $${message}; echo "#  previously: \`cat $${FILE}\`NEWLINE"`; \
	    message=`echo $${message}; echo "#  currently : \`ls -lLd $${compilerpath}\`NEWLINE"`; \
	    message=`echo $${message}; echo "#  (command used to determine this: ls -lLd $${compilerpath})NEWLINE"`; \
	fi; \
    fi
endef


# Store compiler modification dates and compiler settings etc.
# for current build ID.
# This information is later on used to check whether the object files
# in $(DIR) need to be recompiled.
.PHONY:    store-settings-objdir
store-settings-objdir: DIR = $(OBJDIR)
store-settings-objdir: $(OBJDIR) #| check-settings-objdir
	@+additionalflags="APPONLYFLAGS  = $(APPONLYFLAGS)"; \
	echo "# Storing current compiler and compiler command line settings"; \
	echo "# used to compile the application for subsequent 'make' calls"; \
	echo "# to detect future changes and force automatic recompilation..."; \
	$(store-settings)

.PHONY:    store-settings-objdir_lib
store-settings-objdir_lib: DIR = $(OBJDIR_LIB)
store-settings-objdir_lib: $(OBJDIR_LIB) #| check-settings-objdir_lib
ifneq ($(OBJDIR_LIB), $(OBJDIR))
	@+additionalflags=""; \
	echo "# Storing current compiler and compiler command line settings"; \
	echo "# used to compile the libraries for subsequent 'make' calls"; \
	echo "# to detect future changes and force automatic recompilation..."; \
	$(store-settings)
endif

# What exactly is done here?
# In total, 11 files are created in the current object directory.
# 2 per compiler, 1 for the compiler command line settings.
# For every compiler the output of 'ls -lLd <absolute_path_to_compiler>'
# is stored in one file. To a separate file, the output of '<compiler>
# <get-version-info>' is stored. As the syntax to retrieve the compiler
# version is different for most compilers, the variables F77VERSION,
# F90VERSION, CCVERSION and CXXVERSION are evaluated. They are defined
# in one of kernel/arch/templates/*.mk files. These 8 files should catch
# all cases where a compiler has been updated, swapped for another and
# similar. In general, it is not recommended to mix object files created
# by different compiler or compiler versions.
# Compiler command line settings are stored as well. This is done to
# catch altered preprocessor macros: '-DFOO -DBAR' is used the first
# time an application is compiled while for the second compilation
# settings have been changed to '-DBAZ'. Ordinary Makefile don't detect
# this despite the change possibly having a big impact on which code
# is compiled. The same holds true for different kind of optimisation
# flags. The mechanism ensures that all object files have been compiled
# with the very same settings when it comes to linking. The settings
# stored are:
# CFLAGSF77     = [...]
# CFLAGSF90     = [...]
# CFLAGSC       = [...]
# CFLAGSCOPROC  = [...]
# CFLAGSCXX     = [...]
# CFLAGSCUDA    = [...]
# APPONLYFLAGS  = [...]
# INC           = [...]
# The output is similar to the corresponding lines of 'make id' output.
# Path information, however, needs to be removed from these settings.
# Otherwise, it would not be possible to share libraries among FEAT2
# applications as the settings above often contain absolute paths to
# object directories which would lead to conflicts, e.g.:
# CFLAGSF90    = [...] -moddir=/home/foo/nobackup/feat2obj/fb2/src_disk/object
# CFLAGSF90    = [...] -moddir=/home/foo/nobackup/feat2obj/fb2/src_poisson/object
define store-settings
    LC_ALL=C; \
    if test -n "$(F77)"; then \
	$(F77VERSION) > "$(DIR)/$(FILE_F77_INFO).version"; \
	compilerpath=`which 2>/dev/null $(F77)`; \
	if test -f "$${compilerpath}" -o -L "$${compilerpath}"; then \
	    ls -lLd "$${compilerpath}" > "$(DIR)/$(FILE_F77_INFO).ls"; \
	else \
	    echo; echo "Error: F77 compiler not found."; echo; \
	    rm -f $(OBJDIR_LOCKFILE) $(OBJDIR_LIB_LOCKFILE); \
	    exit 1; \
	fi; \
    else \
	echo; echo "Error: F77 compiler not set."; echo; \
	rm -f $(OBJDIR_LOCKFILE) $(OBJDIR_LIB_LOCKFILE); \
	exit 1; \
    fi; \
    if test -n "$(F90)"; then \
	$(F90VERSION) > "$(DIR)/$(FILE_F90_INFO).version"; \
	compilerpath=`which 2>/dev/null $(F90)`; \
	if test -f "$${compilerpath}" -o -L "$${compilerpath}"; then \
	    ls -lLd "$${compilerpath}" > "$(DIR)/$(FILE_F90_INFO).ls"; \
	else \
	    echo; echo "Error: F90 compiler not found."; echo; \
	    rm -f $(OBJDIR_LOCKFILE) $(OBJDIR_LIB_LOCKFILE); \
	    exit 1; \
	fi; \
    else \
	echo; echo "Error: F90 compiler not set."; echo; \
	rm -f $(OBJDIR_LOCKFILE) $(OBJDIR_LIB_LOCKFILE); \
	exit 1; \
    fi; \
    if test -n "$(CC)"; then \
	$(CCVERSION) > "$(DIR)/$(FILE_CC_INFO).version"; \
	compilerpath=`which 2>/dev/null $(CC)`; \
	if test -f "$${compilerpath}" -o -L "$${compilerpath}"; then \
	    ls -lLd "$${compilerpath}" > "$(DIR)/$(FILE_CC_INFO).ls"; \
	else \
	    echo; echo "Error: C compiler not found."; echo; \
	    rm -f $(OBJDIR_LOCKFILE) $(OBJDIR_LIB_LOCKFILE); \
	    exit 1; \
	fi; \
    else \
	echo; echo "Error: C compiler not set."; echo; \
	rm -f $(OBJDIR_LOCKFILE) $(OBJDIR_LIB_LOCKFILE); \
	exit 1; \
    fi; \
    if test -n "$(CXX)"; then \
	$(CXXVERSION) > "$(DIR)/$(FILE_CXX_INFO).version"; \
	compilerpath=`which 2>/dev/null $(CXX)`; \
	if test -f "$${compilerpath}" -o -L "$${compilerpath}"; then \
	    ls -lLd "$${compilerpath}" > "$(DIR)/$(FILE_CXX_INFO).ls"; \
	else \
	    echo; echo "Error: C++ compiler not found."; echo; \
	    rm -f $(OBJDIR_LOCKFILE) $(OBJDIR_LIB_LOCKFILE); \
	    exit 1; \
	fi; \
    else \
	echo; echo "Error: C++ compiler not set."; echo; \
	rm -f $(OBJDIR_LOCKFILE) $(OBJDIR_LIB_LOCKFILE); \
	exit 1; \
    fi; \
    if test -n "$(CUDA)"; then \
	$(CUDAVERSION) > "$(DIR)/$(FILE_CUDA_INFO).version"; \
	compilerpath=`which 2>/dev/null $(CUDA)`; \
	if test -f "$${compilerpath}" -o -L "$${compilerpath}"; then \
	    ls -lLd "$${compilerpath}" > "$(DIR)/$(FILE_CUDA_INFO).ls"; \
	else \
	    echo; echo "Error: CUDA compiler not found."; echo; \
	    rm -f $(OBJDIR_LOCKFILE) $(OBJDIR_LIB_LOCKFILE); \
	    exit 1; \
	fi; \
    fi; \
    (echo 'CFLAGSF77     =' $(CFLAGSF77); \
     echo 'CFLAGSF90     =' $(CFLAGSF90); \
     echo 'CFLAGSC       =' $(CFLAGSC); \
     echo 'CFLAGSCOPROC  =' $(CFLAGSCOPROC); \
     echo 'CFLAGSCXX     =' $(CFLAGSCXX); \
     echo 'CFLAGSCUDA    =' $(CFLAGSCUDA); \
     echo $${additionalflags}; \
     echo 'INC           =' $(INC) ) | \
        sed -e "s^-DENABLE_SERIAL_BUILD[ ]*^^g; \
		s^$(OBJDIR)^<path information intentionally removed by make>^g; \
		s^$(OBJDIR_LIB)^<path information intentionally removed by make>^g;" \
        > $(DIR)/$(COMPILER_SETTINGS); \
    echo "# Done."
endef

# For slow file systems ensure that a directory to be created
# actually has appeared before continuing.
define wait-for-directory-to-appear
    echo; echo "# Waiting till object directory <$${DIR}> appears..."; \
    while ! test -d $${DIR}; do sleep 1; done; \
    echo "# Object directory <$${DIR}> available. Continuing compilation..."

endef



##############################################################################
# Auxiliary targets

# Greeting
.PHONY: greeting
greeting:
	@echo "# Building FEAT2.0 application <$(APPNAME)>"

# Test whether given ID (possibly hard-coded in top section or given
# on command line) is valid
.PHONY: verify-id
verify-id:
ifneq ($(strip $(FORCE_ID)),YES)
ifeq (,$(findstring $(REALID_SHORT), $(ID)))
	@echo; \
	 echo '*** Error: Build ID $(ID)'; \
	 echo '***        is *not* valid for current host!'; \
	 echo '***        $(FEAT2BASEDIR)/bin/guess_id reported a host of type $(REALID_SHORT).'; \
	 echo '***        Cowardly refusing compilation.'; \
	 echo;
	@exit 1;
endif
endif

# Create object directories
.PHONY: $(OBJDIR)
$(OBJDIR):      | verify-id
ifneq ($(MESSAGE),)
	@$(MESSAGE)
endif
	@test -d $(OBJDIR) || (rm -f $(OBJDIR); mkdir -p $(OBJDIR))
#	@DIR=$(OBJDIR); $(wait-for-directory-to-appear)

ifneq ($(OBJDIR_LIB), $(OBJDIR))
.PHONY: $(OBJDIR_LIB)
$(OBJDIR_LIB):  | verify-id $(OBJDIR)
ifneq ($(MESSAGE),)
	@$(MESSAGE)
endif
	@test -d $(OBJDIR_LIB) || (rm -f $(OBJDIR_LIB); mkdir -p $(OBJDIR_LIB))
#	@DIR=$(OBJDIR_LIB); $(wait-for-directory-to-appear)
endif

# aliases for global target .id & .idonly
# show current build ID and all compile settings applied
.PHONY:	id
id:	.id

# show current build ID
.PHONY:	idonly
idonly:   .idonly

# print a list of all valid build IDs for current host
.PHONY:	listids list.ids list-ids
listids:	list-ids
list.ids:	list-ids
list-ids:
	@echo "The following are valid (possibly partial) build IDs for current host:"
# It would be a lot nicer if we could distribute the following perl
# command over several lines, but this breaks with GNU Make 3.81
# (though it works with GNU Make 3.80).
	@LC_ALL=C perl -ne '(my $$id_1st3tokens = "$(REALID)") =~ s/^([\w\.]+-[\w\.]+-[\w\.]+)-.*/$$1/; if (m/^ifeq \(\$$\(call match,\$$\(ID\),([^-]+-[^-]+-[^-]+)(-.*)\),yes\)\s*$$/) { my $$completematch = $$1 . $$2; my $$match_1st3tokens = $$1; if ($$completematch =~ m/$(REALID)/) { print "* $$completematch (default)\n"; } elsif ($$id_1st3tokens =~ m/$$match_1st3tokens/) { print "* $$completematch\n"; } }' \
	    $(MAKEFILE_CPU_INC) | sort;
	@echo;
	@echo "Default build ID for current host: $(REALID)";
ifneq ($(ID), $(REALID))
	@echo "Forced build ID for current host: $(ID)";
endif

# print a list of all valid build IDs
.PHONY:	listallids list.all.ids list-all-ids
listallids:	list-all-ids
list.all.ids:	list-all-ids
list-all-ids:
	@echo "The following are all valid (possibly partial) build IDs:"
# It would be a lot nicer if we could distribute the following perl
# command over several lines, but this breaks with GNU Make 3.81
# (though it works with GNU Make 3.80).
	@LC_ALL=C perl -ne 'if (m/^ifeq \(\$$\(call match,\$$\(ID\),(.*)\),yes\)\s*$$/) {   my $$string = $$1; if ($$string =~ m/^$(REALID)/) { print "* $$string (default)\n"; } else { print "* $$string\n"; }   }' \
	    $(MAKEFILE_CPU_INC) | sort;
	@echo;
	@echo "Default build ID for current host: $(REALID)";
ifneq ($(ID), $(REALID))
	@echo "Forced build ID for current host: $(ID)";
endif

# create tag file for emacs users
.PHONY: tags
tags: $(SRCF77) $(SRCF90) $(SRCEXTRA) $(SRCEXTRA_APP)
	rm -f TAGS
	ctags -e --langmap=c++:+.cu --totals=yes $(filter %.c %.cc %.cu %.f %.f90,$^)

# print a help screen
help:
	@echo "Usage: make [targets...]"
	@echo ""
	@echo "where targets include:"
	@echo ""
	@echo "  help           display this help"
	@echo "  all            compile application (default)"
	@echo "  debug          compile application without optimisation flags,"
	@echo "                   include debugging symbols"
	@echo "  getlibs        download all third party libraries currently missing"
	@echo "  libs           compile all libraries specified in variable BUILDLIB"
	@echo "                   (currently: $(BUILDLIB))"
	@echo "  clean          remove all object files and libraries"
	@echo "  clean-app      remove only FEAT2 object files"
	@echo "  clean-libs     remove libraries and the object files they are built from"
	@echo "  purge          remove all object files and libraries for all build IDs"
	@echo "  purge-libs     remove libraries and the object files they are built from"
	@echo "                   for all build IDs"
	@echo ""
	@echo "Additional auxiliary targets include:"
	@echo "  idonly         show current build ID"
	@echo "  id             show current build ID and all compile settings"
	@echo "                   that would be applied during compilation"
	@echo "  list-ids       print a list of valid build IDs for current host"
	@echo "  list-all-ids   print a list of all valid build IDs"
	@echo "  <library>      compile only <library>, where <library> is one of"
	@echo "                   'agmg' - aggregation-based algebraic multigrid metho "
	@echo "                   'amd' - approximate minimum degree ordering"
	@echo "                   'blas' - basic linear algebra subprograms"
	@echo "                   'coproc' - co-processor support"
	@echo "                   'lapack' - linear algebra package"
	@echo "                   'splib' iterative methods and preconditioners"
	@echo "                   'umfpack' - unsymmetric multifrontal sparse LU factorization"
	@echo "  <object file>  compile <object file>, where <object file> is one of FEAT2's"
	@echo "                   object files. (The object directory can be omitted). Those"
	@echo "                   modules <object file> depends on will be built if necessary"
	@echo "  link           force re-linking (do not bother whether any module needs "
	@echo "                   recompilation due to dependencies and/or time stamps)"
	@echo "  delete FILE=<object file>"
	@echo "                 removes <object file> from current object directory;"
	@echo "                   no need to remember or know the name of that directory"
	@echo ""
	@echo "Makefile variables that you might consider overwriting on the command line include:"
	@echo "  AGMG=<YES|NO>"
	@echo "                 whether to add AGMG support to the application"
	@echo "  APPNAME=<string>"
	@echo "                 application name"
	@echo "  MODE=<PARALLEL|SERIAL> (deprecated, use MPI=<YES|NO>)"
	@echo "                 whether to build parallel or serial version of application"
	@echo "  MONITOR_COMPILE_ENV=<NO|YES>"
	@echo "                 whether or not make should check path and modification dates"
	@echo "                   of compilers and compiler settings across multiple"
	@echo "                   compilation attempts"
	@echo "  MPI=<YES|NO>"
	@echo "                 whether to build a MPI or serial version of the application"
	@echo "  MPIWRAPPERS=<NO|YES>"
	@echo "                 whether or not to use MPI wrapper commands for compilation"
	@echo "  OPENMP=<YES|NO>"
	@echo "                 whether to add OpenMP support to the application"
	@echo "  OPT=<NO|YES|EXPENSIVE|NATIVE|NATIVE-EXPENSIVE>"
	@echo "                 whether to compile application without, with normal optimisation"
	@echo "                   or expensive optimisation flags and optionally auto-tuned for the"
	@echo "                   architecture of the build host. 'make OPT=NO' is equivalent to"
	@echo "                   'make debug'"
	@echo "  RELINK_ALWAYS=<NO|YES>"
	@echo "                 whether or not make should relink an application every time it"
	@echo "                   is invoked regardless whether a source file has changed"
	@echo ""


# For explanation see section 4.6 of GNU Make Manual,
# http://www.gnu.org/software/make/manual/make.html#Phony-Targets
.PHONY: all clean clean-app clean-libs debug default delete \
	help libs link purge purge-libs

# Relink binary every time make is invoked?
ifeq ($(strip $(RELINK_ALWAYS)),YES)
.PHONY: $(APPNAME)
endif

# Phony targets for all shortcuts
.PHONY: $(BUILDLIB:%=clean-%) $(BUILDLIB:%=purge-%)
