Skip to content
Snippets Groups Projects
Makefile 47.9 KiB
Newer Older
# Top level Makefile for ROOT System
# Copyright (c) 2000 Rene Brun and Fons Rademakers
#
# Author: Fons Rademakers, 29/2/2000


##### Include path/location macros (result of ./configure) #####
##### However, if we are building packages or cleaning,    #####
##### config/Makefile.config isn't made yet - the package  #####
##### scripts want's to make it them selves - so we don't  #####
ifeq ($(findstring $(MAKECMDGOALS), debian redhat),)
ifeq ($(MAKECMDGOALS),maintainer-clean)
-include config/Makefile.config
endif
ifeq ($(MAKECMDGOALS),clean)
include config/Makefile.config
endif
Rene Brun's avatar
Rene Brun committed
MAKE_VERSION_MAJOR := $(word 1,$(subst ., ,$(MAKE_VERSION)))
MAKE_VERSION_MINOR := $(shell echo $(word 2,$(subst ., ,$(MAKE_VERSION))) | \
Fons Rademakers's avatar
Fons Rademakers committed
                              sed 's/\([0-9][0-9]*\).*/\1/')
Rene Brun's avatar
Rene Brun committed
MAKE_VERSION_MAJOR ?= 0
MAKE_VERSION_MINOR ?= 0
Fons Rademakers's avatar
Fons Rademakers committed
ORDER_ := $(shell test $(MAKE_VERSION_MAJOR) -gt 3 || \
                  test $(MAKE_VERSION_MAJOR) -eq 3 && \
                  test $(MAKE_VERSION_MINOR) -ge 80 && echo '|')
Rene Brun's avatar
Rene Brun committed

##### Include compiler overrides specified via ./configure #####
##### However, if we are building packages or cleaning, we #####
##### don't include this file since it may screw up things #####
##### Included before Makefile.$ARCH only because of f77   #####
##### if case has to be processed                          #####

ifeq ($(findstring $(MAKECMDGOALS), maintainer-clean debian redhat),)
include config/Makefile.comp
endif
ifeq ($(MAKECMDGOALS),clean)
include config/Makefile.comp
endif

##### Include machine dependent macros                     #####
##### However, if we are building packages or cleaning, we #####
##### don't include this file since it may screw up things #####
ifndef ROOT_SRCDIR
$(error Please run ./configure again, the build system has been updated)
endif

ifeq ($(findstring $(MAKECMDGOALS), maintainer-clean debian redhat),)
include $(ROOT_SRCDIR)/config/Makefile.$(ARCH)
include $(ROOT_SRCDIR)/config/Makefile.$(ARCH)
##### Include compiler overrides specified via ./configure #####
##### However, if we are building packages or cleaning, we #####
##### don't include this file since it may screw up things #####
ifeq ($(findstring $(MAKECMDGOALS), maintainer-clean debian redhat),)
endif
ifeq ($(MAKECMDGOALS),clean)
include config/Makefile.comp
endif
##### Include library dependencies for explicit linking #####

MAKEFILEDEP = $(ROOT_SRCDIR)/config/Makefile.depend
##### Allow local macros #####

-include MyConfig.mk

##### Modules to build #####

MODULES       = build cint/cint core/metautils core/pcre core/clib core/utils \
                core/base core/cont core/meta io/io math/mathcore net/net \
                core/zip core/thread math/matrix core/newdelete hist/hist \
                tree/tree graf2d/freetype graf2d/graf graf2d/gpad graf3d/g3d \
Rene Brun's avatar
Rene Brun committed
                gui/gui math/minuit hist/histpainter tree/treeplayer \
                gui/ged tree/treeviewer math/physics graf2d/postscript \
                geom/geom geom/geompainter montecarlo/vmc \
                math/fumili math/mlp math/quadp net/auth gui/guibuilder io/xml \
Fons Rademakers's avatar
Fons Rademakers committed
                math/foam math/splot math/smatrix io/sql \
                geom/geombuilder hist/spectrum hist/spectrumpainter \
                gui/fitpanel proof/proof proof/proofplayer \
Rene Brun's avatar
Rene Brun committed
                gui/sessionviewer gui/guihtml gui/recorder
MODULES      += core/winnt graf2d/win32gdk
Fons Rademakers's avatar
Fons Rademakers committed
MODULES      := $(filter-out core/newdelete,$(MODULES))
SYSTEMO       = $(WINNTO)
SYSTEMDO      = $(WINNTDO)
else
SYSTEMO       = $(UNIXO)
SYSTEMDO      = $(UNIXDO)
else
SYSTEMO       = $(UNIXO)
SYSTEMDO      = $(UNIXDO)
endif
ifeq ($(BUILDX11),yes)
MODULES      += graf2d/x11 graf2d/x11ttf graf3d/x3d rootx
endif
Fons Rademakers's avatar
Fons Rademakers committed
ifeq ($(BUILDFTGL),yes)
MODULES      += graf3d/ftgl
Fons Rademakers's avatar
Fons Rademakers committed
endif
Fons Rademakers's avatar
Fons Rademakers committed
ifeq ($(BUILDGLEW),yes)
MODULES      += graf3d/glew
endif
Fons Rademakers's avatar
Fons Rademakers committed
MODULES      += graf3d/gl graf3d/eve graf3d/gviz3d
ifeq ($(BUILDMYSQL),yes)
MODULES      += sql/mysql
ifeq ($(BUILDORACLE),yes)
MODULES      += sql/oracle
ifeq ($(BUILDPGSQL),yes)
MODULES      += sql/pgsql
ifeq ($(BUILDSAPDB),yes)
MODULES      += sql/sapdb
endif
Fons Rademakers's avatar
Fons Rademakers committed
ifeq ($(BUILDODBC),yes)
MODULES      += sql/odbc
Fons Rademakers's avatar
Fons Rademakers committed
endif
MODULES      += io/rfio
MODULES      += io/castor
ifeq ($(BUILDDCAP),yes)
MODULES      += io/dcache
Fons Rademakers's avatar
Fons Rademakers committed
ifeq ($(BUILDGFAL),yes)
MODULES      += io/gfal
Fons Rademakers's avatar
Fons Rademakers committed
endif
Fons Rademakers's avatar
Fons Rademakers committed
ifeq ($(BUILDGLITE),yes)
MODULES      += net/glite
Fons Rademakers's avatar
Fons Rademakers committed
endif
ifeq ($(BUILDBONJOUR),yes)
MODULES      += net/bonjour
endif
ifeq ($(BUILDCHIRP),yes)
MODULES      += io/chirp
ifeq ($(BUILDHDFS),yes)
MODULES      += io/hdfs
endif
Rene Brun's avatar
Rene Brun committed
ifeq ($(BUILDMEMSTAT),yes)
MODULES      += misc/memstat
endif
MODULES      += graf2d/asimage
ifeq ($(BUILDFITSIO),yes)
MODULES      += graf2d/fitsio
endif
ifeq ($(BUILDFPYTHIA6),yes)
MODULES      += montecarlo/pythia6
ifeq ($(BUILDFPYTHIA8),yes)
MODULES      += montecarlo/pythia8
ifeq ($(BUILDFFTW3),yes)
Rene Brun's avatar
Rene Brun committed
endif
Fons Rademakers's avatar
Fons Rademakers committed
ifeq ($(BUILDGVIZ),yes)
MODULES      += graf2d/gviz
endif
ifeq ($(BUILDPYTHON),yes)
MODULES      += bindings/pyroot
Fons Rademakers's avatar
Fons Rademakers committed
endif
ifeq ($(BUILDRUBY),yes)
MODULES      += bindings/ruby
ifeq ($(BUILDXML),yes)
Fons Rademakers's avatar
Fons Rademakers committed
MODULES      += io/xmlparser
ifeq ($(BUILDQT),yes)
MODULES      += graf2d/qt gui/qtroot
ifeq ($(BUILDQTGSI),yes)
Rene Brun's avatar
Rene Brun committed
ifeq ($(BUILDGENVECTOR),yes)
Fons Rademakers's avatar
Fons Rademakers committed
# put reflex right in front of CINT; CINT needs it
MODULES      := $(subst cint/cint,cint/reflex cint/cint,$(MODULES))
Rene Brun's avatar
Rene Brun committed
ifeq ($(BUILDMINUIT2),yes)
Rene Brun's avatar
Rene Brun committed
endif
Rene Brun's avatar
Rene Brun committed
ifeq ($(BUILDUNURAN),yes)
Rene Brun's avatar
Rene Brun committed
endif
Fons Rademakers's avatar
 
