1 |
#Orbital Information for flight analysis software |
#Orbital Information for flight analysis software |
2 |
# SOFTWARE VERSION |
# SOFTWARE VERSION |
3 |
VER= v0r01 |
VER= v1r00 |
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' |
89 |
#TRKOBJS=${DIRTOP}/../lib2/libTrkLevel2.so ${DIRTOP}/../lib2/libtrack.so |
#TRKOBJS=${DIRTOP}/../lib2/libTrkLevel2.so ${DIRTOP}/../lib2/libtrack.so |
90 |
#TRKOBJS=${PAM_LIB}/libTrkLevel2.so ${PAM_LIB}/libtrack.so ${PAM_LIB}/libreadB.so ${PAM_LIB}/libinterB.so ${PAM_LIB}/libGLTables.so ${PAM_LIB}/libRunInfo.so |
#TRKOBJS=${PAM_LIB}/libTrkLevel2.so ${PAM_LIB}/libtrack.so ${PAM_LIB}/libreadB.so ${PAM_LIB}/libinterB.so ${PAM_LIB}/libGLTables.so ${PAM_LIB}/libRunInfo.so |
91 |
#TRKOBJS= |
#TRKOBJS= |
92 |
OTHERLIBS=${DIRLIB}/libGLTables.so ${DIRLIB}/libRunInfo.so |
OTHERLIBS=${PAM_LIB}/libGLTables.so ${DIRLIB}/libRunInfo.so |
93 |
# -- directory where to find tracker headers needed to compile |
# -- directory where to find tracker headers needed to compile |
94 |
#TRKHEAD=${DIRTOP}/../tracker/inc |
#TRKHEAD=${DIRTOP}/../tracker/inc |
95 |
#TRKHEAD=${PAM_INC} |
#TRKHEAD=${PAM_INC} |
96 |
SUBDIR=../GLTables ../RunInfo |
SUBDIR=../RunInfo |
97 |
SUBINC=$(shell for dir in `echo ${SUBDIR}`; do echo -I$${dir}/inc; done) |
SUBINC=$(shell for dir in `echo ${SUBDIR}`; do echo -I$${dir}/inc; done) |
98 |
|
|
99 |
# List of all libraries we want to install |
# List of all libraries we want to install |
102 |
# Other objects to install |
# Other objects to install |
103 |
EXESRCS=${DIRBIN}/OrbitalInfoLevel2 |
EXESRCS=${DIRBIN}/OrbitalInfoLevel2 |
104 |
|
|
105 |
INCSRCS=${DIRINC}/OrbitalInfo.h |
INCSRCS=${DIRINC}/OrbitalInfo.h ${DIRINC}/OrbitalInfoStruct.h |
106 |
|
|
107 |
MACROSSRCS= |
MACROSSRCS= |
108 |
|
|
143 |
# Here some general rules to produce objects in our local dir |
# Here some general rules to produce objects in our local dir |
144 |
${DIRLIB}/%.o: ${DIRSRC}/%.cpp |
${DIRLIB}/%.o: ${DIRSRC}/%.cpp |
145 |
@(${EGREEN} "Creating CPP object file: "${WHITE} "`basename $@`"; ${RESET}) |
@(${EGREEN} "Creating CPP object file: "${WHITE} "`basename $@`"; ${RESET}) |
146 |
@${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.cpp -I${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ `root-config --cflags` |
@${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.cpp -I${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ `root-config --cflags` |
147 |
|
|
148 |
${DIRLIB}/%.o: ${DIRSRC}/%.c |
${DIRLIB}/%.o: ${DIRSRC}/%.c |
149 |
@(${EGREEN} "Creating C object file: "${WHITE} "`basename $@`"; ${RESET}) |
@(${EGREEN} "Creating C object file: "${WHITE} "`basename $@`"; ${RESET}) |
150 |
@${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.c -I${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ `root-config --cflags` |
@${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.c -I${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ `root-config --cflags` |
151 |
|
|
152 |
${DIRLIB}/%.o: ${DIRSRC}/%.for |
${DIRLIB}/%.o: ${DIRSRC}/%.for |
153 |
@(${EGREEN} "Creating F77 object file: "${WHITE} "`basename $@`"; ${RESET}) |
@(${EGREEN} "Creating F77 object file: "${WHITE} "`basename $@`"; ${RESET}) |
158 |
# |
# |
159 |
# Create *Dict.cpp and *Dict.h |
# Create *Dict.cpp and *Dict.h |
160 |
# |
# |
161 |
@${ROOTCINT} -f ${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -c -I${ROOTINC} -I${PAM_YODA}/include/yoda/ ${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${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 |
162 |
# |
# |
163 |
# create .o |
# create .o |
164 |
# |
# |
165 |
@(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET}) |
@(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET}) |
166 |
@${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.cpp -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o -I${DIRTOP}/${DIRINC} -I${DIRTOP} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${NROOTINC}; |
@${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.cpp -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o -I${DIRTOP}/${DIRINC} -I${DIRTOP} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ -I${NROOTINC}; |
167 |
@(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET}) |
@(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET}) |
168 |
@${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o -I${DIRTOP}/${DIRINC} -I${DIRTOP} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${NROOTINC}; |
@${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o -I${DIRTOP}/${DIRINC} -I${DIRTOP} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ -I${NROOTINC}; |
169 |
# |
# |
170 |
# create .so |
# create .so |
171 |
# |
# |
172 |
@(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET}) |
@(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET}) |
173 |
@${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} -I${PAM_INC}/ ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o 1>/dev/null |
174 |
@ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
@ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
175 |
|
|
176 |
${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOBJS} |
${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOBJS} |
178 |
# create .o |
# create .o |
179 |
# |
# |
180 |
@(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET}) |
@(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET}) |
181 |
@${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.cpp -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o -I${DIRTOP}/${DIRINC} -I${DIRTOP} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${NROOTINC}; |
@${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.cpp -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o -I${DIRTOP}/${DIRINC} -I${DIRTOP} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ -I${NROOTINC}; |
182 |
# |
# |
183 |
# create .so |
# create .so |
184 |
# |
# |
185 |
@(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET}) |
@(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET}) |
186 |
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} ${SUBINC} -I${PAM_YODA}/include/yoda/ ${DIRTOP}/${DIRLIB}/`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} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${FOBJS} ${COBJS} 1>/dev/null |
187 |
@ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
@ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
188 |
|
|
189 |
${CXXEXELIBS}: ${CPPOBJS} ${COBJS} ${CXXEXEOBJS} |
${CXXEXELIBS}: ${CPPOBJS} ${COBJS} ${CXXEXEOBJS} |