# -*- mode: makefile -*-
#
# Makefile containing library dependencies

ifeq ($(PLATFORM),win32)

HISTLIBDEP          = $(MATRIXLIB)
HISTLIBEXTRA        = lib/libMatrix.lib
GRAFLIBDEP          = $(HISTLIB) $(MATRIXLIB)
GRAFLIBEXTRA        = lib/libHist.lib lib/libMatrix.lib
GPADLIBDEP          = $(GRAFLIB) $(HISTLIB)
GPADLIBEXTRA        = lib/libGraf.lib lib/libHist.lib
G3DLIBDEP           = $(GRAFLIB) $(HISTLIB)
G3DLIBEXTRA         = lib/libGraf.lib lib/libHist.lib
ifeq ($(ARCH),win32gdk)
WIN32GDKLIBDEP      = $(GPADLIB) $(GRAFLIB) $(GDKDLLS) $(GDKLIBS)
WIN32GDKLIBEXTRA    = lib/libGpad.lib lib/libGraf.lib $(GDKLIBS) Glu32.lib \
                      Opengl32.lib
else
WIN32LIBDEP         = $(GPADLIB) $(GRAFLIB)
WIN32LIBEXTRA       = lib/libGpad.lib lib/libGraf.lib
endif
GEDLIBDEP           = $(HISTLIB) $(GPADLIB) $(GRAFLIB) $(GUILIB)
GEDLIBEXTRA         = lib/libHist.lib lib/libGpad.lib lib/libGraf.lib \
                      lib/libGui.lib
GEDOLDLIBDEP        = $(GPADLIB) $(GRAFLIB)
GEDOLDLIBEXTRA      = lib/libGpad.lib lib/libGraf.lib
GUILIBDEP           = $(GPADLIB) $(GRAFLIB)
GUILIBEXTRA         = lib/libGpad.lib lib/libGraf.lib
HISTPAINTERLIBDEP   = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
HISTPAINTERLIBEXTRA = lib/libGraf.lib lib/libHist.lib lib/libMatrix.lib
HTMLLIBDEP          = $(GRAFLIB)
HTMLLIBEXTRA        = lib/libGraf.lib
MINUITLIBDEP        = $(GRAFLIB) $(HISTLIB)
MINUITLIBEXTRA      = lib/libGraf.lib lib/libHist.lib
FUMILILIBDEP        = $(GRAFLIB) $(HISTLIB)
FUMILILIBEXTRA      = lib/libGraf.lib lib/libHist.lib
PROOFLIBDEP         = $(TREELIB) $(HISTLIB)
PROOFLIBEXTRA       = lib/libTree.lib lib/libHist.lib
PROOFGUILIBDEP      = $(PROOFLIB) $(GUILIB)
PROOFGUILIBEXTRA    = lib/libProof.lib lib/libGui.lib
TREEPLAYERLIBDEP    = $(TREELIB) $(G3DLIB) $(GRAFLIB) $(HISTLIB)
TREEPLAYERLIBEXTRA  = lib/libTree.lib lib/libGraf3d.lib \
                      lib/libGraf.lib lib/libHist.lib
TREEVIEWERLIBDEP    = $(TREELIB) $(GPADLIB) $(GRAFLIB) $(HISTLIB) $(GUILIB)
TREEVIEWERLIBEXTRA  = lib/libTree.lib lib/libGpad.lib lib/libGraf.lib \
                      lib/libHist.lib lib/libGui.lib
EGLIBDEP            = $(G3DLIB) $(GRAFLIB)
EGLIBEXTRA          = lib/libGraf3d.lib lib/libGraf.lib
VMCLIBDEP           = $(EGLIB) $(GEOMLIB)
VMCLIBEXTRA         = lib/libEG.lib lib/libGeom.lib
PHYSICSLIBDEP       = $(MATRIXLIB)
PHYSICSLIBEXTRA     = lib/libMatrix.lib
PYTHIALIBDEP        = $(EGLIB) $(GRAFLIB)
PYTHIALIBEXTRA      = lib/libEG.lib lib/libGraf.lib \
                      $(FPYTHIALIBDIR) $(FPYTHIALIB)
PYTHIA6LIBDEP       = $(EGLIB) $(GRAFLIB)
PYTHIA6LIBEXTRA     = lib/libEG.lib lib/libGraf.lib \
                      $(FPYTHIA6LIBDIR) $(FPYTHIA6LIB)