Fons Rademakers committed
MODULES      += cint/cintex
endif
ifeq ($(BUILDCLING),yes)
Fons Rademakers's avatar
Fons Rademakers committed
# to be added to the unconditional MODULES list above once cling is in trunk
Fons Rademakers's avatar
 
Fons Rademakers committed
MODULES      += cint/cling
MODULES      += roofit/roofitcore roofit/roofit roofit/roostats
Fons Rademakers's avatar
Fons Rademakers committed
ifeq ($(BUILDXML),yes)
MODULES      += roofit/histfactory
endif
ifeq ($(BUILDGDML),yes)
ifeq ($(BUILDTABLE),yes)
Fons Rademakers's avatar
Fons Rademakers committed
MODULES      += misc/table
ifeq ($(BUILDSRPUTIL),yes)
MODULES      += net/srputils
ifeq ($(BUILDKRB5),yes)
MODULES      += net/krb5auth
ifeq ($(BUILDLDAP),yes)
MODULES      += net/ldap
Fons Rademakers's avatar
Fons Rademakers committed
ifeq ($(BUILDMONALISA),yes)
MODULES      += net/monalisa
Fons Rademakers's avatar
Fons Rademakers committed
endif
ifeq ($(BUILDGLOBUS),yes)
MODULES      += net/globusauth
ifneq ($(F77),)
MODULES      += misc/minicern hist/hbook
Fons Rademakers's avatar
Fons Rademakers committed
ifneq ($(XRDLIBDIR),)
MODULES      += net/netx
Fons Rademakers's avatar
Fons Rademakers committed
else
MODULES      += net/xrootd net/netx
Fons Rademakers's avatar
Fons Rademakers committed
ifeq ($(BUILDALIEN),yes)
MODULES      += net/alien
Fons Rademakers's avatar
Fons Rademakers committed
endif
ifeq ($(BUILDCLARENS),yes)
endif
ifeq ($(BUILDPEAC),yes)
Fons Rademakers's avatar
Fons Rademakers committed
ifneq ($(ARCH),win32)
Fons Rademakers's avatar
Fons Rademakers committed
MODULES      += net/rpdutils net/rootd proof/proofd proof/pq2
Fons Rademakers's avatar
Fons Rademakers committed
endif
ifeq ($(BUILDEDITLINE),yes)
MODULES      += core/editline
endif
Fons Rademakers's avatar
Fons Rademakers committed
ifeq ($(BUILDTMVA),yes)
Rene Brun's avatar
Rene Brun committed
MODULES      += tmva math/genetic
Fons Rademakers's avatar
Fons Rademakers committed
endif
Fons Rademakers's avatar
Fons Rademakers committed
ifeq ($(BUILDXRD),yes)
Fons Rademakers's avatar
Fons Rademakers committed
ifeq ($(ARCH),win32)
Fons Rademakers's avatar
Fons Rademakers committed
endif
Fons Rademakers's avatar
Fons Rademakers committed
endif
-include MyModules.mk   # allow local modules

Fons Rademakers's avatar
Fons Rademakers committed
ifneq ($(findstring $(MAKECMDGOALS),distclean maintainer-clean),)
MODULES      += core/unix core/winnt core/editline graf2d/x11 graf2d/x11ttf \
Fons Rademakers's avatar
Fons Rademakers committed
                graf3d/gl graf3d/ftgl graf3d/glew io/rfio io/castor \
Fons Rademakers's avatar
Fons Rademakers committed
                montecarlo/pythia6 montecarlo/pythia8 misc/table \
                sql/mysql sql/pgsql sql/sapdb net/srputils graf3d/x3d \
Fons Rademakers's avatar
Fons Rademakers committed
                rootx net/rootd io/dcache io/chirp hist/hbook graf2d/asimage \
                net/ldap net/krb5auth net/rpdutils net/globusauth \
                bindings/pyroot bindings/ruby io/gfal misc/minicern \
                graf2d/qt gui/qtroot gui/qtgsi net/xrootd net/netx net/alien \
Fons Rademakers's avatar
Fons Rademakers committed
                proof/proofd proof/proofx proof/clarens proof/peac proof/pq2 \
Fons Rademakers's avatar
Fons Rademakers committed
                sql/oracle io/xmlparser math/mathmore cint/reflex cint/cintex \
Fons Rademakers's avatar
Fons Rademakers committed
                tmva math/genetic io/hdfs graf2d/fitsio roofit/roofitcore \
                roofit/roofit roofit/roostats roofit/histfactory \
                math/minuit2 net/monalisa math/fftw sql/odbc math/unuran \
                geom/gdml graf3d/eve net/glite misc/memstat \
Fons Rademakers's avatar
Fons Rademakers committed
                math/genvector net/bonjour graf3d/gviz3d graf2d/gviz
MODULES      := $(sort $(MODULES))   # removes duplicates
endif

MODULES      += main   # must be last, $(ALLLIBS) must be fully formed

