/[PAMELA software]/DarthVader/CalorimeterLevel2/Makefile
ViewVC logotype

Diff of /DarthVader/CalorimeterLevel2/Makefile

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

revision 1.2 by mocchiut, Tue May 23 08:35:43 2006 UTC revision 1.12 by mocchiut, Wed Dec 13 13:42:31 2006 UTC
# Line 1  Line 1 
1  # Calorimeter flight analysis software  # Calorimeter flight analysis software
2  # SOFTWARE VERSION  # SOFTWARE VERSION
3  VER= v3r04  VER= v4r01
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'
# Line 32  TODAY=`date` Line 32  TODAY=`date`
32  # F77  # F77
33  F77=g77  F77=g77
34  #F77FLAGS=  -Wall -Wno-globals -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 -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash  F77FLAGS=  -Wall -Wno-globals -fPIC -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash
36  # C++  # C++
37  CXX=g++  CXX=g++
38  #CXXFLAGS=-Wall -O -fPIC -pthread -g  #CXXFLAGS=-Wall -O -fPIC -pthread -g
# Line 79  CSRCS=${DIRSRC}/delay.c Line 79  CSRCS=${DIRSRC}/delay.c
79  COBJS=$(CSRCS:${DIRSRC}%.c=${DIRLIB}%.o)  COBJS=$(CSRCS:${DIRSRC}%.c=${DIRLIB}%.o)
80    
81  # -- CPP - ROOT libraries --  # -- CPP - ROOT libraries --
82  LIBROOTSRCS=${DIRSRC}/CaloLevel2.cpp  LIBROOTSRCS=${DIRSRC}/CaloLevel1.cpp \
83                ${DIRSRC}/CaloLevel2.cpp
84    
85  LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)  LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)
86  LIBROOTCLIBS=libCaloLevel2  LIBROOTOBJS=${DIRLIB}/millim.o
87    LIBROOTCLIBS=libCaloLevel2 libCaloLevel1
88  FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so)  FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so)
89    
90  # -- CPP - NON-ROOT libraries --  # -- CPP - NON-ROOT libraries --
# Line 99  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=$ Line 101  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=$
101  CXXEXELIBS:=CalorimeterLevel2  CXXEXELIBS:=CalorimeterLevel2
102    
103  # -- list of tracker objects needed to link  # -- list of tracker objects needed to link
104  TRKOBJS=${DIRLIB}/libTrkLevel2.so ${DIRLIB}/libGLTables.so ${DIRLIB}/libRunInfo.so  TRKOBJS=${DIRLIB}/libTrkLevel2.so ${PAM_LIB}/libGLTables.so ${DIRLIB}/libRunInfo.so
105    
106  # -- directory where to find tracker headers needed to compile  # -- directory where to find tracker headers needed to compile
107  SUBDIR=../GLTables ../RunInfo ../TrackerLevel2  SUBDIR=../RunInfo ../TrackerLevel2
108  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)
109    
110  # List of all libraries we want to install  # List of all libraries we want to install
# Line 111  FULLLIBS = ${FULLROOTCLIBS} ${FULLLIBCPP Line 113  FULLLIBS = ${FULLROOTCLIBS} ${FULLLIBCPP
113  # Other objects to install  # Other objects to install
114  EXESRCS=${DIRBIN}/CalorimeterLevel2  EXESRCS=${DIRBIN}/CalorimeterLevel2
115    
116  INCSRCS=${DIRINC}/CaloLevel2.h ${DIRINC}/CaloProcessing.h ${DIRINC}/CaloCore.h  INCSRCS=${DIRINC}/CaloLevel1.h ${DIRINC}/CaloLevel2.h ${DIRINC}/CaloStruct.h ${DIRINC}/CaloProcessing.h ${DIRINC}/CaloCore.h
117    
118  MACROSSRCS=  MACROSSRCS=
119    
# Line 152  libs: prepare ${LIBROOTLIBS} ${LIBCPPLIB Line 154  libs: prepare ${LIBROOTLIBS} ${LIBCPPLIB
154  # Here some general rules to produce objects in our local dir  # Here some general rules to produce objects in our local dir
155  ${DIRLIB}/%.o: ${DIRSRC}/%.cpp  ${DIRLIB}/%.o: ${DIRSRC}/%.cpp
156          @(${EGREEN} "Creating CPP object file: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating CPP object file: "${WHITE} "`basename $@`"; ${RESET})
157          @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.cpp -I${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ `root-config --cflags`          @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.cpp -I${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ `root-config --cflags`
158    
159  ${DIRLIB}/%.o: ${DIRSRC}/%.c  ${DIRLIB}/%.o: ${DIRSRC}/%.c
160          @(${EGREEN} "Creating C object file: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating C object file: "${WHITE} "`basename $@`"; ${RESET})
161          @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.c -I${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ `root-config --cflags`          @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.c -I${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ `root-config --cflags`
162    
163  ${DIRLIB}/%.o: ${DIRSRC}/%.for  ${DIRLIB}/%.o: ${DIRSRC}/%.for
164          @(${EGREEN} "Creating F77 object file: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating F77 object file: "${WHITE} "`basename $@`"; ${RESET})
165          @${F77} ${F77FLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.for -I${DIRINC}          @${F77} ${F77FLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.for -I${DIRINC}
166    
167  ${LIBROOTLIBS}: ${LIBROOTSRCS}  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS}
168          @(${EGREEN} "ROOTCINT - creating file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})          @(${EGREEN} "ROOTCINT - creating file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})
169  #  #
170  #       Create *Dict.cpp and *Dict.h  #       Create *Dict.cpp and *Dict.h
171  #  #
172          @${ROOTCINT} -f ${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -c -I${ROOTINC} -I${PAM_YODA}/include/yoda/ ${DIRINC}/`basename $(@F) _${VER}.so | sed s/lib//`.h ${DIRINC}/`basename $(@F) _${VER}.so | sed s/lib//`LinkDef.h          @${ROOTCINT} -f ${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -c -I${ROOTINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${DIRINC}/`basename $(@F) _${VER}.so | sed s/lib//`.h ${DIRINC}/`basename $(@F) _${VER}.so | sed s/lib//`LinkDef.h
173  #  #
174  #       create .o  #       create .o
175  #  #
176          @(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})          @(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})
177          @${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${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_INC}/ -I${NROOTINC};
178          @(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})          @(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})
179          @${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${NROOTINC};          @${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_INC}/ -I${NROOTINC};
180  #  #
181  #       create .so  #       create .so
182  #  #
183          @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})
184          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ ${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          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ ${SUBINC} -I${PAM_INC}/ ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o ${LIBROOTOBJS} 1>/dev/null
185          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
186    
187  ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOBJS}  ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOBJS}
# Line 187  ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOB Line 189  ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOB
189  #       create .o  #       create .o
190  #  #
191          @(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})          @(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})
192          @${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${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} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ -I${NROOTINC};
193  #  #
194  #       create .so  #       create .so
195  #  #
196          @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})
197          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} ${SUBINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${FOBJS} ${COBJS} 1>/dev/null          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} ${SUBINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${FOBJS} ${COBJS} 1>/dev/null
198          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
199    
200  ${CXXEXELIBS}: ${CPPOBJS} ${COBJS} ${CXXEXEOBJS}  ${CXXEXELIBS}: ${CPPOBJS} ${COBJS} ${CXXEXEOBJS}

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.23