/[PAMELA software]/PadmeAmidala/Makefile
ViewVC logotype

Diff of /PadmeAmidala/Makefile

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

revision 1.12 by mocchiut, Tue Sep 23 07:31:20 2008 UTC revision 1.21 by mocchiut, Fri Oct 17 09:39:39 2014 UTC
# Line 1  Line 1 
1  # PadmeAmidala  # PadmeAmidala
2  # SOFTWARE VERSION  # SOFTWARE VERSION
3  VER= v2r03  VER= v10r03
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 26  MAKE=make Line 26  MAKE=make
26  # C  # C
27  CC=gcc  CC=gcc
28  #CFLAGS=-Wall -O -fPIC -pthread -g ${PAM_BIT}  #CFLAGS=-Wall -O -fPIC -pthread -g ${PAM_BIT}
29  CFLAGS=-Wall -O -fPIC -pthread ${PAM_BIT}  CFLAGS=-Wall -O4 -fPIC -pthread ${PAM_BIT}
30  # Enviroment:  # Enviroment:
31  GCCVER=`gcc --version | head -1`  GCCVER=`gcc --version | head -1`
32  UNAMEA=`uname -a`  UNAMEA=`uname -a`
33  TODAY=`date`  TODAY=`date`
34  # F77  # F77
35    ifeq ($(GCC4),)
36    export GCCVERS=$(shell echo `gcc -dumpversion | sed 's/\./\ /g'`)
37    export GCCVERMAJ=$(word 1,$(GCCVERS))
38    export GCC4=$(shell echo `echo "${GCCVERMAJ} > 3" |bc -l`)
39    endif
40    ifeq ($(GCC4),1)
41    F77=gfortran
42    LG2C=-lgfortran
43    EXTRAOPT=
44    else
45  F77=g77  F77=g77
46  #F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source  -static -fno-backslash ${PAM_BIT}  LG2C=-lg2c
47  F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash ${PAM_BIT}  EXTRAOPT=-Wno-globals -fvxt
48    endif
49    #F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash ${PAM_BIT}
50    F77FLAGS=  -Wall -funroll-loops -fPIC $(EXTRAOPT) -fno-automatic -fbounds-check -extend_source -static -fno-backslash ${PAM_BIT}
51  # C++  # C++
52  CXX=g++  CXX=g++
53  #CXXFLAGS=-Wall -O -fPIC -pthread -g ${PAM_BIT}  #CXXFLAGS=-Wall -O -fPIC -pthread -g ${PAM_BIT}
54  CXXFLAGS=-Wall -O -fPIC -pthread ${PAM_BIT}  CXXFLAGS=-Wall -O4 -fPIC -pthread ${PAM_BIT}
55  # ROOTCINT  # ROOTCINT
56  ROOTCINT=rootcint  ROOTCINT=rootcint
57  # Here the variables definig the local directories  # Here the variables definig the local directories
# Line 150  ${LIBROOTLIBS}: ${LIBROOTSRCS} Line 163  ${LIBROOTLIBS}: ${LIBROOTSRCS}
163  #       create .so  #       create .so
164  #  #
165          @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})
166          @${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 ${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_INC} -I${PAM_YODA}/include/yoda/ ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o 1>/dev/null
167          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
168    
169  ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOBJS}  ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOBJS}
# Line 241  installdoc: Line 254  installdoc:
254          @${test_and_cp}          @${test_and_cp}
255    
256  mkverpath:  mkverpath:
257          @echo '#include <TSystem.h>' >  ${DIRTOP}/${DIRSRC}/PadmeAmidalaVerl2.cpp; echo ' char *AmidalaInfo(bool print){ if ( print ) printf("\nPAMELA PadmeAmidala version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); return("${VER}"); }' >>  ${DIRTOP}/${DIRSRC}/PadmeAmidalaVerl2.cpp          @echo '#include <TSystem.h>' >  ${DIRTOP}/${DIRSRC}/PadmeAmidalaVerl2.cpp; echo ' const char *AmidalaInfo(bool print){ if ( print ) printf("\nPAMELA PadmeAmidala version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); return("${VER}"); }' >>  ${DIRTOP}/${DIRSRC}/PadmeAmidalaVerl2.cpp
258          @sleep 0.8          @sleep 0.8
259    
260    

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.21

  ViewVC Help
Powered by ViewVC 1.1.23