ifeq ($(BUILDTOOLS),yes)
MODULES       = build cint/cint core/metautils core/clib core/base core/meta \
                core/utils
endif

ifneq ($(PLATFORM),win32)
RPATH        := -L$(LPATH)
CINTLIBS     := -lCint
BOOTLIBS     := -lCore -lCint -lMathCore
Rene Brun's avatar
Rene Brun committed
ifneq ($(ROOTDICTTYPE),cint)
BOOTLIBS     += -lCintex -lReflex
Rene Brun's avatar
Rene Brun committed
endif
Fons Rademakers's avatar
Fons Rademakers committed
ROOTLIBS     := $(BOOTLIBS) -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad \
                -lTree -lMatrix -lThread
RINTLIBS     := -lRint
else
CINTLIBS     := $(LPATH)/libCint.lib
BOOTLIBS     := $(LPATH)/libCore.lib $(LPATH)/libCint.lib \
                $(LPATH)/libMathcore.lib
Rene Brun's avatar
Rene Brun committed
ifneq ($(ROOTDICTTYPE),cint)
BOOTLIBS     += $(LPATH)/libCintex.lib $(LPATH)/libReflex.lib
Rene Brun's avatar
Rene Brun committed
endif
Fons Rademakers's avatar
Fons Rademakers committed
ROOTLIBS     := $(BOOTLIBS) $(LPATH)/libRIO.lib $(LPATH)/libNet.lib \
                $(LPATH)/libHist.lib $(LPATH)/libGraf.lib \
                $(LPATH)/libGraf3d.lib $(LPATH)/libGpad.lib \
                $(LPATH)/libTree.lib $(LPATH)/libMatrix.lib \
                $(LPATH)/libThread.lib
RINTLIBS     := $(LPATH)/libRint.lib
endif
Fons Rademakers's avatar
Fons Rademakers committed

ROOTALIB     := $(LPATH)/libRoot.a

Rene Brun's avatar
Rene Brun committed
# ROOTLIBSDEP is intended to match the content of ROOTLIBS
BOOTLIBSDEP   = $(ORDER_) $(CORELIB) $(CINTLIB) $(MATHCORELIB)
Fons Rademakers's avatar
Fons Rademakers committed
ifneq ($(ROOTDICTTYPE),cint)
BOOTLIBSDEP  += $(CINTEXLIB) $(REFLEXLIB)
Fons Rademakers's avatar
Fons Rademakers committed
endif
Fons Rademakers's avatar
Fons Rademakers committed
ROOTLIBSDEP   = $(BOOTLIBSDEP) $(IOLIB) $(NETLIB) $(HISTLIB) \
                $(GRAFLIB) $(G3DLIB) $(GPADLIB) $(TREELIB) $(MATRIXLIB)
Fons Rademakers's avatar
Fons Rademakers committed

# Force linking of not referenced libraries
Fons Rademakers's avatar
Fons Rademakers committed
ifeq ($(FORCELINK),yes)
ROOTULIBS    := -Wl,-u,.G__cpp_setupG__Net      \
                -Wl,-u,.G__cpp_setupG__IO       \
                -Wl,-u,.G__cpp_setupG__Graf     \
                -Wl,-u,.G__cpp_setupG__G3D      \
                -Wl,-u,.G__cpp_setupG__GPad     \
                -Wl,-u,.G__cpp_setupG__Tree     \
BOOTULIBS    := -Wl,-u,.G__cpp_setupG__MathCore
ROOTULIBS    := -Wl,-u,_G__cpp_setupG__Net      \
                -Wl,-u,_G__cpp_setupG__IO       \
                -Wl,-u,_G__cpp_setupG__Graf     \
                -Wl,-u,_G__cpp_setupG__G3D      \
                -Wl,-u,_G__cpp_setupG__GPad     \
                -Wl,-u,_G__cpp_setupG__Tree     \
BOOTULIBS    := -Wl,-u,_G__cpp_setupG__MathCore
ROOTULIBS    := -include:_G__cpp_setupG__Net    \
                -include:_G__cpp_setupG__IO     \
                -include:_G__cpp_setupG__Graf   \
                -include:_G__cpp_setupG__G3D    \
                -include:_G__cpp_setupG__GPad   \
                -include:_G__cpp_setupG__Tree   \
                -include:_G__cpp_setupG__Thread \
BOOTULIBS    := -include:_G__cpp_setupG__MathCore
Fons Rademakers's avatar
Fons Rademakers committed
##### Compiler output option #####

Fons Rademakers's avatar
Fons Rademakers committed
CXXOUT ?= -o # keep whitespace after "-o"

##### clang or gcc version #####
ifneq ($(findstring clang,$(CXX)),)
CLANG_MAJOR  := $(shell $(CXX) -v 2>&1 | awk '{if (NR==1) print $$3}' | cut -d'.' -f1)
CLANG_MINOR  := $(shell $(CXX) -v 2>&1 | awk '{if (NR==1) print $$3}' | cut -d'.' -f2)
else
ifneq ($(findstring gnu,$(COMPILER)),)
GCC_MAJOR     := $(shell $(CXX) -dumpversion 2>&1 | cut -d'.' -f1)
GCC_MINOR     := $(shell $(CXX) -dumpversion 2>&1 | cut -d'.' -f2)
GCC_PATCH     := $(shell $(CXX) -dumpversion 2>&1 | cut -d'.' -f3)
GCC_VERS      := gcc-$(GCC_MAJOR).$(GCC_MINOR)
GCC_VERS_FULL := gcc-$(GCC_MAJOR).$(GCC_MINOR).$(GCC_PATCH)
endif
Rene Brun's avatar
Rene Brun committed
ifneq ($(F77),)
F77LD        := $(F77)
endif
ifeq ($(F77OPT),)
F77OPT       := $(OPT)
endif
ifeq ($(F77LDFLAGS),)
F77LDFLAGS   := $(LDFLAGS)
endif

ifneq ($(GCC_MINOR),0)
LIBFRTBEGIN  := $(shell $(F77) -print-file-name=libfrtbegin.a)
F77LIBS      := $(LIBFRTBEGIN) $(F77LIBS)
ifeq ($(GCC_MAJOR),4)
LIBFRTBEGIN  := $(shell $(F77) -print-file-name=libfrtbegin.a)
F77LIBS      := $(LIBFRTBEGIN) $(F77LIBS)
Fons Rademakers's avatar
Fons Rademakers committed
##### Store SVN revision number #####

