/[PAMELA software]/eventviewer/flight/Makefile
ViewVC logotype

Diff of /eventviewer/flight/Makefile

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

revision 1.1.1.1 by mocchiut, Mon Mar 20 10:36:46 2006 UTC revision 1.13 by mocchiut, Thu Mar 6 15:04:58 2008 UTC
# Line 1  Line 1 
1  # FLIGHT EVENT VIEWER  # Flight Event Viewer software
2  # SOFTWARE VERSION  # SOFTWARE VERSION
3  VER= v1r00  VER= v3r00
 # REQUIRES CALOCOMMON and ROOT2PAW versions  
 COMMONVER=v1r9  
 R2PVER=v3r00  
 # installed calocommon version  
 COMPCOMVER=`echo ${COMMONVER} | tr -d [a-z:A-Z]`  
 INSTCOMVER=`${PAM_BIN}/calocommon |head -2 |tail -1 | tr -d [a-z:A-Z]`  
 COMPR2PVER=`echo ${R2PVER} | tr -d [a-z:A-Z]`  
 INSTR2PVER=`${PAM_BIN}/GroundDataConvert --version |head -2 |tail -1 | sed s/2//\1 | tr -d [a-z:A-Z]`  
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'
7  GREEN='\E[1;32;40m'  GREEN='\E[1;32;40m'
8  YELLOW='\E[1;33;40m'  YELLOW='\E[1;33;40m'
9  BLUE='\E[1;34;40m'  BLUE='\E[1;34;40m'
10    WHITE='\E[1;37;40m'
11  VIOLET='\E[1;35;40m'  VIOLET='\E[1;35;40m'
12  CYAN='\E[1;36;40m'  CYAN='\E[1;36;40m'
 WHITE='\E[1;37;40m'  
13  # Here the echo definition to use them  # Here the echo definition to use them
14    EVIOLET=echo -e ${VIOLET}
15    ECYAN=echo -e ${CYAN}
16  ERED=echo -e ${RED}  ERED=echo -e ${RED}
17  EGREEN=echo -e ${GREEN}  EGREEN=echo -e ${GREEN}
18  EYELLOW=echo -e ${YELLOW}  EYELLOW=echo -e ${YELLOW}
19  EBLUE=echo -e ${BLUE}  EBLUE=echo -e ${BLUE}
 EVIOLET=echo -e ${VIOLET}  
 ECYAN=echo -e ${CYAN}  
20  EWHITE=echo -e ${WHITE}  EWHITE=echo -e ${WHITE}
21  # Reset the terminal  # Reset the terminal
22  RESET=tput sgr0  RESET=tput sgr0
23  # Here the variables used to override the standard make flags  # Here the variables used to override the standard make flags
24  # C  # C
25  CC=gcc  CC=gcc
26  #CFLAGS=-Wall -fPIC -O3 -g  CFLAGS=-Wall -O -fPIC -pthread -g
27  CFLAGS=-Wall -fPIC -O3  #CFLAGS=-Wall -O -fPIC -pthread
28  # Enviroment:  # Enviroment:
29  GCCVER=`gcc --version | head -1`  GCCVER=`gcc --version | head -1`
30  UNAMEA=`uname -a`  UNAMEA=`uname -a`
31  TODAY=`date`  TODAY=`date`
32  # F77  # F77
33  F77=g77  F77=g77
34  #F77FLAGS=  -Wall -Wno-globals -fPIC -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash  F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash
35  F77FLAGS=  -Wall -Wno-globals -fPIC -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash  #F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash
36  # C++  # C++
37  CXX=g++  CXX=g++
38  #CXXFLAGS=-Wall -fPIC -O3 -g  CXXFLAGS=-Wall -O -fPIC -pthread -g
39  CXXFLAGS=-Wall -fPIC -O3  #CXXFLAGS=-Wall -O -fPIC -pthread
40  # ROOTCINT  # ROOTCINT
41  ROOTCINT=rootcint  ROOTCINT=rootcint
42  # Here the variables definig the local directories  # Here the variables definig the local directories
# Line 57  DIRDOC=doc Line 49  DIRDOC=doc
49  DIRMACROS=macros  DIRMACROS=macros
50  DIRCALIB=calib  DIRCALIB=calib
51  # Here the  PAMELA environmental variables to be checked  # Here the  PAMELA environmental variables to be checked
52  PAM_ENV= PAM_BIN_env PAM_LIB_env PAM_INC_env PAM_DOC_env PAM_MACROS_env PAM_CALIB_env PAM_YODA_env  PAM_ENV= PAM_BIN_env PAM_LIB_env PAM_INC_env PAM_DOC_env PAM_YODA_env
53    
54  # Here the local variables used to build the targets  # Here the local variables used to build the targets
55    # -- F77 - no libraries --
56  FSRCS=  FSRCS=
57  #${DIRSRC}/readb2maps.for \  FOBJS=$(FSRCS:${DIRSRC}%.for=${DIRLIB}%.o)
 #      ${DIRSRC}/ptlevel1.for \  
 #      ${DIRSRC}/track.for  
   
 FOBJS=$(FSRCS:${DIRSRC}%.for=${DIRBIN}%.o)  
 FLIBS=  
 #readb2maps ptlevel1 track  
 FULLFLIBS=$(FLIBS:%=${DIRLIB}/lib%_${VER}.so)  
 FULLLINKFLIBS=$(FLIBS:%=${DIRLIB}/lib%.so)  
