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), maintainer-clean debian redhat),)
include config/Makefile.config
ifeq ($(MAKECMDGOALS),clean)
include config/Makefile.config
endif
MAKE_VERSION_MAJOR := $(word 1,$(subst ., ,$(MAKE_VERSION)))
MAKE_VERSION_MINOR := $(shell echo $(word 2,$(subst ., ,$(MAKE_VERSION))) | \
ORDER_ := $(shell test $(MAKE_VERSION_MAJOR) -gt 3 || \
test $(MAKE_VERSION_MAJOR) -eq 3 && \
test $(MAKE_VERSION_MINOR) -ge 80 && echo '|')
##### Include machine dependent macros #####
##### 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),)
include config/Makefile.$(ARCH)
ifeq ($(MAKECMDGOALS),clean)
include config/Makefile.$(ARCH)
endif
##### 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),)
Fons Rademakers
committed
include config/Makefile.comp
endif
ifeq ($(MAKECMDGOALS),clean)
include config/Makefile.comp
endif
Fons Rademakers
committed
##### Include library dependencies for explicit linking #####
MAKEFILEDEP = config/Makefile.depend
include $(MAKEFILEDEP)
Fons Rademakers
committed
##### Allow local macros #####
-include MyConfig.mk
##### Modules to build #####
MODULES = build cint/cint core/metautils core/pcre core/utils core/base \
core/cont core/meta io/io math/mathcore net/net core/zip \
core/clib core/thread math/matrix core/newdelete hist/hist \
tree/tree graf2d/freetype graf2d/graf graf2d/gpad graf3d/g3d \
gui/gui math/minuit hist/histpainter tree/treeplayer \
gui/ged tree/treeviewer math/physics graf2d/postscript \
core/rint html montecarlo/eg \
geom/geom geom/geompainter montecarlo/vmc \
math/fumili math/mlp math/quadp net/auth gui/guibuilder io/xml \
math/foam math/splot math/smatrix io/sql tmva \
geom/geombuilder hist/spectrum hist/spectrumpainter \
gui/fitpanel proof/proof proof/proofplayer \
gui/sessionviewer gui/guihtml
ifeq ($(ARCH),win32)
MODULES += core/winnt graf2d/win32gdk
MODULES := $(filter-out core/newdelete,$(MODULES))
SYSTEML = $(WINNTL)
SYSTEMO = $(WINNTO)
SYSTEMDO = $(WINNTDO)
else
ifeq ($(ARCH),win32gcc)
MODULES += core/unix graf2d/x11 graf2d/x11ttf graf3d/x3d rootx
SYSTEML = $(UNIXL)
SYSTEMO = $(UNIXO)
SYSTEMDO = $(UNIXDO)
else
MODULES += core/unix graf2d/x11 graf2d/x11ttf graf3d/x3d rootx
SYSTEML = $(UNIXL)
SYSTEMO = $(UNIXO)
SYSTEMDO = $(UNIXDO)
endif
endif
Fons Rademakers
committed
ifeq ($(BUILDGL),yes)
MODULES += graf3d/gl graf3d/eve
endif
endif
ifeq ($(BUILDRFIO),yes)
endif
ifeq ($(BUILDCASTOR),yes)
endif
endif
MODULES += montecarlo/g4root
ifeq ($(BUILDMEMSTAT),yes)
MODULES += misc/memstat
endif
ifeq ($(BUILDASIMAGE),yes)
MODULES += montecarlo/pythia6
endif
ifeq ($(BUILDFPYTHIA8),yes)
MODULES += montecarlo/pythia8
MODULES += math/fftw
MODULES += bindings/pyroot
MODULES += bindings/ruby
endif
MODULES += graf2d/qt gui/qtroot
MODULES += gui/qtgsi
MODULES += math/genvector
endif
ifeq ($(BUILDMATHMORE),yes)
MODULES += math/mathmore
Fons Rademakers
committed
ifeq ($(BUILDREFLEX),yes)
# put reflex right in front of CINT; CINT needs it
MODULES := $(subst cint/cint,cint/reflex cint/cint,$(MODULES))
Fons Rademakers
committed
endif
MODULES += math/minuit2
MODULES += math/unuran
MODULES := $(subst cint/cint,cint/cint cint/cint7,$(MODULES))
Fons Rademakers
committed
ifeq ($(BUILDCINTEX),yes)
Fons Rademakers
committed
endif
ifeq ($(BUILDROOFIT),yes)
MODULES += roofit/roofitcore roofit/roofit
MODULES += geom/gdml
Fons Rademakers
committed
endif
endif
endif
Fons Rademakers
committed
endif
ifneq ($(F77),)
MODULES += misc/minicern hist/hbook
endif
ifeq ($(BUILDXRD),yes)
MODULES += net/xrootd net/netx
endif
MODULES += proof/clarens
endif
ifeq ($(BUILDPEAC),yes)
MODULES += proof/peac
MODULES += net/rpdutils net/rootd proof/proofd
MODULES += proof/proofd
MODULES += proof/proofx
-include MyModules.mk # allow local modules
ifneq ($(findstring $(MAKECMDGOALS),distclean maintainer-clean),)
MODULES += core/unix core/winnt graf2d/x11 graf2d/x11ttf \
graf2d/win32gdk graf3d/gl graf3d/ftgl io/rfio io/castor \
montecarlo/pythia6 montecarlo/pythia8 misc/table \
sql/mysql sql/pgsql sql/sapdb net/srputils graf3d/x3d \
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 \
proof/proofd proof/proofx proof/clarens proof/peac \
sql/oracle io/xmlparser math/mathmore cint/reflex cint/cintex \
math/minuit2 net/monalisa math/fftw sql/odbc math/unuran \
geom/gdml graf3d/eve montecarlo/g4root net/glite misc/memstat
MODULES := $(sort $(MODULES)) # removes duplicates
endif
MODULES += main # must be last, $(ALLLIBS) must be fully formed
##### ROOT libraries #####
LPATH = lib
RPATH := -L$(LPATH)
CINTLIBS := -lCint
NEWLIBS := -lNew
ROOTLIBS := -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad \
-lTree -lMatrix -lMathCore -lThread
BOOTLIBS := -lCore -lCint -lMathCore
BOOTLIBS += -lCintex -lReflex
RINTLIBS := -lRint
else
CINTLIBS := $(LPATH)/libCint.lib
NEWLIBS := $(LPATH)/libNew.lib
ROOTLIBS := $(LPATH)/libCore.lib $(LPATH)/libCint.lib \
$(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)/libMathcore.lib $(LPATH)/libThread.lib
BOOTLIBS := $(LPATH)/libCore.lib $(LPATH)/libCint.lib \
$(LPATH)/libMathcore.lib
BOOTLIBS += $(LPATH)/libCintex.lib $(LPATH)/libReflex.lib
RINTLIBS := $(LPATH)/libRint.lib
endif
ROOTLIBSDEP = $(ORDER_) $(CORELIB) $(CINTLIB) $(IOLIB) $(NETLIB) $(HISTLIB) \
$(GRAFLIB) $(G3DLIB) $(GPADLIB) $(TREELIB) $(MATRIXLIB) \
$(MATHCORELIB)
BOOTLIBSDEP = $(ORDER_) $(CORELIB) $(CINTLIB) $(MATHCORELIB)
ifneq ($(ROOTDICTTYPE),cint)
ROOTLIBSDEP += $(CINTEXLIB) $(REFLEXLIB)
BOOTLIBSDEP += $(CINTEXLIB) $(REFLEXLIB)
# Force linking of not referenced libraries
ifeq ($(PLATFORM),aix5)
ROOTULIBS := -Wl,-u,.G__cpp_setupG__Net \
-Wl,-u,.G__cpp_setupG__Hist \
-Wl,-u,.G__cpp_setupG__Graf1 \
-Wl,-u,.G__cpp_setupG__G3D \
-Wl,-u,.G__cpp_setupG__GPad \
-Wl,-u,.G__cpp_setupG__Tree \
-Wl,-u,.G__cpp_setupG__Thread \
-Wl,-u,.G__cpp_setupG__Matrix
BOOTULIBS := -Wl,-u,.G__cpp_setupG__MathCore
ROOTULIBS := -Wl,-u,_G__cpp_setupG__Net \
-Wl,-u,_G__cpp_setupG__Hist \
-Wl,-u,_G__cpp_setupG__Graf1 \
-Wl,-u,_G__cpp_setupG__G3D \
-Wl,-u,_G__cpp_setupG__GPad \
-Wl,-u,_G__cpp_setupG__Tree \
-Wl,-u,_G__cpp_setupG__Thread \
-Wl,-u,_G__cpp_setupG__Matrix
BOOTULIBS := -Wl,-u,_G__cpp_setupG__MathCore
endif
ifeq ($(PLATFORM),win32)
ROOTULIBS := -include:_G__cpp_setupG__Net \
-include:_G__cpp_setupG__Hist \
-include:_G__cpp_setupG__Graf1 \
-include:_G__cpp_setupG__G3D \
-include:_G__cpp_setupG__GPad \
-include:_G__cpp_setupG__Tree \
-include:_G__cpp_setupG__Thread \
-include:_G__cpp_setupG__Matrix
BOOTULIBS := -include:_G__cpp_setupG__MathCore
endif
##### gcc version #####
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)
##### CINT Stub Functions Generation #####
ifeq ($(NOSTUBS),yes)
ROOTCINTTMP = export CXXFLAGS="$(CXXFLAGS)"; core/utils/src/rootcint_nostubs_tmp.sh -$(ROOTDICTTYPE)
CXXFLAGS += -DG__NOSTUBS
CINTCXXFLAGS += -DG__NOSTUBS
ifeq ($(NOSTUBSTEST),yes)
CXXFLAGS += -DG__NOSTUBSTEST
CINTCXXFLAGS += -DG__NOSTUBSTEST
endif
endif
ifeq ($(GCC_MAJOR),4)
PCHSUPPORTED := $(ENABLEPCH)
endif
ifeq ($(PCHSUPPORTED),yes)
PCHFILE = include/precompile.h.gch
PCHCXXFLAGS = -DUSEPCH -include precompile.h
PCHEXTRAOBJBUILD = $(CXX) $(CXXFLAGS) -DUSEPCH $(OPT) -x c++-header \
-c include/precompile.h $(CXXOUT)$(PCHFILE) \
&& touch $(PCHEXTRAOBJ)
##### f77 options #####
ifeq ($(F77LD),)
F77LD := $(LD)
endif
ifeq ($(F77OPT),)
F77OPT := $(OPT)
endif
ifeq ($(F77LDFLAGS),)
F77LDFLAGS := $(LDFLAGS)
endif
ifeq ($(GCC_MAJOR),3)
LIBFRTBEGIN := $(shell $(F77) -print-file-name=libfrtbegin.a)
F77LIBS := $(LIBFRTBEGIN) $(F77LIBS)
endif
endif
endif
LIBFRTBEGIN := $(shell $(F77) -print-file-name=libfrtbegin.a)
F77LIBS := $(LIBFRTBEGIN) $(F77LIBS)
ifeq ($(findstring $(MAKECMDGOALS),clean distclean maintainer-clean dist),)
ifeq ($(findstring clean-,$(MAKECMDGOALS)),)
ifeq ($(shell which svn 2>&1 | sed -ne "s@.*/svn@svn@p"),svn)
SVNREV := $(shell build/unix/svninfo.sh)
endif
MAKEDIST = build/unix/makedist.sh
MAKEDISTSRC = build/unix/makedistsrc.sh
MAKEVERSION = build/unix/makeversion.sh
MAKECOMPDATA = build/unix/compiledata.sh
MAKECHANGELOG = build/unix/makechangelog.sh
MAKEHTML = build/unix/makehtml.sh
MAKELOGHTML = build/unix/makeloghtml.sh
MAKERELNOTES = build/unix/makereleasenotes.sh
MAKESTATIC = build/unix/makestatic.sh
MAKELIB = build/win/makelib.sh
MAKECOMPDATA = build/win/compiledata.sh
endif
COMPILEDATA = include/compiledata.h
Fons Rademakers
committed
ROOTRC = etc/system.rootrc
ROOTMAP = etc/system.rootmap
##### libCore #####
COREL = $(BASEL1) $(BASEL2) $(BASEL3) $(CONTL) $(METAL) \
$(SYSTEML) $(CLIBL) $(METAUTILSL)
COREO = $(BASEO) $(CONTO) $(METAO) $(SYSTEMO) $(ZIPO) $(CLIBO) \
$(METAUTILSO)
COREDO = $(BASEDO) $(CONTDO) $(METADO) $(SYSTEMDO) $(CLIBDO) \
CORELIB := $(LPATH)/libCore.$(SOEXT)
COREMAP := $(CORELIB:.$(SOEXT)=.rootmap)
ifneq ($(BUILTINZLIB),yes)
CORELIBEXTRA += $(ZLIBCLILIB)
endif
##### In case shared libs need to resolve all symbols (e.g.: aix, win32) #####
Fons Rademakers
committed
ifeq ($(EXPLICITLINK),yes)
else
MAINLIBS =
endif
##### pre-compiled header support #####
ifeq ($(PCHSUPPORTED),yes)
include config/Makefile.precomp
endif
##### all #####
ALLHDRS :=
ALLLIBS := $(CORELIB)
ALLMAPS := $(COREMAP)
ALLEXECS :=
INCLUDEFILES :=
##### RULES #####
.SUFFIXES: .cxx .d
.PRECIOUS: include/%.h
# special rules (need to be defined before generic ones)
$(MAKEDEP) -R -f$(patsubst %.o,%.d,$@) -Y -w 1000 -- \
$(CXXFLAGS) -D__cplusplus -I$(CINTDIR)/lib/prec_stl \
-I$(CINTDIR)/stl -I$(CINTDIR)/inc -- $<
$(CXX) $(NOOPT) $(CXXFLAGS) -I. -I$(CINTDIR)/inc $(CXXOUT)$@ -c $<
G__c_%.o: G__c_%.c
$(MAKEDEP) -R -f$(patsubst %.o,%.d,$@) -Y -w 1000 -- \
$(CFLAGS) -I$(CINTDIR)/lib/prec_stl \
-I$(CINTDIR)/stl -I$(CINTDIR)/inc -- $<
$(CC) $(NOOPT) $(CFLAGS) -I. -I$(CINTDIR)/inc $(CXXOUT)$@ -c $<
$(MAKEDEP) -R -fcint/cint/$*.d -Y -w 1000 -- $(CINTCXXFLAGS) -I. -D__cplusplus -- $<
$(CXX) $(OPT) $(CINTCXXFLAGS) -I. $(CXXOUT)$@ -c $<
$(MAKEDEP) -R -fcint/cint/$*.d -Y -w 1000 -- $(CINTCFLAGS) -I. -- $<
$(CC) $(OPT) $(CINTCFLAGS) -I. $(CXXOUT)$@ -c $<
$(MAKEDEP) -R -fcint/cint7/$*.d -Y -w 1000 -- $(CINT7CXXFLAGS) -I. -D__cplusplus -- $<
$(CXX) $(OPT) $(CINT7CXXFLAGS) -I. $(CXXOUT)$@ -c $<
$(MAKEDEP) -R -fcint/cint7/$*.d -Y -w 1000 -- $(CINT7CFLAGS) -I. -- $<
$(CC) $(OPT) $(CINT7CFLAGS) -I. $(CXXOUT)$@ -c $<
build/%.o: build/%.cxx
$(CXX) $(OPT) $(CXXFLAGS) $(CXXOUT)$@ -c $<
build/%.o: build/%.c
$(CC) $(OPT) $(CFLAGS) $(CXXOUT)$@ -c $<
%.o: %.cxx
$(MAKEDEP) -R -f$*.d -Y -w 1000 -- $(CXXFLAGS) -D__cplusplus -- $<
$(CXX) $(OPT) $(CXXFLAGS) $(PCHCXXFLAGS) $(CXXOUT)$@ -c $<
%.o: %.c
$(MAKEDEP) -R -f$*.d -Y -w 1000 -- $(CFLAGS) -- $<
%.o: %.f
ifeq ($(F77),f2c)
f2c -a -A $<
else
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
Fons Rademakers
committed
ifneq ($(findstring map, $(MAKECMDGOALS)),)
.NOTPARALLEL:
endif
all: rootexecs postbin
fast: rootexecs
skip:
@true;
-include MyRules.mk # allow local rules
ifeq ($(findstring $(MAKECMDGOALS),clean distclean maintainer-clean dist \
distsrc version install uninstall showbuild \
changelog html debian redhat),)
ifeq ($(findstring skip,$(MAKECMDGOALS))$(findstring fast,$(MAKECMDGOALS)),)
-include $(INCLUDEFILES)
endif
INCLUDEPCHRULES = yes
include config/Makefile.precomp
-include build/dummy.d # must be last include
endif
rootcint: all-cint all-utils
rootlibs: rootcint compiledata $(ALLLIBS) $(ALLMAPS)
postbin: $(POSTBIN)
config config/Makefile.:
@(if [ ! -f config/Makefile.config ] || \
[ ! -f config/Makefile.comp ]; then \
echo ""; echo "Please, run ./configure first"; echo ""; \
exit 1; \
fi)
@(if [ ! -f config/Makefile.config ] || \
[ ! -f config/Makefile.comp ]; then \
./configure --build=debug `cat config.status 2>/dev/null`; \
fi)
endif
# Target Makefile is synonym for "run (re-)configure"
# Makefile is target as we need to re-parse dependencies after
Fons Rademakers
committed
# configure is run (as RConfigure.h changed etc)
config/Makefile.config config/Makefile.comp include/RConfigure.h \
Fons Rademakers
committed
include/RConfigOptions.h etc/system.rootauthrc etc/system.rootdaemonrc \
etc/root.mimes $(ROOTRC) \
bin/root-config: Makefile
ifeq ($(findstring $(MAKECMDGOALS),distclean maintainer-clean debian redhat),)
Fons Rademakers
committed
Makefile: configure config/rootrc.in config/RConfigure.in config/Makefile.in \
config/Makefile-comp.in config/root-config.in config/rootauthrc.in \
config/rootdaemonrc.in config/mimes.unix.in config/mimes.win32.in \
config.status
@( $(RECONFIGURE) "$?" || ( \
echo ""; echo "Please, run ./configure again as config option files ($?) have changed."; \
echo ""; exit 1; \
Fons Rademakers
committed
Fons Rademakers
committed
$(COMPILEDATA): config/Makefile.$(ARCH) config/Makefile.comp $(MAKECOMPDATA)
@$(MAKECOMPDATA) $(COMPILEDATA) "$(CXX)" "$(OPTFLAGS)" "$(DEBUGFLAGS)" \
"$(CXXFLAGS)" "$(SOFLAGS)" "$(LDFLAGS)" "$(SOEXT)" "$(SYSLIBS)" \
"$(LIBDIR)" "$(BOOTLIBS)" "$(RINTLIBS)" "$(INCDIR)" \
"$(MAKESHAREDLIB)" "$(MAKEEXE)" "$(ARCH)" "$(ROOTBUILD)"
build/dummy.d: config Makefile $(ALLHDRS) $(RMKDEP) $(BINDEXP) $(PCHDEP)
@(if [ ! -f $@ ] ; then \
touch $@; \
fi)
$(CORELIB): $(COREO) $(COREDO) $(CINTLIB) $(PCREDEP) $(CORELIBDEP)
Fons Rademakers
committed
ifneq ($(ARCH),alphacxx6)
@$(MAKELIB) $(PLATFORM) $(LD) "$(LDFLAGS)" \
"$(SOFLAGS)" libCore.$(SOEXT) $@ "$(COREO) $(COREDO)" \
"$(CORELIBEXTRA) $(PCRELDFLAGS) $(PCRELIB) $(CRYPTLIBS)"
Fons Rademakers
committed
else
@$(MAKELIB) $(PLATFORM) $(LD) "$(CORELDFLAGS)" \
"$(SOFLAGS)" libCore.$(SOEXT) $@ "$(COREO) $(COREDO)" \
"$(CORELIBEXTRA) $(PCRELDFLAGS) $(PCRELIB) $(CRYPTLIBS)"
Fons Rademakers
committed
endif
$(COREMAP): $(RLIBMAP) $(MAKEFILEDEP) $(COREL)
$(RLIBMAP) -o $(COREMAP) -l $(CORELIB) -d $(CORELIBDEPM) -c $(COREL)
map:: $(ALLMAPS)
dist:
@$(MAKEDIST) $(GCC_VERS)
@$(MAKEDISTSRC)
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$@
rebase: $(ALLLIBS) $(ALLEXECS)
@echo -n "Rebasing binaries... "
@echo done.
@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
build/package/lib/makedebdir.sh
dpkg-buildpackage -rfakeroot -us -uc -i"G__|^debian|root-bin.png|\.d$$"
@echo "Debian GNU/Linux packages done. They are put in '../'"
@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"
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` ; \
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>'"
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
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
build/package/lib/makerpmspecs.sh rpm build/package/common \
build/package/rpm root-rootd >> root-rootd.spec.tmp
@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
clean::
@rm -f __compiledata *~ core.* include/precompile.*
ifeq ($(CXX),KCC)
clean::
@(find . -name "ti_files" -exec rm -rf {} \; >/dev/null 2>&1;true)
endif
@(find . -name "SunWS_cache" -exec rm -rf {} \; >/dev/null 2>&1;true)
distclean:: clean
Fons Rademakers
committed
-@mv -f include/RConfigure.h include/RConfigure.h-
Fons Rademakers
committed
-@mv -f include/RConfigOptions.h include/RConfigOptions.h-
@rm -f include/*.h $(ROOTMAP) $(CORELIB) $(COREMAP)
Fons Rademakers
committed
-@mv -f include/RConfigure.h- include/RConfigure.h
Fons Rademakers
committed
-@mv -f include/RConfigOptions.h- include/RConfigOptions.h
@rm -f bin/*.dll bin/*.exp bin/*.lib bin/*.pdb \
Fons Rademakers
committed
*.def .def
Fons Rademakers
committed
ifeq ($(PLATFORM),macosx)
Fons Rademakers
committed
@rm -f lib/*.dylib
@rm -f lib/*.so
endif
-@mv -f tutorials/gallery.root tutorials/gallery.root-
-@mv -f tutorials/mlp/mlpHiggs.root tutorials/mlp/mlpHiggs.root-
-@mv -f tutorials/quadp/stock.root tutorials/quadp/stock.root-
@(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 -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)
@rm -rf tutorials/eve/aliesd
-@mv -f tutorials/gallery.root- tutorials/gallery.root
-@mv -f tutorials/mlp/mlpHiggs.root- tutorials/mlp/mlpHiggs.root
-@mv -f tutorials/quadp/stock.root- tutorials/quadp/stock.root
@rm -f bin/roota bin/proofserva lib/libRoot.a
@rm -f $(CINTDIR)/include/*.dll $(CINTDIR)/include/sys/*.dll
@rm -f $(CINTDIR)/stl/*.dll build/dummy.d
@rm -f README/ChangeLog
@rm -rf README/ReleaseNotes
@rm -f $(CINTDIR)/lib/posix/a.out $(CINTDIR)/include/*.so*
@rm -f etc/daemons/rootd.rc.d etc/daemons/rootd.xinetd
@rm -f etc/daemons/proofd.rc.d etc/daemons/proofd.xinetd
@rm -f etc/daemons/olbd.rc.d etc/daemons/xrootd.rc.d
@rm -f etc/svninfo.txt macros/html.C
@(find . -path '*/daemons' -prune -o -name *.d -exec rm -rf {} \; >/dev/null 2>&1;true)
Fons Rademakers
committed
@(find . -name *.o -exec rm -rf {} \; >/dev/null 2>&1;true)
-@cd test && $(MAKE) 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 build/misc/root-help.el \
rootd/misc/rootd.rc.d build-arch-stamp build-indep-stamp \
configure-stamp build-arch-cint-stamp config.status config.log
version: $(CINTTMP)
@$(MAKEVERSION)
static: rootlibs
@$(MAKESTATIC) $(PLATFORM) "$(CXX)" "$(CC)" "$(LD)" "$(LDFLAGS)" \
"$(XLIBS)" "$(SYSLIBS)"
changelog:
@$(MAKECHANGELOG)
releasenotes:
@$(MAKERELNOTES)
html: $(ROOTEXE) changelog releasenotes
# Use DESTDIR to set a sandbox prior to calling "make install", e.g.:
# ./configure --prefix=/usr/
# make
# DESTDIR=/tmp/root_install/ make install
# cd /tmp/root_install
# tar czf ~/root-vxxxx.tar.gz usr
# Needed to create e.g. rpms.
install: all
@if [ -d $(DESTDIR)$(BINDIR) ]; then \
inode1=`ls -id $(DESTDIR)$(BINDIR) | awk '{ print $$1 }'`; \
inode2=`ls -id $$PWD/bin | awk '{ print $$1 }'`; \
if ([ -d $(DESTDIR)$(BINDIR) ] && [ "x$$inode1" = "x$$inode2" ]); then \
Fons Rademakers
committed
echo "Everything already installed..."; \
else \
if [ "$(USECONFIG)" = "FALSE" ] && [ -z "$(ROOTSYS)" ]; then \
echo "ROOTSYS not set, set it to a destination directory"; \
exit 1; \
fi; \
Fons Rademakers
committed
echo "Installing binaries in $(DESTDIR)$(BINDIR)"; \
$(INSTALLDIR) $(DESTDIR)$(BINDIR); \
$(INSTALLDATA) bin/* $(DESTDIR)$(BINDIR); \
Fons Rademakers
committed
echo "Installing libraries in $(DESTDIR)$(LIBDIR)"; \
$(INSTALLDIR) $(DESTDIR)$(LIBDIR); \
$(INSTALLDATA) bin/*.dll $(DESTDIR)$(BINDIR); \
for f in $(DESTDIR)$(LIBDIR)/*.dll; do \
bindll=`basename $$f | sed 's,\..*$$,,'`; \
bindll=`ls $(DESTDIR)$(BINDIR)/$${bindll}.*dll`; \
done; \
elif [ x"$(PLATFORM)" = x"win32" ]; then \
$(INSTALLDATA) $(GDKDLL) $(DESTDIR)$(BINDIR); \
$(INSTALLDATA) $(GDKDLLS) $(DESTDIR)$(BINDIR); \
Fons Rademakers
committed
echo "Installing headers in $(DESTDIR)$(INCDIR)"; \
$(INSTALLDIR) $(DESTDIR)$(INCDIR); \
Fons Rademakers
committed
echo "Installing main/src/rmain.cxx in $(DESTDIR)$(INCDIR)"; \
$(INSTALLDATA) main/src/rmain.cxx $(DESTDIR)$(INCDIR); \
echo "Installing cint/cint/include cint/cint/lib and cint/cint/stl in $(DESTDIR)$(CINTINCDIR)"; \
Philippe Canal
committed
$(INSTALLDIR) $(DESTDIR)$(CINTINCDIR)/cint; \
$(INSTALLDATA) cint/cint/include $(DESTDIR)$(CINTINCDIR)/cint; \
$(INSTALLDATA) cint/cint/lib $(DESTDIR)$(CINTINCDIR)/cint; \
$(INSTALLDATA) cint/cint/stl $(DESTDIR)$(CINTINCDIR)/cint; \
find $(DESTDIR)$(CINTINCDIR) -name CVS -exec rm -rf {} \; >/dev/null 2>&1; \
find $(DESTDIR)$(CINTINCDIR) -name .svn -exec rm -rf {} \; >/dev/null 2>&1; \
Fons Rademakers
committed
echo "Installing icons in $(DESTDIR)$(ICONPATH)"; \
$(INSTALLDIR) $(DESTDIR)$(ICONPATH); \
$(INSTALLDATA) icons/*.xpm $(DESTDIR)$(ICONPATH); \
$(INSTALLDATA) icons/*.png $(DESTDIR)$(ICONPATH); \
$(INSTALLDATA) icons/*.gif $(DESTDIR)$(ICONPATH); \
echo "Installing fonts in $(DESTDIR)$(TTFFONTDIR)"; \
$(INSTALLDIR) $(DESTDIR)$(TTFFONTDIR); \
$(INSTALLDATA) fonts/* $(DESTDIR)$(TTFFONTDIR); \
find $(DESTDIR)$(TTFFONTDIR) -name CVS -exec rm -rf {} \; >/dev/null 2>&1; \
find $(DESTDIR)$(TTFFONTDIR) -name .svn -exec rm -rf {} \; >/dev/null 2>&1; \
Fons Rademakers
committed
$(INSTALLDIR) $(DESTDIR)$(DOCDIR); \
$(INSTALLDATA) LICENSE $(DESTDIR)$(DOCDIR); \
find $(DESTDIR)$(DOCDIR) -name CVS -exec rm -rf {} \; >/dev/null 2>&1; \
find $(DESTDIR)$(DOCDIR) -name .svn -exec rm -rf {} \; >/dev/null 2>&1; \
Fons Rademakers
committed
echo "Installing tutorials in $(DESTDIR)$(TUTDIR)"; \
$(INSTALLDIR) $(DESTDIR)$(TUTDIR); \
$(INSTALLDATA) tutorials/* $(DESTDIR)$(TUTDIR); \
find $(DESTDIR)$(TUTDIR) -name CVS -exec rm -rf {} \; >/dev/null 2>&1; \
find $(DESTDIR)$(TUTDIR) -name .svn -exec rm -rf {} \; >/dev/null 2>&1; \
Fons Rademakers
committed
echo "Installing tests in $(DESTDIR)$(TESTDIR)"; \
$(INSTALLDIR) $(DESTDIR)$(TESTDIR); \
$(INSTALLDATA) test/* $(DESTDIR)$(TESTDIR); \
find $(DESTDIR)$(TESTDIR) -name CVS -exec rm -rf {} \; >/dev/null 2>&1; \
find $(DESTDIR)$(TESTDIR) -name .svn -exec rm -rf {} \; >/dev/null 2>&1; \
Fons Rademakers
committed
echo "Installing macros in $(DESTDIR)$(MACRODIR)"; \
$(INSTALLDIR) $(DESTDIR)$(MACRODIR); \
$(INSTALLDATA) macros/* $(DESTDIR)$(MACRODIR); \
find $(DESTDIR)$(MACRODIR) -name CVS -exec rm -rf {} \; >/dev/null 2>&1; \
find $(DESTDIR)$(MACRODIR) -name .svn -exec rm -rf {} \; >/dev/null 2>&1; \
Fons Rademakers
committed
echo "Installing man(1) pages in $(DESTDIR)$(MANDIR)"; \
$(INSTALLDIR) $(DESTDIR)$(MANDIR); \
$(INSTALLDATA) man/man1/* $(DESTDIR)$(MANDIR); \
find $(DESTDIR)$(MANDIR) -name CVS -exec rm -rf {} \; >/dev/null 2>&1; \
find $(DESTDIR)$(MANDIR) -name .svn -exec rm -rf {} \; >/dev/null 2>&1; \
echo "Installing config files in $(DESTDIR)$(ETCDIR)"; \
Fons Rademakers
committed
rm -f $(DESTDIR)$(ETCDIR)/system.rootmap; \
Fons Rademakers
committed
$(INSTALLDIR) $(DESTDIR)$(ETCDIR); \
$(INSTALLDATA) etc/* $(DESTDIR)$(ETCDIR); \
find $(DESTDIR)$(ETCDIR) -name CVS -exec rm -rf {} \; >/dev/null 2>&1; \
find $(DESTDIR)$(ETCDIR) -name .svn -exec rm -rf {} \; >/dev/null 2>&1; \
echo "Installing Autoconf macro in $(DESTDIR)$(ACLOCALDIR)"; \
$(INSTALLDIR) $(DESTDIR)$(ACLOCALDIR); \
$(INSTALLDATA) build/misc/root.m4 $(DESTDIR)$(ACLOCALDIR); \
echo "Installing Emacs Lisp library in $(DESTDIR)$(ELISPDIR)"; \
$(INSTALLDIR) $(DESTDIR)$(ELISPDIR); \
$(INSTALLDATA) build/misc/root-help.el $(DESTDIR)$(ELISPDIR); \
echo "Installing GDML conversion scripts in $(DESTDIR)$(LIBDIR)"; \
$(INSTALLDATA) geom/gdml/*.py $(DESTDIR)$(LIBDIR); \
find $(DESTDIR)$(DATADIR) -name CVS -exec rm -rf {} \; >/dev/null 2>&1; \
find $(DESTDIR)$(DATADIR) -name .svn -exec rm -rf {} \; >/dev/null 2>&1; \
@if [ -d $(DESTDIR)$(BINDIR) ]; then \
inode1=`ls -id $(DESTDIR)$(BINDIR) | awk '{ print $$1 }'`; \
fi; \
inode2=`ls -id $$PWD/bin | awk '{ print $$1 }'`; \
if [ -d $(DESTDIR)$(BINDIR) ] && [ "x$$inode1" = "x$$inode2" ]; then \
$(MAKE) distclean ; \
else \
rm -f $(DESTDIR)$(BINDIR)/`basename $(CINT)`; \
rm -f $(DESTDIR)$(BINDIR)/`basename $(MAKECINT)`; \
rm -f $(DESTDIR)$(BINDIR)/`basename $(ROOTCINTEXE)`; \
rm -f $(DESTDIR)$(BINDIR)/`basename $(RMKDEP)`; \
if [ "x$(BINDEXP)" != "x" ] ; then \
rm -f $(DESTDIR)$(BINDIR)/`basename $(BINDEXP)`; \
fi; \
rm -f $(DESTDIR)$(BINDIR)/root-config; \
rm -f $(DESTDIR)$(BINDIR)/thisroot.sh; \
rm -f $(DESTDIR)$(BINDIR)/thisroot.csh; \
for i in $(ALLEXECS) ; do \
rm -f $(DESTDIR)$(BINDIR)/`basename $$i`; \
done; \
if test -d $(DESTDIR)$(BINDIR) && \
test "x`ls $(DESTDIR)$(BINDIR)`" = "x" ; then \
rm -rf $(DESTDIR)$(BINDIR); \
fi ; \
for lib in $(ALLLIBS) $(CINTLIB) $(ALLMAPS); do \
rm -f $(DESTDIR)$(LIBDIR)/`basename $$lib`* ; \
done ; \
if test "x$(RFLX_GRFLXPY)" != "x"; then \
rm -f $(DESTDIR)$(LIBDIR)/$(RFLX_GRFLXPY); \
fi; \
if test "x$(RFLX_GRFLXPYC)" != "x"; then \
rm -f $(DESTDIR)$(LIBDIR)/$(RFLX_GRFLXPYC); \
fi; \
if test "x$(RFLX_GRFLXPY)$(RFLX_GRFLXPYC)" != "x"; then \
dir=$(RFLX_GRFLXDD:lib/=); \
while test "x$${dir}" != "x" && \
test -d $(DESTDIR)$(LIBDIR)/$${dir} && \
test "x`ls $(DESTDIR)$(INCDIR)/$${dir}`" = "x"; do \
rm -rf $(DESTDIR)$(INCDIR)/$${dir}; \
dir=$(dirname $${dir}); \
done; \
fi; \
if test -d $(DESTDIR)$(LIBDIR) && \
rm -rf $(DESTDIR)$(LIBDIR); \
fi ; \