| 2 | 
  | 
  | 
| 3 | 
 ############################### geant4vmc Makefile ########################### | 
 ############################### geant4vmc Makefile ########################### | 
| 4 | 
  | 
  | 
| 5 | 
  | 
 PACKAGE   = PamVMC_fc | 
 | 
 PACKAGE   = Pam_VMC | 
  | 
| 6 | 
  | 
  | 
| 7 | 
 ifeq ($(PLATFORM),) | 
 ifeq ($(PLATFORM),) | 
| 8 | 
 PLATFORM = $(shell root-config --arch) | 
 PLATFORM = $(shell root-config --arch) | 
| 9 | 
 endif | 
 endif | 
| 10 | 
  | 
  | 
| 11 | 
 TOPDIR  = $(G4VMC_DIR) | 
 TOPDIR  = $(PWD) | 
| 12 | 
 BINDIR  = $(G4WORKDIR)/tmp/tgt_$(PLATFORM)/$(PACKAGE) | 
 BINDIR  = $(TOPDIR)/tmp/tgt_$(PLATFORM)/$(PACKAGE) | 
| 13 | 
 LIBDIR  = $(G4WORKDIR)/lib/tgt_$(PLATFORM) | 
 LIBDIR  = $(TOPDIR)/lib/tgt_$(PLATFORM) | 
| 14 | 
  | 
 #BINDIR  = $(G4WORKDIR)/tmp/tgt_$(PLATFORM)/$(PACKAGE) | 
| 15 | 
  | 
 #LIBDIR  = $(G4WORKDIR)/lib/tgt_$(PLATFORM) | 
| 16 | 
  | 
  | 
| 17 | 
 ifeq ($(ROOTSYS),) | 
 ifeq ($(ROOTSYS),) | 
| 18 | 
 ROOT_INCDIR = $(shell root-config --incdir) | 
 ROOT_INCDIR = $(shell root-config --incdir) | 
| 19 | 
 ROOT_BINDIR = $(shell root-config --prefix)/bin | 
 ROOT_BINDIR = $(shell root-config --prefix)/bin | 
| 20 | 
  | 
 ROOT_ETCDIR = $(shell root-config --prefix)/etc/vmc | 
| 21 | 
 else | 
 else | 
| 22 | 
 ROOT_INCDIR = $(ROOTSYS)/include | 
 ROOT_INCDIR = $(ROOTSYS)/include | 
| 23 | 
 ROOT_BINDIR = $(ROOTSYS)/bin | 
 ROOT_BINDIR = $(ROOTSYS)/bin | 
| 24 | 
  | 
 ROOT_ETCDIR = $(ROOTSYS)/etc/vmc | 
| 25 | 
 endif | 
 endif | 
| 26 | 
  | 
  | 
| 27 | 
 include $(TOPDIR)/config/Makefile.$(PLATFORM) | 
 include $(ROOT_ETCDIR)/Makefile.$(PLATFORM) | 
| 28 | 
  | 
  | 
| 29 | 
 ############################### Sources ####################################### | 
 ############################### Sources ####################################### | 
| 30 | 
  | 
  | 
| 31 | 
 # Rules | 
 # Rules | 
| 32 | 
 # | 
 # | 
| 33 | 
 include $(TOPDIR)/config/MakeRules | 
 include $(ROOT_ETCDIR)/MakeRules | 
| 34 | 
  | 
  | 
| 35 | 
 # Dictionary | 
 # Dictionary | 
| 36 | 
 # | 
 # | 
| 37 | 
 GDICT    := $(BINDIR)/$(PACKAGE)Cint.cxx | 
 GDICT    := $(BINDIR)/$(PACKAGE)Cint.cxx | 
| 38 | 
 GDICTH   := $(GDICT:.cxx=.h) | 
 GDICTH   := $(GDICT:.cxx=.h) | 
| 39 | 
 GDICTO   := $(patsubst %.cxx,$(BINDIR)/%.o,$(GDICT)) | 
 GDICTO   := $(patsubst %.cxx,%.o,$(GDICT)) | 
| 40 | 
  | 
  | 
| 41 | 
 # Sources | 
 # Sources | 
| 42 | 
 # | 
 # | 