VENUSLIBDEP         = $(EGLIB)
VENUSLIBEXTRA       = lib/libEG.lib $(FVENUSLIBDIR) $(FVENUSLIB)
TABLELIBDEP         = $(TREELIB) $(GPADLIB) $(G3DLIB) $(GRAFLIB) $(HISTLIB)
TABLELIBEXTRA       = lib/libTree.lib lib/libGpad.lib \
                      lib/libGraf3d.lib lib/libGraf.lib lib/libHist.lib
MLPLIBDEP           = $(HISTLIB) $(MATRIXLIB) $(TREELIB) $(GRAFLIB) \
                      $(GPADLIB) $(TREEPLAYERLIB)
MLPLIBEXTRA         = lib/libHist.lib lib/libMatrix.lib lib/libTree.lib \
                      lib/libGraf.lib lib/libGpad.lib lib/libTreePlayer.lib
ifeq ($(ARCH),win32gdk)
GLLIBDEP            = $(G3DLIB) $(GUILIB)
GLLIBEXTRA          = lib/libGraf3d.lib lib/libGui.lib
else
GLLIBDEP            = $(G3DLIB) $(WIN32LIB)
GLLIBEXTRA          = lib/libGraf3d.lib lib/libWin32.lib Glu32.lib Opengl32.lib
endif
HBOOKLIBDEP         = $(HISTLIB) $(MATRIXLIB) $(TREELIB) $(GRAFLIB) \
                      $(TREEPLAYERLIB)
HBOOKLIBEXTRA       = lib/libHist.lib lib/libMatrix.lib lib/libTree.lib \
                      lib/libGraf.lib lib/libTreePlayer.lib
GEOMPAINTERLIBDEP   = $(GEOMLIB) $(TREELIB) $(G3DLIB) $(HISTLIB)
GEOMPAINTERLIBEXTRA = lib/libGeom.lib lib/libTree.lib lib/libGraf3d.lib \
                      lib/libHist.lib
RFIOLIBEXTRA        = WSock32.lib Ws2_32.lib
QTROOTLIBDEP        = $(GQTLIB) $(GUILIB)
QTROOTLIBEXTRA      = lib/libGQt.lib lib/libGui.lib $(QTLIB)
QTGUILIBDEP         = $(GRAFLIB) $(GPADLIB) $(GQTLIB) $(GUILIB)
QTGUILIBEXTRA       = lib/libGraf.lib lib/libGpad.lib lib/libGQt.lib \
                      lib/libGui.lib $(QTLIB)

else