Fons Rademakers's avatar
Fons Rademakers committed
ifeq ($(findstring $(MAKECMDGOALS),clean distclean maintainer-clean dist),)
ifeq ($(findstring clean-,$(MAKECMDGOALS)),)
Fons Rademakers's avatar
Fons Rademakers committed
ifeq ($(shell which svn 2>&1 | sed -ne "s@.*/svn@svn@p"),svn)
SVNREV  := $(shell bash $(ROOT_SRCDIR)/build/unix/svninfo.sh $(ROOT_SRCDIR))
Fons Rademakers's avatar
Fons Rademakers committed
endif
Fons Rademakers's avatar
Fons Rademakers committed
endif
endif
Fons Rademakers's avatar
Fons Rademakers committed

Fons Rademakers's avatar
Fons Rademakers committed
##### Utilities #####
   MAKEDIR      = +@[ -d $(dir $@) ] || mkdir -p $(dir $@)
   RUNTIMEDIRS := etc macros icons fonts README tutorials test man
   POSTBIN     += $(RUNTIMEDIRS)
   BUILDTOOLSDIR := buildtools
   POSTBIN       += static
MAKEDEP        = $(RMKDEP)
MAKELIB        = $(ROOT_SRCDIR)/build/unix/makelib.sh $(MKLIBOPTIONS)
MAKEDIST      := $(ROOT_SRCDIR)/build/unix/makedist.sh
MAKEDISTSRC   := $(ROOT_SRCDIR)/build/unix/makedistsrc.sh
MAKEVERSION   := $(ROOT_SRCDIR)/build/unix/makeversion.sh
MAKECOMPDATA  := $(ROOT_SRCDIR)/build/unix/compiledata.sh
MAKECINTDLL   := $(ROOT_SRCDIR)/build/unix/makecintdll.sh
MAKECHANGELOG := $(ROOT_SRCDIR)/build/unix/makechangelog.sh
MAKEHTML      := $(ROOT_SRCDIR)/build/unix/makehtml.sh
MAKELOGHTML   := $(ROOT_SRCDIR)/build/unix/makeloghtml.sh
MAKERELNOTES  := $(ROOT_SRCDIR)/build/unix/makereleasenotes.sh
MAKESTATIC    := $(ROOT_SRCDIR)/build/unix/makestatic.sh
RECONFIGURE   := $(ROOT_SRCDIR)/build/unix/reconfigure.sh
ifeq ($(PLATFORM),win32)
MAKELIB       := $(ROOT_SRCDIR)/build/win/makelib.sh
MAKECOMPDATA  := $(ROOT_SRCDIR)/build/win/compiledata.sh
Fons Rademakers's avatar
Fons Rademakers committed
##### Compiler directives and run-control file #####
Fons Rademakers's avatar
Fons Rademakers committed
##### Extra libs needed for "static" target #####

STATICEXTRALIBS = $(PCRELDFLAGS) $(PCRELIB) \
                  $(FREETYPELDFLAGS) $(FREETYPELIB)

COREL         = $(BASEL1) $(BASEL2) $(BASEL3) $(CONTL) $(METAL) \
                $(SYSTEML) $(CLIBL) $(METAUTILSL) $(EDITLINEL)
COREO         = $(BASEO) $(CONTO) $(METAO) $(SYSTEMO) $(ZIPO) $(CLIBO) \
Fons Rademakers's avatar
 
Fons Rademakers committed
                $(METAUTILSO) $(EDITLINEO) $(CLINGO)
COREDO        = $(BASEDO) $(CONTDO) $(METADO) $(METACDO) $(SYSTEMDO) \
                $(CLIBDO) $(METAUTILSDO) $(EDITLINEDO) $(CLINGDO)
COREMAP      := $(CORELIB:.$(SOEXT)=.rootmap)
Fons Rademakers's avatar
Fons Rademakers committed
ifneq ($(BUILTINZLIB),yes)
CORELIBEXTRA += $(ZLIBLIBDIR) $(ZLIBCLILIB)
STATICEXTRALIBS += $(ZLIBLIBDIR) $(ZLIBCLILIB)
Fons Rademakers's avatar
Fons Rademakers committed
endif
ifeq ($(BUILDEDITLINE),yes)
CORELIBEXTRA += $(CURSESLIBDIR) $(CURSESLIB)
STATICEXTRALIBS += $(CURSESLIBDIR) $(CURSESLIB)
endif
Fons Rademakers's avatar
Fons Rademakers committed
##### In case shared libs need to resolve all symbols (e.g.: aix, win32) #####
Fons Rademakers's avatar
Fons Rademakers committed
MAINLIBS     := $(CORELIB) $(CINTLIB)
Fons Rademakers's avatar
Fons Rademakers committed
ifneq ($(ROOTDICTTYPE),cint)
Fons Rademakers's avatar
Fons Rademakers committed
MAINLIBS     += $(CINTEXLIB) $(REFLEXLIB)
Fons Rademakers's avatar
Fons Rademakers committed
endif
else
MAINLIBS      =
endif

##### all #####

ALLHDRS      :=
ALLLIBS      := $(CORELIB)
ALLEXECS     :=
INCLUDEFILES :=

##### RULES #####

.SUFFIXES: .cxx .d
.PRECIOUS: include/%.h

# special rules (need to be defined before generic ones)
Fons Rademakers's avatar
Fons Rademakers committed
cint/cint/lib/dll_stl/G__%.o: cint/cint/lib/dll_stl/G__%.cxx
	$(MAKEDEP) -R -f$(patsubst %.o,%.d,$@) -Y -w 1000 -- \
	   $(CXXFLAGS) $(DICTFLAGS) -D__cplusplus -I$(CINTDIRL)/prec_stl \
	   -I$(CINTDIRSTL) -I$(CINTDIR)/inc -- $<
Fons Rademakers's avatar
Fons Rademakers committed
	$(CXX) $(NOOPT) $(CXXFLAGS) $(DICTFLAGS) -I. -I$(CINTDIR)/inc  $(CXXOUT)$@ -c $<

cint/cint/lib/dll_stl/G__c_%.o: cint/cint/lib/dll_stl/G__c_%.c
	$(MAKEDEP) -R -f$(patsubst %.o,%.d,$@) -Y -w 1000 -- \
	   $(CFLAGS) $(DICTFLAGS) -I$(CINTDIRL)/prec_stl \
	   -I$(CINTDIRSTL) -I$(CINTDIR)/inc -- $<
Fons Rademakers's avatar
Fons Rademakers committed
	$(CC) $(NOOPT) $(CFLAGS) $(DICTFLAGS) -I. -I$(CINTDIR)/inc  $(CXXOUT)$@ -c $<

cint/cint/lib/G__%.o: cint/cint/lib/G__%.cxx
	$(MAKEDEP) -R -f$(patsubst %.o,%.d,$@) -Y -w 1000 -- \
	   $(CXXFLAGS) $(DICTFLAGS) -D__cplusplus -I$(CINTDIRL)/prec_stl \
	   -I$(CINTDIRSTL) -I$(CINTDIR)/inc -- $<
