/[PAMELA software]/DarthVader/Makefile
ViewVC logotype

Diff of /DarthVader/Makefile

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

revision 1.6 by mocchiut, Fri Jul 14 14:08:29 2006 UTC revision 1.18 by mocchiut, Thu Nov 2 12:32:56 2006 UTC
# Line 1  Line 1 
1  # DarthVader flight analysis software  # DarthVader flight analysis software
2  # SOFTWARE VERSION  # SOFTWARE VERSION IS
3  VER= v1r01beta  VER= v2r00
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 82  LIBCPPCLIBS= Line 82  LIBCPPCLIBS=
82  FULLLIBCPPLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so)  FULLLIBCPPLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so)
83    
84  # -- CPP - Executables --  # -- CPP - Executables --
85  CXXEXESRCS=${DIRSRC}/DarthVader.cpp \  CXXEXESRCS=${DIRSRC}/DarthVader.cpp
            ${DIRSRC}/R2-D2.cpp  
86  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=${DIRLIB}%.o)  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=${DIRLIB}%.o)
87  CXXEXELIBS:=DarthVader R2-D2  CXXEXELIBS:=DarthVader
88    
89  # -- list of tracker objects needed to link  # -- list of tracker objects needed to link
90  #TRKOBJS=${DIRTOP}/../lib2/libTrkLevel2.so ${DIRTOP}/../lib2/libtrack.so  #TRKOBJS=${DIRTOP}/../lib2/libTrkLevel2.so ${DIRTOP}/../lib2/libtrack.so
# Line 93  CXXEXELIBS:=DarthVader R2-D2 Line 92  CXXEXELIBS:=DarthVader R2-D2
92  #OBJS=${DIRLIB}/*.*  #OBJS=${DIRLIB}/*.*
93  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)
94  #TRKOBJS=  #TRKOBJS=
95    DARTHVLIB=${DIRLIB}/libDarthVader_${VER}.so
96    
97  # -- directory where to find tracker headers needed to compile  # -- directory where to find tracker headers needed to compile
98  #TRKHEAD=${DIRTOP}/../tracker/inc  #TRKHEAD=${DIRTOP}/../tracker/inc
99  #TRKHEAD=-I${PAM_INC} -ITrackerLevel2/inc/ -IRunInfo/inc/ -IGLTables/inc/  #TRKHEAD=-I${PAM_INC} -ITrackerLevel2/inc/ -IRunInfo/inc/ -IGLTables/inc/
100    
101  #  #
102  SUBDIR=./GLTables ./RunInfo ./S4Level2 ./NDLevel2 ./TrackerLevel2 ./TriggerLevel2 ./ToFLevel2 ./CalorimeterLevel2 ./AnticounterLevel2 ./OrbitalInfo  SUBDIR=./RunInfo ./S4Level2 ./NDLevel2 ./TrackerLevel2 ./TriggerLevel2 ./ToFLevel2 ./CalorimeterLevel2 ./AnticounterLevel2 ./OrbitalInfo
103  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)
104    
105  # List of all libraries we want to install  # List of all libraries we want to install
106  FULLLIBS = ${FULLROOTCLIBS} ${FULLLIBCPPLIBS}  FULLLIBS = ${FULLROOTCLIBS} ${FULLLIBCPPLIBS} ${DARTHVLIB}
107    
108  # Other objects to install  # Other objects to install
109  EXESRCS=${DIRBIN}/DarthVader ${DIRBIN}/R2-D2  EXESRCS=${DIRBIN}/DarthVader
110    
111  INCSRCS=  INCSRCS=
112    
# Line 163  libs: prepare ${LIBROOTLIBS} ${LIBCPPLIB Line 163  libs: prepare ${LIBROOTLIBS} ${LIBCPPLIB
163  # Here some general rules to produce objects in our local dir  # Here some general rules to produce objects in our local dir
164  ${DIRLIB}/%.o: ${DIRSRC}/%.cpp  ${DIRLIB}/%.o: ${DIRSRC}/%.cpp
165          @(${EGREEN} "Creating CPP object file: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating CPP object file: "${WHITE} "`basename $@`"; ${RESET})
166          @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.cpp -I${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ `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`
167    
168  ${DIRLIB}/%.o: ${DIRSRC}/%.c  ${DIRLIB}/%.o: ${DIRSRC}/%.c
169          @(${EGREEN} "Creating C object file: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating C object file: "${WHITE} "`basename $@`"; ${RESET})
170          @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.c -I${DIRINC}  -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ `root-config --cflags`          @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.c -I${DIRINC}  -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ `root-config --cflags`
171    
172  ${DIRLIB}/%.o: ${DIRSRC}/%.for  ${DIRLIB}/%.o: ${DIRSRC}/%.for
173          @(${EGREEN} "Creating F77 object file: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating F77 object file: "${WHITE} "`basename $@`"; ${RESET})
# Line 178  ${LIBROOTLIBS}: ${LIBROOTSRCS} Line 178  ${LIBROOTLIBS}: ${LIBROOTSRCS}
178  #  #
179  #       Create *Dict.cpp and *Dict.h  #       Create *Dict.cpp and *Dict.h
180  #  #
181          @${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          @${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
182  #  #
183  #       create .o  #       create .o
184  #  #
185          @(${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})
186          @cd ${DIRSRC} &>/dev/null && ${CXX} ${CXXFLAGS} -c `basename $(@F) _${VER}.so | sed s/lib//`.cpp -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ -I${NROOTINC};          @cd ${DIRSRC} &>/dev/null && ${CXX} ${CXXFLAGS} -c `basename $(@F) _${VER}.so | sed s/lib//`.cpp -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ -I${NROOTINC};
187          @(${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})
188          @cd ${DIRSRC} &>/dev/null && ${CXX} ${CXXFLAGS} -c `basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ -I${NROOTINC};          @cd ${DIRSRC} &>/dev/null && ${CXX} ${CXXFLAGS} -c `basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ -I${NROOTINC};
189  #  #
190  #       create .so  #       create .so
191  #  #
192          @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})
193          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRSRC}/`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/ -I${PAM_INC}/ ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o 1>/dev/null
194          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
195    
196  ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOBJS}  ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOBJS}
# Line 198  ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOB Line 198  ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOB
198  #       create .o  #       create .o
199  #  #
200          @(${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})
201          @cd ${DIRSRC} &>/dev/null && ${CXX} ${CXXFLAGS} -c `basename $(@F) _${VER}.so | sed s/lib//`.cpp -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ -I${NROOTINC} ${SUBINC};          @cd ${DIRSRC} &>/dev/null && ${CXX} ${CXXFLAGS} -c `basename $(@F) _${VER}.so | sed s/lib//`.cpp -I${DIRTOP}/${DIRINC} -I${DIRTOP} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ -I${NROOTINC};
202  #  #
203  #       create .so  #       create .so
204  #  #
205          @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})
206          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ ${DIRTOP}/${DIRSRC}/`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} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${FOBJS} ${COBJS} 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    
209  ${CXXEXELIBS}: ${CPPOBJS} ${COBJS} ${CXXEXEOBJS}  ${CXXEXELIBS}: ${CPPOBJS} ${COBJS} ${CXXEXEOBJS}
210            @${CXX} ${CXXFLAGS} -Xlinker -soname=libDarthVader_${VER}.so -shared -o ${DIRTOP}/${DIRLIB}/libDarthVader_${VER}.so -lg2c ${DIRTOP}/${DIRLIB}/libAcLevel2.so ${DIRTOP}/${DIRLIB}/libCaloLevel2.so  ${PAM_LIB}/libsgp4.so ${DIRTOP}/${DIRLIB}/libNDLevel2.so ${DIRTOP}/${DIRLIB}/libS4Level2.so ${DIRTOP}/${DIRLIB}/libToFLevel2.so ${DIRTOP}/${DIRLIB}/libTrigLevel2.so ${DIRTOP}/${DIRLIB}/libTrkLevel2.so ${DIRTOP}/${DIRLIB}/libTrkLevel1.so ${PAM_LIB}/libGLTables.so ${DIRTOP}/${DIRLIB}/libRunInfo.so ${DIRTOP}/${DIRLIB}/libOrbitalInfo.so
211          @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET})
212          @${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_LIB}/libGLTables.so ${PAM_LIB}/libsgp4.so ${PAM_YODA}/lib/libyoda.so -lThread `root-config --cflags --glibs` `cernlib mathlib`
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`
214    
215  # A small target to check environmental variables  # A small target to check environmental variables
216  %_env:  %_env:

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.23