--- /fink_packaging/roofit/RooFitCore/GNUmakefile.standalone Fri Oct 4 16:08:58 2002 +++ RooFitCore/GNUmakefile.standalone Wed Mar 24 14:05:20 2004 @@ -27,7 +27,6 @@ # from the RooFitCore/ directory # # # # Build targets # - # lib - make libRooFitCore.a # # shlib - make libRooFitCore.so # # clean - delete all intermediate and final build objects # # # @@ -36,29 +35,32 @@ # --- External configuration ---------------------------------- CC = g++ -CCFLAGS = -O2 -Wno-deprecated +CCFLAGS = -pipe -O2 -Wno-deprecated MFLAGS = -MM -Wno-deprecated INCLUDES = WORKDIR = tmp/ +LDFLAGS = -O -Xlinker -flat_namespace -bind_at_load -bundle -Wl,-x +SOFLAGS = -dynamiclib -flat_namespace -undefined suppress LIBDIR = $(WORKDIR) # ------------------------------------------------------------- # Internal configuration PACKAGE=RooFitCore -LD_LIBRARY_PATH:=$(ROOTSYS)/lib +MAJOR = $(shell echo @VERSION@ | awk -F "." '{printf("%d",$$1)}') +MINOR = $(shell echo @VERSION@ | awk -F "." '{printf("%d",$$2)}') +REVIS = $(shell echo @VERSION@ | awk -F "." '{printf("%d",$$3)}') + OBJDIR=$(WORKDIR)/objects/ INCDIR=$(WORKDIR)/$(PACKAGE)/ VPATH=$(INCDIR) $(OBJDIR) -INCLUDES += -I.. -I$(WORKDIR)/ -I$(ROOTSYS)/include -ROOTSYS ?= ERROR_RootSysIsNotDefined +INCLUDES += -I.. -I$(WORKDIR)/ $(shell root-config --cflags) RDLLIST = $(filter-out $(PACKAGE)_LinkDef.rdl,$(wildcard *.rdl)) SKIPLIST = makedocs.cc RooIntegratorTest.cc CINTFILE = $(PACKAGE)Cint.cc CINTOBJ = $(PACKAGE)Cint.o -LIBFILE = $(LIBDIR)/lib$(PACKAGE).a -SHLIBFILE = $(LIBDIR)/lib$(PACKAGE).so +SHLIBFILE = $(LIBDIR)/lib$(PACKAGE).dylib default: shlib @@ -99,34 +101,31 @@ @mkdir -p $(OBJDIR) @cp *.hh $(INCDIR) @echo "Running rootcint" - @ROOTSYS=$(ROOTSYS) - @export ROOTSYS - @cd $(INCDIR) ; $(ROOTSYS)/bin/rootcint -f $(CINTFILE) -c $(INCLUDES) $(HHLIST) $(PACKAGE)_LinkDef.hh + @cd $(INCDIR) ; rootcint -f $(CINTFILE) -c $(INCLUDES) $(HHLIST) $(PACKAGE)_LinkDef.hh @echo "Compiling $(CINTFILE)" @$(CC) $(CCFLAGS) -c $(INCDIR)/$(CINTFILE) -o $(OBJDIR)/$(CINTOBJ) $(INCLUDES) -# Rule to combine objects into a library -$(LIBFILE): $(OLIST) $(INCDIR)/$(CINTFILE)) $(patsubst %.cc,%.o,$(OBJDIR)/$(CINTFILE)) - @echo "Making $(LIBFILE)" - @rm -f $(LIBFILE) - @ar q $(LIBFILE) $(addprefix $(OBJDIR)/,$(OLIST) $(patsubst %.cc,%.o,$(CINTFILE))) - @ranlib $(LIBFILE) - # Rule to combine objects into a shared library $(SHLIBFILE): $(OLIST) $(patsubst %.cc,%.o,$(OBJDIR)/$(CINTFILE)) @echo "Making $(SHLIBFILE)" @rm -f $(SHLIBFILE) - @$(CC) $(addprefix $(OBJDIR)/,$(OLIST) $(patsubst %.cc,%.o,$(CINTFILE))) -shared -o $(SHLIBFILE) + @$(CC) $(addprefix $(OBJDIR)/,$(OLIST) $(patsubst \ + %.cc,%.o,$(CINTFILE))) $(LDFLAGS) `root-config --glibs` -lHtml \ + -lMinuit -o $(subst .dylib,.so,$@) + @$(CC) $(addprefix $(OBJDIR)/,$(OLIST) $(patsubst %.cc,%.o,$(CINTFILE))) \ + $(SOFLAGS) `root-config --glibs` -lHtml -lMinuit \ + -install_name $(subst $(LIBDIR),@PREFIX@/lib/root,$(subst .dylib,.$(MAJOR).dylib,$@)) \ + -compatibility_version $(MAJOR) -current_version $(MAJOR).$(MINOR).$(REVIS) \ + -o $(subst .dylib,.$(MAJOR).$(MINOR).dylib,$@) + # Useful build targets -lib: $(LIBFILE) shlib: $(SHLIBFILE) clean: rm -f $(OBJDIR)/* rm -f $(INCDIR)/* - rm -f $(LIBFILE) rm -f $(SHLIBFILE) -.PHONY : shlib lib default clean +.PHONY : shlib default clean -include $(addprefix $(INCDIR)/,$(DLIST)) --- RooFitCore/RooHtml.cc Tue Oct 22 17:44:55 2002 +++ RooFitCore.new/RooHtml.cc Wed Jun 25 17:13:03 2003 @@ -35,7 +35,7 @@ #endif const Int_t kSpaceNum = 1; -const char *formatStr = "%12s %5s %s"; +//const char *formatStr = "%12s %5s %s"; ClassImp(RooHtml) ; --- RooFitCore.orig/RooFormula.cc Mon Apr 5 15:44:11 2004 +++ RooFitCore.new/RooFormula.cc Sat Aug 14 19:30:13 2004 @@ -233,6 +233,20 @@ Int_t +RooFormula::DefinedVariable(TString &name, Int_t &action) +{ + // ROOT version 4.00/01 and above uses this API. + // Need to define both here to make overloading working + // regardless of ROOT change. + +#if ROOT_VERSION_CODE >= ROOT_VERSION(4,0,1) + action = kDefinedVariable; +#endif + + return DefinedVariable(name); +} + +Int_t RooFormula::DefinedVariable(TString &name) { // Check if a variable with given name is available @@ -320,7 +334,7 @@ // cout << "DefinedVariable " << arg->GetName() ; // if (labelName) cout << "::" << labelName ; -// cout << " registered with code " << _useList.GetEntries()-1 << endl ; +// cout << " registered with code " << _useList.GetSize()-1 << endl ; return (_useList.GetSize()-1) ; } --- RooFitCore.orig/RooFormula.rdl Mon Apr 5 15:44:11 2004 +++ RooFitCore.new/RooFormula.rdl Sat Aug 14 19:29:19 2004 @@ -59,7 +59,8 @@ void initCopy(const RooFormula& other) ; // Interface to TFormula engine - Int_t DefinedVariable(TString &name) ; + Int_t DefinedVariable(TString &name) ; // Root 3 API + Int_t DefinedVariable(TString &name, Int_t &action) ; // Root 4 API Double_t DefinedValue(Int_t code) ; RooArgSet* _nset ;