| 1 |
# YodaProfiler |
# YodaProfiler |
| 2 |
# SOFTWARE VERSION |
# SOFTWARE VERSION |
| 3 |
VER= v6r02 |
VER= v10r01 |
| 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' |
| 25 |
MAKE=make |
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 -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 |
ifeq ($(GCC4),1) |
| 36 |
|
F77 = gfortran |
| 37 |
|
export LG2C=-lgfortran |
| 38 |
|
else |
| 39 |
|
F77 = g77 |
| 40 |
|
export LG2C=-lg2c |
| 41 |
|
endif |
| 42 |
#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 -g -extend_source -static -fno-backslash ${PAM_BIT} |
| 43 |
F77FLAGS= -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash ${PAM_BIT} |
F77FLAGS= -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash ${PAM_BIT} |
| 44 |
# C++ |
# C++ |
| 45 |
CXX=g++ |
CXX=g++ |
| 46 |
CXXFLAGS=-Wall -O -fPIC -pthread -g ${PAM_BIT} |
#CXXFLAGS=-Wall -O -fPIC -pthread -g ${PAM_BIT} |
| 47 |
#CXXFLAGS=-Wall -O4 -fPIC -pthread ${PAM_BIT} |
CXXFLAGS=-Wall -O4 -fPIC -pthread ${PAM_BIT} |
| 48 |
# ROOTCINT |
# ROOTCINT |
| 49 |
ROOTCINT=rootcint |
ROOTCINT=rootcint |
| 50 |
# Here the variables definig the local directories |
# Here the variables definig the local directories |
| 159 |
# create .so |
# create .so |
| 160 |
# |
# |
| 161 |
@(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET}) |
@(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET}) |
| 162 |
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I../event/ ${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../event/ ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o `root-config --glibs` 1>/dev/null |
| 163 |
@ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
@ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
| 164 |
|
|
| 165 |
${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOBJS} |
${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOBJS} |
| 172 |
# create .so |
# create .so |
| 173 |
# |
# |
| 174 |
@(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET}) |
@(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET}) |
| 175 |
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${SUBINC} -I../event/ ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${FOBJS} ${COBJS} 1>/dev/null |
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ ${LG2C} -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${SUBINC} -I../event/ ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${FOBJS} ${COBJS} 1>/dev/null |
| 176 |
@ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
@ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
| 177 |
|
|
| 178 |
${CXXEXELIBS}: ${CPPOBJS} ${COBJS} ${CXXEXEOBJS} |
${CXXEXELIBS}: ${CPPOBJS} ${COBJS} ${CXXEXEOBJS} |
| 250 |
@${test_and_cp} |
@${test_and_cp} |
| 251 |
|
|
| 252 |
mkverpath: |
mkverpath: |
| 253 |
@echo '#include <TSystem.h>' > ${DIRTOP}/${DIRSRC}/YodaProfilerVerl2.cpp; echo ' char *YodaProfilerInfo(bool print){ if ( print ) printf("\nPAMELA YodaProfiler version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); return("${VER}"); }' >> ${DIRTOP}/${DIRSRC}/YodaProfilerVerl2.cpp |
@echo '#include <TSystem.h>' > ${DIRTOP}/${DIRSRC}/YodaProfilerVerl2.cpp; echo 'const char *YodaProfilerInfo(bool print){ if ( print ) printf("\nPAMELA YodaProfiler version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); return("${VER}"); }' >> ${DIRTOP}/${DIRSRC}/YodaProfilerVerl2.cpp |
| 254 |
@sleep 0.8 |
@sleep 0.8 |
| 255 |
|
|
| 256 |
|
|