Fons Rademakers's avatar
Fons Rademakers committed
	$(CXX) $(NOOPT) $(CXXFLAGS) $(DICTFLAGS) -I. -I$(CINTDIR)/inc  $(CXXOUT)$@ -c $<

cint/cint/lib/G__c_%.o: cint/cint/lib/G__c_%.c
	$(MAKEDEP) -R -f$(patsubst %.o,%.d,$@) -Y -w 1000 -- \
	   $(CFLAGS) $(DICTFLAGS) -I$(CINTDIRL)/prec_stl \
	   -I$(CINTDIRSTL) -I$(CINTDIR)/inc -- $<
Fons Rademakers's avatar
Fons Rademakers committed
	$(CC) $(NOOPT) $(CFLAGS) $(DICTFLAGS) -I. -I$(CINTDIR)/inc  $(CXXOUT)$@ -c $<

Fons Rademakers's avatar
Fons Rademakers committed
G__%.o: G__%.cxx
	$(MAKEDEP) -R -f$(patsubst %.o,%.d,$@) -Y -w 1000 -- \
	   $(CXXFLAGS) $(DICTFLAGS) -D__cplusplus -I$(CINTDIRL)/prec_stl \
	   -I$(CINTDIRSTL) -I$(CINTDIR)/inc -- $<
	$(CXX) $(NOOPT) $(CXXFLAGS) $(DICTFLAGS) -I. -I$(CINTDIR)/inc  $(CXXOUT)$@ -c $<
Fons Rademakers's avatar
Fons Rademakers committed

G__c_%.o: G__c_%.c
	$(MAKEDEP) -R -f$(patsubst %.o,%.d,$@) -Y -w 1000 -- \
	   $(CFLAGS) $(DICTFLAGS) -I$(CINTDIRL)/prec_stl \
	   -I$(CINTDIRSTL) -I$(CINTDIR)/inc -- $<
	$(CC) $(NOOPT) $(CFLAGS) $(DICTFLAGS) -I. -I$(CINTDIR)/inc  $(CXXOUT)$@ -c $<
Fons Rademakers's avatar
Fons Rademakers committed

cint/cint/%.o: cint/cint/%.cxx
	$(MAKEDEP) -R -fcint/cint/$*.d -Y -w 1000 -- $(CINTCXXFLAGS) -I. -D__cplusplus -- $<
	$(CXX) $(OPT) $(CINTCXXFLAGS) -I. $(CXXOUT)$@ -c $<

cint/cint/%.o: $(ROOT_SRCDIR)/cint/cint/%.cxx
	$(MAKEDIR)
Fons Rademakers's avatar
Fons Rademakers committed
	$(MAKEDEP) -R -fcint/cint/$*.d -Y -w 1000 -- $(CINTCXXFLAGS) -I. -D__cplusplus -- $<
	$(CXX) $(OPT) $(CINTCXXFLAGS) -I. $(CXXOUT)$@ -c $<
cint/cint/%.o: $(ROOT_SRCDIR)/cint/cint/%.c
	$(MAKEDIR)
Fons Rademakers's avatar
Fons Rademakers committed
	$(MAKEDEP) -R -fcint/cint/$*.d -Y -w 1000 -- $(CINTCFLAGS) -I. -- $<
	$(CC) $(OPT) $(CINTCFLAGS) -I. $(CXXOUT)$@ -c $<
Fons Rademakers's avatar
Fons Rademakers committed

build/rmkdepend/%.o: $(ROOT_SRCDIR)/build/rmkdepend/%.cxx
	$(MAKEDIR)
	$(CXX) $(OPT) $(CXXFLAGS) $(CXXOUT)$@ -c $<

build/rmkdepend/%.o: $(ROOT_SRCDIR)/build/rmkdepend/%.c
	$(MAKEDIR)
	$(CC) $(OPT) $(CFLAGS) $(CXXOUT)$@ -c $<

define SRCTOOBJ_template
$(1)/%_tmp.o: $(1)/%_tmp.cxx
	$$(MAKEDIR)
	$$(MAKEDEP) -R -f$$(@:.o=.d) -Y -w 1000 -- $$(CXXFLAGS) -D__cplusplus -- $$<
	$$(CXX) $$(OPT) $$(CXXFLAGS) $$(CXXOUT)$$@ -c $$<

$(1)/%.o: $(ROOT_SRCDIR)/$(1)/%.cxx
	$$(MAKEDIR)
	$$(MAKEDEP) -R -f$$(@:.o=.d) -Y -w 1000 -- $$(CXXFLAGS) -D__cplusplus -- $$<
	$$(CXX) $$(OPT) $$(CXXFLAGS) $$(CXXOUT)$$@ -c $$<

$(1)/%.o: $(ROOT_SRCDIR)/$(1)/%.c
	$$(MAKEDIR)
	$$(MAKEDEP) -R -f$$(@:.o=.d) -Y -w 1000 -- $$(CFLAGS) -- $$<
	$$(CC) $$(OPT) $$(CFLAGS) $$(CXXOUT)$$@ -c $$<

$(1)/%.o: $(ROOT_SRCDIR)/$(1)/%.f
	$$(MAKEDIR)
ifeq ($$(F77),f2c)
	f2c -a -A $$<
	$$(CC) $$(F77OPT) $$(CFLAGS) $$(CXXOUT)$$@ -c $$(@:.o=.c)
else
	$$(F77) $$(F77OPT) $$(F77FLAGS) $$(CXXOUT)$$@ -c $$<
endif
endef

MODULESGENERIC := build $(filter-out build,$(MODULES))
MODULESGENERIC := $(filter-out cint/cint,$(MODULES))
$(foreach module,$(MODULESGENERIC),$(eval $(call SRCTOOBJ_template,$(module))))

%.o: %.cxx
	$(MAKEDEP) -R -f$*.d -Y -w 1000 -- $(CXXFLAGS) -D__cplusplus -- $<
Fons Rademakers's avatar
Fons Rademakers committed
	$(CXX) $(OPT) $(CXXFLAGS) $(CXXOUT)$@ -c $<
	$(MAKEDEP) -R -f$*.d -Y -w 1000 -- $(CFLAGS) -- $<
Fons Rademakers's avatar
Fons Rademakers committed
	$(CC) $(OPT) $(CFLAGS) $(CXXOUT)$@ -c $<
Fons Rademakers's avatar
Fons Rademakers committed
	$(CC) $(F77OPT) $(CFLAGS) $(CXXOUT)$@ -c $*.c
Fons Rademakers's avatar
Fons Rademakers committed
	$(F77) $(F77OPT) $(F77FLAGS) $(CXXOUT)$@ -c $<
endif

