--- PamCut/makefile 2009/05/27 13:30:01 1.1 +++ PamCut/makefile 2009/08/26 16:34:13 1.5 @@ -28,15 +28,15 @@ # to the compiler options for the main analysis program. OPTIMIZE = -g3 #-DDEBUGPAMCUT + # Library flags # Pamela software is modular, so some libraries may not be available in some istallations. # To avoid linking problems, here you can define flags to exclude those parts of the # PamCut software which make use of unavailable libraries. Remember to place # the code to be excluded between proper preprocessor directives. See the documentation or the cut # TofNucleiZCut for an example. -EXCLUSIONFLAGS = #-DNO_TOFNUCLEI -DNO_CALONUCLEI -DNO_TRKNUCLEI - +EXCLUSIONFLAGS = -DNO_CALONUCLEI -DNO_TRKNUCLEI #-DNO_TOFNUCLEI -DNO_CALONUCLEI -DNO_TRKNUCLEI # Put below the files on which every .cpp must depend on, ie., those files that, # if modified, will trigger a complete recompilation of the project. @@ -62,8 +62,13 @@ endif # All Target -all: version libPamCut.so - +all: libPamCut.so + @echo + @echo "**** Compiler version and compilation host ****" + @$(C++) --version | grep GCC + @hostname + @echo + # Tool invocations libPamCut.so: $(OBJS) $(USER_OBJS) @echo 'Building target: $@' @@ -77,7 +82,24 @@ -$(RM) $(CPP_DEPS) $(OBJS) libPamCut.so -@echo ' ' -version: - @gcc --version | grep gcc; echo +distclean: + @rm -f ${PAM_LIB}/libPamCut.so + @rm -rf ${PAM_INC}/PamCut + @echo Installed files successfully removed. + +install: + @if [[ "${PAM_INC}" == "" || "${PAM_LIB}" == "" ]]; then \ + echo Pamela environment not set. ; \ + else \ + rootdir=`pwd`; \ + for file in `find -name "*.h"`; do \ + dir=`dirname $${file} | sed 's/.\///'`; \ + mkdir -p ${PAM_INC}/PamCut/$${dir}; \ + cp -u $${file} ${PAM_INC}/PamCut/$${dir}; \ + done; \ + cp -u libPamCut.so ${PAM_LIB}; \ + fi + @echo PamCut installed. + +.PHONY: all clean distclean install -.PHONY: all clean dependents version