HISTLIBDEP          = $(MATRIXLIB)
HISTLIBEXTRA        = -Llib -lMatrix
GRAFLIBDEP          = $(HISTLIB) $(MATRIXLIB)
GRAFLIBEXTRA        = -Llib -lHist -lMatrix
GPADLIBDEP          = $(GRAFLIB) $(HISTLIB)
GPADLIBEXTRA        = -Llib -lGraf -lHist
G3DLIBDEP           = $(GRAFLIB) $(HISTLIB)
G3DLIBEXTRA         = -Llib -lGraf -lHist
GEDLIBDEP           = $(HISTLIB) $(GPADLIB) $(GRAFLIB) $(GUILIB)
GEDLIBEXTRA         = -Llib -lHist -lGpad -lGraf -lGui
GEDOLDLIBDEP        = $(GPADLIB) $(GRAFLIB)
GEDOLDLIBEXTRA      = -Llib -lGpad -lGraf
GUILIBDEP           = $(GPADLIB) $(GRAFLIB)
GUILIBEXTRA        := -Llib -lGpad -lGraf $(GUILIBEXTRA)
HISTPAINTERLIBDEP   = $(GRAFLIB) $(HISTLIB) $(MATRIXLIB)
HISTPAINTERLIBEXTRA = -Llib -lGraf -lHist -lMatrix
HTMLLIBDEP          = $(GRAFLIB)
HTMLLIBEXTRA        = -Llib -lGraf
MINUITLIBDEP        = $(GRAFLIB) $(HISTLIB)
MINUITLIBEXTRA      = -Llib -lGraf -lHist
FUMILILIBDEP        = $(GRAFLIB) $(HISTLIB)
FUMILILIBEXTRA      = -Llib -lGraf -lHist
PROOFLIBDEP         = $(TREELIB) $(HISTLIB)
PROOFLIBEXTRA       = -Llib -lTree -lHist
PROOFGUILIBDEP      = $(PROOFLIB) $(GUILIB)
PROOFGUILIBEXTRA    = -Llib -lProof -lGui
TREEPLAYERLIBDEP    = $(TREELIB) $(G3DLIB) $(GRAFLIB) $(HISTLIB)
TREEPLAYERLIBEXTRA  = -Llib -lTree -lGraf3d -lGraf -lHist
TREEVIEWERLIBDEP    = $(TREELIB) $(GPADLIB) $(GRAFLIB) $(HISTLIB) $(GUILIB)
TREEVIEWERLIBEXTRA  = -Llib -lTree -lGpad -lGraf -lHist -lGui
X3DLIBDEP           = $(G3DLIB) $(GUILIB)
X3DLIBEXTRA         = -Llib -lGraf3d -lGui
EGLIBDEP            = $(G3DLIB) $(GRAFLIB)
EGLIBEXTRA          = -Llib -lGraf3d -lGraf
VMCLIBDEP           = $(EGLIB) $(GEOMLIB)
VMCLIBEXTRA         = -Llib -lEG -lGeom
PHYSICSLIBDEP       = $(MATRIXLIB)
PHYSICSLIBEXTRA     = -Llib -lMatrix
PYTHIALIBDEP        = $(EGLIB) $(GRAFLIB)
PYTHIALIBEXTRA      = -Llib -lEG -lGraf $(FPYTHIALIBDIR) $(FPYTHIALIB)
PYTHIA6LIBDEP       = $(EGLIB) $(GRAFLIB)
PYTHIA6LIBEXTRA     = -Llib -lEG -lGraf $(FPYTHIA6LIBDIR) $(FPYTHIA6LIB)
VENUSLIBDEP         = $(EGLIB)
VENUSLIBEXTRA       = -Llib -lEG $(FVENUSLIBDIR) $(FVENUSLIB)
X11TTFLIBDEP        = $(X11LIB) $(GRAFLIB)
X11TTFLIBEXTRA      = -Llib -lGX11 -lGraf
TABLELIBDEP         = $(TREELIB) $(GPADLIB) $(G3DLIB) $(GRAFLIB) $(HISTLIB)
TABLELIBEXTRA       = -Llib -lTree -lGpad -lGraf3d -lGraf -lHist
GLLIBDEP            = $(GPADLIB) $(G3DLIB) $(GUILIB)
GLLIBEXTRA         := -Llib -lGpad -lGraf3d -lGui $(GLLIBEXTRA)
HBOOKLIBDEP         = $(HISTLIB) $(MATRIXLIB) $(TREELIB) $(GRAFLIB) \
                      $(TREEPLAYERLIB)
HBOOKLIBEXTRA       = -Llib -lHist -lMatrix -lTree -lGraf -lTreePlayer
GEOMPAINTERLIBDEP   = $(GEOMLIB) $(TREELIB) $(G3DLIB) $(HISTLIB)
GEOMPAINTERLIBEXTRA = -Llib -lGeom -lTree -lGraf3d -lHist
ASIMAGELIBDEP       = $(GRAFLIB) $(HISTLIB) $(GPADLIB) $(GUILIB)
ASIMAGELIBEXTRA     = -Llib -lGraf -lHist -lGpad -lGui
THREADLIBDEP        = $(GPADLIB)
THREADLIBEXTRA      = -Llib -lGpad
MLPLIBDEP           = $(HISTLIB) $(MATRIXLIB) $(TREELIB) $(GRAFLIB) \
                      $(GPADLIB) $(TREEPLAYERLIB)
MLPLIBEXTRA         = -Llib -lHist -lMatrix -lTree -lGraf -lGpad -lTreePlayer
QTROOTLIBDEP        = $(GQTLIB) $(GUILIB)
QTROOTLIBEXTRA      = -Llib -lGQt -lGui $(QTLIB)
QTGUILIBDEP         = $(GRAFLIB) $(GPADLIB) $(GQTLIB) $(GUILIB)
QTGUILIBEXTRA       = -Llib -lGraf -lGpad -lGQt -lGui $(QTLIB)

endif
