/[PAMELA software]/DarthVader/OrbitalInfo/Makefile
ViewVC logotype

Diff of /DarthVader/OrbitalInfo/Makefile

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

revision 1.20 by mocchiut, Fri Oct 31 15:48:56 2008 UTC revision 1.25 by mocchiut, Tue Aug 4 14:01:24 2009 UTC
# Line 1  Line 1 
1  #Orbital Information for flight analysis software  #Orbital Information for flight analysis software
2  # SOFTWARE VERSION  # SOFTWARE VERSION
3  VER= v2r04  VER= v3r00
4  # An almost general purpouse Makefile for PAMELA repository  #
5  # Let's start with some usefull definition for colorize the echo  include ../Make.def
 RED='\E[1;31;40m'  
 GREEN='\E[1;32;40m'  
 YELLOW='\E[1;33;40m'  
 BLUE='\E[1;34;40m'  
 WHITE='\E[1;37;40m'  
 VIOLET='\E[1;35;40m'  
 CYAN='\E[1;36;40m'  
 # Here the echo definition to use them  
 EVIOLET=echo -e ${VIOLET}  
 ECYAN=echo -e ${CYAN}  
 ERED=echo -e ${RED}  
 EGREEN=echo -e ${GREEN}  
 EYELLOW=echo -e ${YELLOW}  
 EBLUE=echo -e ${BLUE}  
 EWHITE=echo -e ${WHITE}  
 # Reset the terminal  
 RESET=tput sgr0  
 # Here the variables used to override the standard make flags  
 # C  
 CC=gcc  
 #CFLAGS=-Wall -O -fPIC -pthread -g ${PAM_BIT}  
 CFLAGS=-Wall -O3 -funroll-loops -fPIC -pthread ${PAM_BIT}  
 # Enviroment:  
 GCCVER=`gcc --version | head -1`  
 UNAMEA=`uname -a`  
 TODAY=`date`  
 # F77  
 F77=g77  
 #F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash ${PAM_BIT}  
 F77FLAGS=  -Wall -funroll-loops -Wno-globals -fPIC -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash ${PAM_BIT}  
 # C++  
 CXX=g++  
 #CXXFLAGS=-Wall -O -fPIC -pthread -g ${PAM_BIT}  
 CXXFLAGS=-Wall -O3 -funroll-loops -fPIC -pthread ${PAM_BIT}  
 # ROOTCINT  
 ROOTCINT=rootcint  
6  # Here the variables definig the local directories  # Here the variables definig the local directories
7  DIRTOP=${shell pwd}  DIRTOP=${shell pwd}
8  DIRLIB=../lib/${ARCH}  DIRLIB=../lib/${ARCH}
# Line 95  OTHERLIBS=${PAM_LIB}/libGLTables.so ${DI Line 59  OTHERLIBS=${PAM_LIB}/libGLTables.so ${DI
59  # -- directory where to find tracker headers needed to compile  # -- directory where to find tracker headers needed to compile
60  #TRKHEAD=${DIRTOP}/../tracker/inc  #TRKHEAD=${DIRTOP}/../tracker/inc
61  #TRKHEAD=${PAM_INC}  #TRKHEAD=${PAM_INC}
62  SUBDIR=../RunInfo  SUBDIR=../RunInfo ../ToFLevel2 ../TrackerLevel2 ../TriggerLevel2
63  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)
64    
65  # List of all libraries we want to install  # List of all libraries we want to install
# Line 129  NROOTINC=${shell root-config --incdir} Line 93  NROOTINC=${shell root-config --incdir}
93  #all: test mkbindir mklibdir mkverpath ${FOBJS} ${CPPOBJS} ${LIBROOTLIBS} ${LIBCPPLIBS} ${CXXEXELIBS}  #all: test mkbindir mklibdir mkverpath ${FOBJS} ${CPPOBJS} ${LIBROOTLIBS} ${LIBCPPLIBS} ${CXXEXELIBS}
94  all: prepare libs  all: prepare libs
95  all:  all:
96          @echo -e ${GREEN} ""  #       @echo -e ${GREEN} ""
97          @(${EGREEN} " Finished, now you can install the package \n  (use: make install or make upgrade or make forceinstall) "; ${RESET})  #       @(${EGREEN} " Finished, now you can install the package \n  (use: make install or make upgrade or make forceinstall) "; ${RESET})
98          @echo -e ${GREEN} ""          @echo -e ${GREEN} ""
99          @${RESET}          @${RESET}
100    
# Line 142  exe: prepare ${CXXEXELIBS} Line 106  exe: prepare ${CXXEXELIBS}
106    
107  libs: prepare ${LIBROOTLIBS} ${LIBCPPLIBS}  libs: prepare ${LIBROOTLIBS} ${LIBCPPLIBS}
108    
109  # Here some general rules to produce objects in our local dir  include ../Make.dect
 ${DIRLIB}/%.o: ${DIRSRC}/%.cpp  
         @(${EGREEN} "Creating CPP object file: "${WHITE} "`basename $@`"; ${RESET})  
         @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.cpp -I${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ `root-config --cflags`  
   
 ${DIRLIB}/%.o: ${DIRSRC}/%.c  
         @(${EGREEN} "Creating C object file: "${WHITE} "`basename $@`"; ${RESET})  
         @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.c -I${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ `root-config --cflags`  
   
 ${DIRLIB}/%.o: ${DIRSRC}/%.for  
         @(${EGREEN} "Creating F77 object file: "${WHITE} "`basename $@`"; ${RESET})  
         @${F77} ${F77FLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.for -I${DIRINC}  
   
 ${LIBROOTLIBS}: ${LIBROOTSRCS}  
         @(${EGREEN} "ROOTCINT - creating file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})  
 #  
 #       Create *Dict.cpp and *Dict.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  
 #  
 #       create .o  
 #  
         @(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})  
         @${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};  
         @(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})  
         @${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};  
 #  
 #       create .so  
 #  
         @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})  
         @${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  
         @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))  
   
 ${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOBJS}  
 #  
 #       create .o  
 #  
         @(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})  
         @${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};  
 #  
 #       create .so  
 #  
         @(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET})  
         @${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  
         @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))  
   
 ${CXXEXELIBS}: ${CPPOBJS} ${COBJS} ${CXXEXEOBJS}  
         @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET})  
         @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o ${FULLROOTCLIBS} ${FULLLIBCPPLIBS} ${OTHERLIBS} ${CPPOBJS} ${COBJS} ${FOBJS} ${PAM_YODA}/lib/libyoda.so -lThread `root-config --cflags --glibs` `cernlib mathlib`  
   
110  # A small target to check environmental variables  # A small target to check environmental variables
111  %_env:  %_env:
112          @${test_env}          @${test_env}

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.25

  ViewVC Help
Powered by ViewVC 1.1.23