| 28 | # to the compiler options for the main analysis program. | # to the compiler options for the main analysis program. | 
| 29 | OPTIMIZE = -g3 #-DDEBUGPAMCUT | OPTIMIZE = -g3 #-DDEBUGPAMCUT | 
| 30 |  |  | 
| 31 |  |  | 
| 32 | # Library flags | # Library flags | 
| 33 | # 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. | 
| 34 | # To avoid linking problems, here you can define flags to exclude those parts of the | # To avoid linking problems, here you can define flags to exclude those parts of the | 
| 35 | # PamCut software which make use of unavailable libraries. Remember to place | # PamCut software which make use of unavailable libraries. Remember to place | 
| 36 | # 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 | 
| 37 | # TofNucleiZCut for an example. | # TofNucleiZCut for an example. | 
| 38 | EXCLUSIONFLAGS = #-DNO_TOFNUCLEI -DNO_CALONUCLEI -DNO_TRKNUCLEI | # Since PamCut headers may refer to the optional libraries, it's important to define the same | 
| 39 |  | # flags when compiling the analysis code. Otherwise, analysis code will include PamCut headers which, | 
| 40 |  | # if no exclusion flag is set, will try to include optional software headers. | 
| 41 |  | # Conversely, if you use optional libraries remember to tell it to the linker. | 
| 42 |  |  | 
| 43 |  | EXCLUSIONFLAGS = -DNO_CALONUCLEI -DNO_TRKNUCLEI -DNO_TOFNUCLEI | 
| 44 |  |  | 
| 45 | # 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, | 
| 46 | # if modified, will trigger a complete recompilation of the project. | # if modified, will trigger a complete recompilation of the project. | 
| 66 | endif | endif | 
| 67 |  |  | 
| 68 | # All Target | # All Target | 
| 69 | all: version libPamCut.so | all: libPamCut.so | 
| 70 |  | @echo | 
| 71 |  | @echo "**** Compiler version and compilation host ****" | 
| 72 |  | @$(C++) --version | grep GCC | 
| 73 |  | @hostname | 
| 74 |  | @echo | 
| 75 |  |  | 
| 76 | # Tool invocations | # Tool invocations | 
| 77 | libPamCut.so: $(OBJS) $(USER_OBJS) | libPamCut.so: $(OBJS) $(USER_OBJS) | 
| 78 | @echo 'Building target: $@' | @echo 'Building target: $@' | 
| 86 | -$(RM) $(CPP_DEPS) $(OBJS) libPamCut.so | -$(RM) $(CPP_DEPS) $(OBJS) libPamCut.so | 
| 87 | -@echo ' ' | -@echo ' ' | 
| 88 |  |  | 
| 89 | version: | distclean: | 
| 90 | @gcc --version | grep gcc; echo | @rm -f ${PAM_LIB}/libPamCut.so | 
| 91 |  | @rm -rf ${PAM_INC}/PamCut | 
| 92 |  | @echo Installed files successfully removed. | 
| 93 |  |  | 
| 94 |  | install: | 
| 95 |  | @if [[ "${PAM_INC}" == ""  || "${PAM_LIB}" == "" ]]; then \ | 
| 96 |  | echo Pamela environment not set. ; \ | 
| 97 |  | else \ | 
| 98 |  | rootdir=`pwd`; \ | 
| 99 |  | for file in `find -name "*.h"`; do \ | 
| 100 |  | dir=`dirname $${file} | sed 's/.\///'`; \ | 
| 101 |  | mkdir -p ${PAM_INC}/PamCut/$${dir}; \ | 
| 102 |  | cp -u $${file} ${PAM_INC}/PamCut/$${dir}; \ | 
| 103 |  | done; \ | 
| 104 |  | cp -u libPamCut.so ${PAM_LIB}; \ | 
| 105 |  | fi | 
| 106 |  | @echo PamCut installed. | 
| 107 |  |  | 
| 108 |  | .PHONY: all clean distclean install | 
| 109 |  |  | 
|  | .PHONY: all clean dependents version |  |