58    
59  CSRCS=  # -- CPP - no libraries --
60  COBJS=$(CSRCS:${DIRMACROS}%.c=${DIRBIN}%.o)  CPPSRCS=${DIRSRC}/FEVpathtoc.cpp \
61  CLIBS=          ${DIRSRC}/FEVVerl2.cpp \
62  FULLCLIBS=$(CLIBS:%=${DIRLIB}/lib%_${VER}.so)          ${DIRSRC}/FEventViewerCore.cpp
63  FULLLINKCLIBS=$(CLIBS:%=${DIRLIB}/lib%.so)  CPPOBJS=$(CPPSRCS:${DIRSRC}%.cpp=${DIRLIB}%.o)
   
 CXXSRCS=  
 #${DIRSRC}/libptlevel1.C \  
 #       ${DIRSRC}/libtrack.C    \  
 #       ${DIRSRC}/libreadb2maps.C  
   
 FULLCXXLIBS=$(CXXSRCS:${DIRSRC}/%.C=${DIRLIB}/%_C_${VER}.so)  
   
 MACROSRCS=${DIRMACROS}/FEVpathtoc.cxx \  
           ${DIRMACROS}/FEVpamevcontrol.cxx \  
           ${DIRMACROS}/FEventViewer.cxx  
 MACROSLIBS=$(MACROSRCS:${DIRMACROS}/%.cxx=${DIRLIB}/%_cxx_${VER}.so)  
 MACROCLIBS=FEVpathtoc_cxx FEVpamevcontrol_cxx FEventViewer_cxx  
 FULLMACROCLIBS=$(MACROCLIBS:%=${DIRLIB}/%_${VER}.so)  
 FULLLINKMACROCLIBS=$(MACROCLIBS:%=${DIRLIB}/%.so)  
64    
65  HSRCS=  # -- C - no libraries --
66  FULLHLIBS=$(HSRCS:${DIRINC}/%.h=${DIRLIB}/%_h_${VER}.so)  CSRCS=
67    COBJS=$(CSRCS:${DIRSRC}%.c=${DIRLIB}%.o)
68    
69  CXXEXESRCS=${DIRSRC}/FEventViewer.cc  # -- CPP - ROOT libraries --
70  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cc=${DIRBIN}%.o)  LIBROOTSRCS=${DIRSRC}/FEVpamevcontrol.cpp
71    LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)
72    LIBROOTCLIBS=libFEVpamevcontrol
73    FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so)
74    
75    # -- CPP - NON-ROOT libraries --
76    LIBCPPSRCS=${DIRSRC}/color.cpp \
77               ${DIRSRC}/FEVdetector.cpp
78    LIBCPPLIBS=$(LIBCPPSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)
79    LIBCPPCLIBS=libcolor libFEVdetector
80    FULLLIBCPPLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so)
81    
82    # -- CPP - Executables --
83    CXXEXESRCS=${DIRSRC}/FEventViewer.cpp
84    CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=${DIRLIB}%.o)
85  CXXEXELIBS:=FEventViewer  CXXEXELIBS:=FEventViewer
86    
87  FULLLIBS=${FULLFLIBS} ${FULLCXXLIBS} ${FULLCLIBS} ${FULLHLIBS}  # -- list of tracker objects needed to link
88    TRKOBJS=${PAM_LIB}/libDarthVader.so ${PAM_LIB}/libGLTables.so ${PAM_LIB}/libsgp4.so  
89    #${PAM_LIB}/libTrkLevel2.so ${PAM_LIB}/libTrkLevel1.so ${PAM_LIB}/libGLTables.so ${PAM_LIB}/libRunInfo.so ${PAM_LIB}/libNDLevel2.so ${PAM_LIB}/libAcLevel2.so ${PAM_LIB}/libToFLevel2.so ${PAM_LIB}/libS4Level2.so ${PAM_LIB}/libCaloLevel2.so ${PAM_LIB}/libOrbitalInfo.so ${PAM_LIB}/libTrigLevel2.so
90    # -- directory where to find tracker headers needed to compile
91    SUBDIR=
92    SUBINC=-I${PAM_INC}
93    #SUBINC=$(shell for dir in `echo ${SUBDIR}`; do echo -I$${dir}/inc; done)
94    
95    # List of all libraries we want to install
96    FULLLIBS = ${FULLROOTCLIBS} ${FULLLIBCPPLIBS}
97    
98  EXESRCS = ${DIRBIN}/FEventViewer  # Other objects to install
99    EXESRCS=${DIRBIN}/FEventViewer
100    
101  INCSRCS= ${DIRINC}/feventviewer.h  INCSRCS=${DIRINC}/FEventViewer.h ${DIRINC}/FEVpamevcontrol.h ${DIRINC}/FEVpathtoc.h ${DIRINC}/feventvstruct.h ${DIRINC}/color.h
102    
103    MACROSSRCS=
 MACROSSRCS=${DIRMACROS}/FEventViewer.cxx ${DIRMACROS}/ffilter.cxx  