##### TARGETS #####
.PHONY:         all fast config rootcint rootlibs rootexecs dist distsrc \
                clean distclean maintainer-clean compiledata \
                version html changelog install uninstall showbuild \
                releasenotes static map debian redhat skip postbin \
                showit help
ifneq ($(findstring map, $(MAKECMDGOALS)),)
.NOTPARALLEL:
endif
-include $(patsubst %,$(ROOT_SRCDIR)/%/ModuleVars.mk,$(MODULES))
include $(patsubst %,$(ROOT_SRCDIR)/%/Module.mk,$(MODULES))
Fons Rademakers's avatar
Fons Rademakers committed

-include MyRules.mk            # allow local rules

Fons Rademakers's avatar
Fons Rademakers committed
ifeq ($(findstring $(MAKECMDGOALS),clean distclean maintainer-clean dist \
Fons Rademakers's avatar
Fons Rademakers committed
ifeq ($(findstring clean-,$(MAKECMDGOALS)),)
ifeq ($(findstring skip,$(MAKECMDGOALS))$(findstring fast,$(MAKECMDGOALS)),)
-include $(INCLUDEFILES)
-include build/dummy.d          # must be last include
Fons Rademakers's avatar
Fons Rademakers committed
endif
rootlibs:       rootcint compiledata $(ALLLIBS) $(ALLMAPS)
rootexecs:      rootlibs $(ALLEXECS)
buildtools:
		@if [ ! -f $(BUILDTOOLSDIR)/Makefile ]; then \
		   echo "*** Building build tools in $(BUILDTOOLSDIR)..."; \
		   mkdir -p $(BUILDTOOLSDIR); \
		   cd $(BUILDTOOLSDIR); \
		   $(ROOT_SRCDIR)/configure $(HOST) --minimal; \
		else \
		   echo "*** Running make in $(BUILDTOOLSDIR)..."; \
		   cd $(BUILDTOOLSDIR); \
		   TARGETFLAGS=-DR__$(shell echo $(ARCH) | tr 'a-z' 'A-Z') \
Fons Rademakers's avatar
Fons Rademakers committed
		   rootcint cint/cint/lib/posix/mktypes \
compiledata:    $(COMPILEDATA)
Fons Rademakers's avatar
Fons Rademakers committed
ifeq ($(BUILDING_WITHIN_IDE),)
	@(if [ ! -f config/Makefile.config ] || \
	     [ ! -f config/Makefile.comp ]; then \
	   echo ""; echo "Please, run ./configure first"; echo ""; \
	   exit 1; \
	fi)
Fons Rademakers's avatar
Fons Rademakers committed
else
# Building from within an IDE, running configure
	@(if [ ! -f config/Makefile.config ] || \
	     [ ! -f config/Makefile.comp ]; then \
Fons Rademakers's avatar
Fons Rademakers committed
	   ./configure --build=debug `cat config.status 2>/dev/null`; \
	fi)
endif
Fons Rademakers's avatar
Fons Rademakers committed
# Target Makefile is synonym for "run (re-)configure"
# Makefile is target as we need to re-parse dependencies after
# configure is run (as RConfigure.h changed etc)
config/Makefile.config config/Makefile.comp include/RConfigure.h \
  include/RConfigOptions.h etc/system.rootauthrc etc/system.rootdaemonrc \
  etc/root.mimes $(ROOTRC) \
Fons Rademakers's avatar
Fons Rademakers committed

ifeq ($(findstring $(MAKECMDGOALS),distclean maintainer-clean debian redhat),)
Makefile: $(addprefix $(ROOT_SRCDIR)/,configure config/rootrc.in \
  config/RConfigure.in config/Makefile.in config/Makefile.$(ARCH) \
  config/Makefile-comp.in config/root-config.in config/rootauthrc.in \
  config/rootdaemonrc.in config/mimes.unix.in config/mimes.win32.in \
  config/proofserv.in config/roots.in) config.status
Fons Rademakers's avatar
Fons Rademakers committed
	+@( $(RECONFIGURE) "$?" "$(ROOT_SRCDIR)" || ( \
	   echo ""; echo "Please, run $(ROOT_SRCDIR)/configure again as config option files ($?) have changed."; \
Fons Rademakers's avatar
Fons Rademakers committed
	   echo ""; exit 1; \
Fons Rademakers's avatar
Fons Rademakers committed
endif
$(COMPILEDATA): $(ROOT_SRCDIR)/config/Makefile.$(ARCH) config/Makefile.comp \
                $(MAKECOMPDATA)
	@$(MAKECOMPDATA) $(COMPILEDATA) "$(CXX)" "$(OPTFLAGS)" "$(DEBUGFLAGS)" \
	   "$(CXXFLAGS)" "$(SOFLAGS)" "$(LDFLAGS)" "$(SOEXT)" "$(SYSLIBS)" \
Rene Brun's avatar
Rene Brun committed
	   "$(LIBDIR)" "$(BOOTLIBS)" "$(RINTLIBS)" "$(INCDIR)" \
	   "$(MAKESHAREDLIB)" "$(MAKEEXE)" "$(ARCH)" "$(ROOTBUILD)" "$(EXPLICITLINK)"
Fons Rademakers's avatar
Fons Rademakers committed
build/dummy.d: config Makefile $(ALLHDRS) $(RMKDEP) $(BINDEXP)
else
build/dummy.d: config Makefile buildtools $(ALLHDRS) $(RMKDEP) $(BINDEXP)
endif
$(CORELIB): $(COREO) $(COREDO) $(CINTLIB) $(PCREDEP) $(CORELIBDEP)
	@$(MAKELIB) $(PLATFORM) $(LD) "$(LDFLAGS)" \
	   "$(SOFLAGS)" libCore.$(SOEXT) $@ "$(COREO) $(COREDO)" \
	   "$(CORELIBEXTRA) $(PCRELDFLAGS) $(PCRELIB) $(CRYPTLIBS)"
else
	@$(MAKELIB) $(PLATFORM) $(LD) "$(CORELDFLAGS)" \
	   "$(SOFLAGS)" libCore.$(SOEXT) $@ "$(COREO) $(COREDO)" \
	   "$(CORELIBEXTRA) $(PCRELDFLAGS) $(PCRELIB) $(CRYPTLIBS)"
$(COREMAP): $(RLIBMAP) $(MAKEFILEDEP) $(COREL)
	$(RLIBMAP) -o $@ -l $(CORELIB) -d $(CORELIBDEPM) -c $(COREL)
Fons Rademakers's avatar
Fons Rademakers committed
distmsi: build/package/msi/makemsi$(EXEEXT)
Fons Rademakers's avatar
Fons Rademakers committed
	$(MAKEDIST) -msi
Rene Brun's avatar
Rene Brun committed

build/package/msi/makemsi$(EXEEXT): build/package/msi/makemsi.cxx build/version_number
	@vers=`sed 's|\(.*\)/\(.*\)|\1.\2|' < build/version_number` && \
	$(CXX) -DPRODUCT=\"ROOT\" -DVERSION=\"$$vers\" $(CXXFLAGS) Rpcrt4.lib build/package/msi/makemsi.cxx -Fe$@

Rene Brun's avatar
Rene Brun committed
rebase: $(ALLLIBS) $(ALLEXECS)
	@echo -n "Rebasing binaries... "
Rene Brun's avatar
Rene Brun committed
	@rebase -b 0x71000000 bin/*.exe bin/*.dll
Rene Brun's avatar
Rene Brun committed

Fons Rademakers's avatar
Fons Rademakers committed
debian:
	@if [ ! -x `which dpkg-buildpackage` ] || [ ! -x `which dh_testdir` ]; then \
	   echo "You must have debhelper installed to make the "; \
	   echo "Debian GNU/Linux packages"; exit 1; fi
	@echo "OK, you're on a Debian GNU/Linux system - cool"
	@vers=`sed 's|\(.*\)/\(.*\)|\1.\2|' < build/version_number` ; \
	  dirvers=`basename $$PWD | sed 's|root-\(.*\)|\1|'` ; \
	  if [ "$$vers" != "$$dirvers" ] ; then \
	    echo "Must have ROOT source tree in root-$$vers" ; \
	    echo "Please rename this directory to `basename $$PWD` to"; \
	    echo "root-$$vers and try again"; exit 1 ; fi
Fons Rademakers's avatar
Fons Rademakers committed
	rm -rf debian
	$(ROOT_SRCDIR)/build/package/lib/makedebdir.sh
Fons Rademakers's avatar
Fons Rademakers committed
	fakeroot debian/rules debian/control
Fons Rademakers's avatar
Fons Rademakers committed
	dpkg-buildpackage -rfakeroot -us -uc -i"G__|^debian|root-bin.png|\.d$$"
	@echo "Debian GNU/Linux packages done. They are put in '../'"
Fons Rademakers's avatar
Fons Rademakers committed

redhat:
	@if [ ! -x `which rpm` ]; then \
Fons Rademakers's avatar
Fons Rademakers committed
	   echo "You must have rpm installed to make the Redhat package"; \
	   exit 1; fi
	@echo "OK, you have RPM on your system - good"
	$(ROOT_SRCDIR)/build/package/lib/makerpmspec.sh
	@echo "To build the packages, make a gzipped tar ball of the sources"
	@vers=`sed 's|\(.*\)/\(.*\)|\1.\2|' < build/version_number` ; \
Fons Rademakers's avatar
Fons Rademakers committed
	  echo "called root_v$$vers.source.tar.gz and put it in you RPM "
	@echo "source directory (default /usr/src/rpm/SOURCES) and the "
	@echo "spec-file root.spec in your RPM spec directory"
	@echo "(default /usr/src/RPM/SPECS). If you want to build outside"
	@echo "the regular tree, please refer to the RPM documentation."
	@echo "After that, do"
	@echo "   rpm -ba root.spec "
	@echo "to actually build the packages. More details are given in"
	@echo "README/INSTALL"
#	rpm -bb --rcfile rpm/rpmrc --buildroot `pwd`/rpm/tmp rpm/root.spec
#	@echo "Redhat Linux packages done. They are put in '../<arch>'"
Fons Rademakers's avatar
Fons Rademakers committed
redhat-tar:
	@if [ ! -x `which rpm` ]; then \
	   echo "You must have rpm installed to make the Redhat package"; \
	   exit 1; fi
	@echo "OK, you have RPM on your system - good"
	$(ROOT_SRCDIR)/build/package/lib/makerpmspec.sh
Fons Rademakers's avatar
Fons Rademakers committed
	-@$(MAKE) distclean
	-@$(MAKE) maintainer-clean
	@vers=`sed 's|\(.*\)/\(.*\)|\1.\2|' < build/version_number` && \
	  rm -f root_v$$vers.source.tar.gz && \
	  (cd ../ && tar 		\
		--exclude=\\.svn 	\
		--exclude=root/debian 	\
		--exclude=root/bin	\
		--exclude=root/lib	\
		--exclude=root/include	\
	     -czf root_v$$vers.source.tar.gz root) && \
	  mv ../root_v$$vers.source.tar.gz .
	@echo "To build the packages, run "
	@echo ""
	@vers=`sed 's|\(.*\)/\(.*\)|\1.\2|' < build/version_number` ; \
	  echo "  rpmbuild -ta root_v$$vers.source.tar.gz"
	@echo ""
	@echo "as user root (or similar). If you want to build outside"
	@echo "the regular tree (as a normal user), please refer to the"
	@echo "RPM documentation."

redhat-rpm: redhat-tar
	@rm -rf rpm
	@mkdir -p rpm/SOURCES rpm/SPECS rpm/BUILD rpm/RPMS rpm/SRPMS
	@vers=`sed 's|\(.*\)/\(.*\)|\1.\2|' < build/version_number` && \
	  rpmbuild --define "_topdir `pwd`/rpm" -ta root_v$$vers.source.tar.gz
	@rm -rf rpm/SOURCES rpm/SPECS
	@echo "Packages build in rpm/RPMS and rpm/SPRMS"

Fons Rademakers's avatar
Fons Rademakers committed
rootdrpm:
	@if [ ! -x `which rpm` ]; then \
	   echo "You must have rpm installed to make the root-rootd package"; \
	   exit 1; fi
	@echo "OK, you have RPM on your system - good"
	@if [ "x$(ARCOMP)" != "x" ]; then \
	    rm -f rootd-$(ARCOMP)-*-$(ROOTDRPMREL).spec ; \
	else  \
	    rm -f rootd-*-$(ROOTDRPMREL).spec ; \
	fi
	$(ROOT_SRCDIR)/build/package/lib/makerpmspecs.sh rpm \
		$(ROOT_SRCDIR)/build/package/common \
	        $(ROOT_SRCDIR)/build/package/rpm root-rootd >> \
		root-rootd.spec.tmp
Fons Rademakers's avatar
Fons Rademakers committed
	@if [ "x$(ARCOMP)" != "x" ]; then \
	    echo "Architecture+compiler flag: $(ARCOMP)" ; \
	fi
	@if [ "x$(ROOTDRPMREL)" != "x" ]; then \
	    echo "RPM release set to: $(ROOTDRPMREL)" ; \
	fi
	@if [ ! -d "/tmp/rootdrpm" ]; then \
	   echo "Creating build directory /tmp/rootdrpm ..."; \
	   mkdir -p /tmp/rootdrpm; \
	   chmod 0777 /tmp/rootdrpm; \
	fi
	@echo "Make the substitutions ..."
	@vers=`sed 's|\(.*\)/\(.*\)|\1.\2|' < build/version_number` ; \
	        echo "Version is $$vers ... " ; \
	   rootdir=`echo $(PWD)` ; \
	        echo "Rootdir: $$rootdir" ; \
	   prefix=`dirname $(DESTDIR)$(BINDIR)` ; \
	        echo "Prefix: $$prefix" ; \
	   etcdir=`echo $(DESTDIR)$(ETCDIR)` ; \
	        echo "Etcdir: $$etcdir" ; \
	   arcomp="" ; \
	   if [ "x$(ARCOMP)" != "x" ]; then \
	      arcomp=`echo -$(ARCOMP)` ; \
	   fi ; \
	   sed -e "s|@version@|$$vers|" \
	       -e "s|@rootdir@|$$rootdir|" \
	       -e "s|@prefix@|$$prefix|" \
	       -e "s|@etcdir@|$$etcdir|" \
	       -e "s|@arcomp@|$$arcomp|" \
	       -e "s|@release@|$(ROOTDRPMREL)|" \
	           < root-rootd.spec.tmp \
	           > rootd$$arcomp-$$vers-$(ROOTDRPMREL).spec
	@echo " "
	@echo "To build the RPM package run:"
	@specfile=`ls -1 rootd*$(ARCOMP)*-$(ROOTDRPMREL).spec` ; \
	        echo "   rpmbuild -ba $$specfile "
	@rm -f root-rootd.spec.tmp root-rootd.spec.tmp.*
	@if [ "x$(ARCOMP)" == "x" ]; then \
	    echo " " ; \
	    echo "To add a flag to the package name re-run with" ; \
	    echo " " ; \
	    echo "  make rootdrpm ARCOMP=<flag> " ; \
	    echo " " ; \
	    echo "The RPM will then be called rootd-<flag> " ; \
	    echo " " ; \
	fi
	@if [ "x$(ROOTDRPMREL)" == "x1" ]; then \
	    echo " " ; \
	    echo "To change the release version number re-run with" ; \
	    echo " " ; \
	    echo "  make rootdrpm ROOTDRPMREL=<new_release_version_number> " ; \
	    echo " " ; \
	fi

Fons Rademakers's avatar
Fons Rademakers committed
	@rm -f __compiledata *~ core.*
	@(find . -name "ti_files" -exec rm -rf {} \; >/dev/null 2>&1;true)
ifeq ($(SUNCC5),true)
clean::
	@(find . -name "SunWS_cache" -exec rm -rf {} \; >/dev/null 2>&1;true)
	-@mv -f include/RConfigure.h include/RConfigure.h-
	-@mv -f include/RConfigOptions.h include/RConfigOptions.h-
	@rm -f include/*.h $(ROOTMAP) $(CORELIB) $(COREMAP)
	-@mv -f include/RConfigure.h- include/RConfigure.h
	-@mv -f include/RConfigOptions.h- include/RConfigOptions.h
	@rm -f bin/*.dll bin/*.exp bin/*.lib bin/*.pdb \
Rene Brun's avatar
Rene Brun committed
               lib/*.def lib/*.exp lib/*.lib lib/*.dll.a \
	-@(mv -f tutorials/gallery.root tutorials/gallery.root- >/dev/null 2>&1;true)
	-@(mv -f tutorials/mlp/mlpHiggs.root tutorials/mlp/mlpHiggs.root- >/dev/null 2>&1;true)
	-@(mv -f tutorials/quadp/stock.root tutorials/quadp/stock.root- >/dev/null 2>&1;true)
	@(find tutorials -name "files" -exec rm -rf {} \; >/dev/null 2>&1;true)
	@(find tutorials -name "*.root" -exec rm -rf {} \; >/dev/null 2>&1;true)
	@(find tutorials -name "*.ps" -exec rm -rf {} \; >/dev/null 2>&1;true)
	@(find tutorials -path '*/doc' -prune -o -name "*.gif" -exec rm -rf {} \; >/dev/null 2>&1;true)
	@(find tutorials -name "so_locations" -exec rm -rf {} \; >/dev/null 2>&1;true)
	@(find tutorials -name "pca.C" -exec rm -rf {} \; >/dev/null 2>&1;true)
	@(find tutorials -name "*.so" -exec rm -rf {} \; >/dev/null 2>&1;true)
	@(find tutorials -name "work.pc" -exec rm -rf {} \; >/dev/null 2>&1;true)
	@(find tutorials -name "work.pcl" -exec rm -rf {} \; >/dev/null 2>&1;true)
	-@(mv -f tutorials/gallery.root- tutorials/gallery.root >/dev/null 2>&1;true)
	-@(mv -f tutorials/mlp/mlpHiggs.root- tutorials/mlp/mlpHiggs.root >/dev/null 2>&1;true)
	-@(mv -f tutorials/quadp/stock.root- tutorials/quadp/stock.root >/dev/null 2>&1;true)
	@rm -f bin/roota bin/proofserva lib/libRoot.a
Fons Rademakers's avatar
Fons Rademakers committed
	@rm -f $(CINTDIR)/include/*.dll $(CINTDIR)/include/*.so*
	@rm -f $(CINTDIR)/stl/*.dll $(CINTDIR)/stl/*.so*
	@rm -f $(CINTDIR)/include/sys/*.dll $(CINTDIR)/include/sys/*.so.*
	@rm -f $(CINTDIR)/lib/posix/a.out $(CINTDIR)/lib/posix/mktypes
	@rm -f README/ChangeLog build/dummy.d
	@(find . -path '*/daemons' -prune -o -name *.d -exec rm -rf {} \; >/dev/null 2>&1;true)
	@(find . -name *.o -exec rm -rf {} \; >/dev/null 2>&1;true)
	-@([ -d test ] && (cd test && $(MAKE) distclean); true)
Fons Rademakers's avatar
Fons Rademakers committed
maintainer-clean:: distclean
	@rm -rf bin lib include htmldoc system.rootrc config/Makefile.config \
	   config/Makefile.comp $(ROOTRC) etc/system.rootauthrc \
	   etc/system.rootdaemonrc etc/root.mimes etc/daemons/rootd.rc.d \
	   etc/daemons/rootd.xinetd etc/daemons/proofd.rc.d \
	   etc/daemons/proofd.xinetd main/src/proofserv.sh main/src/roots.sh \
	   etc/daemons/olbd.rc.d etc/daemons/xrootd.rc.d \
	   etc/daemons/cmsd.rc.d macros/html.C \
	   build/misc/root-help.el build-arch-stamp build-indep-stamp \
Fons Rademakers's avatar
Fons Rademakers committed
	   configure-stamp build-arch-cint-stamp config.status config.log