1 |
# Calorimeter flight analysis software |
# Calorimeter flight analysis software |
2 |
# SOFTWARE VERSION |
# SOFTWARE VERSION |
3 |
VER= v4r02 |
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' |
24 |
# C |
# C |
25 |
CC=gcc |
CC=gcc |
26 |
#CFLAGS=-Wall -O -fPIC -pthread -g |
#CFLAGS=-Wall -O -fPIC -pthread -g |
27 |
CFLAGS=-Wall -O -fPIC -pthread |
CFLAGS=-Wall -O4 -fPIC -pthread |
28 |
# Enviroment: |
# Enviroment: |
29 |
GCCVER=`gcc --version | head -1` |
GCCVER=`gcc --version | head -1` |
30 |
UNAMEA=`uname -a` |
UNAMEA=`uname -a` |
36 |
# C++ |
# C++ |
37 |
CXX=g++ |
CXX=g++ |
38 |
#CXXFLAGS=-Wall -O -fPIC -pthread -g |
#CXXFLAGS=-Wall -O -fPIC -pthread -g |
39 |
CXXFLAGS=-Wall -O -fPIC -pthread |
CXXFLAGS=-Wall -O4 -fPIC -pthread |
40 |
# ROOTCINT |
# ROOTCINT |
41 |
ROOTCINT=rootcint |
ROOTCINT=rootcint |
42 |
# Here the variables definig the local directories |
# Here the variables definig the local directories |
61 |
${DIRSRC}/nshower.for \ |
${DIRSRC}/nshower.for \ |
62 |
${DIRSRC}/nointer.for \ |
${DIRSRC}/nointer.for \ |
63 |
${DIRSRC}/elio.for \ |
${DIRSRC}/elio.for \ |
64 |
|
${DIRSRC}/nuclei.for \ |
65 |
${DIRSRC}/cluster.for \ |
${DIRSRC}/cluster.for \ |
66 |
${DIRSRC}/cluster2.for \ |
${DIRSRC}/cluster2.for \ |
67 |
|
${DIRSRC}/cluster4.for \ |
68 |
${DIRSRC}/laterale.for \ |
${DIRSRC}/laterale.for \ |
69 |
${DIRSRC}/baric.for \ |
${DIRSRC}/baric.for \ |
70 |
${DIRSRC}/selftrig.for \ |
${DIRSRC}/selftrig.for \ |
81 |
COBJS=$(CSRCS:${DIRSRC}%.c=${DIRLIB}%.o) |
COBJS=$(CSRCS:${DIRSRC}%.c=${DIRLIB}%.o) |
82 |
|
|
83 |
# -- CPP - ROOT libraries -- |
# -- CPP - ROOT libraries -- |
84 |
LIBROOTSRCS=${DIRSRC}/CaloLevel1.cpp \ |
LIBROOTSRCS=${DIRSRC}/CaloLevel0.cpp \ |
85 |
|
${DIRSRC}/CaloLevel1.cpp \ |
86 |
${DIRSRC}/CaloLevel2.cpp |
${DIRSRC}/CaloLevel2.cpp |
87 |
|
|
88 |
LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so) |
LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so) |
89 |
LIBROOTOBJS=${DIRLIB}/millim.o |
#LIBROOTOBJS=${DIRLIB}/millim.o |
90 |
LIBROOTCLIBS=libCaloLevel2 libCaloLevel1 |
LIBROOTOBJS=${FOBJS} ${COBJS} |
91 |
|
LIBROOTCLIBS=libCaloLevel2 libCaloLevel1 libCaloLevel0 |
92 |
FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so) |
FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so) |
93 |
|
|
94 |
# -- CPP - NON-ROOT libraries -- |
# -- CPP - NON-ROOT libraries -- |
95 |
LIBCPPSRCS=${DIRSRC}/CaloProcessing.cpp \ |
LIBCPPSRCS=${DIRSRC}/CaloCore.cpp \ |
|
${DIRSRC}/CaloCore.cpp \ |
|
96 |
${DIRSRC}/CaloVerl2.cpp |
${DIRSRC}/CaloVerl2.cpp |
97 |
LIBCPPLIBS=$(LIBCPPSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so) |
LIBCPPLIBS=$(LIBCPPSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so) |
98 |
LIBCPPCLIBS=libCaloProcessing libCaloCore libCaloVerl2 |
LIBCPPCLIBS=libCaloCore libCaloVerl2 |
99 |
FULLLIBCPPLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so) |
FULLLIBCPPLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so) |
100 |
|
|
101 |
# -- CPP - Executables -- |
# -- CPP - Executables -- |
116 |
# Other objects to install |
# Other objects to install |
117 |
EXESRCS=${DIRBIN}/CalorimeterLevel2 |
EXESRCS=${DIRBIN}/CalorimeterLevel2 |
118 |
|
|
119 |
INCSRCS=${DIRINC}/CaloLevel1.h ${DIRINC}/CaloLevel2.h ${DIRINC}/CaloStruct.h ${DIRINC}/CaloProcessing.h ${DIRINC}/CaloCore.h |
INCSRCS=${DIRINC}/CaloLevel0.h ${DIRINC}/CaloLevel1.h ${DIRINC}/CaloLevel2.h ${DIRINC}/CaloStruct.h ${DIRINC}/CaloCore.h ${DIRINC}/INTEST.TXT |
120 |
|
|
121 |
MACROSSRCS= |
MACROSSRCS= |
122 |
|
|
167 |
@(${EGREEN} "Creating F77 object file: "${WHITE} "`basename $@`"; ${RESET}) |
@(${EGREEN} "Creating F77 object file: "${WHITE} "`basename $@`"; ${RESET}) |
168 |
@${F77} ${F77FLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.for -I${DIRINC} |
@${F77} ${F77FLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.for -I${DIRINC} |
169 |
|
|
170 |
${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS} |
${LIBROOTLIBS}: ${LIBROOTSRCS} ${COBJS} ${FOBJS} |
171 |
@(${EGREEN} "ROOTCINT - creating file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET}) |
@(${EGREEN} "ROOTCINT - creating file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET}) |
172 |
# |
# |
173 |
# Create *Dict.cpp and *Dict.h |
# Create *Dict.cpp and *Dict.h |
174 |
# |
# |
175 |
@${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${DIRINC} -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 |
176 |
# |
# |
177 |
# create .o |
# create .o |
178 |
# |
# |