# $Id$
+#
+# Compatibility Make.global_options file
+#
+
+# TODO: Update this comment:
###############################################################################
## Please note:
## The ./configure script generates Make.global_options from
## doc/development/Makefile.
###############################################################################
-
-######################################################################
-# Since most of our makefiles at some ponit use bash features, choose
-# bash as default shell here once and for all
-SHELL=/bin/bash
-
-
-######################################################
-# the following lines will be replaced by the output
-# of ./configure
-
D = @CMAKE_INSTALL_PREFIX@
-
CXX = @CMAKE_CXX_COMPILER@
CXX-ID = @CMAKE_CXX_COMPILER_ID@
CXX-VERSION = @CMAKE_CXX_COMPILER_VERSION@
CC = @CMAKE_C_COMPILER@
CC-ID = @CMAKE_C_COMPILER_ID@
CC-VERSION = @CMAKE_C_COMPILER_VERSION@
-SHLIBLD = @SHLIBLD@
-SHLIBFLAGS = @SHLIBFLAGS@
-AR = @AR@
-RANLIB = @RANLIB@
-LDFLAGS = @LDFLAGS@
-F77 = @F77@
-F77-VERSION = @F77_VERSION@
-F77LIBS = @F77LIBS@
-LIBS = @LIBS@
-LIBDIR = $D/lib
-PERL = @PERL@
-QMAKE = @QMAKE@
-enable-threads = @enablethreads@
-enable-shared = @enableshared@
-enable-parser = @enableparser@
-DEAL_II_VERSION = @VERSION@
-DEAL_II_MAJOR = @DEAL_II_MAJOR@
-DEAL_II_MINOR = @DEAL_II_MINOR@
-
-USE_CONTRIB_PETSC = @USE_CONTRIB_PETSC@
-DEAL_II_PETSC_DIR = @DEAL_II_PETSC_DIR@
-DEAL_II_PETSC_ARCH = @DEAL_II_PETSC_ARCH@
-DEAL_II_PETSC_VERSION_MAJOR = @DEAL_II_PETSC_VERSION_MAJOR@
-DEAL_II_PETSC_VERSION_MINOR = @DEAL_II_PETSC_VERSION_MINOR@
-DEAL_II_PETSC_VERSION_SUBMINOR = @DEAL_II_PETSC_VERSION_SUBMINOR@
-DEAL_II_PETSC_VERSION_DEV = @DEAL_II_PETSC_VERSION_DEV@
-DEAL_II_PETSC_MPIUNI_LIB = @DEAL_II_PETSC_MPIUNI_LIB@
-
-USE_CONTRIB_SLEPC = @USE_CONTRIB_SLEPC@
-DEAL_II_SLEPC_DIR = @DEAL_II_SLEPC_DIR@
-DEAL_II_SLEPC_VERSION_MAJOR = @DEAL_II_SLEPC_VERSION_MAJOR@
-DEAL_II_SLEPC_VERSION_MINOR = @DEAL_II_SLEPC_VERSION_MINOR@
-DEAL_II_SLEPC_VERSION_SUBMINOR = @DEAL_II_SLEPC_VERSION_SUBMINOR@
-
-USE_CONTRIB_TRILINOS = @USE_CONTRIB_TRILINOS@
-DEAL_II_TRILINOS_INCDIR = @DEAL_II_TRILINOS_INCDIR@
-DEAL_II_TRILINOS_LIBDIR = @DEAL_II_TRILINOS_LIBDIR@
-DEAL_II_TRILINOS_SHARED = @DEAL_II_TRILINOS_SHARED@
-DEAL_II_TRILINOS_STATIC = @DEAL_II_TRILINOS_STATIC@
-DEAL_II_TRILINOS_VERSION_MAJOR = @DEAL_II_TRILINOS_VERSION_MAJOR@
-DEAL_II_TRILINOS_VERSION_MINOR = @DEAL_II_TRILINOS_VERSION_MINOR@
-DEAL_II_TRILINOS_VERSION_SUBMINOR = @DEAL_II_TRILINOS_VERSION_SUBMINOR@
-DEAL_II_TRILINOS_LIBPREFIX = @DEAL_II_TRILINOS_LIBPREFIX@
-
-USE_CONTRIB_HDF5 = @USE_CONTRIB_HDF5@
-DEAL_II_HDF5_VERSION = @DEAL_II_HDF5_VERSION@
-DEAL_II_HDF5_CFLAGS = @DEAL_II_HDF5_CFLAGS@
-DEAL_II_HDF5_CPPFLAGS = @DEAL_II_HDF5_CPPFLAGS@
-DEAL_II_HDF5_LDFLAGS = @DEAL_II_HDF5_LDFLAGS@
-DEAL_II_HDF5_INCDIR = @DEAL_II_HDF5_INCDIR@
-
-USE_CONTRIB_BLAS = @USE_CONTRIB_BLAS@
-USE_CONTRIB_LAPACK = @USE_CONTRIB_LAPACK@
-
-USE_CONTRIB_MUMPS = @USE_CONTRIB_MUMPS@
-DEAL_II_MUMPS_DIR = @DEAL_II_MUMPS_DIR@
-DEAL_II_SCALAPACK_DIR = @DEAL_II_SCALAPACK_DIR@
-DEAL_II_BLACS_DIR = @DEAL_II_BLACS_DIR@
-DEAL_II_BLACS_ARCH = @DEAL_II_BLACS_ARCH@
+AR = @CMAKE_AR@
+RANLIB = @CMAKE_RANLIB@
+LDFLAGS = @CMAKE_SHARED_LINKER_FLAGS@
-USE_CONTRIB_ARPACK = @USE_CONTRIB_ARPACK@
-DEAL_II_ARPACK_DIR = @DEAL_II_ARPACK_DIR@
-DEAL_II_ARPACK_ARCH = @DEAL_II_ARPACK_ARCH@
+#LIBS = @LIBS@ # TODO
-USE_CONTRIB_METIS = @USE_CONTRIB_METIS@
-DEAL_II_METIS_DIR = @DEAL_II_METIS_DIR@
-DEAL_II_METIS_LIBDIR = @DEAL_II_METIS_LIBDIR@
-DEAL_II_METIS_INCDIR = @DEAL_II_METIS_INCDIR@
+LIBDIR = @CMAKE_INSTALL_PREFIX@/@DEAL_II_LIBRARY_RELDIR@
-USE_CONTRIB_HSL = @USE_CONTRIB_HSL@
-USE_CONTRIB_UMFPACK = @USE_CONTRIB_UMFPACK@
-
-USE_CONTRIB_P4EST = @USE_CONTRIB_P4EST@
-DEAL_II_P4EST_DIR = @DEAL_II_P4EST_DIR@
-DEAL_II_P4EST_LIBDIR_NAME = @DEAL_II_P4EST_LIBDIR_NAME@
+enable-threads = @MAKEFILE_enablethreads@
+enable-shared = @MAKEFILE_enableshared@
+enable-parser = @MAKEFILE_enableparser@
+DEAL_II_VERSION = @VERSION@
+DEAL_II_MAJOR = @DEAL_II_MAJOR@
+DEAL_II_MINOR = @DEAL_II_MINOR@
DEAL_II_USE_MPI = @DEAL_II_USE_MPI@
-TARGET = @target@
+#TARGET = @target@ # TODO
######################################################
# now configuration for compiler flags, paths, etc
LIBPATH += $(addprefix -L,$(LIBDIR))
-static-lib-suffix = @static_lib_suffix@
-shared-lib-suffix = @shared_lib_suffix@
+static-lib-suffix = @CMAKE_STATIC_LIBRARY_SUFFIX@
+shared-lib-suffix = @CMAKE_SHARED_LIBRARY_SUFFIX@
ifeq ($(enable-shared),yes)
lib-suffix = $(shared-lib-suffix)
vpath %@static_lib_suffix@ $(LIBDIR)
vpath %@shared_lib_suffix@ $(LIBDIR)
-OBJEXT = @OBJEXT@
-EXEEXT = @EXEEXT@
-
-# dealing with shared libraries
-ifeq ($(shared-lib-suffix),.so)
- DEAL_II_SHLIB_NAME = lib$(1)$(shared-lib-suffix).$(DEAL_II_VERSION)
-else
- DEAL_II_SHLIB_NAME = lib$(1).$(DEAL_II_VERSION)$(shared-lib-suffix)
-endif
-
-ifeq (@DEAL_II_LD_UNDERSTANDS_SONAME@,yes)
- DEAL_II_ADD_SONAME = -Wl,-soname,$(call DEAL_II_SHLIB_NAME,$(1))
-else
- ifeq (@DEAL_II_LD_UNDERSTANDS_DYLIB_INSTALL_NAME@,yes)
- DEAL_II_ADD_SONAME = -Wl,-dynamic,-install_name -Wl,$(call DEAL_II_SHLIB_NAME,$(1))
- else
- DEAL_II_ADD_SONAME =
- endif
-endif
-
-ifeq (@DEAL_II_LD_UNDERSTANDS_RPATH@,yes)
- DEAL_II_RPATH = -Wl,-rpath,$1
-else
- DEAL_II_RPATH =
-endif
-
-
-# since the PETSc libs are called the same for both debug and
-# optimized mode, we have to have a trick to let the executable
-# know which ones are the right (since apparently LD_LIBRARY_PATH
-# can't do the trick unless you want to reset it every time
-# you switch from debug to optimized mode). To avoid messing with
-# -Wl,-rpath in our linker flags, we create one convenience library
-# for all PETSc libraries in our own lib directory, and have this one
-# twiddle with whatever is necessary to link in PETSc. This is only
-# used for PETSc <=3.0. After this version, PETSc creates one library
-# we can link to directly. This avoids problems with recent versions
-# of gcc.
-ifeq ($(USE_CONTRIB_PETSC),yes)
- lib-contrib-petsc-path.g = $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib
- lib-contrib-petsc-path.o = $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib
-
- ifeq ($(enable-shared),yes)
- # Starting with PETSc versions 3.0.0:
- ifeq ($(DEAL_II_PETSC_VERSION_MAJOR)$(DEAL_II_PETSC_VERSION_MINOR),30)
- lib-contrib-petsc.g = $(shell echo $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib/*$(lib-suffix))
- lib-contrib-petsc.o = $(shell echo $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib/*$(lib-suffix))
- else
- # but after that (petsc-3.1++), we can use the simpler PETSc
- # default "--with-single-library=1" like this:
- lib-contrib-petsc.g = $(shell echo $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib/libpetsc$(lib-suffix))
- lib-contrib-petsc.o = $(shell echo $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/lib/libpetsc$(lib-suffix))
- endif
- else
- # and finally this goes for static libraries
- lib-contrib-petsc.g = $(LIBDIR)/libpetscall.g$(lib-suffix)
- lib-contrib-petsc.o = $(LIBDIR)/libpetscall$(lib-suffix)
- endif
-endif # USE_CONTRIB_PETSC
-
-ifeq ($(USE_CONTRIB_SLEPC),yes)
- lib-contrib-slepc = $(DEAL_II_SLEPC_DIR)/$(DEAL_II_PETSC_ARCH)/lib/libslepc$(lib-suffix)
-endif
-
-# same for metis, except that there is only one library in that case
-ifeq ($(USE_CONTRIB_METIS),yes)
- lib-contrib-metis = $(DEAL_II_METIS_LIBDIR)/libmetis$(lib-suffix)
-endif
-
-# List all trilinos libraries that we want to link with. These must be sorted
-# in dependency order for linking. Fortunately, we can get the set of
-# libraries from Trilinos's cmake files in aclocal.m4.
-ifeq ($(USE_CONTRIB_TRILINOS),yes)
- DEAL_II_TRILINOS_LIBS = $(addprefix $(DEAL_II_TRILINOS_LIBPREFIX), @DEAL_II_TRILINOS_LIBS@)
-
- ifeq ($(enable-shared),yes)
- lib-contrib-trilinos = \
- $(addsuffix $(shared-lib-suffix), $(addprefix $(DEAL_II_TRILINOS_LIBDIR)/lib, \
- $(DEAL_II_TRILINOS_LIBS)))
- else
- lib-contrib-trilinos = \
- $(addsuffix $(static-lib-suffix), $(addprefix $(DEAL_II_TRILINOS_LIBDIR)/lib, \
- $(DEAL_II_TRILINOS_LIBS)))
- endif
-endif
-
-# Using dealii with MUMPS means we need to link the MUMPS library as
-# well as bumping in its dependencies, ie, SCALAPCK and BLACS
-ifeq ($(USE_CONTRIB_MUMPS),yes)
- lib-contrib-mumps = $(DEAL_II_MUMPS_DIR)/lib/libdmumps.a \
- $(DEAL_II_MUMPS_DIR)/lib/libmumps_common.a \
- $(DEAL_II_MUMPS_DIR)/lib/libpord.a
- lib-contrib-mumps += $(DEAL_II_SCALAPACK_DIR)/libscalapack.a
- lib-contrib-mumps += $(DEAL_II_BLACS_DIR)/LIB/blacsCinit_$(DEAL_II_BLACS_ARCH).a \
- $(DEAL_II_BLACS_DIR)/LIB/blacsF77init_$(DEAL_II_BLACS_ARCH).a \
- $(DEAL_II_BLACS_DIR)/LIB/blacs_$(DEAL_II_BLACS_ARCH).a
-endif
-
-# Using dealii with ARPACK simply means adding the libarpack library
-# with the right name
-ifeq ($(USE_CONTRIB_ARPACK),yes)
- lib-contrib-arpack = $(DEAL_II_ARPACK_DIR)/libarpack_$(DEAL_II_ARPACK_ARCH).a
-endif
+OBJEXT = @CMAKE_CXX_OUTPUT_EXTENSION@
+EXEEXT = @EXEEXT@ # TODO
-# deal with HSL; this should have been $(lib-contrib-hsl) but for a long time we
-# accidentally had $(lib-hsl) -- so we simply make both symbols available
-ifeq ($(USE_CONTRIB_HSL),yes)
- lib-hsl = $(LIBDIR)/libhsl$(lib-suffix)
- lib-contrib-hsl = $(lib-hsl)
-endif
-# need to link with libtbb if we're using threads
-ifeq ($(enable-threads),yes)
- lib-contrib-tbb.g = $D/lib/libtbb_debug$(shared-lib-suffix)
- lib-contrib-tbb.o = $D/lib/libtbb$(shared-lib-suffix)
-endif
# set paths to all the libraries we need:
-lib-deal2.o = $(LIBDIR)/libdeal_II$(lib-suffix) \
- $(lib-contrib-trilinos) \
- $(lib-hsl) \
- $(lib-contrib-petsc.o) $(DEAL_II_PETSC_MPIUNI_LIB) \
- $(lib-contrib-slepc) \
- $(lib-contrib-mumps) \
- $(lib-contrib-metis) \
- $(lib-contrib-tbb.o)
-lib-deal2.g = $(LIBDIR)/libdeal_II.g$(lib-suffix) \
- $(lib-contrib-trilinos) \
- $(lib-hsl) \
- $(lib-contrib-petsc.g) $(DEAL_II_PETSC_MPIUNI_LIB) \
- $(lib-contrib-slepc) \
- $(lib-contrib-mumps) \
- $(lib-contrib-metis) \
- $(lib-contrib-tbb.g)
-
-# include paths. do not take into account a possibly existing
-# environment variable, since the compiler will evaluate the value of
-# that anyway at compile time
-include-path-petsc = $(DEAL_II_PETSC_DIR)/include
-include-path-petsc-bmake = $(DEAL_II_PETSC_DIR)/$(DEAL_II_PETSC_ARCH)/include
-include-path-slepc = $(DEAL_II_SLEPC_DIR)/include
-include-path-slepc-bmake = $(DEAL_II_SLEPC_DIR)/$(DEAL_II_PETSC_ARCH)/include
-include-path-slepc-conf = $(DEAL_II_SLEPC_DIR)/$(DEAL_II_PETSC_ARCH)/conf
-include-path-trilinos = $(DEAL_II_TRILINOS_INCDIR)
-include-path-mumps = $(DEAL_II_MUMPS_DIR)/include
-include-path-metis = $(DEAL_II_METIS_INCDIR)
-include-path-hdf5 = $(DEAL_II_HDF5_INCDIR)
-
-
-# include paths as command line flags. while compilers allow a space between
-# the '-I' and the actual path, we also send these flags to the
-# make_dependencies program that doesn't support the extra space.
-#
-# post 7.0 we use #include <deal.II/...> instead of just #include <...>
-# but by providing two -I directives we can have it both ways.
-INCLUDE = -I$D/include \
- -I$D/include/deal.II \
- @CPPFLAGS@ @TECPLOT_INCLUDE_DIR@ \
- @UMFPACK_INCLUDE_DIR@ @HSL_INCLUDE_DIR@ \
- -I$D/contrib \
- -I$D/include
-
-# add PETSc, SLEPSc, and Trilinos include paths if necessary. this rule
-# (and the one further down below to get correct flags) should eventually
-# be replaced by something where we do not blindly include PETSc make files
-# (and thus import all of its variables), but rather set up a scheme to
-# extract these values upon configuration
-#
-# also, note that this only works for PETSc before 2.3 :-]
-ifeq ($(USE_CONTRIB_PETSC),yes)
- INCLUDE += -I$(include-path-petsc) \
- -I$(include-path-petsc-bmake) \
- $(MPI_INCLUDE)
-endif
+lib-deal2.o = ${MAKEFILE_EXTERNAL_LIBRARIES}
+lib-deal2.g = ${MAKEFILE_EXTERNAL_LIBRARIES}
-ifeq ($(USE_CONTRIB_SLEPC),yes)
- INCLUDE += -I$(include-path-slepc) \
- -I$(include-path-slepc-bmake) \
- -I$(include-path-slepc-conf)
-endif
-
-ifeq ($(USE_CONTRIB_TRILINOS),yes)
- INCLUDE += -I$(include-path-trilinos)
-endif
-
-ifeq ($(USE_CONTRIB_MUMPS),yes)
- INCLUDE += -I$(include-path-mumps)
-endif
-
-ifeq ($(USE_CONTRIB_METIS),yes)
- INCLUDE += -I$(include-path-metis)
-endif
-
-ifeq ($(USE_CONTRIB_HDF5),yes)
- INCLUDE += -I$(include-path-hdf5)
-endif
+# necessary includes:
+INCLUDE = ${MAKEFILE_EXTERNAL_INCLUDES}
-ifeq ($(enable-threads),yes)
- INCLUDE += -I$(shell echo $D/contrib/tbb/tbb*/include)
-endif
# compiler flags for debug and optimized mode
-CXXFLAGS.g = @DEFS@ @CXXFLAGSG@ $(INCLUDE)
-CXXFLAGS.o = @DEFS@ @CXXFLAGSO@ $(INCLUDE)
+CXXFLAGS.g = @CMAKE_CXX_FLAGS@ @CMAKE_CXX_FLAGS_DEBUG@ @MAKEFILE_EXTERNAL_DEFINITIONS@ $(INCLUDE)
+CXXFLAGS.o = @CMAKE_CXX_FLAGS@ @CMAKE_CXX_FLAGS_RELEASE@ @MAKEFILE_EXTERNAL_DEFINITIONS@ $(INCLUDE)
-F77FLAGS.g = @DEFS@ @F77FLAGSG@ $(INCLUDE)
-F77FLAGS.o = @DEFS@ @F77FLAGSO@ $(INCLUDE)
# compile flags for C compiler
-CFLAGS.g = @CFLAGSG@
-CFLAGS.o = @CFLAGSO@
-
-# if in debug mode, add TBB assertions
-ifeq ($(enable-threads),yes)
- CXXFLAGS.g += -DTBB_DO_ASSERT=1
-endif
-
-
-# PETSc wants to see a whole lot of other flags being passed...
-ifeq ($(USE_CONTRIB_PETSC),yes)
- # set PETSC_DIR and PETSC_ARCH to be used in variables file
- PETSC_DIR = $(DEAL_II_PETSC_DIR)
- PETSC_ARCH = $(DEAL_II_PETSC_ARCH)
+CFLAGS.g = @CMAKE_C_FLAGS@ @CMAKE_C_FLAGS_DEBUG@ @MAKEFILE_EXTERNAL_DEFINITIONS@
+CFLAGS.o = @CMAKE_C_FLAGS@ @CMAKE_C_FLAGS_RELEASE@ @MAKEFILE_EXTERNAL_DEFINITIONS@
- # PETSC's $(PETSC_ARCH)/conf/petscvariables include file happens
- # to have a variable $(CXX) of itself. we need to save our own
- # variable and restore it later. this isn't pretty :-(
- SAVE_CXX := $(CXX)
- include $(DEAL_II_PETSC_DIR)/conf/variables
- CXX := $(SAVE_CXX)
-
- CXXFLAGS.g += $(GCXX_PETSCFLAGS)
- CXXFLAGS.o += $(OCXX_PETSCFLAGS)
-endif
-
-ifeq ($(USE_CONTRIB_HDF5),yes)
- CFLAGS.g += $(DEAL_II_HDF5_CFLAGS)
- CFLAGS.o += $(DEAL_II_HDF5_CFLAGS)
- CXXFLAGS.g += $(DEAL_II_HDF5_CXXFLAGS)
- CXXFLAGS.o += $(DEAL_II_HDF5_CXXFLAGS)
-endif
ifneq ($(enable-threads),no)
MT = MT