//
// Geant4 Web page document
/* http://geant4.web.cern.ch/geant4/G4UsersDocuments/UsersGuides/ForApplicationDeveloper/html/Appendix/makeFile.htm

G4INSTALL G4INSTALL/lib
G4WORKDIR G4WORKDIR/tmp ,,/bin

We recommend _not_ to override (explicitly or by accident) those environment variables listed here and marked with (!).

* System configuration

      $CLHEP_BASE_DIR
      Specifies the path where the CLHEP package is installed in your system.

      $G4SYSTEM (!)
      Defines the architecture and compiler currently used. This variable should be set automatically by the installer script "g4install" (in case of installation of Geant4) or by the script "g4config" (in case of pre-installed Geant4 and initial configuration of the user's environment).

      * Installation paths

      $G4INSTALL
      Defines the path where the Geant4 toolkit should be installed. It should be set by the system installer. By default, it sets to $HOME/geant4, assuming the Geant4 distribution is placed in $HOME.

      $G4BASE (!)
      Defines the path to the source code. Internally used to define $CPPFLAGS and $LDFLAGS for -I and -L directives. It has to be set to $G4INSTALL/src.

      $G4WORKDIR
      Defines the path for the user's workdir for Geant4. It is set by default to $HOME/geant4, assuming the user's working directory for Geant4 is placed in $HOME.

      $G4INCLUDE
      Defines the path where source header files may be mirrored at installation by issuing gmake includes (default is set to $G4INSTALL/include)

      *

$G4BIN, $G4BINDIR (!)
Used by the system to specify the place where to store executables. By default they're set to $G4WORKDIR/bin and $G4BIN/$G4SYSTEM respectively. The path to $G4WORKDIR/bin/$G4SYSTEM should be added to $PATH in the user environment. $G4BIN can be overridden.

$G4TMP, $G4TMPDIR (!)
Used by the system to specify the place where to store temporary files products of the compilation/build of a user application or test. By default they're set to $G4WORKDIR/tmp and $G4TMP/$G4SYSTEM respectively. $G4TMP can be overridden.

$G4LIB, $G4LIBDIR (!)
Used by the system to specify the place where to store libraries. By default they're set to $G4INSTALL/lib and $G4LIB/$G4SYSTEM respectively. $G4LIB can be overridden.

* Build specific

$G4TARGET
Specifies the target (name of the source file defining the main()) of the application/example to be built. This variable is set automatically for the examples and tests placed in $G4INSTALL/examples.

$G4EXEC_BUILD
Flag specifying if to use a secondary template repository or not for handling template instantiations at the time of building a user application/example. For internal category tests in Geant4, this variable is already in the related GNUmakefile. It's however not needed for examples and tests in $G4INSTALL/examples, where class names are already mangled and different each other. It applies only on those compilers which make use of template repositories (see Appendix A.2 of this Guide). The secondary template repository is set to $G4TREP/exec.

$G4DEBUG
Specifies to compile the code (libraries or examples) including symbolic information in the object code for debugging. The size of the generated object code can increase considerably. By default, code is compiled in optimised mode ($G4OPTIMISE set).
*

      $G4NO_OPTIMISE
      Specifies to compile the code (libraries or examples) without compiler optimisation.

      $G4NO_STD_NAMESPACE
      To avoid using the std namespace in the Geant4 libraries.

      $G4NO_STD_EXCEPTIONS
      To avoid throwing of exceptions in Geant4.

      $G4_NO_VERBOSE
      Geant4 code is compiled by default in high verbosity mode ($G4VERBOSE flag set). For better performance, verbosity code can be left out by defining $G4_NO_VERBOSE.

      $G4LIB_BUILD_SHARED
      Flag specifying if to build kernel libraries as shared libraries (libraries will be then used by default). If not set, static archive libraries are built by default.

      $G4LIB_BUILD_STATIC
      Flag specifying if to build kernel libraries as static archive libraries in addition to shared libraries (in case $G4LIB_BUILD_SHARED is set as well).

      $G4LIB_USE_GRANULAR
      To force usage of "granular" libraries against "compound" libraries at link time in case both have been installed. The Geant4 building system chooses "compound" libraries by default, if installed.

      *

      G4UI_USE_TERMINAL
      Specifies to use dumb terminal interface in the application to be built (default).

      G4UI_BUILD_XM_SESSION, G4UI_BUILD_XAW_SESSION
      Specifies to include in kernel library the XM or XAW Motif-based user interfaces.

      G4UI_USE_XM, G4UI_USE_XAW
      Specifies to use the XM or XAW interfaces in the application to be built.

      G4UI_BUILD_WO_SESSION, G4UI_USE_WO
      Specifies to use the WO user interface associated to the OPACS tool.

      G4UI_BUILD_WIN32_SESSION
      Specifies to include in kernel library the WIN32 terminal interface for Windows systems.

      G4UI_USE_WIN32
      Specifies to use the WIN32 interfaces in the application to be built on Windows systems.

      G4UI_NONE
      If set, no UI sessions nor any UI libraries are built. This can be useful when running a pure batch job or in a user framework having its own UI system.

      * Visualization specific

      The most relevant flags for visualization graphics drivers are just listed here. A description of these variables is given also in section 2. of this User's Guide.

      $G4VIS_BUILD_OPENGLX_DRIVER
      Specifies to build kernel library for visualization including the OpenGL driver with X11 extension. It requires $OGLHOME set (path to OpenGL installation).

 $G4VIS_USE_OPENGLX
Specifies to use OpenGL graphics with X11 extension in the application to be built.

$G4VIS_BUILD_OPENGLXM_DRIVER
Specifies to build kernel library for visualization including the OpenGL driver with XM extension. It requires $OGLHOME set (path to OpenGL installation).

$G4VIS_USE_OPENGLXM
Specifies to use OpenGL graphics with XM extension in the application to be built.

$G4VIS_BUILD_OI_DRIVER
Specifies to build kernel library for visualization including the OpenInventor driver. It requires $OIHOME and $HEPVISDIR set (paths to OpenInventor/HepVis installation).

$G4VIS_USE_OI
Specifies to use OpenInventor graphics in the application to be built.

$G4VIS_BUILD_OIX_DRIVER
Specifies to build the driver for the free X11 version of OpenInventor.

$G4VIS_USE_OIX
Specifies to use the free X11 version of OpenInventor.

$G4VIS_BUILD_OIWIN32_DRIVER
Specifies to build the driver for the free X11 version of OpenInventor on Windows systems.

$G4VIS_USE_OIWIN32
Specifies to use the free X11 version of OpenInventor on Windows systems.
*

      $G4VIS_BUILD_OPACS_DRIVER
      Specifies to build kernel library for visualization including the OPACS driver. It requires $OPACSHOME set (path to OPACS installation).

      $G4VIS_USE_OPACS
      Specifies to use OpenInventor graphics in the application to be built.

      $G4VIS_BUILD_DAWN_DRIVER
      Specifies to build kernel library for visualization including the driver for DAWN.

      $G4VIS_USE_DAWN
      Specifies to use DAWN as a possible graphics renderer in the application to be built.

      $G4DAWN_HOST_NAME
      To specify the hostname for use with the DAWN-network driver.

      $G4VIS_NONE
      If specified, no visualization drivers will be built or used.

      * Analysis specific

      $G4ANALYSIS_USE
      Specifies to activate the appropriate environment for analysis, if an application includes code for histogramming based on AIDA. Additional setup variables are required ($G4ANALYSIS_AIDA_CONFIG_CFLAGS, $G4ANALYSIS_AIDA_CONFIG_LIBS) to define config options for AIDA ("aida-config --cflags" and "aida-config --libs"). See installation instructions of the specific analysis tools for details.

      * Directory paths to Physics Data

      *

      $NeutronHPCrossSections
      Path to external data set for Neutron Scaterring processes.

      $G4LEDATA
      Path to external data set for low energy electromagnetic processes.

      $G4LEVELGAMMADATA
      Path to the data set for Photon Evaporation.

      $G4RADIOACTIVEDATA
      Path to the data set for Radiative Decay processes.



