/[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.1 by mocchiut, Fri May 19 13:15:48 2006 UTC revision 1.24 by mocchiut, Fri Apr 20 11:17:33 2007 UTC
# Line 1  Line 1 
1  # Calorimeter flight analysis software  # Calorimeter flight analysis software
2  # SOFTWARE VERSION  # SOFTWARE VERSION
3  VER= v3r03  VER= v4r08
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 24  RESET=tput sgr0 Line 24  RESET=tput sgr0
24  # C  # C
25  CC=gcc  CC=gcc
26  #CFLAGS=-Wall -O -fPIC -pthread -g  #CFLAGS=-Wall -O -fPIC -pthread -g
27  CFLAGS=-Wall -O -fPIC -pthread  CFLAGS=-Wall -O4 -fPIC -pthread
28  # Enviroment:  # Enviroment:
29  GCCVER=`gcc --version | head -1`  GCCVER=`gcc --version | head -1`
30  UNAMEA=`uname -a`  UNAMEA=`uname -a`
# 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
39  CXXFLAGS=-Wall -O -fPIC -pthread  CXXFLAGS=-Wall -O4 -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 61  FSRCS=${DIRSRC}/direction.for \ Line 61  FSRCS=${DIRSRC}/direction.for \
61        ${DIRSRC}/nshower.for \        ${DIRSRC}/nshower.for \
62        ${DIRSRC}/nointer.for \        ${DIRSRC}/nointer.for \
63        ${DIRSRC}/elio.for \        ${DIRSRC}/elio.for \
64          ${DIRSRC}/nuclei.for \
65        ${DIRSRC}/cluster.for \        ${DIRSRC}/cluster.for \
66        ${DIRSRC}/cluster2.for \        ${DIRSRC}/cluster2.for \
67        ${DIRSRC}/laterale.for \        ${DIRSRC}/laterale.for \
# Line 79  CSRCS=${DIRSRC}/delay.c Line 80  CSRCS=${DIRSRC}/delay.c
80  COBJS=$(CSRCS:${DIRSRC}%.c=${DIRLIB}%.o)  COBJS=$(CSRCS:${DIRSRC}%.c=${DIRLIB}%.o)
81    
82  # -- CPP - ROOT libraries --  # -- CPP - ROOT libraries --
83  LIBROOTSRCS=${DIRSRC}/CaloLevel2.cpp  LIBROOTSRCS=${DIRSRC}/CaloLevel0.cpp \
84                ${DIRSRC}/CaloLevel1.cpp \
85                ${DIRSRC}/CaloLevel2.cpp
86    
87  LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)  LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)
88  LIBROOTCLIBS=libCaloLevel2  #LIBROOTOBJS=${DIRLIB}/millim.o
89    LIBROOTOBJS=${FOBJS} ${COBJS}
90    LIBROOTCLIBS=libCaloLevel2 libCaloLevel1 libCaloLevel0
91  FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so)  FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so)
92    
93  # -- CPP - NON-ROOT libraries --  # -- CPP - NON-ROOT libraries --
94  LIBCPPSRCS=${DIRSRC}/CaloProcessing.cpp \  LIBCPPSRCS=${DIRSRC}/CaloCore.cpp \
            ${DIRSRC}/CaloCore.cpp \  
