# This is the Go4 Makefile configuration included by all package Makefiles ifeq ($(Go4_Makefile_Config),) Go4_Makefile_Config = included ifndef GO4_Configured -include $(GO4SYS)/build/Makefile.gener ifndef GO4_OS GO4_OS=Linux endif endif ifdef debug DOOPTIMIZATION = false endif #rules which does not require any dependency checks FASTRULES += package setup clean clean-bin map ifneq ($(findstring $(MAKECMDGOALS), package),) DOPACKAGE = true endif ifneq ($(findstring $(MAKECMDGOALS), $(FASTRULES)),) DOING_FASTRULE=true endif ifdef ROOTINCPATH ifeq ($(wildcard $(ROOTINCPATH)/RVersion.h),) $(error No files found in $(ROOTINCPATH), check your ROOT installation) endif endif ifeq ($(GO4_OS), Win32) GO4_WIN32 = true endif include $(GO4SYS)/build/Makefile.$(GO4_OS) #### File suffixes: ### SrcSuf = cxx CSuf = c HedSuf = h DepSuf = d #file prefixes DICT_PREFIX = G__ DICT_R6SUFF = _rdict.pcm LIB_PREFIX = lib GO4_USERLIBNAME = $(LIB_PREFIX)Go4UserAnalysis GO4_USEREXENAME = MainUserAnalysis #### Library version numbers: ### MAJOR = 6 MINOR = 4.99 VERSSUF = $(MAJOR).$(MINOR) #### Go4 general build flags: ### ifdef GO4PACKAGE INCLUDES = -Iinclude -I. else ifdef GO4_WIN32 INCLUDES = -I'$(shell cygpath -w $(GO4SYS)/include)' else ifdef GO4PREFIX INCLUDES = -I$(GO4INCPATH) else INCLUDES = -I$(GO4SYS)/include #this is for very old user code, when go4/include was not exists INCLUDES += -I$(GO4SYS) endif endif endif ifdef USEHDF5 INCLUDES += -I$(HDF5INCLUDEPATH) DEFINITIONS += -D__GO4HDF5__ endif ### suppress ROOT6 compiler warnings, should be eliminated soon ifdef GO4_WIN32 DEFINITIONS += -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER endif #### Combine compilers flags in one variable: ### CXXFLAGS = $(OPTIONS) $(EXTRACXXOPTIONS) $(DEFINITIONS) $(ROOTCFLAGS) $(INCLUDES) CFLAGS = $(OPTIONS) $(EXTRACOPTIONS) $(DEFINITIONS) $(INCLUDES) LDRPATHS = $(ROOTLIBPATH) $(GO4LIBPATH) #QT relevant variables ifdef GO4_QT ifndef USEGEDEDITOR QTGO4DEFINITIONS += -D__NOGO4GED__ endif ifndef USEASIMAGE QTGO4DEFINITIONS += -D__NOGO4ASI__ endif QTGO4DEFINITIONS += $(DEFINITIONS) ifdef USEHDF5 QTGO4DEFINITIONS += -D__GO4HDF5__ endif ifdef GO4_DESIGNER QTGO4DEFINITIONS += -D__GO4DESIGNER__ endif ifdef GO4_X11 QTGO4DEFINITIONS += -D__GO4X11__ endif ifdef GO4_WEB QTGO4DEFINITIONS += -D__GO4WEB__ endif QTCXXFLAGS += $(QTGO4DEFINITIONS) QMAKEOPTFLAG = "CONFIG+=release" QMAKEFLAGS = "QMAKE_CXXFLAGS=$(WARNINGS) $(QTGO4DEFINITIONS)" "QMAKE_CXXFLAGS_RELEASE = -O2" "QMAKE_CFLAGS_RELEASE = -O2" ifeq ($(GO4_OS),Win32) QMAKEFLAGS += "INCLUDEPATH+=$(shell cygpath -w $(ROOTINCPATH))" "DEPENDPATH+=$(shell cygpath -w $(ROOTINCPATH))" MAKEFORQT = nmake else QMAKEFLAGS += "INCLUDEPATH+=$(ROOTINCPATH)" "DEPENDPATH+=$(ROOTINCPATH)" MAKEFORQT = $(MAKE) ifeq ($(GO4_OS),Linux) QMAKEFLAGS += "QMAKE_LFLAGS += -Wl,--no-as-needed" endif endif ifndef GO4_WIN32 ifeq ($(DOOPTIMIZATION),false) QMAKEOPTFLAG = "CONFIG+=debug" QMAKEFLAGS += "QMAKE_CXXFLAGS+=-Wall" endif ifneq ($(findstring -std=c++11,$(ROOTCFLAGS)),) QMAKEOPTFLAG += "CONFIG+=c++11" endif ifneq ($(findstring -std=c++14,$(ROOTCFLAGS)),) QMAKEOPTFLAG += "CONFIG+=c++14" endif ifneq ($(findstring -std=c++17,$(ROOTCFLAGS)),) QMAKEOPTFLAG += "CONFIG+=c++17" endif ifneq ($(findstring -std=c++20,$(ROOTCFLAGS)),) QMAKEOPTFLAG += "CONFIG+=c++20" endif endif endif ### library load path: #root tools for file generations ifdef GO4PACKAGE GO4DLLPATH = lib else GO4DLLPATH = $(GO4LIBPATH) endif ### library load path: ROOTMAPNAME = .rootmap GO4MAP = $(GO4SYS)/$(ROOTMAPNAME) DOMAP = true ################ Go4 build scripts ################## MakeDepend = $(GO4SYS)/build/depend.sh $(ObjSuf) CleanLib = $(GO4SYS)/build/cleanlib.sh $(GO4_OS) "$(RM)" $(DllSuf) ifdef ISROOT6 # ROOTCINTGO4 = echo "Generating dictionary $@ ..."; \ # $(ROOTCLING) -f $@ -m $(ROOTLIBPATH)/libCore_rdict.pcm $(INCLUDES) $(DEFINITIONS) ROOTCINTGO4 = $(GO4SYS)/build/makedict.sh $(GO4_OS) $(DllSuf) "$(ROOTEXEPATH)" rootcling $@ "$(INCLUDES) $(DEFINITIONS)" MakeLibrary = $(GO4SYS)/build/makelib6.sh $(GO4_OS) "$(LD)" "$(RM)" "$(MV)" "$(LN)" "$(LDFLAGS)" "$(SOFLAGS)" $(DllSuf) "$(ROOTEXEPATH)" "$(MAKELIB_SET)" "$(INCLUDES) $(DEFINITIONS)" MakeLib = $(error MakeLib macro not defined, please change your Makefile) MakeMap = $(error MakeMap macro not defined, please change your Makefile) else ifeq ($(GO4_OS),Win32) RLIBMAP = rlibmap else RLIBMAP = $(ROOTEXEPATH)/bin/rlibmap endif ROOTCINTGO4 = $(GO4SYS)/build/makedict.sh $(GO4_OS) $(DllSuf) "$(ROOTEXEPATH)" rootcint $@ "$(INCLUDES) $(DEFINITIONS)" MakeLibrary = $(GO4SYS)/build/makelib.sh $(GO4_OS) "$(LD)" "$(RM)" "$(MV)" "$(LN)" "$(RLIBMAP)" "$(LDFLAGS)" "$(SOFLAGS)" $(DllSuf) "---" #this is for compatibility with old makefile, #where version suffix is required for library file #all new makefiles should use MakeLibrary call MakeLib = $(GO4SYS)/build/makelib.sh $(GO4_OS) "$(LD)" "$(RM)" "$(MV)" "$(LN)" "$(RLIBMAP)" "$(LDFLAGS)" "$(SOFLAGS)" $(DllSuf) $(VERSSUF) #Also kept for compatibility with old makefiles, #now rootmap will be produced by makelib call MakeMap = $(GO4SYS)/build/makemap.sh $(GO4_OS) $(RLIBMAP) endif # files sets GO4QTMAIN := GO4QTHEADS := LIBDEPENDENC := EXAMPDEPENDENCS := EXAMPLEEXECS := DISTRFILES := ifeq ($(GO4_OS),Win32) go4ldname = '$(GO4SYS)\lib\lib$1.lib' LIBS_BASESET = $(ROOTLIBS) \ libMinuit.lib \ $(if $(USEXMLIO),libXMLIO.lib,) \ $(if $(USESPECTRUM),libSpectrum.lib,) LIBS_WEB6SET = $(ROOTLIBS) libRHTTP.lib libROOTWebDisplay.lib LIBS_GUISET = $(if $(GO4_X11),$(ROOTGLIBS),$(ROOTLIBS)) \ $(if $(USEXMLIO), libXMLIO.lib,) \ $(if $(USESPECTRUM), libSpectrum.lib,) \ $(if $(USEASIMAGE), libASImage.lib,) \ $(if $(USEGEDEDITOR), libGed.lib libTreePlayer.lib,) \ '..\..\lib\libGo4Fit.lib' \ '..\..\lib\libGo4Base.lib' \ '..\..\lib\libGo4ThreadManager.lib' \ '..\..\lib\libGo4TaskHandler.lib' \ '..\..\lib\libGo4AnalBase.lib' \ '..\..\lib\libGo4GUI.lib' else go4ldname = -l$1 LIBS_BASESET = $(ROOTLIBS) \ -lpthread \ -lThread \ -lMinuit \ $(if $(USESPECTRUM),-lSpectrum,) \ $(if $(USEXMLIO),-lXMLIO,) \ -L$(GO4LIBPATH) ifneq ($(USERT),false) LIBS_BASESET += -lrt endif LIBS_WEB6SET = $(ROOTLIBS) -lRHTTP -lROOTWebDisplay LIBS_GUISET = $(if $(GO4_X11),$(ROOTGLIBS),$(ROOTLIBS)) \ -lMinuit \ -lThread \ -lpthread \ $(if $(USEXMLIO),-lXMLIO,) \ $(if $(USESPECTRUM),-lSpectrum,) \ $(if $(USEASIMAGE),-lASImage,) \ $(if $(USEGEDEDITOR),-lGed -lTreePlayer,) \ $(if $(LINKX11),-L/usr/X11R6/lib/ -lX11,) \ $(if $(GO4_X11),-L/usr/lib/ -lX11,) \ -L$(GO4LIBPATH) \ $(call go4ldname,Go4Fit) \ $(call go4ldname,Go4Base) \ $(call go4ldname,Go4ThreadManager) \ $(call go4ldname,Go4TaskHandler) \ $(call go4ldname,Go4AnalBase) \ $(call go4ldname,Go4GUI) endif LIBS_THRDMANSET = $(LIBS_BASESET) \ $(call go4ldname,Go4Base) \ $(call go4ldname,Go4ThreadManager) LIBS_TASKHANDSET = $(LIBS_THRDMANSET) \ $(call go4ldname,Go4TaskHandler) LIBS_FULLSET = $(LIBS_BASESET) \ $(call go4ldname,Go4Fit) \ $(call go4ldname,Go4Base) \ $(call go4ldname,Go4ThreadManager) \ $(call go4ldname,Go4TaskHandler) \ $(call go4ldname,Go4AnalBase) \ $(call go4ldname,Go4Analysis) ifdef USEHDF5 LIBS_FULLSET += -L $(HDF5LIBPATH) -lhdf5_cpp -lhdf5 #-lhdf5_hl endif # this is set of libraries which linked in MakeLibrary script against currently build library # used only in ROOT6 by makelib6.sh MAKELIB_SET = $(LIBS_FULLSET) BASIC_LIB_DEP = $(if $(USESPECTRUM),$(ROOTLIBPATH)/libSpectrum.$(DllSuf),) \ $(if $(USEXMLIO),$(ROOTLIBPATH)/libXMLIO.$(DllSuf),) \ $(ROOTLIBPATH)/libGpad.$(DllSuf) \ $(ROOTLIBPATH)/libTree.$(DllSuf) \ $(ROOTLIBPATH)/libMinuit.$(DllSuf) \ $(ROOTLIBPATH)/libThread.$(DllSuf) ANAL_LIB_DEP = $(GO4DLLPATH)/libGo4Analysis.$(DllSuf) \ $(GO4DLLPATH)/libGo4AnalBase.$(DllSuf) \ $(GO4DLLPATH)/libGo4TaskHandler.$(DllSuf) \ $(GO4DLLPATH)/libGo4ThreadManager.$(DllSuf) \ $(GO4DLLPATH)/libGo4Base.$(DllSuf) \ $(GO4DLLPATH)/libGo4Fit.$(DllSuf) \ $(BASIC_LIB_DEP) # for very old make files MAKEDEP = rmkdepend GO4LIBS = $(LIBS_FULLSET) GO4PATH = -L$(GO4DLLPATH) endif