/[PAMELA software]/DarthVader/Makefile
ViewVC logotype

Diff of /DarthVader/Makefile

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

revision 1.17 by mocchiut, Tue Oct 24 07:28:36 2006 UTC revision 1.43 by mocchiut, Wed Oct 1 15:25:34 2008 UTC
# Line 1  Line 1 
1  # DarthVader flight analysis software  # DarthVader flight analysis software
2  # SOFTWARE VERSION IS  # SOFTWARE VERSION IS
3  VER= v2r00  VER= v5r02
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 25  RESET=tput sgr0 Line 25  RESET=tput sgr0
25  MAKE=make  MAKE=make
26  # C  # C
27  CC=gcc  CC=gcc
28  #CFLAGS=-Wall -O -fPIC -pthread -g  #CFLAGS=-Wall -O -fPIC -pthread -g ${PAM_BIT}
29  CFLAGS=-Wall -O -fPIC -pthread  CFLAGS=-Wall -O -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  F77=g77  F77=g77
36  #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 ${PAM_BIT}
37  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 ${PAM_BIT}
38  # C++  # C++
39  CXX=g++  CXX=g++
40  #CXXFLAGS=-Wall -O -fPIC -pthread -g  #CXXFLAGS=-Wall -O -fPIC -pthread -g ${PAM_BIT}
41  CXXFLAGS=-Wall -O -fPIC -pthread  CXXFLAGS=-Wall -O4 -fPIC -pthread ${PAM_BIT}
42  # ROOTCINT  # ROOTCINT
43  ROOTCINT=rootcint  ROOTCINT=rootcint
44    #CERNLIB
45    CERNLIB=./docs/cernlib_pam
46    #CERNLIB=cernlib
47    
48  # Here the variables definig the local directories  # Here the variables definig the local directories
49  DIRTOP=${shell pwd}  DIRTOP=${shell pwd}
50  #DIRLIB=../lib/${ARCH}  #DIRLIB=../lib/${ARCH}
# Line 82  LIBCPPCLIBS= Line 86  LIBCPPCLIBS=
86  FULLLIBCPPLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so)  FULLLIBCPPLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so)
87    
88  # -- CPP - Executables --  # -- CPP - Executables --
89  CXXEXESRCS=${DIRSRC}/DarthVader.cpp \  CXXEXESRCS=${DIRSRC}/DarthVader.cpp
            ${DIRSRC}/R2-D2.cpp  
90  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=${DIRLIB}%.o)  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=${DIRLIB}%.o)
91  CXXEXELIBS:=DarthVader R2-D2  CXXEXELIBS:=DarthVader
92    
93  # -- list of tracker objects needed to link  # -- list of objects needed to link
94  #TRKOBJS=${DIRTOP}/../lib2/libTrkLevel2.so ${DIRTOP}/../lib2/libtrack.so  ##OBJS=$(shell cd ${DIRLIB}&>/dev/null;for file in `ls *.*`; do if [ $${file} != "" ] && [ $${file} != "DarthVader.o" ] && [ $${file} != "R2-D2.o" ]; then echo ${DIRLIB}/$${file}; fi; done)
95  #TRKOBJS=$(shell for lib in `ls ${DIRLIB}`; do echo ${lib}; done)  OBJS=$(shell cd ${DIRLIB}&>/dev/null;for file in `ls lib*.so`; do if [ $${file} != "" ]; then echo ${DIRLIB}/$${file}; fi; done) ${CPPOBJS}
 #OBJS=${DIRLIB}/*.*  
 OBJS=$(shell cd ${DIRLIB}&>/dev/null;for file in `ls *.*`; do if [ $${file} != "" ] && [ $${file} != "DarthVader.o" ] && [ $${file} != "R2-D2.o" ]; then echo ${DIRLIB}/$${file}; fi; done)  
 #TRKOBJS=  
96  DARTHVLIB=${DIRLIB}/libDarthVader_${VER}.so  DARTHVLIB=${DIRLIB}/libDarthVader_${VER}.so
97    
98  # -- directory where to find tracker headers needed to compile  # -- directory where to find tracker headers needed to compile
# Line 107  SUBINC=$(shell for dir in `echo ${SUBDIR Line 107  SUBINC=$(shell for dir in `echo ${SUBDIR
107  FULLLIBS = ${FULLROOTCLIBS} ${FULLLIBCPPLIBS} ${DARTHVLIB}  FULLLIBS = ${FULLROOTCLIBS} ${FULLLIBCPPLIBS} ${DARTHVLIB}
108    
109  # Other objects to install  # Other objects to install
110  EXESRCS=${DIRBIN}/DarthVader ${DIRBIN}/R2-D2  EXESRCS=${DIRBIN}/DarthVader
111    
112  INCSRCS=  INCSRCS=
113    
114  MACROSSRCS=  MACROSSRCS=
115    
116  CALIBFILES=${DIRCALIB}/trk-param ${DIRCALIB}/cal-param ${DIRCALIB}/tof-param  CALIBFILES=${DIRCALIB}/trk-param ${DIRCALIB}/cal-param ${DIRCALIB}/tof-param ${DIRCALIB}/orb-param
117    
118  DOCFILES=  DOCFILES=
119    
# Line 208  ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOB Line 208  ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOB
208          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
209    
210  ${CXXEXELIBS}: ${CPPOBJS} ${COBJS} ${CXXEXEOBJS}  ${CXXEXELIBS}: ${CPPOBJS} ${COBJS} ${CXXEXEOBJS}
         @${CXX} ${CXXFLAGS} -Xlinker -soname=libDarthVader_${VER}.so -shared -o ${DIRTOP}/${DIRLIB}/libDarthVader_${VER}.so -lg2c ${DIRTOP}/${DIRLIB}/libAcLevel2.so ${DIRTOP}/${DIRLIB}/libCaloLevel2.so  ${PAM_LIB}/libsgp4.so ${DIRTOP}/${DIRLIB}/libNDLevel2.so ${DIRTOP}/${DIRLIB}/libS4Level2.so ${DIRTOP}/${DIRLIB}/libToFLevel2.so ${DIRTOP}/${DIRLIB}/libTrigLevel2.so ${DIRTOP}/${DIRLIB}/libTrkLevel2.so ${DIRTOP}/${DIRLIB}/libTrkLevel1.so ${PAM_LIB}/libGLTables.so ${DIRTOP}/${DIRLIB}/libRunInfo.so ${DIRTOP}/${DIRLIB}/libOrbitalInfo.so  
