/[PAMELA software]/PamelaLevel2/Makefile
ViewVC logotype

Diff of /PamelaLevel2/Makefile

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

revision 1.14 by pam-fi, Tue Jan 16 10:24:08 2007 UTC revision 1.38 by mocchiut, Tue Oct 21 10:08:34 2014 UTC
# Line 1  Line 1 
1  # Calorimeter flight analysis software  # PamelaLevel2 software
2  # SOFTWARE VERSION  # SOFTWARE VERSION
3  VER= v3r01  VER= v11r04
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 -O -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  ifeq ($(GCC4),)
33    export GCCVERS=$(shell echo `gcc -dumpversion | sed 's/\./\ /g'`)
34    export GCCVERMAJ=$(word 1,$(GCCVERS))
35    export GCC4=$(shell echo `echo "${GCCVERMAJ} > 3" |bc -l`)
36    endif
37    ifeq ($(GCC4),1)
38    F77=gfortran
39    LG2C=-lgfortran
40    EXTRAOPT=
41    else
42  F77=g77  F77=g77
43  F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash  LG2C=-lg2c
44  #F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash  EXTRAOPT=-Wno-globals -fvxt
45    endif
46    #F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash ${PAM_BIT}
47    F77FLAGS=  -Wall -funroll-loops -fPIC $(EXTRAOPT) -fno-automatic -fbounds-check -extend_source -static -fno-backslash ${PAM_BIT}
48  # C++  # C++
49  CXX=g++  CXX=g++
50  #CXXFLAGS=-Wall -O -fPIC -pthread -g  #CXXFLAGS=-Wall -O -fPIC -pthread -g ${PAM_BIT}
51  CXXFLAGS=-Wall -O -fPIC -pthread  CXXFLAGS=-Wall -O4 -fPIC -pthread ${PAM_BIT}
52  # ROOTCINT  # ROOTCINT
53  ROOTCINT=rootcint  ROOTCINT=rootcint
54  # Here the variables definig the local directories  # Here the variables definig the local directories
# Line 130  ${DIRLIB}/%.o : ${DIRSRC}/F77/%.f Line 142  ${DIRLIB}/%.o : ${DIRSRC}/F77/%.f
142  ${LIBF77LIBS}: ${LIBF77OBJS}  ${LIBF77LIBS}: ${LIBF77OBJS}
143          @(${EYELLOW} " F77 shared library --------------------------")          @(${EYELLOW} " F77 shared library --------------------------")
144          @(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET})
145          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $^ -lg2c `doc/cernlib_pam mathlib`          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $^ $(LG2C) `doc/cernlib_pam mathlib`
146    
147    
148  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS}  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS}
# Line 139  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS} Line 151  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS}
151  #  #
152  #       Create *Dict.cpp and *Dict.h  #       Create *Dict.cpp and *Dict.h
153  #  #
154          @${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  #       @${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
155            @${ROOTCINT} -f ${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -c -I${PAM_INC} -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
156    #
157    # order of include directories changed since RunInfo.h can be found (with completely different definition) in YODA while we want to load the DV one!
158    # should be fixed some time changing names...
159  #  #
160  #       create .o  #       create .o
161  #  #
162          @(${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})
163          @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};
164          @(${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})
165          @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};
166  #  #
167  #       create .so  #       create .so
168  #  #
169          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})
170          @${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      
171  #       @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))  #       @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
172    
173  ${LIBCPPLIBS}: ${LIBCPPSRCS}  ${LIBCPPLIBS}: ${LIBCPPSRCS}
# Line 164  ${LIBCPPLIBS}: ${LIBCPPSRCS} Line 180  ${LIBCPPLIBS}: ${LIBCPPSRCS}
180  #       create .so  #       create .so
181  #  #
182          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})
183          @${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
184    
185    
186  ${CXXEXELIBS}: ${COBJS} ${FOBJS} ${CXXEXEOBJS}  ${CXXEXELIBS}: ${COBJS} ${FOBJS} ${CXXEXEOBJS}

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.38

  ViewVC Help
Powered by ViewVC 1.1.23