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

Diff of /DarthVader/TrackerLevel2/Makefile

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

revision 1.1 by mocchiut, Fri May 19 13:15:51 2006 UTC revision 1.16 by pam-fi, Thu Nov 23 18:51:43 2006 UTC
# Line 1  Line 1 
1  # Tracker flight analysis software  # Tracker flight analysis software
2  # SOFTWARE VERSION  # SOFTWARE VERSION
3  VER= v0r01  VER= v2r01
4  DEBUG=0  DEBUG=0
5  # An almost general purpouse Makefile for PAMELA repository  # An almost general purpouse Makefile for PAMELA repository
6  # Let's start with some usefull definition for colorize the echo  # Let's start with some usefull definition for colorize the echo
# Line 33  TODAY=`date` Line 33  TODAY=`date`
33  # F77  # F77
34  F77=g77  F77=g77
35  #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
36  F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash  F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash -fPIC
37  # C++  # C++
38  CXX=g++  CXX=g++
39  #CXXFLAGS=-Wall -O -fPIC -pthread -g -D'DEBUG=${DEBUG}'  #CXXFLAGS=-Wall -O -fPIC -pthread -g -D'DEBUG=${DEBUG}'
40  #CXXFLAGS=-Wall -O -fPIC -pthread -g -D'DEBUG=0'  #CXXFLAGS=-Wall -O -fPIC -pthread -g -D'DEBUG=0'
41    #CXXFLAGS=-Wall -O -fPIC -pthread -fpermissive
42  CXXFLAGS=-Wall -O -fPIC -pthread  CXXFLAGS=-Wall -O -fPIC -pthread
43  # ROOTCINT  # ROOTCINT
44  ROOTCINT=rootcint  ROOTCINT=rootcint
# Line 78  CSRCS= Line 79  CSRCS=
79  COBJS=$(CSRCS:${DIRSRC}%.cpp=${DIRLIB}/%.o)  COBJS=$(CSRCS:${DIRSRC}%.cpp=${DIRLIB}/%.o)
80  #-------------------------------------------------  #-------------------------------------------------
81  # librerie utilizzabili da root (ci deve essere anche il ***LinkDef.h )  # librerie utilizzabili da root (ci deve essere anche il ***LinkDef.h )
82  LIBROOTSRCS=    ${DIRSRC}/TrkLevel2.cpp  LIBROOTSRCS=    ${DIRSRC}/TrkLevel2.cpp  \
83                    ${DIRSRC}/TrkLevel1.cpp \
84                    ${DIRSRC}/TrkHough.cpp \
85                    ${DIRSRC}/TrkCalib.cpp
86    
87  #LIBROOTSRCS=    #LIBROOTSRCS=  
88  LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)  LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)
89  LIBROOTOBJS=${DIRLIB}/readB.o ${DIRLIB}/interB.o ${DIRLIB}/track.o ${DIRLIB}/grkuta.o  LIBROOTOBJS=${DIRLIB}/readB.o ${DIRLIB}/interB.o ${DIRLIB}/track.o ${DIRLIB}/grkuta.o ${DIRLIB}/functionspfa.o ${DIRLIB}/readallparam.o ${DIRLIB}/functions.o ${DIRLIB}/mini.o ${DIRLIB}/tricircle.o
90  LIBROOTCLIBS=libTrkLevel2  LIBROOTCLIBS=libTrkLevel2 libTrkLevel1 libTrkHough libTrkCalib
91    
92  #LIBROOTCLIBS=  #LIBROOTCLIBS=
93  FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so)  FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so)
94  #-------------------------------------------------  #-------------------------------------------------
# Line 114  CXXEXESRCS=${DIRSRC}/TrackerLevel2.cpp Line 120  CXXEXESRCS=${DIRSRC}/TrackerLevel2.cpp
120  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=${DIRLIB}%.o)  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=${DIRLIB}%.o)
121  CXXEXELIBS:=TrackerLevel2  CXXEXELIBS:=TrackerLevel2
122    
123  OTHERLIBS=${DIRLIB}/libGLTables.so ${DIRLIB}/libRunInfo.so  OTHERLIBS=${PAM_LIB}/libGLTables.so ${DIRLIB}/libRunInfo.so
124  SUBDIR=../GLTables ../RunInfo  SUBDIR=../RunInfo
125  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)
126    
127  #-------------------------------------------------  #-------------------------------------------------
# Line 123  SUBINC=$(shell for dir in `echo ${SUBDIR Line 129  SUBINC=$(shell for dir in `echo ${SUBDIR
129  EXESRCS=${DIRBIN}/TrackerLevel2  EXESRCS=${DIRBIN}/TrackerLevel2
130  INCSRCS= \  INCSRCS= \
131          ${DIRINC}/TrkLevel2.h \          ${DIRINC}/TrkLevel2.h \
132            ${DIRINC}/TrkLevel1.h \
133          ${DIRINC}/TrkLevel0.h \          ${DIRINC}/TrkLevel0.h \
134            ${DIRINC}/TrkHough.h \
135            ${DIRINC}/TrkCalib.h \
136          ${DIRINC}/TrkStruct.h \          ${DIRINC}/TrkStruct.h \
137          ${DIRINC}/TrkProcess.h \          ${DIRINC}/TrkProcess.h \
138          ${DIRINC}/TrkCore.h \          ${DIRINC}/TrkCore.h \
# Line 158  standalone: all ${CXXEXELIBS} Line 167  standalone: all ${CXXEXELIBS}
167  ${DIRLIB}/%.o: ${DIRSRC}/%.cpp  ${DIRLIB}/%.o: ${DIRSRC}/%.cpp
168  #       @(${EYELLOW} " C++ object ------------------------")  #       @(${EYELLOW} " C++ object ------------------------")
169          @(${EGREEN} "Creating C++ object file: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Creating C++ object file: "${WHITE} "$@"; ${RESET})
170          @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.cpp -I${DIRTOP}/${DIRINC} -I${SUBINC} -I${PAM_YODA}/include/yoda/  `root-config --cflags`          @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.cpp -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ `root-config --cflags`
171    
172  ${DIRLIB}/%.o : ${DIRSRC}/F77/%.f  ${DIRLIB}/%.o : ${DIRSRC}/F77/%.f
173  #       @(${EYELLOW} " F77 object ------------------------")  #       @(${EYELLOW} " F77 object ------------------------")
174          @(${EGREEN} "Creating F77 object file: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Creating F77 object file: "${WHITE} "$@"; ${RESET})
175          @${F77} ${F77FLAGS} -c -o $@ ${DIRSRC}/F77/`basename ${@} .o`.f -I${DIRTOP}/${DIRINC}/F77 -I${NROOTINC} -I${PAM_YODA}/include/yoda -I${SUBINC}          @${F77} ${F77FLAGS} -c -o $@ ${DIRSRC}/F77/`basename ${@} .o`.f -I${DIRTOP}/${DIRINC}/F77 -I${NROOTINC} ${SUBINC} -I${PAM_YODA}/include/yoda -I${PAM_INC}/
176    
177  # .so from .o fortran  # .so from .o fortran
178  ${LIBF77LIBS}: ${LIBF77OBJS}  ${LIBF77LIBS}: ${LIBF77OBJS}
179          @(${EYELLOW} " F77 shared library --------------------------")          @(${EYELLOW} " F77 shared library --------------------------")
180          @(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET})
181          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $^ -lg2c `cernlib mathlib`  #       @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $^ `cernlib mathlib` /usr/lib/libg2c.so.0
182    ##      @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c $^ `cernlib mathlib`
183            @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c $^
184    
185  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS}  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS}
186          @(${EYELLOW} " ROOT library ------------------------")          @(${EYELLOW} " ROOT library ------------------------")
# Line 177  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS} Line 188  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS}
188  #  #
189  #       Create *Dict.cpp and *Dict.h  #       Create *Dict.cpp and *Dict.h
190  #  #
191          @${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
192  #  #
193  #       create .o  #       create .o
194  #  #
195          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})
196          @${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};
197          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})
198          @${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} -I${PAM_INC} -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} -I${PAM_INC} -I${PAM_YODA}/include/yoda/ -I${NROOTINC};
199          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
# Line 190  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS} Line 201  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS}
201  #       create .so  #       create .so
202  #  #
203          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})
204          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda -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} `cernlib mathlib` 1>/dev/null          ##      @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda -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} `cernlib mathlib` 1>/dev/null        
205            @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda -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  
206  #       ${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} ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o 1>/dev/null
207          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
208          @(${EYELLOW} " -------------------------------------")          @(${EYELLOW} " -------------------------------------")
# Line 200  ${LIBCPPLIBS}: ${LIBCPPSRCS} Line 212  ${LIBCPPLIBS}: ${LIBCPPSRCS}
212  #       create .o  #       create .o
213  #  #
214          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})
215          @${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};
216  #  #
217  #       create .so  #       create .so
218  #  #
219          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})
220          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${PAM_YODA}/include/yoda/ -I${SUBINC} ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${OTHERLIBS} 1>/dev/null          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${OTHERLIBS} ${FOBJS} 1>/dev/null
221          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
222    
223    
224  ${CXXEXELIBS}: ${COBJS} ${FOBJS} ${CXXEXEOBJS}  ${CXXEXELIBS}: ${COBJS} ${FOBJS} ${CXXEXEOBJS}
225          @(${EVIOLET} "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *")          @(${EVIOLET} "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
226          @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET})
227          @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ ${PAM_YODA}/lib/libyoda.so ${FOBJS} ${COBJS} ${FULLLIBS} ${OTHERLIBS} -lThread `root-config --cflags --glibs` `cernlib mathlib` ;  #       @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ ${PAM_YODA}/lib/libyoda.so ${PAM_YODA}/lib/libutils.so ${FOBJS} ${COBJS} ${FULLLIBS} ${OTHERLIBS} -lThread `root-config --cflags --glibs` `cernlib mathlib` /usr/lib/libg2c.so.0;
228            @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${PAM_YODA}/lib/libyoda.so ${FOBJS} ${COBJS} ${FULLLIBS} ${OTHERLIBS} -lThread -lg2c `root-config --cflags --glibs` `cernlib_noshift mathlib`;
229    
230    
231  # A small target to check environmental variables  # A small target to check environmental variables

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.23