/[PAMELA software]/calo/flight/CaloFranzini/Makefile
ViewVC logotype

Diff of /calo/flight/CaloFranzini/Makefile

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

revision 1.1 by mocchiut, Tue Dec 4 12:05:27 2007 UTC revision 1.7 by mocchiut, Tue Aug 4 13:59:13 2009 UTC
# Line 1  Line 1 
1  # Calorimeter "Franzini" method plugin  # Calorimeter "Franzini" method plugin
2  # SOFTWARE VERSION  # SOFTWARE VERSION
3  VER= v0r00  VER= v1r00
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 23  RESET=tput sgr0 Line 23  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 -O -fPIC -pthread -g  #CFLAGS=-Wall -fPIC -pthread -g ${PAM_BIT}
27  CFLAGS=-Wall -O -fPIC -pthread  CFLAGS=-Wall -O4 -fPIC -pthread ${PAM_BIT}
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    ifeq ($(GCC4),)
34    export GCCVERS=$(shell echo `gcc -dumpversion | sed 's/\./\ /g'`)
35    export GCCVERMAJ=$(word 1,$(GCCVERS))
36    export GCC4=$(shell echo `echo "${GCCVERMAJ} > 3" |bc -l`)
37    endif
38    ifeq ($(GCC4),1)
39    F77=gfortran
40    LG2C=-lgfortran
41    EXTRAOPT=
42    else
43  F77=g77  F77=g77
44  #F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash  LG2C=-lg2c
45  F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash  EXTRAOPT=-Wno-globals -fvxt
46    endif
47    #F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash ${PAM_BIT}
48    F77FLAGS=  -Wall -funroll-loops -fPIC $(EXTRAOPT) -fno-automatic -fbounds-check -extend_source -static -fno-backslash ${PAM_BIT}
49  # C++  # C++
50  CXX=g++  CXX=g++
51  #CXXFLAGS=-Wall -O -fPIC -pthread -g  #CXXFLAGS=-Wall -fPIC -pthread -g ${PAM_BIT}
52  CXXFLAGS=-Wall -O -fPIC -pthread  CXXFLAGS=-Wall -O4 -fPIC -pthread ${PAM_BIT}
53  # ROOTCINT  # ROOTCINT
54  ROOTCINT=rootcint  ROOTCINT=rootcint
55  # Here the variables definig the local directories  # Here the variables definig the local directories
# Line 55  PAM_ENV= PAM_BIN_env PAM_LIB_env PAM_INC Line 68  PAM_ENV= PAM_BIN_env PAM_LIB_env PAM_INC
68  FSRCS=    FSRCS=  
69  FOBJS=$(FSRCS:${DIRSRC}/F77/%.f=${DIRLIB}/%.o)  FOBJS=$(FSRCS:${DIRSRC}/F77/%.f=${DIRLIB}/%.o)
70  #-------------------------------------------------  #-------------------------------------------------
71  CSRCS=    CSRCS=${DIRSRC}/Calib.cpp
72  COBJS=$(CSRCS:${DIRSRC}%.cpp=${DIRLIB}/%.o)  COBJS=$(CSRCS:${DIRSRC}%.cpp=${DIRLIB}/%.o)
73  #-------------------------------------------------  #-------------------------------------------------
74  # librerie utilizzabili da root (ci deve essere anche il ***LinkDef.h )  # librerie utilizzabili da root (ci deve essere anche il ***LinkDef.h )
# Line 82  FULLLIBS=${FULLROOTCLIBS} ${FULLCPPCLIBS Line 95  FULLLIBS=${FULLROOTCLIBS} ${FULLCPPCLIBS
95    
96  #-------------------------------------------------  #-------------------------------------------------
97  # eseguibile  # eseguibile
98  CXXEXESRCS=  CXXEXESRCS=${DIRSRC}/CaloCreateMatrix.cpp
99  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=${DIRLIB}%.o)  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=${DIRLIB}%.o)
100  CXXEXELIBS:=  CXXEXELIBS:=CaloCreateMatrix
101    
102  OTHERLIBS=${PAM_LIB}/libCaloLevel0.so ${PAM_LIB}/libCaloLevel1.so ${PAM_LIB}/libCaloLevel2.so ${PAM_LIB}/libCaloCore.so  ${PAM_LIB}/libcaloclasses.so  OTHERLIBS=$(PAM_LIB)/libDarthVader.so $(PAM_LIB)/libPamLevel2.so
103  #-------------------------------------------------  #-------------------------------------------------
104  # variabili per l'installazione  # variabili per l'installazione
105  EXESRCS=  EXESRCS=${DIRBIN}/CaloCreateMatrix
106  INCSRCS=${DIRINC}/CaloFranzini.h  INCSRCS=${DIRINC}/CaloFranzini.h
107  MACROSSRCS=  MACROSSRCS=
108  CALIBFILES=  CALIBFILES=
# Line 130  ${DIRLIB}/%.o : ${DIRSRC}/F77/%.f Line 143  ${DIRLIB}/%.o : ${DIRSRC}/F77/%.f
143  ${LIBF77LIBS}: ${LIBF77OBJS}  ${LIBF77LIBS}: ${LIBF77OBJS}
144          @(${EYELLOW} " F77 shared library --------------------------")          @(${EYELLOW} " F77 shared library --------------------------")
145          @(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET})
146          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $^ -lg2c `doc/cernlib_pam mathlib`          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $^ $(LG2C) `doc/cernlib_pam mathlib`
147    
148    
149  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS}  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS}
# Line 155  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS} Line 168  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS}
168  #       create .so  #       create .so
169  #  #
170          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})
171          @${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 ${LIBROOTOBJS} `doc/cernlib_pam 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}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o ${LIBROOTOBJS} `doc/cernlib_pam mathlib` 1>/dev/null      
172  #       @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))  #       @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
173    
174  ${LIBCPPLIBS}: ${LIBCPPSRCS}  ${LIBCPPLIBS}: ${LIBCPPSRCS}
# Line 168  ${LIBCPPLIBS}: ${LIBCPPSRCS} Line 181  ${LIBCPPLIBS}: ${LIBCPPSRCS}
181  #       create .so  #       create .so
182  #  #
183          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})
184          @${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 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 1>/dev/null
185    
186    
187  ${CXXEXELIBS}: ${COBJS} ${FOBJS} ${CXXEXEOBJS}  ${CXXEXELIBS}: ${COBJS} ${FOBJS} ${CXXEXEOBJS}
188          @(${EVIOLET} "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *")          @(${EVIOLET} "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
189          @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET})
190          @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o -I${DIRTOP}/${DIRINC} -I${PAM_INC} -I${PAM_YODA}/include/yoda/ ${PAM_YODA}/lib/libyoda.so ${FOBJS} ${COBJS} ${FULLLIBS} ${OTHERLIBS} -lThread `root-config --cflags --glibs` `doc/cernlib_pam mathlib` ;          @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o -I${DIRTOP}/${DIRINC} -I${PAM_INC} -I${PAM_YODA}/include/yoda/ ${PAM_YODA}/lib/libyoda.so ${COBJS} ${FULLLIBS} ${OTHERLIBS} -lThread `root-config --cflags --glibs` `doc/cernlib_pam mathlib` ;
191    
192  # A small target to check environmental variables  # A small target to check environmental variables
193  %_env:  %_env:

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

  ViewVC Help
Powered by ViewVC 1.1.23