diff --git a/etc/vmc/MakeRules b/etc/vmc/MakeRules index 868a11fc2ac8786c7b88c5f96916035efd096f5e..63579daa1f9165b559ddb3fdf82cd70950c3685a 100644 --- a/etc/vmc/MakeRules +++ b/etc/vmc/MakeRules @@ -46,7 +46,7 @@ $(BINDIR)/%.o : %.f $(BINDIR)/%.o : %.F @echo $*.F @[ -d $(dir $@) ] || mkdir -p $(dir $@) - @$(F77) $(FFLAGS) -c $*.F -o $(BINDIR)/$*.o + $(F77) $(FFLAGS) -c $*.F -o $(BINDIR)/$*.o diff --git a/etc/vmc/Makefile.linux b/etc/vmc/Makefile.linux index cff396a39fd6de73d5cc90b1d98f995bf5a86e31..af6121f7f781db87e01fbcac40474e69b2ae9634 100644 --- a/etc/vmc/Makefile.linux +++ b/etc/vmc/Makefile.linux @@ -3,10 +3,19 @@ # Linux platform dependent definitions # The compilers -CXX = g++ -F77 = g77 +CXX = g++ CC = gcc +ifneq (,$(findstring g95,$(ROOTBUILD))) +F77 = g95 +else +ifneq (,$(findstring gfortran,$(ROOTBUILD))) +F77 = gfortran +else +F77 = g77 +endif +endif + # Global optimisation OPT = -O2 -g @@ -23,7 +32,16 @@ AWK = awk # CXXOPTS = $(OPT) -Wall -W -fPIC -pipe -Woverloaded-virtual COPT = $(OPT) + +ifneq (,$(findstring g95,$(ROOTBUILD))) +FOPT = $(OPT) -fno-second-underscore +else +ifneq (,$(findstring gfortran,$(ROOTBUILD))) FOPT = $(OPT) -fno-second-underscore +else +FOPT = $(OPT) -fno-second-underscore +endif +endif GCC_MAJOR := $(shell $(CXX) -v 2>&1 | \ grep version | cut -d' ' -f3 | cut -d'.' -f1) @@ -38,12 +56,32 @@ CLIBCXXOPTS = $(CLIBDEFS) CLIBCOPT = $(CLIBDEFS) CLIBFOPT = $(CLIBDEFS) +ifneq (,$(findstring g95,$(ROOTBUILD))) +CLIBDEFS += -DCERNLIB_G95 +else +ifneq (,$(findstring gfortran,$(ROOTBUILD))) +CLIBDEFS += -DCERNLIB_GFORTRAN +else + +endif +endif + LD = g++ LDFLAGS = $(OPT) SHLD = $(LD) SOFLAGS = -Wl,-soname,$(notdir $@) -shared + +ifneq (,$(findstring g95,$(ROOTBUILD))) +SHLIB += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95 +else +ifneq (,$(findstring gfortran,$(ROOTBUILD))) +SHLIB := $(shell gfortran -print-file-name=libgfortran.so) +SHLIB += $(shell gfortran -print-file-name=libgfortranbegin.a) +else SHLIB = -lg2c +endif +endif # Graphics # diff --git a/hist/inc/TFormulaPrimitive.h b/hist/inc/TFormulaPrimitive.h index 846322cf0eaee180c1bdd4df0560f97da909e2c1..740ec342b54489b691c8c23a7930b52391db6301 100644 --- a/hist/inc/TFormulaPrimitive.h +++ b/hist/inc/TFormulaPrimitive.h @@ -66,6 +66,9 @@ protected: Int_t fNArguments; //number of arguments Int_t fNParameters; //number of parameters Bool_t fIsStatic; // indication if the function is static +private: + TFormulaPrimitive(const TFormulaPrimitive&); // Not implemented + TFormulaPrimitive& operator=(const TFormulaPrimitive&); // Not implemented public: TFormulaPrimitive(); TFormulaPrimitive(const char *name,const char *formula, GenFunc0 fpointer);