# ====================================================================== # # HepTuple binary-building GNUmakefile # # ====================================================================== # ---------------------------------------------------------------------- # Identify the target binaries: # ---------------------------------------------------------------------- BINS = \ hepToyz \ TBINS = \ hepComplex \ hepAddTest \ hepAppend \ hepArrayTest \ hepDir \ hepFileManager \ hepHistArray \ hepIndexTest \ hepInoutTest \ hepQuickTest \ hepTransfer \ hepTwoFiles \ hepWriteReadRoot \ hepTimingTest \ hepWriteReadCwn \ hepWriteReadRwn \ hepX1 \ hepTest1 \ hepRwn2cwn \ hepTestHepTuple \ # For the moment, take hepTestRefresh out of the list because it kills # gcc v3.1. JMM 14 Feb. 2003 ifneq (, $(ROOTSYS)) # TBINS += hepAnonymous hepTestHBtoR hepTestRefresh tableToCWN FileSwitch TBINS += hepAnonymous hepTestHBtoR tableToCWN FileSwitch endif # ---------------------------------------------------------------------- # Identify and categorize the sources for the above-named binaries: # ---------------------------------------------------------------------- SIMPLEBINS = \ hepComplex \ hepAddTest \ hepAppend \ hepArrayTest \ hepDir \ hepFileManager \ hepHistArray \ hepIndexTest \ hepInoutTest \ hepQuickTest \ hepTransfer \ hepTwoFiles \ hepWriteReadRoot \ hepTimingTest \ hepToyz \ hepWriteReadCwn \ hepWriteReadRwn \ hepX1 \ hepRwn2cwn \ ifneq (, $(ROOTSYS)) # SIMPLEBINS += hepAnonymous hepTestHBtoR hepTestRefresh tableToCWN FileSwitch SIMPLEBINS += hepAnonymous hepTestHBtoR tableToCWN FileSwitch endif COMPLEXBIN = hepTest1 SCRIPTS = hepTestHepTuple BINCCFILES = hepTest1.cc jlist.cc test: zoomtest .PHONY: zoomtest zoomtest: ; cd $(workdir); hepTestHepTuple # # ---------------------------------------------------------------------- # Identify other libraries that the above binaries will need: # ---------------------------------------------------------------------- #LOADLIBES = -lHepTuple -lCLHEP -lPhysicsVectors -lExceptions -lZMutility -lm LOADLIBES = -lHepTuple -lCLHEP -lExceptions -lZMutility -lm # ---------------------------------------------------------------------- # Make HBook-specific adaptations: # ---------------------------------------------------------------------- ifneq (, $(CERN_DIR) ) override CPPFLAGS += -DUSE_HBOOK override LDFLAGS += -L$(CERN_DIR)/lib override LOADLIBES := -lHBookHepTuple $(LOADLIBES) endif # ---------------------------------------------------------------------- # Make Histoscope-specific adaptations: # ---------------------------------------------------------------------- ifneq (, $(HISTO_INC)) override CPPFLAGS += -DUSE_HISTOSCOPE override LDFLAGS += -L$(HISTO_DIR)/lib override LOADLIBES := -lHistoHepTuple -lCHisto $(LOADLIBES) ifeq (NT,$(findstring NT,$(BFARCH))) override LOADLIBES += -lxdr endif endif # ---------------------------------------------------------------------- # Make Root-specific adaptations: # ---------------------------------------------------------------------- ifneq (, $(ROOTSYS)) # Under cygwin ROOTSYS is actually a Windows path # ifeq (NT,$(findstring NT,$(BFARCH))) # lROOTSYS := `cygpath -u $$ROOTSYS` # endif ifeq (,$(ROOTRELEASE)) ROOTRELEASE := $(shell root-config --version | awk -F '[/]' '{print $$1}') export ROOTRELEASE endif ifeq (,$(ROOTMAJOR)) ROOTMAJOR := $(shell root-config --version | awk -F '[./]' '{print $$1}') export ROOTMAJOR endif ifneq (NT,$(findstring NT,$(BFARCH))) # root v2_22_XX ifeq (2.22,$(ROOTRELEASE)) # ROOT == 2.22 ------------------ override CPPFLAGS += -DROOT_2_22 ROOTLIBS = -lNew -lBase -lRint -lCint -lClib -lCont -lFunc \ -lGraf -lGraf3d -lHist -lHtml -lMatrix -lMeta -lMinuit -lNet \ -lPostscript -lProof -lTree -lUnix -lZip else ROOTLIBS := $(shell root-config --libs) ROOTLIBS := $(patsubst -L$(ROOTSYS)/lib,,$(ROOTLIBS)) NODEP_LIBS += -L/usr/ccs/lib -lgen endif override LDFLAGS += -L$(ROOTSYS)/lib override CPPFLAGS := -I$(ROOTSYS)/include $(CPPFLAGS) else # ROOTLIBS := -lCore -lCint -lHist -lGraf -lGraf3d -lGpad \ # -lTree -lRint -lPostscript -lMatrix -lPhysics \ # -lWinNT -lWIN32 unixROOTSYS := $(shell cygpath -u $$ROOTSYS ) ROOTLIBS := $(shell root-config --nonew --libs) # Under cygwin ROOTSYS is actually a Windows path # override LDFLAGS += -L$(unixROOTSYS)/lib override CPPFLAGS := -I$(unixROOTSYS)/include $(CPPFLAGS) endif override CPPFLAGS += -DUSE_ROOT override LOADLIBES := -lRootHepTuple $(LOADLIBES) $(ROOTLIBS) override NODEP_LIBS += $(ROOTLIBS) endif # ---------------------------------------------------------------------- # Make environment-specific adaptations: # ---------------------------------------------------------------------- # JMM debugging #ifeq (GCC,$(findstring GCC,$(SRT_CXX))) # override CXXFLAGS += -ggdb3 #endif ifeq (SunOS5,$(findstring SunOS5,$(BFARCH))) ifeq (-KCC,$(findstring -KCC,$(BFARCH))) override LDFLAGS := --backend -Wl,-t $(LDFLAGS) else override LDFLAGS := -t $(LDFLAGS) endif endif ifeq (CYGWIN,$(findstring CYGWIN,$(BFARCH))) ifeq (g++,$(CXX)) override LOADLIBES := $(subst -lm,-lc -lm,$(LOADLIBES)) else override LOADLIBES := $(subst -lm,,$(LOADLIBES)) override LOADLIBES := $(subst -lc,,$(LOADLIBES)) endif override LOADLIBES += -lnt_dummy endif ifneq (,$(findstring IRIX,$(SRT_ARCH))) ifneq (,$(findstring KCC,$(SRT_CXX))) override CXXFLAGS += --backend -OPT:Olimit=0 override CCFLAGS += --backend -OPT:Olimit=0 override LDFLAGS += --backend -Wl,-LD_MSG:off=15:off=84-85 endif ifneq (,$(findstring GCC,$(SRT_CXX))) override LDFLAGS += -Wl,-LD_MSG:off=15:off=47:off=84-85:off=127:off=134 endif ifneq (,$(findstring EGCS,$(SRT_CXX))) override LDFLAGS += -Wl,-LD_MSG:off=15:off=84-85:off=134 endif endif # ---------------------------------------------------------------------- # Connect to other packages: # ---------------------------------------------------------------------- USE_ISOCXX = true include SoftRelTools/standard.mk include SoftRelTools/arch_spec_STL.mk ifneq (, $(CERN_DIR) ) include SoftRelTools/arch_spec_cern.mk include SoftRelTools/arch_spec_f77.mk endif include Exceptions/arch_spec_Exceptions.mk ifneq (,$(findstring IRIX,$(SRT_ARCH))) ifneq (,$(findstring GCC,$(SRT_CXX))) override LDFLAGS += -Wl,-LD_MSG:off=15:off=47:off=84-85:off=127:off=134 endif endif # Make sure there's one and only one reference to -lm override LOADLIBES := $(filter-out -lm, $(LOADLIBES)) -lm # ======================================================================