104    
105  CALIBFILES=  CALIBFILES=
106    
107  DOCFILES=${DIRDOC}/FEventViewer.README.pdf ${DIRDOC}/ffilter.cxx  DOCFILES=
108    
109  # Here the Variables used for info target  # Here the Variables used for info target
110  PACKAGE=PAMELA flight event viewer software  PACKAGE=
111  EXECUTABLES=FEventViewer  EXECUTABLES= ${EXESRCS}
112  LIBS= ${FLIBS} ${FOBJS} ${CLIBS} ${COBJS} ${CXXEXEOBJS}  LIBS= ${FULLLIBS}
113  DOCS=  DOCS=
114  SRCS= ${FSRCS} ${CRSCS} ${CXXEXESRCS}  SRCS=
115    #SRCS= ${FSRCS} ${CRSCS} ${CXXEXESRCS} ${LIBROOTSRCS} ${LIBCPPSRCS}
116  MACROS= ${MACROSSRCS}  MACROS= ${MACROSSRCS}
117    INCLUDE= ${INCSRCS}
118  #  #
119  TOBEDEL = junk  TOBEDEL = junk
120  ROOTINC=$$${shell root-config --incdir}  ROOTINC=$$${shell root-config --incdir}
121  NROOTINC=${shell root-config --incdir}  NROOTINC=${shell root-config --incdir}
122  # Let's start  # Let's start
123  all : test mkbindir mklibdir mkpathtoc ${FULLFLIBS} ${FULLCXXLIBS} ${MACROSLIBS} ${CXXEXELIBS}  #all: test mkbindir mklibdir mkverpath ${FOBJS} ${CPPOBJS} ${LIBROOTLIBS} ${LIBCPPLIBS} ${CXXEXELIBS}
124    all: prepare libs exe
125  all:  all:
126          @echo -e ${GREEN} ""          @echo -e ${GREEN} ""
127          @(${EGREEN} " Finished, now you can install the package \n  (use: make install or make upgrade or make forceinstall) "; ${RESET})          @(${EGREEN} " Finished, now you can install the package \n  (use: make install or make upgrade or make forceinstall) "; ${RESET})
128          @echo -e ${GREEN} ""          @echo -e ${GREEN} ""
         @if [ "$(shell ${PAM_BIN}/CaloLEVEL2 --version 2>/dev/null | grep version | tr -d [a-z:A-Z\ ])" ]; then (${EVIOLET} "WARNING: the installation will break dependencies of CALOLEVEL2"; ${RESET}); (${EVIOLET} "WARNING: re-compile CALOLEVEL2 package after the installation"; ${RESET}); echo -e ${GREEN} ""; fi        