| 43 | 
 CXXSRC  := $(wildcard src/*.cxx)  | 
 CXXSRC  := $(wildcard src/*.cxx) | 
| 44 | 
 SRCS    := $(CXXSRC) | 
 CALSRC  := $(wildcard cal/src/*.cxx) | 
| 45 | 
  | 
 TRKSRC  := $(wildcard trk/src/*.cxx) | 
| 46 | 
  | 
 TRKFSRCS  :=$(wildcard trk/src/f77/*.F) | 
| 47 | 
  | 
 TOFSRC  := $(wildcard tof/src/*.cxx) | 
| 48 | 
  | 
 ACSRC  := $(wildcard ac/src/*.cxx) | 
| 49 | 
  | 
 S4SRC  := $(wildcard s4/src/*.cxx) | 
| 50 | 
  | 
 NDSRC  := $(wildcard nd/src/*.cxx) | 
| 51 | 
  | 
  | 
| 52 | 
  | 
   | 
| 53 | 
  | 
 SRCS    := $(CXXSRC) $(CALSRC) $(TRKSRC) $(TOFSRC) $(ACSRC) $(S4SRC) $(NDSRC) | 
| 54 | 
  | 
 FSRCS   := $(TRKFSRCS) | 
| 55 | 
  | 
  | 
| 56 | 
  | 
  | 
| 57 | 
 # C++ Headers | 
 # C++ Headers | 
| 58 | 
 # | 
 # | 
| 59 | 
 HDRS    := $(wildcard inc/*.h) | 
 HDRS    := $(wildcard include/*.h) | 
| 60 | 
 HDRS    := $(filter-out inc/$(PACKAGE)LinkDef.h,$(HDRS)) | 
 HDRS    += $(wildcard cal/include/*.h) | 
| 61 | 
 HDRS    += inc/$(PACKAGE)LinkDef.h | 
 HDRS    += $(wildcard trk/include/*.h) | 
| 62 | 
  | 
 HDRS    += $(wildcard tof/include/*.h) | 
| 63 | 
  | 
 HDRS    += $(wildcard ac/include/*.h) | 
| 64 | 
  | 
 HDRS    += $(wildcard s4/include/*.h) | 
| 65 | 
  | 
 HDRS    += $(wildcard nd/include/*.h) | 
| 66 | 
  | 
  | 
| 67 | 
  | 
 HDRS    := $(filter-out include/$(PACKAGE)LinkDef.h,$(HDRS)) | 
| 68 | 
  | 
 HDRS    += include/$(PACKAGE)LinkDef.h | 
| 69 | 
  | 
  | 
| 70 | 
 # Objects | 
 # Objects | 
| 71 | 
 # | 
 # | 
| 72 | 
 CXXOBJ  := $(patsubst %.cxx,$(BINDIR)/%.o,$(CXXSRC)) | 
 CXXOBJ  := $(patsubst %.cxx,$(BINDIR)/%.o,$(SRCS)) | 
| 73 | 
 OBJS    := $(CXXOBJ) $(GDICTO) | 
 FOBJ    := $(patsubst %.F,$(BINDIR)/%.o,$(FSRCS)) | 
| 74 | 
  | 
 OBJS    := $(CXXOBJ) $(GDICTO) $(FOBJ) | 
| 75 | 
  | 
  | 
| 76 | 
 # PAMELA LIBS | 
 # PAMELA LIBS | 
| 77 | 
 # | 
 # | 
| 78 | 
 PAMLIBS := -L${PAM_LIB} -lTrkLevel2 | 
 PAMLIBS := -L${PAM_LIB} -lTrkLevel2   | 
| 79 | 
 SHLIBS := ${PAMLIBS} | 
 SHLIBS := ${PAMLIBS} | 
| 80 | 
 # Make include list | 
 # Make include list | 
| 81 | 
 # | 
 # | 
| 82 | 
 PAMINC := -I${PAM_INC} -I${PAM_INC}/yoda | 
 PAMINC :=   -I$(PAMELA_SOFTWARE)/include/yoda -I$(PAMELA_SOFTWARE)/inc -I${ALIROOT}/source | 
| 83 | 
 INCDIR  := -Iinc ${PAMINC} | 
 INCDIR  := -Iinclude $(PAMINC) \ | 
| 84 | 
  | 
            -Ical/include \ | 
| 85 | 
  | 
            -Itrk/include \ | 
| 86 | 
  | 
            -Itof/include \ | 
| 87 | 
  | 
            -Iac/include \ | 
| 88 | 
  | 
            -Is4/include \ | 
| 89 | 
  | 
            -Ind/include \ | 
| 90 | 
  | 
            -I$(G4VMC_DIR)/include \ | 
| 91 | 
  | 
            -I$(CLHEP_BASE_DIR)/include \ | 
| 92 | 
  | 
            -Iinclude -I$(G4INCLUDE) | 
| 93 | 
  | 
  | 
| 94 | 
  | 
 FINCDIR := -Itrk/include/f77 | 
| 95 | 
 # C++ compilation flags | 
 # C++ compilation flags | 
| 96 | 
 # | 
 # | 
| 97 | 
 CXXFLAGS := $(CXXOPTS) -I. $(INCDIR) -I$(ROOT_INCDIR) ${PAMOPTS} | 
 CXXFLAGS := $(CXXOPTS) -I. $(INCDIR) -I$(ROOT_INCDIR) ${PAMOPTS} | 
| 98 | 
  | 
 FFLAGS :=  $(FINCDIR)  -fvxt -fno-automatic -Wno-globals  | 
| 99 | 
  | 
  | 
| 100 | 
 DEPINC          += -I. -I$(ROOT_INCDIR) $(INCDIR) | 
 DEPINC          += -I. -I$(ROOT_INCDIR) $(INCDIR) | 
| 101 | 
  | 
  | 
| 102 | 
 ############################### Targets ####################################### | 
 ############################### Targets ####################################### | 
| 103 | 
  | 
  | 
| 104 | 
  | 
 RM_FILE=$(shell rm -f $(LIBDIR)/resxy_new.root)\ | 
| 105 | 
  | 
         $(shell rm -f $(LIBDIR)/CalibTrk_00110_000_000.root) | 
| 106 | 
  | 
  | 
| 107 | 
  | 
 AUXDIR='aux' | 
| 108 | 
  | 
 CP_FILE=$(shell mkdir -p  ${LIBDIR})\ | 
| 109 | 
  | 
         $(shell cp -rf ${AUXDIR}/resxy_new.root ${AUXDIR}/CalibTrk_00110_000_000.root ${LIBDIR}/) | 
| 110 | 
  | 
  | 
| 111 | 
 SLIBRARY        = $(LIBDIR)/lib$(PACKAGE).$(SL) | 
 SLIBRARY        = $(LIBDIR)/lib$(PACKAGE).$(SL) | 
| 112 | 
 ALIBRARY        = $(LIBDIR)/lib$(PACKAGE).a | 
 ALIBRARY        = $(LIBDIR)/lib$(PACKAGE).a | 
| 114 | 
 default:        depend $(SLIBRARY) | 
 default:        depend $(SLIBRARY) | 
| 115 | 
  | 
  | 
| 116 | 
  | 
  | 
| 117 | 
 $(LIBDIR)/lib$(PACKAGE).$(SL):  $(OBJS) | 
 $(LIBDIR)/lib$(PACKAGE).$(SL):$(CP_FILE) $(OBJS) $(FOBS)  | 
| 118 | 
 $(LIBDIR)/lib$(PACKAGE).a:      $(OBJS) | 
  | 
| 119 | 
  | 
 $(LIBDIR)/lib$(PACKAGE).a: $(CP_FILE) $(OBJS) $(FOBS) | 
| 120 | 
  | 
  | 
| 121 | 
 DICT:=          $(GDICT) | 
 DICT:=          $(GDICT) | 
| 122 | 
  | 
  | 
| 123 | 
 $(DICT):        $(HDRS) | 
 $(DICT):        $(HDRS) | 
| 124 | 
  | 
  | 
| 125 | 
 depend:         $(SRCS) | 
 depend:         $(SRCS)  $(FSRCS) | 
| 126 | 
  | 
  | 
| 127 | 
  | 
 TOCLEAN         = $(BINDIR) $(RM_FILE) | 
| 128 | 
  | 
 TOCLEANALL      = $(BINDIR) $(LIBDIR) $(RM_FILE) | 
| 129 | 
  | 
  | 
| 130 | 
 TOCLEAN         = $(BINDIR) | 
 include $(ROOT_ETCDIR)/MakeMacros | 
 | 
 TOCLEANALL      = $(BINDIR) $(LIBDIR) | 
  | 
| 131 | 
  | 
  | 
 | 
 include $(TOPDIR)/config/MakeMacros | 
  | 
| 132 | 
  | 
  | 
| 133 | 
 ############################### Dependencies ################################## | 
 ############################### Dependencies ################################## | 
| 134 | 
  | 
  |