--- eventviewer/flight/Makefile 2006/07/14 14:17:46 1.4 +++ eventviewer/flight/Makefile 2009/02/01 17:00:04 1.16 @@ -1,6 +1,6 @@ # Flight Event Viewer software # SOFTWARE VERSION -VER= v0r00 +VER= v4r00 # An almost general purpouse Makefile for PAMELA repository # Let's start with some usefull definition for colorize the echo RED='\E[1;31;40m' @@ -23,20 +23,20 @@ # Here the variables used to override the standard make flags # C CC=gcc -CFLAGS=-Wall -O -fPIC -pthread -g -#CFLAGS=-Wall -O -fPIC -pthread +#CFLAGS=-Wall -O -fPIC -pthread -g ${PAM_BIT} +CFLAGS=-Wall -O -fPIC -pthread ${PAM_BIT} # Enviroment: GCCVER=`gcc --version | head -1` UNAMEA=`uname -a` TODAY=`date` # F77 F77=g77 -F77FLAGS= -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash -#F77FLAGS= -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash +#F77FLAGS= -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash ${PAM_BIT} +F77FLAGS= -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash ${PAM_BIT} # C++ CXX=g++ -CXXFLAGS=-Wall -O -fPIC -pthread -g -#CXXFLAGS=-Wall -O -fPIC -pthread +#CXXFLAGS=-Wall -O -fPIC -pthread -g ${PAM_BIT} +CXXFLAGS=-Wall -O -fPIC -pthread ${PAM_BIT} # ROOTCINT ROOTCINT=rootcint # Here the variables definig the local directories @@ -73,9 +73,10 @@ FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so) # -- CPP - NON-ROOT libraries -- -LIBCPPSRCS=${DIRSRC}/FEVdetector.cpp +LIBCPPSRCS=${DIRSRC}/color.cpp \ + ${DIRSRC}/FEVdetector.cpp LIBCPPLIBS=$(LIBCPPSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so) -LIBCPPCLIBS=libFEVdetector +LIBCPPCLIBS=libcolor libFEVdetector FULLLIBCPPLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so) # -- CPP - Executables -- @@ -84,7 +85,8 @@ CXXEXELIBS:=FEventViewer # -- list of tracker objects needed to link -TRKOBJS=${PAM_LIB}/libTrkLevel2.so ${PAM_LIB}/libGLTables.so ${PAM_LIB}/libRunInfo.so ${PAM_LIB}/libNDLevel2.so ${PAM_LIB}/libAcLevel2.so ${PAM_LIB}/libToFLevel2.so ${PAM_LIB}/libS4Level2.so ${PAM_LIB}/libCaloLevel2.so ${PAM_LIB}/libOrbitalInfo.so ${PAM_LIB}/libTrigLevel2.so +TRKOBJS=${PAM_LIB}/libDarthVader.so ${PAM_LIB}/libGLTables.so ${PAM_LIB}/libsgp4.so +#${PAM_LIB}/libTrkLevel2.so ${PAM_LIB}/libTrkLevel1.so ${PAM_LIB}/libGLTables.so ${PAM_LIB}/libRunInfo.so ${PAM_LIB}/libNDLevel2.so ${PAM_LIB}/libAcLevel2.so ${PAM_LIB}/libToFLevel2.so ${PAM_LIB}/libS4Level2.so ${PAM_LIB}/libCaloLevel2.so ${PAM_LIB}/libOrbitalInfo.so ${PAM_LIB}/libTrigLevel2.so # -- directory where to find tracker headers needed to compile SUBDIR= SUBINC=-I${PAM_INC} @@ -96,7 +98,7 @@ # Other objects to install EXESRCS=${DIRBIN}/FEventViewer -INCSRCS=${DIRINC}/FEventViewer.h ${DIRINC}/FEVpamevcontrol.h ${DIRINC}/FEVpathtoc.h ${DIRINC}/feventvstruct.h +INCSRCS=${DIRINC}/FEventViewer.h ${DIRINC}/FEVpamevcontrol.h ${DIRINC}/FEVpathtoc.h ${DIRINC}/feventvstruct.h ${DIRINC}/color.h MACROSSRCS= @@ -165,7 +167,7 @@ @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ ${SUBINC} ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o 1>/dev/null @ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) -${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOBJS} +${LIBCPPLIBS}: ${LIBCPPSRCS} ${LIBSRCS} ${COBJS} ${FOBJS} # # create .o # @@ -178,10 +180,12 @@ @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} ${SUBINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${FOBJS} ${COBJS} 1>/dev/null @ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) -${CXXEXELIBS}: ${CPPOBJS} ${COBJS} ${CXXEXEOBJS} +${CXXEXELIBS}: ${LIBROOTSRCS} ${CPPOBJS} ${COBJS} ${CXXEXEOBJS} @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET}) # @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o ${FULLROOTCLIBS} ${FULLLIBCPPLIBS} ${CPPOBJS} ${FOBJS} ${TRKOBJS} ${PAM_YODA}/lib/libyoda.so -I${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -lThread `root-config --cflags --glibs` `cernlib mathlib` - @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o ${FULLROOTCLIBS} ${FULLLIBCPPLIBS} ${TRKOBJS} ${CPPOBJS} ${COBJS} ${FOBJS} ${PAM_YODA}/lib/libyoda.so ${PAM_YODA}/lib/libutils.so ${PAM_LIB}/libPamLevel2.so -lThread `root-config --cflags --glibs` +## @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o ${FULLROOTCLIBS} ${FULLLIBCPPLIBS} ${TRKOBJS} ${CPPOBJS} ${COBJS} ${FOBJS} ${PAM_YODA}/lib/libyoda.so ${PAM_YODA}/lib/libutils.so ${PAM_LIB}/libPamLevel2.so -lThread `root-config --cflags --glibs` `cernlib mathlib` +# echo 'nuclei is ${NUCLEI}' + @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o ${FULLROOTCLIBS} ${FULLLIBCPPLIBS} ${TRKOBJS} ${CPPOBJS} ${COBJS} ${FOBJS} ${PAM_YODA}/lib/libyoda.so ${PAM_LIB}/libPamLevel2.so -lThread `root-config --cflags --glibs` `doc/cernlib_pam mathlib`; # A small target to check environmental variables %_env: @@ -283,6 +287,7 @@ testpamenv: ${PAM_ENV} + root-config: OPT=--cflags root-config: @${test_cmd}