/[PAMELA software]/PamCut/makefile
ViewVC logotype

Diff of /PamCut/makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by pam-fi, Wed May 27 13:30:01 2009 UTC revision 1.10.2.1 by pam-fi, Thu Jul 8 10:43:14 2010 UTC
# Line 26  C++ = g++ Line 26  C++ = g++
26  # "#ifdef DEBUGPAMCUT" and "#endif"). Note that if you  # "#ifdef DEBUGPAMCUT" and "#endif"). Note that if you
27  # use debug instructions also in the .h code (headers) you will also have to add -DDEBUGPAMCUT  # use debug instructions also in the .h code (headers) you will also have to add -DDEBUGPAMCUT
28  # to the compiler options for the main analysis program.  # to the compiler options for the main analysis program.
29  OPTIMIZE = -g3 #-DDEBUGPAMCUT  # 3) Since this is a general compiler flag it can also be used, eg., to set the -m32 flag
30    OPTIMIZE = -O3 ${PAM_BIT} #-DDEBUGPAMCUT
31    
32    # Linker flags
33    # The flags defined here will be directly inserted into the linker invocation. Place here the
34    # -m32 flag, for example.
35    LINKERFLAGS = ${PAM_BIT}
36    
37  # Library flags  # Library flags
38  # Pamela software is modular, so some libraries may not be available in some istallations.  # Pamela software is modular, so some libraries may not be available in some istallations.
# Line 34  OPTIMIZE = -g3 #-DDEBUGPAMCUT Line 40  OPTIMIZE = -g3 #-DDEBUGPAMCUT
40  # PamCut software which make use of unavailable libraries. Remember to place  # PamCut software which make use of unavailable libraries. Remember to place
41  # the code to be excluded between proper preprocessor directives. See the documentation or the cut  # the code to be excluded between proper preprocessor directives. See the documentation or the cut
42  # TofNucleiZCut for an example.  # TofNucleiZCut for an example.
43  EXCLUSIONFLAGS = #-DNO_TOFNUCLEI -DNO_CALONUCLEI -DNO_TRKNUCLEI  # Since PamCut headers may refer to the optional libraries, it's important to define the same
44    # flags when compiling the analysis code. Otherwise, analysis code will include PamCut headers which,
45    # if no exclusion flag is set, will try to include optional software headers.
46    # Conversely, if you use optional libraries remember to tell it to the linker.
47    #
48    # Excluded cuts and actions:
49    # NO_CALONUCLEI: CaloNucleiZCut
50    # NO_TRKNUCLEI: TrkNucleiZCut
51    # NO_TOFNUCLEI: TofNucleiZCut
52    # NO_CALOPRESAMPLER: ReprocessCaloAction
53    # NO_CALOAXIS: CaloAngleCut, CaloCrossCut, CaloGeomCut, CaloGeomYSensCut, CaloIonCut, CaloNHitCut,
54    #              CaloNotIntCut (reduced functionality), CaloTrackChi2Cut, CaloTrackCut,
55    #              TrackRedGeomCut (reduced functionality), CaloChi2HistoAction, CaloAxisChi2VsRigHistoAction
56    EXCLUSIONFLAGS = -DNO_CALONUCLEI -DNO_TRKNUCLEI -DNO_TOFNUCLEI -DNO_CALOPRESAMPLER -DNO_CALOAXIS
57    
58  # Put below the files on which every .cpp  must depend on, ie., those files that,  # Put below the files on which every .cpp  must depend on, ie., those files that,
59  # if modified, will trigger a complete recompilation of the project.  # if modified, will trigger a complete recompilation of the project.
# Line 62  endif Line 79  endif
79  endif  endif
80    
81  # All Target  # All Target
82  all: version libPamCut.so  all: libPamCut.so
83            @echo
84            @echo "**** Compiler version and compilation host ****"
85            @$(C++) --version | grep GCC
86            @hostname
87            @echo "**** Compilation flags ****"
88            @echo OPTIMIZE: $(OPTIMIZE)
89            @echo LINKERFLAGS: $(LINKERFLAGS)
90            @echo EXCLUSIONFLAGS: $(EXCLUSIONFLAGS)
91            @echo
92    
93  # Tool invocations  # Tool invocations
94  libPamCut.so: $(OBJS) $(USER_OBJS)  libPamCut.so: $(OBJS) $(USER_OBJS)
95          @echo 'Building target: $@'          @echo 'Building target: $@'
96          @echo 'Invoking: GCC C++ Linker'          @echo 'Invoking: GCC C++ Linker'
97          $(C++) -shared -o"libPamCut.so" $(OBJS)          $(C++) -shared $(LINKERFLAGS) -o"libPamCut.so" $(OBJS)
98          @echo 'Finished building target: $@'          @echo 'Finished building target: $@'
99          @echo ' '          @echo ' '
100    
# Line 77  clean: Line 103  clean:
103          -$(RM) $(CPP_DEPS) $(OBJS) libPamCut.so          -$(RM) $(CPP_DEPS) $(OBJS) libPamCut.so
104          -@echo ' '          -@echo ' '
105    
106  version:  distclean:
107          @gcc --version | grep gcc; echo          @rm -f ${PAM_LIB}/libPamCut.so
108            @rm -rf ${PAM_INC}/PamCut
109            @echo Installed files successfully removed.
110    
111    install:
112            @if [[ "${PAM_INC}" == ""  || "${PAM_LIB}" == "" ]]; then \
113                echo Pamela environment not set. ; \
114            else \
115              rootdir=`pwd`; \
116              for file in `find -name "*.h"`; do \
117                    dir=`dirname $${file} | sed 's/.\///'`; \
118                    mkdir -p ${PAM_INC}/PamCut/$${dir}; \
119                cp -u $${file} ${PAM_INC}/PamCut/$${dir}; \
120              done; \
121              cp -u libPamCut.so ${PAM_LIB}; \
122            fi
123            @echo PamCut installed.
124    
125    .PHONY: all clean distclean install
126    
 .PHONY: all clean dependents version  

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.10.2.1

  ViewVC Help
Powered by ViewVC 1.1.23