The file common/Make.global_options
exports several
make variables to other Makefiles which
include it. You will want to include this file into the Makefiles of
your project to use the same compiler flags and to access the paths
to libraries. This page documents available
variables, documents the values which are used
in your local installation, and shows
generic Makefiles which you may want to use
in your own projects.
Following is a partial list of available variables which are exported to
other Makefiles. There are additional variables, in particular ones that
determine the interaction with other libraries such as PETSc, Trilinos,
METIS, etc; for details on these variables, take a look
at common/Make.global_options
.
D
Path to the deal.II library
CXX
Executable name of the C++ compiler
CC
Executable name of the C compiler, which is used to generate shared libraries
GXX-VERSION
Name and version of the C++ compiler. Possible
names presently include
gcc3.3
, gcc3.4
,
gcc4.0
, gcc4.1
, etc,
ibm_xlc
, MIPSpro
,
sun_workshop
, sun_forte
,
intel_icc5
, intel_icc6
,
intel_icc7
, compaq_cxx
, and
probably a few more as well. Not all of
these compilers are actually supported (see the
ReadMe file for a
list of supported compilers and platforms), it is only a list of
recognized compilers.
Note that the naming of this variable is historical (it
should read CXX-VERSION
), since
it is also used even if the compiler is not the GNU C++
compiler.
GXX-VERSION-DETAILED
Like GXX-VERSION, just that it may also contain the dot version number, for example gcc3.3.3.
CC-VERSION
Name and version of the CC compiler. Possible names are similar to the ones listed above.
F77
Executable name of the F77 compiler; often, no Fortran compiler is needed, in which case the variable may be empty if none was found
F77-VERSION
Name and version of the Fortran 77 compiler. Possible
names presently include egcs1.1
,
gcc2.95
, gcc2.96
,
gcc2.97
, gcc3.0
, SunF77
,
AIXF77
, MIPSproF77
;
there may be others in the future, if we have access to
other systems
SHLIBLD
Executable name of compiler that is used to link object files to shared libraries. This will usually be the C++ compiler.
enable-shared
Determines whether shared or static libraries are used.
In the former case it is set to yes
.
enable-threads
Determines whether multiple threads should be used or not.
In the former case it is set to yes
.
PERL
Executable name of the `perl' program
DEAL_II_MAJOR
Major version number of the deal.II library, i.e. the number before the first dot. Note that this version number is also available in programs through a preprocessor variable
DEAL_II_MINOR
Minor version number of the deal.II library, i.e. the number after the first dot; if there are further numbers, like in version 3.0.1, then they are discarded as these versions only fix bugs but do not change features. Note that this version number is also available in programs through a preprocessor variable
TARGET
The target triplet as returned by config.guess. For example, on the system where I write this, it is i686-pc-linux-gnu, but it may also be sparc-sun-solaris2.7, or whatever config.guess determines for your system.
LIBDIR
Path to the deal.II libraries.
LIBPATH
All the library paths (the deal.II libraries as well as other libraries we need to link with) prefixed by -L, i.e. the flags needed by the compiler to find the libraries when they are linked in. These -L paths are appended to what was in $(LIBPATH) before.
LIBS
Additional libraries to be linked in, such as Fortran support, or Tecplot libraries when binary output is available.
F77LIBS
Libraries to be linked in when we link with Fortran
files. These libraries are checked at configuration time,
and are included into $(LIBS)
when they are
actually needed
OBJEXT
Extension of object files. On unix, this is usually simply
o
, on Windows systems it is obj
.
EXEEXT
Extension of executables. On unix, this is usually the
empty string, on Windows systems it is .exe
.
static-lib-suffix
File extension of static libraries. Usually set to .a
shared-lib-suffix
File extension of shared libraries. If shared libraries
are supported, this suffix is usually .so
on unix-like
systems, but is .dylib
on Mac OS X
and .dll
on windows.
lib-suffix
File extension of libraries. Depending on the value of
enable-shared
, it is either set to
static-lib-suffix
or to
shared-lib-suffix
.
lib-deal2.o lib-deal2.g
Path and filename of the deal.II libraries.
INCLUDE
All include paths figured out by the configure
script are now included into the variable
$(INCLUDE)
(which include the compiler option
-I in front of each directory). They are also
automatically included in your compiler calls as soon as you use
$(CXXFLAGS.g)
or $(CXXFLAGS.o)
.
An exception to this rule are paths listed below. These are
added to the variable $(INCLUDE)
only during make.
include-path-contrib-petsc
include-path-contrib-petsc-bmake
If PETSc is used, then these variables have the paths to the usual PETSc include files and the PETSc architecture dependent include files. (See the ReadMe file for more information on installation of PETSC.)
include-path-contrib-metis
If METIS is used, then this variable has the path to the METIS include files. (See the ReadMe file for more information on installation of METIS.)
CXXFLAGS.g
C++ compiler flags for debug mode
CXXFLAGS.o
C++ compiler flags for optimized mode
CCFLAGS.g
C compiler flags for debug mode.
CCFLAGS.o
C compiler flags for optimized mode.
F77FLAGS.g
Fortran 77 compiler flags for debug mode
F77FLAGS.o
Fortran 77 compiler flags for optimized mode
LDFLAGS
General linker flags
common/Make.global_options
: