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

Diff of /calo/flight/CaloProfile/Makefile

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

revision 1.2 by mocchiut, Mon Sep 22 20:08:00 2008 UTC revision 1.9 by mocchiut, Thu Jan 23 11:23:55 2014 UTC
# Line 1  Line 1 
1  # Calorimeter Hough transform plugin  # Calorimeter profile plugin
2  # SOFTWARE VERSION  # SOFTWARE VERSION
3  VER= v2r00  VER= v3r02
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 -m32  #CFLAGS=-Wall -O -fPIC -pthread -g ${PAM_BIT}
27  CFLAGS=-Wall -O -fPIC -pthread -m32  CFLAGS=-Wall -O3 -fPIC -pthread ${PAM_BIT}
28    #CFLAGS=-Wall -g -fPIC -pthread ${PAM_BIT}
29  # Enviroment:  # Enviroment:
30  GCCVER=`gcc --version | head -1`  GCCVER=`gcc --version | head -1`
31  UNAMEA=`uname -a`  UNAMEA=`uname -a`
32  TODAY=`date`  TODAY=`date`
33  # F77  # F77
34    ifeq ($(GCC4),)
35    export GCCVERS=$(shell echo `gcc -dumpversion | sed 's/\./\ /g'`)
36    export GCCVERMAJ=$(word 1,$(GCCVERS))
37    export GCC4=$(shell echo `echo "${GCCVERMAJ} > 3" |bc -l`)
38    endif
39    ifeq ($(GCC4),1)
40    F77=gfortran
41    LG2C=-lgfortran
42    EXTRAOPT=
43    else
44  F77=g77  F77=g77
45  #F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash -m32  LG2C=-lg2c
46  F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash -m32  EXTRAOPT=-Wno-globals -fvxt
47    endif
48    #F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash ${PAM_BIT}
49    F77FLAGS=  -Wall -funroll-loops -fPIC $(EXTRAOPT) -fno-automatic -fbounds-check -extend_source -static -fno-backslash ${PAM_BIT}
50  # C++  # C++
51  CXX=g++  CXX=g++
52  #CXXFLAGS=-Wall -O -fPIC -pthread -g -m32  #CXXFLAGS=-Wall -O -fPIC -pthread -g ${PAM_BIT}
53  CXXFLAGS=-Wall -O -fPIC -pthread -m32  CXXFLAGS=-Wall -O3 -fPIC -pthread ${PAM_BIT}
54  # ROOTCINT  # ROOTCINT
55  ROOTCINT=rootcint  ROOTCINT=rootcint
56  # Here the variables definig the local directories  # Here the variables definig the local directories
# Line 106  INCLUDE= ${INCSRCS} Line 120  INCLUDE= ${INCSRCS}
120  TOBEDEL = junk  TOBEDEL = junk
121  ROOTINC=$$${shell root-config --incdir}  ROOTINC=$$${shell root-config --incdir}
122  NROOTINC=${shell root-config --incdir}  NROOTINC=${shell root-config --incdir}
123    ROOTVERS=$(shell echo `root-config --version | sed 's/\./\ /g' | sed 's/\//\ /g' `)
124    ROOTMAJ=$(word 1,$(ROOTVERS))
125    ROOTMIN=$(word 2,$(ROOTVERS))
126  # Let's start  # Let's start
127  all : test mkbindir mklibdir ${LIBF77LIBS} ${LIBROOTLIBS} ${LIBCPPLIBS} ${CXXEXELIBS}  all : test mkbindir mklibdir ${LIBF77LIBS} ${LIBROOTLIBS} ${LIBCPPLIBS} ${CXXEXELIBS}
128  all:  all:
129          @echo -e ${GREEN} ""          @echo -e ${GREEN} ""
130          @(${EGREEN} " Finished, now you can install the package \n  (use: make install or make upgrade or make forceinstall) "; ${RESET})          @(${EGREEN} " Finished, now you can install the package \n  (use: make install or make upgrade or make forceinstall) "; ${RESET})
131          @echo -e ${GREEN} ""          @echo -e ${GREEN} ""
132            @if [ ${ROOTMAJ} -lt 5 ]||([ ${ROOTMAJ} -eq 5 ]&&[ ${ROOTMIN} -lt 24 ]); then (${ERED} " W A R N I N G ! ! old ROOT version (${ROOTMAJ}.${ROOTMIN})\n  The longitudinal fit will fail - upgrade ROOT to version >= 5.24! \n"; ${RESET}); fi;
133            @echo -e ${GREEN} ""
134          @${RESET}          @${RESET}
135    
136  # Here some general rules to produce objects in our local dir  # Here some general rules to produce objects in our local dir
# Line 130  ${DIRLIB}/%.o : ${DIRSRC}/F77/%.f Line 149  ${DIRLIB}/%.o : ${DIRSRC}/F77/%.f
149  ${LIBF77LIBS}: ${LIBF77OBJS}  ${LIBF77LIBS}: ${LIBF77OBJS}
150          @(${EYELLOW} " F77 shared library --------------------------")          @(${EYELLOW} " F77 shared library --------------------------")
151          @(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET})
152          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $^ -lg2c `doc/cernlib_pam mathlib`          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $^ $(LG2C) `doc/cernlib_pam mathlib`
153    
154    
155  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS}  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS}
# Line 148  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS} Line 167  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS}
167  #       create .o  #       create .o
168  #  #
169          @(${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})
170          @cd ${DIRSRC} &>/dev/null && ${CXX} ${CXXFLAGS} -c `basename $(@F) _${VER}.so | sed s/lib//`.cpp -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_INC} -I${PAM_YODA}/include/yoda/ -I${NROOTINC};          cd ${DIRSRC} &>/dev/null && ${CXX} ${CXXFLAGS} -c `basename $(@F) _${VER}.so | sed s/lib//`.cpp -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_INC} -I${PAM_YODA}/include/yoda/ -I${NROOTINC};
171          @(${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})
172          @cd ${DIRSRC} &>/dev/null && ${CXX} ${CXXFLAGS} -c `basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_INC} -I${PAM_YODA}/include/yoda/ -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_INC} -I${PAM_YODA}/include/yoda/ -I${NROOTINC};
173  #  #
174  #       create .so  #       create .so
175  #  #
176          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})
177          @${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      
178  #       @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))  #       @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
179    
180  ${LIBCPPLIBS}: ${LIBCPPSRCS}  ${LIBCPPLIBS}: ${LIBCPPSRCS}
# Line 168  ${LIBCPPLIBS}: ${LIBCPPSRCS} Line 187  ${LIBCPPLIBS}: ${LIBCPPSRCS}
187  #       create .so  #       create .so
188  #  #
189          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})
190          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_INC} -I${PAM_YODA}/include/yoda/ ${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_INC} -I${PAM_YODA}/include/yoda/ ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.o 1>/dev/null
191    
192    
193  ${CXXEXELIBS}: ${COBJS} ${FOBJS} ${CXXEXEOBJS}  ${CXXEXELIBS}: ${COBJS} ${FOBJS} ${CXXEXEOBJS}

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

  ViewVC Help
Powered by ViewVC 1.1.23