129          @${RESET}          @${RESET}
130    
131  # Here some general rules to produce objects in our local dir  prepare: test mkbindir mklibdir mkverpath mkpathtoc
 # .o from fortran  
 ${DIRBIN}/%.o : ${DIRSRC}/%.for  
         @(${EGREEN} "Creating object file: "${WHITE} "$@"; ${RESET})  
         @${F77} ${F77FLAGS} -c -o $@ $< -I${DIRINC}  
   
 ${DIRBIN}/%.o: ${DIRSRC}/%.cc  
         @(${EGREEN} "Creating object file: "${WHITE} "$@"; ${RESET})  
         @cat ${DIRSRC}/`basename ${@} .o`.cc > ${DIRSRC}/temp.cc;  
         @echo ' ' >> ${DIRSRC}/temp.cc  
         @echo 'void info(){ printf("\nEventViewer package version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); }' >> ${DIRSRC}/temp.cc  
         @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/temp.cc -I${DIRINC} -I${PAM_INC} -I${PAM_YODA}/include/yoda/ `root-config --cflags`  
   
 # .o from C  
 ${DIRBIN}/%.o : ${DIRSRC}/%.c  
         @(${EGREEN} "Creating object file: "${WHITE} "$@"; ${RESET})  
         @${CC} ${CFLAGS} -c -o $@ $< -I${DIRINC}  
   
   
 # .so from .o fortran  
 ${FULLFLIBS}: ${FOBJS}  
         @(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET})  
         @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ ${DIRBIN}/$(patsubst lib%_${VER}.so,%.o,$(@F)) -lg2c `cernlib mathlib`  
         @(${EGREEN} "Creating symlink from : "${WHITE} "$@"; ${RESET})  
         @(${EGREEN} "                   to : "${WHITE} "${DIRLIB}/`basename $@ _${VER}.so`.so"; ${RESET})  
         @ln -sf `basename $@` ${DIRLIB}/`basename $@ _${VER}.so`.so  
   
 # .so from .o c  
 ${FULLCLIBS}: ${COBJS}  
         @(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET})  
         @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $^ -lg2c `mysql_config --cflags --libs`  
         @(${EGREEN} "Creating symlink from : "${WHITE} "$@"; ${RESET})  
         @(${EGREEN} "                   to : "${WHITE} "${DIRLIB}/`basename $@ _${VER}.so`.so"; ${RESET})  
         @ln -sf `basename $@` ${DIRLIB}/`basename $@ _${VER}.so`.so  
