1 |
# Tracker flight analysis software |
# Tracker flight analysis software |
2 |
# SOFTWARE VERSION |
# SOFTWARE VERSION |
3 |
VER= v0r01 |
VER= v2r01 |
4 |
DEBUG=0 |
DEBUG=0 |
5 |
# An almost general purpouse Makefile for PAMELA repository |
# An almost general purpouse Makefile for PAMELA repository |
6 |
# Let's start with some usefull definition for colorize the echo |
# Let's start with some usefull definition for colorize the echo |
33 |
# F77 |
# F77 |
34 |
F77=g77 |
F77=g77 |
35 |
#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 |
36 |
F77FLAGS= -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash |
F77FLAGS= -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash -fPIC |
37 |
# C++ |
# C++ |
38 |
CXX=g++ |
CXX=g++ |
39 |
#CXXFLAGS=-Wall -O -fPIC -pthread -g -D'DEBUG=${DEBUG}' |
#CXXFLAGS=-Wall -O -fPIC -pthread -g -D'DEBUG=${DEBUG}' |
79 |
COBJS=$(CSRCS:${DIRSRC}%.cpp=${DIRLIB}/%.o) |
COBJS=$(CSRCS:${DIRSRC}%.cpp=${DIRLIB}/%.o) |
80 |
#------------------------------------------------- |
#------------------------------------------------- |
81 |
# librerie utilizzabili da root (ci deve essere anche il ***LinkDef.h ) |
# librerie utilizzabili da root (ci deve essere anche il ***LinkDef.h ) |
82 |
LIBROOTSRCS= ${DIRSRC}/TrkLevel2.cpp |
LIBROOTSRCS= ${DIRSRC}/TrkLevel2.cpp \ |
83 |
|
${DIRSRC}/TrkLevel1.cpp \ |
84 |
|
${DIRSRC}/TrkHough.cpp |
85 |
#LIBROOTSRCS= |
#LIBROOTSRCS= |
86 |
LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so) |
LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so) |
87 |
LIBROOTOBJS=${DIRLIB}/readB.o ${DIRLIB}/interB.o ${DIRLIB}/track.o ${DIRLIB}/grkuta.o |
LIBROOTOBJS=${DIRLIB}/readB.o ${DIRLIB}/interB.o ${DIRLIB}/track.o ${DIRLIB}/grkuta.o ${DIRLIB}/functionspfa.o ${DIRLIB}/readallparam.o ${DIRLIB}/functions.o ${DIRLIB}/mini.o ${DIRLIB}/tricircle.o |
88 |
LIBROOTCLIBS=libTrkLevel2 |
LIBROOTCLIBS=libTrkLevel2 libTrkLevel1 libTrkHough |
89 |
|
|
90 |
#LIBROOTCLIBS= |
#LIBROOTCLIBS= |
91 |
FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so) |
FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so) |
92 |
#------------------------------------------------- |
#------------------------------------------------- |
127 |
EXESRCS=${DIRBIN}/TrackerLevel2 |
EXESRCS=${DIRBIN}/TrackerLevel2 |
128 |
INCSRCS= \ |
INCSRCS= \ |
129 |
${DIRINC}/TrkLevel2.h \ |
${DIRINC}/TrkLevel2.h \ |
130 |
|
${DIRINC}/TrkLevel1.h \ |
131 |
${DIRINC}/TrkLevel0.h \ |
${DIRINC}/TrkLevel0.h \ |
132 |
|
${DIRINC}/TrkHough.h \ |
133 |
${DIRINC}/TrkStruct.h \ |
${DIRINC}/TrkStruct.h \ |
134 |
${DIRINC}/TrkProcess.h \ |
${DIRINC}/TrkProcess.h \ |
135 |
${DIRINC}/TrkCore.h \ |
${DIRINC}/TrkCore.h \ |
176 |
@(${EYELLOW} " F77 shared library --------------------------") |
@(${EYELLOW} " F77 shared library --------------------------") |
177 |
@(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET}) |
@(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET}) |
178 |
# @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $^ `cernlib mathlib` /usr/lib/libg2c.so.0 |
# @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $^ `cernlib mathlib` /usr/lib/libg2c.so.0 |
179 |
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c $^ `cernlib mathlib` |
## @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c $^ `cernlib mathlib` |
180 |
|
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c $^ |
181 |
|
|
182 |
${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS} |
${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS} |
183 |
@(${EYELLOW} " ROOT library ------------------------") |
@(${EYELLOW} " ROOT library ------------------------") |
198 |
# create .so |
# create .so |
199 |
# |
# |
200 |
@(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET}) |
@(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET}) |
201 |
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda -I${PAM_INC} ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o ${LIBROOTOBJS} `cernlib mathlib` 1>/dev/null |
## @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda -I${PAM_INC} ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o ${LIBROOTOBJS} `cernlib mathlib` 1>/dev/null |
202 |
|
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda -I${PAM_INC} ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o ${LIBROOTOBJS} 1>/dev/null |
203 |
# ${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ ${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 |
# ${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ ${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 |
204 |
@ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
@ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
205 |
@(${EYELLOW} " -------------------------------------") |
@(${EYELLOW} " -------------------------------------") |
214 |
# create .so |
# create .so |
215 |
# |
# |
216 |
@(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET}) |
@(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET}) |
217 |
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${OTHERLIBS} 1>/dev/null |
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${OTHERLIBS} ${FOBJS} 1>/dev/null |
218 |
@ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
@ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
219 |
|
|
220 |
|
|
222 |
@(${EVIOLET} "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *") |
@(${EVIOLET} "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *") |
223 |
@(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET}) |
@(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET}) |
224 |
# @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ ${PAM_YODA}/lib/libyoda.so ${PAM_YODA}/lib/libutils.so ${FOBJS} ${COBJS} ${FULLLIBS} ${OTHERLIBS} -lThread `root-config --cflags --glibs` `cernlib mathlib` /usr/lib/libg2c.so.0; |
# @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ ${PAM_YODA}/lib/libyoda.so ${PAM_YODA}/lib/libutils.so ${FOBJS} ${COBJS} ${FULLLIBS} ${OTHERLIBS} -lThread `root-config --cflags --glibs` `cernlib mathlib` /usr/lib/libg2c.so.0; |
225 |
@${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${PAM_YODA}/lib/libyoda.so ${FOBJS} ${COBJS} ${FULLLIBS} ${OTHERLIBS} -lThread -lg2c `root-config --cflags --glibs` `cernlib mathlib`; |
@${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${PAM_YODA}/lib/libyoda.so ${FOBJS} ${COBJS} ${FULLLIBS} ${OTHERLIBS} -lThread -lg2c `root-config --cflags --glibs` `cernlib_noshift mathlib`; |
226 |
|
|
227 |
|
|
228 |
# A small target to check environmental variables |
# A small target to check environmental variables |