211          @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET})
212          @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRTOP}/${DIRLIB}/$@.o ${OBJS} ${PAM_LIB}/libGLTables.so ${PAM_LIB}/libsgp4.so ${PAM_YODA}/lib/libyoda.so -lThread `root-config --cflags --glibs` `cernlib mathlib`          @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRTOP}/${DIRLIB}/$@.o ${OBJS} ${PAM_LIB}/libGLTables.so ${PAM_LIB}/libsgp4.so ${PAM_YODA}/lib/libyoda.so -lThread `root-config --cflags --glibs` `${CERNLIB} mathlib`
213            @(${EGREEN} "Creating libDarthVader.so library: "${WHITE} "libDarthVader_${VER}.so"; ${RESET})
214            @${CXX} ${CXXFLAGS} -Xlinker -soname=libDarthVader_${VER}.so -shared -o ${DIRTOP}/${DIRLIB}/libDarthVader_${VER}.so -lg2c ${DIRTOP}/${DIRLIB}/libAcLevel2.so ${DIRTOP}/${DIRLIB}/libCaloLevel0.so ${DIRTOP}/${DIRLIB}/libCaloLevel1.so ${DIRTOP}/${DIRLIB}/libCaloLevel2.so  ${PAM_LIB}/libsgp4.so ${DIRTOP}/${DIRLIB}/libNDLevel2.so ${DIRTOP}/${DIRLIB}/libS4Level2.so ${DIRTOP}/${DIRLIB}/libToFLevel2.so ${DIRTOP}/${DIRLIB}/libTrigLevel2.so ${DIRTOP}/${DIRLIB}/libTrkLevel2.so ${DIRTOP}/${DIRLIB}/libTrkLevel1.so ${DIRTOP}/${DIRLIB}/libTrkLevel0.so ${DIRTOP}/${DIRLIB}/libTrkHough.so  ${DIRTOP}/${DIRLIB}/libTrkCalib.so ${DIRTOP}/${DIRLIB}/libTrkParams.so ${PAM_LIB}/libGLTables.so ${DIRTOP}/${DIRLIB}/libRunInfo.so ${DIRTOP}/${DIRLIB}/libOrbitalInfo.so ${DIRTOP}/${DIRLIB}/libOrientationInfo.so ${DIRTOP}/${DIRLIB}/libInclinationInfo.so `root-config --glibs` `${CERNLIB} mathlib`
215    
216  #       @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRTOP}/${DIRLIB}/$@.o ${OBJS} ${PAM_YODA}/lib/libyoda.so ${PAM_YODA}/lib/libutils.so -lThread `root-config --cflags --glibs` `cernlib mathlib`  #       @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRTOP}/${DIRLIB}/$@.o ${OBJS} ${PAM_YODA}/lib/libyoda.so ${PAM_YODA}/lib/libutils.so -lThread `root-config --cflags --glibs` `cernlib mathlib`
217    
218  # A small target to check environmental variables  # A small target to check environmental variables
# Line 269  upgrade: Line 271  upgrade:
271  locupgrade: FORCE=-u  locupgrade: FORCE=-u
272  locupgrade: locinstall  locupgrade: locinstall
273    
274    upgradenc:
275            @for dir in `echo ${SUBDIR}`; do  \
276             echo "Making upgrade in $${dir}"; \
277             (cd $${dir} && ${MAKE} upgrade); \
278            done; make locupgradenc
279    
280    locupgradenc: FORCE=-u
281    locupgradenc: locinstallnc
282    
283  install:  install:
284          @for dir in `echo ${SUBDIR}`; do  \          @for dir in `echo ${SUBDIR}`; do  \
285           echo "Making install in $${dir}"; \           echo "Making install in $${dir}"; \
# Line 277  install: Line 288  install:
288    
289  locinstall: installlib installinc installmacros installcalib installdoc installexe installcmacro  locinstall: installlib installinc installmacros installcalib installdoc installexe installcmacro
290    
291    locinstallnc: installlib installinc installmacros installdoc installexe installcmacro
292    
293  installlib: LINK=y  installlib: LINK=y
294  installlib: TOBEMOVED= $(FULLLIBS:${DIRLIB}%=${PAM_LIB}%)  installlib: TOBEMOVED= $(FULLLIBS:${DIRLIB}%=${PAM_LIB}%)
295  installlib: ORIGIN=${DIRLIB}  installlib: ORIGIN=${DIRLIB}

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.43

  ViewVC Help
Powered by ViewVC 1.1.23