95             ${DIRSRC}/CaloVerl2.cpp             ${DIRSRC}/CaloVerl2.cpp
96  LIBCPPLIBS=$(LIBCPPSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)  LIBCPPLIBS=$(LIBCPPSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)
97  LIBCPPCLIBS=libCaloProcessing libCaloCore libCaloVerl2  LIBCPPCLIBS=libCaloCore libCaloVerl2
98  FULLLIBCPPLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so)  FULLLIBCPPLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so)
99    
100  # -- CPP - Executables --  # -- CPP - Executables --
# Line 99  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=$ Line 103  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=$
103  CXXEXELIBS:=CalorimeterLevel2  CXXEXELIBS:=CalorimeterLevel2
104    
105  # -- list of tracker objects needed to link  # -- list of tracker objects needed to link
106  TRKOBJS=${DIRLIB}/libTrkLevel2.so ${DIRLIB}/libGLTables.so ${DIRLIB}/libRunInfo.so  TRKOBJS=${DIRLIB}/libTrkLevel2.so ${PAM_LIB}/libGLTables.so ${DIRLIB}/libRunInfo.so
107    
108  # -- directory where to find tracker headers needed to compile  # -- directory where to find tracker headers needed to compile
109  SUBDIR=../GLTables ../RunInfo ../TrackerLevel2  SUBDIR=../RunInfo ../TrackerLevel2
110  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)
111    
112  # List of all libraries we want to install  # List of all libraries we want to install
# Line 111  FULLLIBS = ${FULLROOTCLIBS} ${FULLLIBCPP Line 115  FULLLIBS = ${FULLROOTCLIBS} ${FULLLIBCPP
115  # Other objects to install  # Other objects to install
116  EXESRCS=${DIRBIN}/CalorimeterLevel2  EXESRCS=${DIRBIN}/CalorimeterLevel2
117    
118  INCSRCS=${DIRINC}/CaloLevel2.h ${DIRINC}/CaloProcessing.h ${DIRINC}/CaloCore.h  INCSRCS=${DIRINC}/CaloLevel0.h ${DIRINC}/CaloLevel1.h ${DIRINC}/CaloLevel2.h ${DIRINC}/CaloStruct.h ${DIRINC}/CaloCore.h
119    
120  MACROSSRCS=  MACROSSRCS=
121    
# Line 152  libs: prepare ${LIBROOTLIBS} ${LIBCPPLIB Line 156  libs: prepare ${LIBROOTLIBS} ${LIBCPPLIB
156  # Here some general rules to produce objects in our local dir  # Here some general rules to produce objects in our local dir
157  ${DIRLIB}/%.o: ${DIRSRC}/%.cpp  ${DIRLIB}/%.o: ${DIRSRC}/%.cpp
158          @(${EGREEN} "Creating CPP object file: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating CPP object file: "${WHITE} "`basename $@`"; ${RESET})
159          @${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`
160    
161  ${DIRLIB}/%.o: ${DIRSRC}/%.c  ${DIRLIB}/%.o: ${DIRSRC}/%.c
162          @(${EGREEN} "Creating C object file: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating C object file: "${WHITE} "`basename $@`"; ${RESET})
163          @${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`
164    
165  ${DIRLIB}/%.o: ${DIRSRC}/%.for  ${DIRLIB}/%.o: ${DIRSRC}/%.for
166          @(${EGREEN} "Creating F77 object file: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating F77 object file: "${WHITE} "`basename $@`"; ${RESET})
167          @${F77} ${F77FLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.for -I${DIRINC}          @${F77} ${F77FLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.for -I${DIRINC}
168    
169  ${LIBROOTLIBS}: ${LIBROOTSRCS}  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${COBJS} ${FOBJS}
170          @(${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})
171  #  #
172  #       Create *Dict.cpp and *Dict.h  #       Create *Dict.cpp and *Dict.h
173  #  #
174          @${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${DIRINC} -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
175  #  #
176  #       create .o  #       create .o
177  #  #
178          @(${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})
179          @${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};
180          @(${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})
181          @${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};
182  #  #
183  #       create .so  #       create .so
184  #  #
185          @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})
186          @${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
187          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
188    
189  ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOBJS}  ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOBJS}
# Line 187  ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOB Line 191  ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOB
191  #       create .o  #       create .o
192  #  #
193          @(${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})
194          @${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};
195  #  #
196  #       create .so  #       create .so
197  #  #
198          @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})
199          @${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
200          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
201    
202  ${CXXEXELIBS}: ${CPPOBJS} ${COBJS} ${CXXEXEOBJS}  ${CXXEXELIBS}: ${CPPOBJS} ${COBJS} ${CXXEXEOBJS}

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

  ViewVC Help
Powered by ViewVC 1.1.23