/[PAMELA software]/YodaProfiler/Makefile
ViewVC logotype

Diff of /YodaProfiler/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by mocchiut, Mon Sep 11 15:29:37 2006 UTC revision 1.24 by mocchiut, Tue Apr 17 12:06:06 2007 UTC
# Line 1  Line 1 
1  # YodaProfiler  # YodaProfiler
2  # SOFTWARE VERSION  # SOFTWARE VERSION
3  VER= v2r00  VER= v3r02
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'
# Line 25  RESET=tput sgr0 Line 25  RESET=tput sgr0
25  MAKE=make  MAKE=make
26  # C  # C
27  CC=gcc  CC=gcc
28  #CFLAGS=-Wall -O -fPIC -pthread -g  CFLAGS=-Wall -O -fPIC -pthread -g
29  CFLAGS=-Wall -O -fPIC -pthread  #CFLAGS=-Wall -O -fPIC -pthread
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  F77=g77
36  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
37  #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
38  # C++  # C++
39  CXX=g++  CXX=g++
40  #CXXFLAGS=-Wall -O -fPIC -pthread -g  CXXFLAGS=-Wall -O -fPIC -pthread -g
41  CXXFLAGS=-Wall -O -fPIC -pthread  #CXXFLAGS=-Wall -O4 -fPIC -pthread
42  # ROOTCINT  # ROOTCINT
43  ROOTCINT=rootcint  ROOTCINT=rootcint
44  # Here the variables definig the local directories  # Here the variables definig the local directories
# Line 49  DIRLIB=lib/${ARCH} Line 49  DIRLIB=lib/${ARCH}
49  DIRBIN=bin/${ARCH}  DIRBIN=bin/${ARCH}
50  DIRSRC=src  DIRSRC=src
51  DIRINC=inc  DIRINC=inc
52  DIRDOC=doc  DIRDOC=docs
53  DIRMACROS=macros  DIRMACROS=macros
54  DIRCALIB=param  DIRCALIB=param
55  # Here the  PAMELA environmental variables to be checked  # Here the  PAMELA environmental variables to be checked
# Line 62  FOBJS=$(FSRCS:${DIRSRC}%.for=${DIRLIB}%. Line 62  FOBJS=$(FSRCS:${DIRSRC}%.for=${DIRLIB}%.
62    
63  # -- CPP - no libraries --  # -- CPP - no libraries --
64  CPPSRCS=${DIRSRC}/YodaProfilerVerl2.cpp \  CPPSRCS=${DIRSRC}/YodaProfilerVerl2.cpp \
65          ${DIRSRC}/PamelaDBOperations.cpp          ${DIRSRC}/PamelaDBOperations.cpp
66  CPPOBJS=$(CPPSRCS:${DIRSRC}%.cpp=${DIRLIB}%.o)  CPPOBJS=$(CPPSRCS:${DIRSRC}%.cpp=${DIRLIB}%.o)
67    
68  # -- C - no libraries --  # -- C - no libraries --
# Line 77  LIBROOTCLIBS=libGLTables #libPacketTypeL Line 77  LIBROOTCLIBS=libGLTables #libPacketTypeL
77  FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so)  FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so)
78    
79  # -- CPP - NON-ROOT libraries --  # -- CPP - NON-ROOT libraries --
80  LIBCPPSRCS=  LIBCPPSRCS=${DIRSRC}/sgp4.cpp
81  LIBCPPLIBS=$(LIBCPPSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)  LIBCPPLIBS=$(LIBCPPSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)
82  LIBCPPCLIBS=  LIBCPPCLIBS=libsgp4
83  FULLLIBCPPLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so)  FULLLIBCPPLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so)
84    
85  # -- CPP - Executables --  # -- CPP - Executables --
86  CXXEXESRCS=${DIRSRC}/YodaProfiler.cpp  CXXEXESRCS=${DIRSRC}/YodaProfiler.cpp \
87               ${DIRSRC}/R2-D2.cpp
88  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=${DIRLIB}%.o)  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=${DIRLIB}%.o)
89  CXXEXELIBS:=YodaProfiler  CXXEXELIBS:=YodaProfiler R2-D2
90    
91  # List of all libraries we want to install  # List of all libraries we want to install
92  FULLLIBS = ${FULLROOTCLIBS} ${FULLLIBCPPLIBS} ${DARTHVLIB}  FULLLIBS = ${FULLROOTCLIBS} ${FULLLIBCPPLIBS} ${DARTHVLIB}
93    
94  # Other objects to install  # Other objects to install
95  EXESRCS=${DIRBIN}/YodaProfiler  EXESRCS=${DIRBIN}/YodaProfiler ${DIRBIN}/R2-D2
96    
97  INCSRCS=${DIRINC}/GLTables.h ${DIRINC}/GLTablesStruct.h  INCSRCS=${DIRINC}/GLTables.h ${DIRINC}/GLTablesStruct.h ${DIRINC}/sgp4.h
98    
99  MACROSSRCS=  MACROSSRCS=
100    
101  CALIBFILES=  CALIBFILES=
102    
103  DOCFILES=  DOCFILES=${DIRDOC}/retrieve_TLE.sh ${DIRDOC}/YodaProfilerManual.pdf ${DIRDOC}/PAMELAProductionDB.sql ${DIRDOC}/install_DB.sh
104    
105  # Here the Variables used for info target  # Here the Variables used for info target
106  PACKAGE=PAMELA analysis flight software  PACKAGE=PAMELA analysis flight software
# Line 125  all: test mkbindir mklibdir mkverpath ${ Line 126  all: test mkbindir mklibdir mkverpath ${
126  # Here some general rules to produce objects in our local dir  # Here some general rules to produce objects in our local dir
127  ${DIRLIB}/%.o: ${DIRSRC}/%.cpp  ${DIRLIB}/%.o: ${DIRSRC}/%.cpp
128          @(${EGREEN} "Creating CPP object file: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating CPP object file: "${WHITE} "`basename $@`"; ${RESET})
129          @${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/ `root-config --cflags`
130    
131  ${DIRLIB}/%.o: ${DIRSRC}/%.c  ${DIRLIB}/%.o: ${DIRSRC}/%.c
132          @(${EGREEN} "Creating C object file: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating C object file: "${WHITE} "`basename $@`"; ${RESET})
133          @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.c -I${DIRINC}  -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ `root-config --cflags`          @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.c -I${DIRINC}  -I${PAM_YODA}/include/yoda/ `root-config --cflags`
134    
135  ${DIRLIB}/%.o: ${DIRSRC}/%.for  ${DIRLIB}/%.o: ${DIRSRC}/%.for
136          @(${EGREEN} "Creating F77 object file: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating F77 object file: "${WHITE} "`basename $@`"; ${RESET})
# Line 140  ${LIBROOTLIBS}: ${LIBROOTSRCS} Line 141  ${LIBROOTLIBS}: ${LIBROOTSRCS}
141  #  #
142  #       Create *Dict.cpp and *Dict.h  #       Create *Dict.cpp and *Dict.h
143  #  #
144          @${ROOTCINT} -f ${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -c -I${ROOTINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ ${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/ ${DIRINC}/`basename $(@F) _${VER}.so | sed s/lib//`.h ${DIRINC}/`basename $(@F) _${VER}.so | sed s/lib//`LinkDef.h
145  #  #
146  #       create .o  #       create .o
147  #  #
148          @(${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})
149          @cd ${DIRSRC} &>/dev/null && ${CXX} ${CXXFLAGS} -c `basename $(@F) _${VER}.so | sed s/lib//`.cpp -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ -I${NROOTINC};          @cd ${DIRSRC} &>/dev/null && ${CXX} ${CXXFLAGS} -c `basename $(@F) _${VER}.so | sed s/lib//`.cpp -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${NROOTINC};
150          @(${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})
151          @cd ${DIRSRC} &>/dev/null && ${CXX} ${CXXFLAGS} -c `basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ -I${NROOTINC};          @cd ${DIRSRC} &>/dev/null && ${CXX} ${CXXFLAGS} -c `basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${NROOTINC};
152  #  #
153  #       create .so  #       create .so
154  #  #
155          @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})
156          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ ${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${PAM_YODA}/include/yoda/ ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o 1>/dev/null
157          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
158    
159  ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOBJS}  ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOBJS}
# Line 160  ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOB Line 161  ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOB
161  #       create .o  #       create .o
162  #  #
163          @(${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})
164          @cd ${DIRSRC} &>/dev/null && ${CXX} ${CXXFLAGS} -c `basename $(@F) _${VER}.so | sed s/lib//`.cpp -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ -I${NROOTINC} ${SUBINC};          @cd ${DIRSRC} &>/dev/null && ${CXX} ${CXXFLAGS} -c `basename $(@F) _${VER}.so | sed s/lib//`.cpp -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${NROOTINC} ${SUBINC};
165  #  #
166  #       create .so  #       create .so
167  #  #
168          @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})          @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})
169          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ ${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${PAM_YODA}/include/yoda/  ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${FOBJS} ${COBJS} 1>/dev/null
170          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
171    
172  ${CXXEXELIBS}: ${CPPOBJS} ${COBJS} ${CXXEXEOBJS}  ${CXXEXELIBS}: ${CPPOBJS} ${COBJS} ${CXXEXEOBJS}
173          @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET})
174  #       @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRTOP}/${DIRLIB}/$@.o ${CPPOBJS} ${PAM_YODA}/lib/libyoda.so ${PAM_YODA}/lib/libutils.so -lThread `root-config --cflags --glibs` `cernlib mathlib`          @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRTOP}/${DIRLIB}/$@.o ${DIRTOP}/${DIRLIB}/libGLTables.so ${DIRTOP}/${DIRLIB}/libsgp4.so ${CPPOBJS} ${PAM_YODA}/lib/libyoda.so -lThread `root-config --cflags --glibs`
 #       @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRTOP}/${DIRLIB}/$@.o ${DIRTOP}/${DIRLIB}/libPacketTypeList.so ${DIRTOP}/${DIRLIB}/libGLTables.so ${CPPOBJS} ${PAM_YODA}/lib/libyoda.so -lThread `root-config --cflags --glibs` `cernlib mathlib`  
   
 #       @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRTOP}/${DIRLIB}/$@.o ${DIRTOP}/${DIRLIB}/libGLTables.so ${CPPOBJS} ${PAM_YODA}/lib/libyoda.so -lThread `root-config --cflags --glibs` `cernlib mathlib`  
         @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRTOP}/${DIRLIB}/$@.o ${DIRTOP}/${DIRLIB}/libGLTables.so ${CPPOBJS} ${PAM_YODA}/lib/libyoda.so -lThread `root-config --cflags --glibs`  
175    
176  # A small target to check environmental variables  # A small target to check environmental variables
177  %_env:  %_env:

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.24

  ViewVC Help
Powered by ViewVC 1.1.23