132    
133    exe: prepare ${CXXEXELIBS}
134    
135  ${MACROSLIBS}: ${MACROSRCS}  libs: prepare ${LIBROOTLIBS} ${LIBCPPLIBS}
136          @(${EGREEN} "Compiling macro: "${WHITE} "$@"; ${RESET})  
137    # Here some general rules to produce objects in our local dir
138    ${DIRLIB}/%.o: ${DIRSRC}/%.cpp
139            @(${EGREEN} "Creating CPP object file: "${WHITE} "`basename $@`"; ${RESET})
140            @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.cpp -I${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ `root-config --cflags`
141    
142    ${DIRLIB}/%.o: ${DIRSRC}/%.c
143            @(${EGREEN} "Creating C object file: "${WHITE} "`basename $@`"; ${RESET})
144            @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.c -I${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ `root-config --cflags`
145    
146    ${DIRLIB}/%.o: ${DIRSRC}/%.for
147            @(${EGREEN} "Creating F77 object file: "${WHITE} "`basename $@`"; ${RESET})
148            @${F77} ${F77FLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.for -I${DIRINC}
149    
150    ${LIBROOTLIBS}: ${LIBROOTSRCS}
151            @(${EGREEN} "ROOTCINT - creating file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})
152  #  #
153  #       Create *Dict.cxx and *Dict.h  #       Create *Dict.cpp and *Dict.h
154  #  #
155          @${ROOTCINT} -f ${DIRMACROS}/`basename $(@F) _cxx_${VER}.so`Dict.cxx -c -I${ROOTINC} ${DIRINC}/`basename $(@F) _cxx_${VER}.so`fun.h ${DIRINC}/`basename $(@F) _cxx_${VER}.so`LinkDef.h          @${ROOTCINT} -f ${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -c -I${ROOTINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ ${DIRINC}/`basename $(@F) _${VER}.so | sed s/lib//`.h ${DIRINC}/`basename $(@F) _${VER}.so | sed s/lib//`LinkDef.h
156  #  #
157  #       create .o  #       create .o
158  #  #
159          @cd ${DIRMACROS} &>/dev/null && ${CXX} ${CXXFLAGS} -c `basename $(@F) _cxx_${VER}.so`.cxx -I${PAM_INC} -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${NROOTINC};          @(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})
160          @cd ${DIRMACROS} &>/dev/null && ${CXX} ${CXXFLAGS} -c `basename $(@F) _cxx_${VER}.so`Dict.cxx -I${PAM_INC} -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${NROOTINC};          @${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.cpp  -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o -I${DIRTOP}/${DIRINC} -I${DIRTOP} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ -I${NROOTINC};
161            @(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})
162            @${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o -I${DIRTOP}/${DIRINC} -I${DIRTOP} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ -I${NROOTINC};
163  #  #
164  #       create .so  #       create .so
165  #  #
166          @if [ "$@" == "${DIRLIB}/FEVpathtoc_cxx_${VER}.so" ] || [ "$@" == "${DIRLIB}/FEVpamevcontrol_cxx_${VER}.so" ]; then ${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${PAM_INC} -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ ${PAM_YODA}/lib/libyoda.so ${DIRTOP}/${DIRMACROS}/`basename $(@F) _cxx_${VER}.so`.o ${DIRTOP}/${DIRMACROS}/`basename $(@F) _cxx_${VER}.so`Dict.o `root-config --cflags --glibs` 1>/dev/null; fi          @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})
167  #          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ ${SUBINC} ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o 1>/dev/null
168          @if [ "$@" == "${DIRLIB}/FEventViewer_cxx_${VER}.so" ]; then ${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${PAM_INC} -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ ${PAM_YODA}/lib/libyoda.so ${DIRTOP}/${DIRMACROS}/`basename $(@F) _cxx_${VER}.so`.o ${DIRTOP}/${DIRMACROS}/`basename $(@F) _cxx_${VER}.so`Dict.o ${DIRTOP}/${DIRLIB}/FEVpathtoc_cxx_${VER}.so  ${DIRTOP}/${DIRLIB}/FEVpamevcontrol_cxx_${VER}.so `root-config --cflags --glibs` 1>/dev/null; fi          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
   
169    
170  #${MACROSLIBS}: ${MACROSRCS}  ${LIBCPPLIBS}: ${LIBCPPSRCS} ${LIBSRCS} ${COBJS} ${FOBJS}
171  #       @(${EGREEN} "Compiling macro: "${WHITE} "$@"; ${RESET})  #
172  #       @echo '.include ${DIRTOP}/${DIRINC}' > build_so.txt  #       create .o
173  #       @echo '.include ${PAM_INC}' >> build_so.txt  #
174  #       @echo 'TString *junk=new TString();' >> build_so.txt          @(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})
175  #       @echo '*junk=gSystem->GetDynamicPath();' >> build_so.txt          @${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.cpp -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ -I${NROOTINC};
176  #       @echo '*junk+=":${DIRLIB}";' >> build_so.txt  #
177  #       @echo 'gSystem->SetDynamicPath(junk.Data());' >> build_so.txt  #       create .so
178  #       @echo 'char *lmac = gSystem->ExpandPathName("$$PAM_INC");'>>build_so.txt  #
179  #       @echo 'gInterpreter->AddIncludePath(lmac);'>>build_so.txt          @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})
180  #       @echo 'char *pamyoda = gSystem->ExpandPathName("$$PAM_YODA");' >>build_so.txt          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} ${SUBINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${FOBJS} ${COBJS} 1>/dev/null
181  #       @echo 'stringstream incy;' >>build_so.txt          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
 #       @echo 'incy.str("");' >>build_so.txt  
 #       @echo 'incy << pamyoda << "/include/yoda/";' >>build_so.txt  
 #       @echo 'gInterpreter->AddIncludePath(incy.str().c_str());' >>build_so.txt  
 #       @echo 'incy.str("");' >>build_so.txt  
 #       @echo 'incy << pamyoda << "/event/";'>>build_so.txt  
 #       @echo 'gInterpreter->AddIncludePath(incy.str().c_str());'>>build_so.txt  
 #       @echo 'gSystem->cd("'${DIRMACROS}'");' >> build_so.txt  
 #       @echo 'char *pamyodalib = gSystem->ExpandPathName("$$PAM_YODA");' >>build_so.txt  
 #       @echo 'stringstream libYODA;'>>build_so.txt  
 #       @echo 'libYODA.str("");' >>build_so.txt  
 #       @echo 'libYODA << pamyodalib << "/lib/libyoda.so";'>>build_so.txt  
 #       @echo 'gSystem->Load(libYODA.str().c_str());'>>build_so.txt  
 #       @echo 'libYODA.str("");' >>build_so.txt  
 ##      @echo 'libYODA << "${DIRTOP}/${DIRLIB}/libtrack_${VER}.so";'>>build_so.txt  
 ##      @echo 'gSystem->Load(libYODA.str().c_str());'>>build_so.txt  
 ##      @echo 'libYODA.str("");' >>build_so.txt  
 ##      @echo 'libYODA << "${DIRTOP}/${DIRLIB}/libtrack_C_${VER}.so";'>>build_so.txt  
 ##      @echo 'gSystem->Load(libYODA.str().c_str());'>>build_so.txt  
 ##      @echo 'libYODA.str("");' >>build_so.txt  
 ##      @echo 'libYODA << "${DIRTOP}/${DIRLIB}/libptlevel1_${VER}.so";'>>build_so.txt  
 ##      @echo 'gSystem->Load(libYODA.str().c_str());'>>build_so.txt  
 ##      @echo 'libYODA.str("");' >>build_so.txt  
 ##      @echo 'libYODA << "${DIRTOP}/${DIRLIB}/libptlevel1_C_${VER}.so";'>>build_so.txt  
 ##      @echo 'gSystem->Load(libYODA.str().c_str());'>>build_so.txt  
 ##      @echo 'libYODA.str("");' >>build_so.txt  
 ##      @echo 'libYODA << "${DIRTOP}/${DIRLIB}/libreadb2maps_${VER}.so";'>>build_so.txt  
 ##      @echo 'gSystem->Load(libYODA.str().c_str());'>>build_so.txt  
 ##      @echo 'libYODA.str("");' >>build_so.txt  
 ##      @echo 'libYODA << "${DIRTOP}/${DIRLIB}/libreadb2maps_C_${VER}.so";'>>build_so.txt  
 ##      @echo 'gSystem->Load(libYODA.str().c_str());'>>build_so.txt  
 ##      @echo 'libYODA.str("");' >>build_so.txt  
 ##      @echo 'libYODA << "${PAM_LIB}/caloclasses_h.so";'>>build_so.txt  
 ##      @echo 'gSystem->Load(libYODA.str().c_str());'>>build_so.txt  
 ##      @echo 'libYODA.str("");' >>build_so.txt  
 ##      @echo 'libYODA << "${PAM_LIB}/aclev1class_h.so";'>>build_so.txt  
 ##      @echo 'gSystem->Load(libYODA.str().c_str());'>>build_so.txt  
 #       if [ "$@" != "${DIRLIB}/FEVpathtoc_c_"${VER}".so" ]; then \  
 #       echo 'libYODA.str("");' >>build_so.txt ; \  
 #       echo 'libYODA << "'${DIRTOP}/${DIRLIB}'/FEVpathtoc_c_'${VER}'.so";'>>build_so.txt ; \  
 #       echo 'gSystem->Load(libYODA.str().c_str());'>>build_so.txt ; \  
 #       fi;  
 #       if [ "$@" != "${DIRLIB}/FEVpathtoc_cxx_"${VER}".so" ]; then \  
 #       ${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ ${DIRMACROS}/`basename $(@F) _cxx_${VER}.so`.cxx -lg2c -I${PAM_INC} -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ ${PAM_YODA}/lib/libyoda.so ${DIRTOP}/${DIRLIB}/FEVpathtoc_cxx_${VER}.so `root-config --cflags --glibs` 1>/dev/null; \  
 #       else \  
 #       ${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ ${DIRMACROS}/`basename $(@F) _cxx_${VER}.so`.cxx -lg2c -I${PAM_INC} -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ ${PAM_YODA}/lib/libyoda.so `root-config --cflags --glibs` 1>/dev/null; \  
 #       fi  
 #       @echo '.debug' >> build_so.txt  
 #       @echo '.L $(patsubst %_c_${VER}.so,%.c++,$(@F))' >> build_so.txt  
 #       @echo '.q' >> build_so.txt  
 #       @root -l -b 1>/dev/null  < build_so.txt  
 #       @mv -f ${DIRMACROS}/$(patsubst %_c_${VER}.so,%_c.so,$(@F)) ${DIRLIB}/$(@F)  
 #       @rm -f build_so.txt  
182    
183  ${CXXEXELIBS}: ${CXXEXEOBJS}  ${CXXEXELIBS}: ${LIBROOTSRCS} ${CPPOBJS} ${COBJS} ${CXXEXEOBJS}
184          @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET})
185          @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRBIN}/$@.o -I${DIRINC} -I${PAM_INC} -I${PAM_YODA}/include/yoda/ ${PAM_YODA}/lib/libyoda.so ${DIRTOP}/${DIRLIB}/FEVpathtoc_cxx_${VER}.so ${DIRTOP}/${DIRLIB}/FEVpamevcontrol_cxx_${VER}.so ${DIRTOP}/${DIRLIB}/$@_cxx_${VER}.so `root-config --cflags --glibs`  #       @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o ${FULLROOTCLIBS} ${FULLLIBCPPLIBS} ${CPPOBJS} ${FOBJS} ${TRKOBJS} ${PAM_YODA}/lib/libyoda.so -I${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -lThread `root-config --cflags --glibs` `cernlib mathlib`
186  #       @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRBIN}/$@.o -I${DIRINC} -I${PAM_INC} -I${PAM_YODA}/include/yoda/ ${PAM_LIB}/caloclasses_h.so ${PAM_YODA}/lib/libyoda.so ${DIRTOP}/${DIRLIB}/FEVpathtoc_c_${VER}.so ${PAM_LIB}/aclev1class_h.so ${DIRTOP}/${DIRLIB}/libreadb2maps_${VER}.so ${DIRTOP}/${DIRLIB}/libreadb2maps_C_${VER}.so ${DIRTOP}/${DIRLIB}/libtrack_${VER}.so ${DIRTOP}/${DIRLIB}/libtrack_C_${VER}.so ${DIRTOP}/${DIRLIB}/libptlevel1_${VER}.so ${DIRTOP}/${DIRLIB}/libptlevel1_C_${VER}.so ${DIRTOP}/${DIRLIB}/$@_c_${VER}.so `root-config --cflags --glibs`  ##      @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o ${FULLROOTCLIBS} ${FULLLIBCPPLIBS} ${TRKOBJS} ${CPPOBJS} ${COBJS} ${FOBJS} ${PAM_YODA}/lib/libyoda.so ${PAM_YODA}/lib/libutils.so ${PAM_LIB}/libPamLevel2.so -lThread `root-config --cflags --glibs` `cernlib mathlib`
187  #       @rm -f ${DIRSRC}/temp.cc  #       echo 'nuclei is ${NUCLEI}'
188            @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o ${FULLROOTCLIBS} ${FULLLIBCPPLIBS} ${TRKOBJS} ${CPPOBJS} ${COBJS} ${FOBJS} ${PAM_YODA}/lib/libyoda.so ${PAM_LIB}/libPamLevel2.so -lThread `root-config --cflags --glibs` `doc/cernlib_pam mathlib`;
189    
190  # A small target to check environmental variables  # A small target to check environmental variables
191  %_env:  %_env:
192          @${test_env}          @${test_env}
193    
194  .PHONY: install installdoc installlib installmacros installinc  .PHONY: install installdoc installlib installmacros installinc installexe installcmacro
195  .PHONY: clean depclean info mkbindir mklibdir testcern testpamenv test testcalocommon testroot2paw testmysql  .PHONY: clean depclean info mkbindir mklibdir testcern testpamenv test
196    
197  mkbindir: ${DIRBIN}  mkbindir: ${DIRBIN}
198  ${DIRBIN}:  ${DIRBIN}:
# Line 273  ${DIRLIB}: Line 203  ${DIRLIB}:
203          @${test_and_mk}          @${test_and_mk}
204    
205  # Here what has to be deleted in clean target  # Here what has to be deleted in clean target
206  clean: TOBEDEL=${DIRMACROS}/*.o ${DIRMACROS}/*Dict.cxx ${DIRMACROS}/*Dict.h ${FOBJS} ${FULLLIBS} ${DIRBIN}/${CXXEXELIBS} ${COBJS} ${CXXEXEOBJS} ${FULLLINKFLIBS} ${FULLLINKCLIBS}  clean: TOBEDEL= ${DIRSRC}/*.o ${DIRSRC}/*Dict.cpp ${DIRSRC}/*Dict.h ${FOBJS} ${FULLLIBS} ${DIRBIN}/${CXXEXELIBS} ${CPPOBJS} ${CXXEXEOBJS} ${FULLLINKCLIBS} ${FULLMACROCLIBS} ${FULLLINKMACROCLIBS} ${DIRSRC}/FEVVerl2.cpp ${DIRSRC}/FEVpathtoc.cpp
207  clean:  clean:
208          @${test_and_rm}          @${test_and_rm}
209    
# Line 288  forceinstall: install Line 218  forceinstall: install
218  upgrade: FORCE=-u  upgrade: FORCE=-u
219  upgrade: install  upgrade: install
220    
221  install: installlib installinc installmacros installcalib installdoc installexe installcmacro  install: installlib installinc installmacros installcalib installdoc installcmacro installexe
222    
223  installlib: LINK=y  installlib: LINK=y
224  installlib: TOBEMOVED= $(FULLLIBS:${DIRLIB}%=${PAM_LIB}%)  installlib: TOBEMOVED= $(FULLLIBS:${DIRLIB}%=${PAM_LIB}%)
# Line 327  installdoc: ORIGIN=${DIRDOC} Line 257  installdoc: ORIGIN=${DIRDOC}
257  installdoc:  installdoc:
258          @${test_and_cp}          @${test_and_cp}
259    
260    mkverpath:
261            @echo '#include <TSystem.h>' >  ${DIRTOP}/${DIRSRC}/FEVVerl2.cpp; echo ' char *FEVInfo(bool print){ if ( print ) printf("\nEvent Viewer flight package version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); return("${VER}"); }' >>  ${DIRTOP}/${DIRSRC}/FEVVerl2.cpp
262            @sleep 0.8
263    
264    mkpathtoc:
265            @if [ "${PAM_CCO}" == "" ]; then echo '#include <TSystem.h>' >  ${DIRTOP}/${DIRSRC}/FEVpathtoc.cpp; echo ' const char *pathtocalibration(){ return((const char*)gSystem->Getenv("PAM_CALIB"));}' >>  ${DIRTOP}/${DIRSRC}/FEVpathtoc.cpp; echo ' const char *pathtoinclude(){ return((const char*)gSystem->Getenv("PAM_INC"));}' >>  ${DIRTOP}/${DIRSRC}/FEVpathtoc.cpp;  fi
266            @if [ "${PAM_CCO}" != "" ]; then echo '#include <TSystem.h>' >  ${DIRTOP}/${DIRSRC}/FEVpathtoc.cpp; echo ' const char *pathtocalibration(){ return((const char*)"'${PAM_CALIB}'/");}' >>  ${DIRTOP}/${DIRSRC}/FEVpathtoc.cpp; echo ' const char *pathtocalibration(){ return((const char*)"'${PAM_INC}'/");}' >>  ${DIRTOP}/${DIRSRC}/FEVpathtoc.cpp; fi
267            @sleep 0.5
268    
269    
270    
271    
272    
273  info:  info:
274          @echo " "          @echo " "
275          @${EGREEN} "Infos for package :" ${WHITE} ${PACKAGE}          @${EGREEN} "Infos for package :" ${WHITE} ${PACKAGE}
# Line 336  info: Line 279  info:
279          @${EGREEN} "             DOCS :" ${WHITE} ${DOCS}          @${EGREEN} "             DOCS :" ${WHITE} ${DOCS}
280          @${EGREEN} "             SRCS :" ${WHITE} ${SRCS}          @${EGREEN} "             SRCS :" ${WHITE} ${SRCS}
281          @${EGREEN} "           MACROS :" ${WHITE} ${MACROS}          @${EGREEN} "           MACROS :" ${WHITE} ${MACROS}
282            @${EGREEN} "          INCLUDE :" ${WHITE} ${INCLUDE}
283          @echo " "          @echo " "
284          @${RESET}          @${RESET}
285    
286  test: testpamenv  test: testpamenv
 #test: testpamenv testcernlib testmysql testcalocommon testroot2paw  
287    
288  testpamenv: ${PAM_ENV}  testpamenv: ${PAM_ENV}
289    
 testcernlib: cernlib root-config  
   
 testmysql: mysql_config  
   
 testcalocommon: '${PAM_BIN}'/calocommon  
         @if [ ${INSTCOMVER} -lt ${COMPCOMVER} ]; then ${ERED} " ERROR: EventViewer ${VER} requires package CALOCOMMON version ${COMMONVER} "; ${RESET} ; exit 1; fi  
   
 testroot2paw: '${PAM_BIN}'/GroundDataConvert  
         @if [ ${INSTR2PVER} -lt ${COMPR2PVER} ]; then ${ERED} " ERROR: EventViewer ${VER} requires package root2paw version ${R2PVER} "; ${RESET} ; exit 1; fi  
   
 mysql_config: OPT=--cflags  
 mysql_config:  
         @$(test_cmd)  
   
 mkpathtoc:  
         @if [ "${PAM_CCO}" == "" ]; then echo '#include <TSystem.h>' >  ${DIRTOP}/${DIRMACROS}/FEVpathtoc.cxx; echo ' const char *pathtocalibration(){ return((const char*)gSystem->Getenv("PAM_CALIB"));}' >>  ${DIRTOP}/${DIRMACROS}/FEVpathtoc.cxx; fi  
         @if [ "${PAM_CCO}" != "" ]; then echo '#include <TSystem.h>' >  ${DIRTOP}/${DIRMACROS}/FEVpathtoc.cxx; echo ' const char *pathtocalibration(){ return((const char*)"'${PAM_CALIB}'/");}' >>  ${DIRTOP}/${DIRMACROS}/FEVpathtoc.cxx; fi  
         @sleep 0.5  
   
   
 '${PAM_BIN}'/calocommon:  
         @$(test_cmd)  
   
 '${PAM_BIN}'/GroundDataConvert: OPT=--version  
 '${PAM_BIN}'/GroundDataConvert:  
         @$(test_cmd)  
   
 cernlib:  
         @${test_cmd}  
290    
291  root-config: OPT=--cflags  root-config: OPT=--cflags
292  root-config:  root-config:

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

  ViewVC Help
Powered by ViewVC 1.1.23