| 1 | 
 # DarthVader flight analysis software  | 
 # DarthVader flight analysis software  | 
| 2 | 
 # SOFTWARE VERSION | 
 # SOFTWARE VERSION | 
| 3 | 
 VER= v1r00 | 
 VER= v1r02 | 
| 4 | 
 # An almost general purpouse Makefile for PAMELA repository | 
 # An almost general purpouse Makefile for PAMELA repository | 
| 5 | 
 # Let's start with some usefull definition for colorize the echo  | 
 # Let's start with some usefull definition for colorize the echo  | 
| 6 | 
 RED='\E[1;31;40m' | 
 RED='\E[1;31;40m' | 
| 93 | 
 #OBJS=${DIRLIB}/*.* | 
 #OBJS=${DIRLIB}/*.* | 
| 94 | 
 OBJS=$(shell cd ${DIRLIB}&>/dev/null;for file in `ls *.*`; do if [ $${file} != "" ] && [ $${file} != "DarthVader.o" ] && [ $${file} != "R2-D2.o" ]; then echo ${DIRLIB}/$${file}; fi; done) | 
 OBJS=$(shell cd ${DIRLIB}&>/dev/null;for file in `ls *.*`; do if [ $${file} != "" ] && [ $${file} != "DarthVader.o" ] && [ $${file} != "R2-D2.o" ]; then echo ${DIRLIB}/$${file}; fi; done) | 
| 95 | 
 #TRKOBJS= | 
 #TRKOBJS= | 
| 96 | 
  | 
 DARTHVLIB=${DIRLIB}/libDarthVader_${VER}.so | 
| 97 | 
  | 
  | 
| 98 | 
 # -- directory where to find tracker headers needed to compile | 
 # -- directory where to find tracker headers needed to compile | 
| 99 | 
 #TRKHEAD=${DIRTOP}/../tracker/inc | 
 #TRKHEAD=${DIRTOP}/../tracker/inc | 
| 104 | 
 SUBINC=$(shell for dir in `echo ${SUBDIR}`; do echo -I$${dir}/inc; done) | 
 SUBINC=$(shell for dir in `echo ${SUBDIR}`; do echo -I$${dir}/inc; done) | 
| 105 | 
  | 
  | 
| 106 | 
 # List of all libraries we want to install | 
 # List of all libraries we want to install | 
| 107 | 
 FULLLIBS = ${FULLROOTCLIBS} ${FULLLIBCPPLIBS} | 
 FULLLIBS = ${FULLROOTCLIBS} ${FULLLIBCPPLIBS} ${DARTHVLIB} | 
| 108 | 
  | 
  | 
| 109 | 
 # Other objects to install | 
 # Other objects to install | 
| 110 | 
 EXESRCS=${DIRBIN}/DarthVader ${DIRBIN}/R2-D2 | 
 EXESRCS=${DIRBIN}/DarthVader ${DIRBIN}/R2-D2 | 
| 208 | 
         @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) | 
         @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) | 
| 209 | 
  | 
  | 
| 210 | 
 ${CXXEXELIBS}: ${CPPOBJS} ${COBJS} ${CXXEXEOBJS} | 
 ${CXXEXELIBS}: ${CPPOBJS} ${COBJS} ${CXXEXEOBJS} | 
| 211 | 
  | 
         @${CXX} ${CXXFLAGS} -Xlinker -soname=libDarthVader_${VER}.so -shared -o ${DIRTOP}/${DIRLIB}/libDarthVader_${VER}.so -lg2c ${DIRTOP}/${DIRLIB}/libAcLevel2.so ${DIRTOP}/${DIRLIB}/libCaloLevel2.so ${DIRTOP}/${DIRLIB}/libNDLevel2.so ${DIRTOP}/${DIRLIB}/libS4Level2.so ${DIRTOP}/${DIRLIB}/libToFLevel2.so ${DIRTOP}/${DIRLIB}/libTrigLevel2.so ${DIRTOP}/${DIRLIB}/libTrkLevel2.so ${DIRTOP}/${DIRLIB}/libGLTables.so ${DIRTOP}/${DIRLIB}/libRunInfo.so ${DIRTOP}/${DIRLIB}/libOrbitalInfo.so  | 
| 212 | 
         @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET}) | 
         @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET}) | 
| 213 | 
         @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRTOP}/${DIRLIB}/$@.o ${OBJS} ${PAM_YODA}/lib/libyoda.so ${PAM_YODA}/lib/libutils.so -lThread `root-config --cflags --glibs` `cernlib mathlib` | 
         @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRTOP}/${DIRLIB}/$@.o ${OBJS} ${PAM_YODA}/lib/libyoda.so ${PAM_YODA}/lib/libutils.so -lThread `root-config --cflags --glibs` `cernlib mathlib` | 
| 214 | 
  | 
 #       @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRTOP}/${DIRLIB}/$@.o ${OBJS} ${PAM_YODA}/lib/libyoda.so ${PAM_YODA}/lib/libutils.so -lThread `root-config --cflags --glibs` `cernlib mathlib` | 
| 215 | 
  | 
  | 
| 216 | 
 # A small target to check environmental variables | 
 # A small target to check environmental variables | 
| 217 | 
 %_env: | 
 %_env: |