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

Diff of /DarthVader/TrackerLevel2/Makefile

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

revision 1.9 by pam-fi, Tue Nov 7 15:55:10 2006 UTC revision 1.36 by mocchiut, Fri Oct 31 15:49:08 2008 UTC
# Line 1  Line 1 
1  # Tracker flight analysis software  # Tracker flight analysis software
2  # SOFTWARE VERSION  # SOFTWARE VERSION
3  VER= v2r00  VER= v5r00
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
7  RED='\E[1;31;40m'  RED='\E[1;31;40m'
8  GREEN='\E[1;32;40m'  GREEN='\E[1;32;40m'
9  YELLOW='\E[1;33;40m'  YELLOW='\E[1;33;40m'
10  BLUE='\E[1;34;40m'  BLUE='\E[1;34;40m'
11  WHITE='\E[1;37;40m'  WHITE='\E[1;37;40m'
12  VIOLET='\E[1;35;40m'  VIOLET='\E[1;35;40m'
13  CYAN='\E[1;36;40m'  CYAN='\E[1;36;40m'
14  # Here the echo definition to use them  # Here the echo definition to use them
15  EVIOLET=echo -e ${VIOLET}  EVIOLET=echo -e ${VIOLET}
16  ECYAN=echo -e ${CYAN}  ECYAN=echo -e ${CYAN}
17  ERED=echo -e ${RED}  ERED=echo -e ${RED}
18  EGREEN=echo -e ${GREEN}  EGREEN=echo -e ${GREEN}
19  EYELLOW=echo -e ${YELLOW}  EYELLOW=echo -e ${YELLOW}
20  EBLUE=echo -e ${BLUE}  EBLUE=echo -e ${BLUE}
21  EWHITE=echo -e ${WHITE}  EWHITE=echo -e ${WHITE}
22  # Reset the terminal  # Reset the terminal
23  RESET=tput sgr0  RESET=tput sgr0
24  # Here the variables used to override the standard make flags  # Here the variables used to override the standard make flags
25  # C  # C
26  CC=gcc  CC=gcc
27  #CFLAGS=-Wall -O -fPIC -pthread -g  #CFLAGS=-Wall -O -fPIC -pthread -g ${PAM_BIT}
28  CFLAGS=-Wall -O -fPIC -pthread  #CFLAGS=-Wall -O -fPIC -pthread ${PAM_BIT}
29  # Enviroment:  CFLAGS=-Wall -O3 -funroll-loops -fPIC -pthread ${PAM_BIT}
30  GCCVER=`gcc --version | head -1`  #CFLAGS=-Wall -fPIC -pthread ${PAM_BIT}
31  UNAMEA=`uname -a`  # Enviroment:
32  TODAY=`date`  GCCVER=`gcc --version | head -1`
33  # F77  UNAMEA=`uname -a`
34  F77=g77  TODAY=`date`
35  #F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash  # F77
36  F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash  F77=g77
37  # C++  #F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash  ${PAM_BIT}
38  CXX=g++  F77FLAGS=  -Wall -funroll-loops -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash -fPIC ${PAM_BIT}
39  #CXXFLAGS=-Wall -O -fPIC -pthread -g -D'DEBUG=${DEBUG}'  #F77FLAGS=  -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash -fPIC ${PAM_BIT}
40  #CXXFLAGS=-Wall -O -fPIC -pthread -g -D'DEBUG=0'  # C++
41  #CXXFLAGS=-Wall -O -fPIC -pthread -fpermissive  CXX=g++
42  CXXFLAGS=-Wall -O -fPIC -pthread  #CXXFLAGS=-Wall -O -fPIC -pthread -g -D'DEBUG=${DEBUG}' ${PAM_BIT}
43  # ROOTCINT  #CXXFLAGS=-Wall -O -fPIC -pthread -g -D'DEBUG=0' ${PAM_BIT}
44  ROOTCINT=rootcint  #CXXFLAGS=-Wall -O -fPIC -pthread -fpermissive ${PAM_BIT}
45  # Here the variables definig the local directories  #CXXFLAGS=-Wall -O4 -fPIC -pthread ${PAM_BIT}
46  DIRTOP=${shell pwd}  CXXFLAGS=-Wall -O3 -funroll-loops -fPIC -pthread ${PAM_BIT}
47  #DIRLIB=lib/${ARCH}/  #CXXFLAGS=-Wall -fPIC -pthread ${PAM_BIT}
48  #DIRBIN=bin/${ARCH}/  # ROOTCINT
49  DIRLIB=../lib/${ARCH}/  ROOTCINT=rootcint
50  DIRBIN=../bin/${ARCH}/  # Here the variables definig the local directories
51  DIRSRC=src  DIRTOP=${shell pwd}
52  DIRINC=inc  #DIRLIB=lib/${ARCH}/
53  DIRDOC=doc  #DIRBIN=bin/${ARCH}/
54  DIRMACROS=macros  DIRLIB=../lib/${ARCH}/
55  DIRCALIB=calib  DIRBIN=../bin/${ARCH}/
56  # Here the  PAMELA environmental variables to be checked  DIRSRC=src
57  PAM_ENV= PAM_BIN_env PAM_LIB_env PAM_INC_env PAM_DOC_env PAM_YODA_env  DIRINC=inc
58  # Here the local variables used to build the targets  DIRDOC=doc
59  #-------------------------------------------------  DIRMACROS=macros
60  FSRCS=${DIRSRC}/F77/fillpedsig.f   \  DIRCALIB=calib
61          ${DIRSRC}/F77/readallparam.f \  # Here the  PAMELA environmental variables to be checked
62          ${DIRSRC}/F77/functions.f    \  PAM_ENV= PAM_BIN_env PAM_LIB_env PAM_INC_env PAM_DOC_env PAM_YODA_env
63          ${DIRSRC}/F77/cncomp.f    \  # Here the local variables used to build the targets
64          ${DIRSRC}/F77/filladc.f    \  #-------------------------------------------------
65          ${DIRSRC}/F77/reductionflight.f \  FSRCS=${DIRSRC}/F77/fillpedsig.f   \
66          ${DIRSRC}/F77/functionspfa.f    \          ${DIRSRC}/F77/readallparam.f \
67          ${DIRSRC}/F77/mini.f \          ${DIRSRC}/F77/functions.f    \
68          ${DIRSRC}/F77/tricircle.f \          ${DIRSRC}/F77/cncomp.f    \
69          ${DIRSRC}/F77/analysissubroutines.f \          ${DIRSRC}/F77/filladc.f    \
70          ${DIRSRC}/F77/analysisflight.f \          ${DIRSRC}/F77/reductionflight.f \
71          ${DIRSRC}/F77/readB.f \          ${DIRSRC}/F77/functionspfa.f    \
72          ${DIRSRC}/F77/interB.f \          ${DIRSRC}/F77/mini.f \
73          ${DIRSRC}/F77/track.f \          ${DIRSRC}/F77/tricircle.f \
74          ${DIRSRC}/F77/grkuta.f          ${DIRSRC}/F77/analysissubroutines.f \
75            ${DIRSRC}/F77/analysisflight.f \
76  FOBJS=$(FSRCS:${DIRSRC}/F77/%.f=${DIRLIB}/%.o)          ${DIRSRC}/F77/readB.f \
77  #-------------------------------------------------          ${DIRSRC}/F77/interB.f \
78  CSRCS=          ${DIRSRC}/F77/track.f \
79  COBJS=$(CSRCS:${DIRSRC}%.cpp=${DIRLIB}/%.o)          ${DIRSRC}/F77/grkuta.f \
80  #-------------------------------------------------          ${DIRSRC}/F77/bdll.f      # ***PP***
81  # librerie utilizzabili da root (ci deve essere anche il ***LinkDef.h )  
82  LIBROOTSRCS=    ${DIRSRC}/TrkLevel2.cpp  \  FOBJS=$(FSRCS:${DIRSRC}/F77/%.f=${DIRLIB}/%.o)
83                                  ${DIRSRC}/TrkLevel1.cpp  #-------------------------------------------------
84  #LIBROOTSRCS=    CSRCS=
85  LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)  COBJS=$(CSRCS:${DIRSRC}%.cpp=${DIRLIB}/%.o)
86  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  #-------------------------------------------------
87  LIBROOTCLIBS=libTrkLevel2 libTrkLevel1  # librerie utilizzabili da root (ci deve essere anche il ***LinkDef.h )
88  #LIBROOTCLIBS=  LIBROOTSRCS=${DIRSRC}/TrkParams.cpp \
89  FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so)          ${DIRSRC}/TrkLevel2.cpp  \
90  #-------------------------------------------------          ${DIRSRC}/TrkLevel1.cpp \
91  # librerie C++ NON utilizzabili da root          ${DIRSRC}/TrkLevel0.cpp \
92  #LIBCPPSRCS=  ${DIRSRC}/TrkLevel2.cpp \          ${DIRSRC}/TrkHough.cpp \
93  #               ${DIRSRC}/TrkLevel0.cpp          ${DIRSRC}/TrkCalib.cpp
94  LIBCPPSRCS=${DIRSRC}/TrkLevel0.cpp \  
95             ${DIRSRC}/TrkStruct.cpp \  #LIBROOTSRCS=  
96             ${DIRSRC}/TrkProcess.cpp \  LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)
97             ${DIRSRC}/TrkVerl2.cpp \  LIBROOTOBJS=${DIRLIB}/readB.o \
98             ${DIRSRC}/TrkCore.cpp            ${DIRLIB}/interB.o \
99  LIBCPPLIBS=$(LIBCPPSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)          ${DIRLIB}/track.o \
100  #LIBCPPCLIBS=libTrkLevel2 libTrkLevel0          ${DIRLIB}/grkuta.o \
101  LIBCPPCLIBS=libTrkLevel0 libTrkStruct libTrkProcess libTrkCore libTrkVerl2          ${DIRLIB}/bdll.o \
102  FULLCPPCLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so)          ${DIRLIB}/functionspfa.o \
103  #-------------------------------------------------          ${DIRLIB}/readallparam.o \
104  # librerie F77 NON utilizzabili da root          ${DIRLIB}/functions.o  \
105  LIBF77SRCS=          ${DIRLIB}/mini.o  \
106  LIBF77OBJS= $(LIBF77SRCS:${DIRSRC}/F77/%.f=${DIRLIB}/%.o)          ${DIRLIB}/tricircle.o  \
107  LIBF77LIBS= $(LIBF77SRCS:${DIRSRC}/F77/%.f=${DIRLIB}/lib%_${VER}.so)          ${DIRLIB}/analysisflight.o  \
108  LIBF77CLIBS=          ${DIRLIB}/analysissubroutines.o  \
109  FULLF77CLIBS=$(LIBF77CLIBS:%=${DIRLIB}/%_${VER}.so)          ${DIRLIB}/fillpedsig.o  \
110  #-------------------------------------------------          ${DIRLIB}/cncomp.o  \
111  FULLLIBS=${FULLROOTCLIBS} ${FULLCPPCLIBS} ${FULLF77CLIBS}          ${DIRLIB}/filladc.o  \
112            ${DIRLIB}/reductionflight.o
113  #-------------------------------------------------  LIBROOTCLIBS= libTrkParams libTrkLevel2 libTrkLevel1 libTrkLevel0 libTrkHough libTrkCalib
114  # eseguibile  
115  CXXEXESRCS=${DIRSRC}/TrackerLevel2.cpp  #LIBROOTCLIBS=
116  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=${DIRLIB}%.o)  FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so)
117  CXXEXELIBS:=TrackerLevel2  #-------------------------------------------------
118    # librerie C++ NON utilizzabili da root
119  OTHERLIBS=${PAM_LIB}/libGLTables.so ${DIRLIB}/libRunInfo.so  #LIBCPPSRCS=  ${DIRSRC}/TrkLevel2.cpp \
120  SUBDIR=../RunInfo  #               ${DIRSRC}/TrkLevel0.cpp
121  SUBINC=$(shell for dir in `echo ${SUBDIR}`; do echo -I$${dir}/inc; done)  LIBCPPSRCS=${DIRSRC}/TrkStruct.cpp \
122               ${DIRSRC}/TrkProcess.cpp \
123  #-------------------------------------------------             ${DIRSRC}/TrkVerl2.cpp \
124  # variabili per l'installazione             ${DIRSRC}/TrkCore.cpp \
125  EXESRCS=${DIRBIN}/TrackerLevel2  #          ${DIRSRC}/TrkLevel0.cpp
126  INCSRCS= \  
127          ${DIRINC}/TrkLevel2.h \  LIBCPPLIBS=$(LIBCPPSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so)
128          ${DIRINC}/TrkLevel1.h \  #LIBCPPCLIBS=libTrkLevel2 libTrkLevel0
129          ${DIRINC}/TrkLevel0.h \  LIBCPPCLIBS= libTrkStruct libTrkProcess libTrkCore libTrkVerl2 #libTrkLevel0
130          ${DIRINC}/TrkStruct.h \  FULLCPPCLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so)
131          ${DIRINC}/TrkProcess.h \  #-------------------------------------------------
132          ${DIRINC}/TrkCore.h \  # librerie F77 NON utilizzabili da root
133          ${DIRINC}/TrkVerl2.h  LIBF77SRCS=
134  MACROSSRCS=  LIBF77OBJS= $(LIBF77SRCS:${DIRSRC}/F77/%.f=${DIRLIB}/%.o)
135  CALIBFILES=  LIBF77LIBS= $(LIBF77SRCS:${DIRSRC}/F77/%.f=${DIRLIB}/lib%_${VER}.so)
136  DOCFILES=  LIBF77CLIBS=
137  # Here the Variables used for info target  FULLF77CLIBS=$(LIBF77CLIBS:%=${DIRLIB}/%_${VER}.so)
138  PACKAGE=Tracker flight software  #-------------------------------------------------
139  EXECUTABLES=${EXESRCS}  FULLLIBS=${FULLROOTCLIBS} ${FULLCPPCLIBS} ${FULLF77CLIBS}
140  LIBS= ${FULLLIBS} ${OTHERLIBS}  
141  DOCS=  #-------------------------------------------------
142  SRCS=  # eseguibile
143  MACROS= ${MACROSSRCS}  CXXEXESRCS=${DIRSRC}/TrackerLevel2.cpp
144  INCLUDE= ${INCSRCS}  CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=${DIRLIB}%.o)
145  #  CXXEXELIBS:=TrackerLevel2
146  TOBEDEL = junk  
147  ROOTINC=$$${shell root-config --incdir}  OTHERLIBS=${PAM_LIB}/libGLTables.so ${DIRLIB}/libRunInfo.so
148  NROOTINC=${shell root-config --incdir}  SUBDIR=../RunInfo
149  # Let's start  SUBINC=$(shell for dir in `echo ${SUBDIR}`; do echo -I$${dir}/inc; done)
150  #all : test mkbindir mklibdir mkverpath ${LIBF77LIBS} ${LIBROOTLIBS} ${LIBCPPLIBS} ${FOBJS} ${COBJS} ${CXXEXELIBS}  
151  all : test mkbindir mklibdir mkverpath ${LIBF77LIBS} ${LIBROOTLIBS} ${LIBCPPLIBS}  #-------------------------------------------------
152  all:  # variabili per l'installazione
153          @echo -e ${GREEN} ""  EXESRCS=${DIRBIN}/TrackerLevel2
154          @(${EGREEN} " Finished, now you can install the package \n  (use: make install or make upgrade or make forceinstall) "; ${RESET})  INCSRCS= \
155          @echo -e ${GREEN} ""          ${DIRINC}/TrkLevel2.h \
156          @${RESET}          ${DIRINC}/TrkLevel1.h \
157            ${DIRINC}/TrkLevel0.h \
158  standalone: all ${CXXEXELIBS}          ${DIRINC}/TrkHough.h \
159            ${DIRINC}/TrkCalib.h \
160  # Here some general rules to produce objects in our local dir          ${DIRINC}/TrkParams.h \
161  ${DIRLIB}/%.o: ${DIRSRC}/%.cpp          ${DIRINC}/TrkStruct.h \
162  #       @(${EYELLOW} " C++ object ------------------------")          ${DIRINC}/TrkProcess.h \
163          @(${EGREEN} "Creating C++ object file: "${WHITE} "$@"; ${RESET})          ${DIRINC}/TrkCore.h \
164          @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.cpp -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ `root-config --cflags`          ${DIRINC}/TrkVerl2.h
165    MACROSSRCS=
166  ${DIRLIB}/%.o : ${DIRSRC}/F77/%.f  CALIBFILES=
167  #       @(${EYELLOW} " F77 object ------------------------")  DOCFILES=
168          @(${EGREEN} "Creating F77 object file: "${WHITE} "$@"; ${RESET})  # Here the Variables used for info target
169          @${F77} ${F77FLAGS} -c -o $@ ${DIRSRC}/F77/`basename ${@} .o`.f -I${DIRTOP}/${DIRINC}/F77 -I${NROOTINC} ${SUBINC} -I${PAM_YODA}/include/yoda -I${PAM_INC}/  PACKAGE=Tracker flight software
170    EXECUTABLES=${EXESRCS}
171  # .so from .o fortran  LIBS= ${FULLLIBS} ${OTHERLIBS}
172  ${LIBF77LIBS}: ${LIBF77OBJS}  DOCS=
173          @(${EYELLOW} " F77 shared library --------------------------")  SRCS=
174          @(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET})  MACROS= ${MACROSSRCS}
175  #       @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $^ `cernlib mathlib` /usr/lib/libg2c.so.0  INCLUDE= ${INCSRCS}
176  ##      @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c $^ `cernlib mathlib`  #
177          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c $^  TOBEDEL = junk
178    ROOTINC=$$${shell root-config --incdir}
179  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS}  NROOTINC=${shell root-config --incdir}
180          @(${EYELLOW} " ROOT library ------------------------")  # Let's start
181          @(${EGREEN} "Creating file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})  #all : test mkbindir mklibdir mkverpath ${LIBF77LIBS} ${LIBROOTLIBS} ${LIBCPPLIBS} ${FOBJS} ${COBJS} ${CXXEXELIBS}
182  #  all : test mkbindir mklibdir mkverpath ${LIBF77LIBS} ${LIBROOTLIBS} ${LIBCPPLIBS}
183  #       Create *Dict.cpp and *Dict.h  all:
184  #          @echo -e ${GREEN} ""
185          @${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          @(${EGREEN} " Finished, now you can install the package \n  (use: make install or make upgrade or make forceinstall) "; ${RESET})
186  #          @echo -e ${GREEN} ""
187  #       create .o          @${RESET}
188  #  
189          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})  standalone: all ${CXXEXELIBS}
190          @${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};  
191          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})  # Here some general rules to produce objects in our local dir
192          @${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} -I${PAM_INC} -I${PAM_YODA}/include/yoda/ -I${NROOTINC};  ${DIRLIB}/%.o: ${DIRSRC}/%.cpp
193          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))  #       @(${EYELLOW} " C++ object ------------------------")
194  #          @(${EGREEN} "Creating C++ object file: "${WHITE} "$@"; ${RESET})
195  #       create .so          @${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.cpp -I${DIRTOP}/${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ `root-config --cflags`
196  #  
197          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})  ${DIRLIB}/%.o : ${DIRSRC}/F77/%.f
198  ##      @${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          #       @(${EYELLOW} " F77 object ------------------------")
199          @${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            @(${EGREEN} "Creating F77 object file: "${WHITE} "$@"; ${RESET})
200  #       ${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          @${F77} ${F77FLAGS} -c -o $@ ${DIRSRC}/F77/`basename ${@} .o`.f -I${DIRTOP}/${DIRINC}/F77 -I${NROOTINC} ${SUBINC} -I${PAM_YODA}/include/yoda -I${PAM_INC}/
201          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))  
202          @(${EYELLOW} " -------------------------------------")  # .so from .o fortran
203    ${LIBF77LIBS}: ${LIBF77OBJS}
204  ${LIBCPPLIBS}: ${LIBCPPSRCS}          @(${EYELLOW} " F77 shared library --------------------------")
205  #          @(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET})
206  #       create .o  #       @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $^ `cernlib mathlib` /usr/lib/libg2c.so.0
207  #  ##      @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c $^ `cernlib mathlib`
208          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})          @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c $^
209          @${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} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ -I${NROOTINC};  
210  #  ${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS}
211  #       create .so          @(${EYELLOW} " ROOT library ------------------------")
212  #          @(${EGREEN} "Creating file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})
213          @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})  #
214          @${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  #       Create *Dict.cpp and *Dict.h
215          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))  #
216            @${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
217    #
218  ${CXXEXELIBS}: ${COBJS} ${FOBJS} ${CXXEXEOBJS}  #       create .o
219          @(${EVIOLET} "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *")  #
220          @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET})          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})
221  #       @${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} -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};
222          @${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`;          @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET})
223            @${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} -I${PAM_INC} -I${PAM_YODA}/include/yoda/ -I${NROOTINC};
224            @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
225  # A small target to check environmental variables  #
226  %_env:  #       create .so
227          @${test_env}  #
228            @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})
229  .PHONY: install installdoc installlib installmacros installinc installexe installcmacro  ##      @${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        
230  .PHONY: clean depclean info mkbindir mklibdir testcern testpamenv test          @${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  
231    #       ${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
232  mkbindir: ${DIRBIN}          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
233  ${DIRBIN}:          @(${EYELLOW} " -------------------------------------")
234          @${test_and_mk}  
235    ${LIBCPPLIBS}: ${LIBCPPSRCS}
236  mklibdir: ${DIRLIB}  #
237  ${DIRLIB}:  #       create .o
238          @${test_and_mk}  #
239            @(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET})
240  # Here what has to be deleted in clean target          @${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} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_INC}/ -I${NROOTINC};
241  clean: TOBEDEL= ${DIRSRC}/*.o ${DIRSRC}/*Dict.cpp ${DIRSRC}/*Dict.h ${FOBJS} ${FULLLIBS} ${DIRBIN}/${CXXEXELIBS} ${COBJS} ${CXXEXEOBJS} ${DIRSRC}/TrkVerl2.cpp  #
242  clean:  #       create .so
243          @${test_and_rm}  #
244            @(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET})
245  distclean: clean          @${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
246  distclean: TOBEDEL= ${DIRBIN} ${DIRLIB}          @ln -sf  ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F))
247  distclean:  
248          @${test_and_rm}  
249    ${CXXEXELIBS}: ${COBJS} ${FOBJS} ${CXXEXEOBJS}
250  forceinstall: FORCE=-f          @(${EVIOLET} "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
251  forceinstall: install          @(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET})
252    #       @${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;
253  upgrade: FORCE=-u          @${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`;
254  upgrade: install  
255  upgradestandalone: FORCE=-u  
256  upgradestandalone: installstandalone  # A small target to check environmental variables
257    %_env:
258  install: installlib installinc installmacros installcalib installdoc installcmacro          @${test_env}
259  installstandalone: install installexe  
260    .PHONY: install installdoc installlib installmacros installinc installexe installcmacro
261  installlib: LINK=y  .PHONY: clean depclean info mkbindir mklibdir testcern testpamenv test
262  installlib: TOBEMOVED= $(FULLLIBS:${DIRLIB}%=${PAM_LIB}%)  
263  installlib: ORIGIN=${DIRLIB}  mkbindir: ${DIRBIN}
264  installlib:  ${DIRBIN}:
265          @${test_and_cp}          @${test_and_mk}
266    
267  installcmacro: LINK=y  mklibdir: ${DIRLIB}
268  installcmacro: TOBEMOVED= $(FULLMACROCLIBS:${DIRLIB}%=${PAM_LIB}%)  ${DIRLIB}:
269  installcmacro: ORIGIN=${DIRLIB}          @${test_and_mk}
270  installcmacro:  
271          @${test_and_cp}  # Here what has to be deleted in clean target
272    clean: TOBEDEL= ${DIRSRC}/*.o ${DIRSRC}/*Dict.cpp ${DIRSRC}/*Dict.h ${FOBJS} ${FULLLIBS} ${DIRBIN}/${CXXEXELIBS} ${COBJS} ${CXXEXEOBJS} ${DIRSRC}/TrkVerl2.cpp
273  installinc: TOBEMOVED= $(INCSRCS:${DIRINC}/%=${PAM_INC}/%)  clean:
274  installinc: ORIGIN=${DIRINC}          @${test_and_rm}
275  installinc:  
276          @${test_and_cp}  distclean: clean
277    distclean: TOBEDEL= ${DIRBIN} ${DIRLIB}
278  installexe: TOBEMOVED= $(EXESRCS:${DIRBIN}/%=${PAM_BIN}/%)  distclean:
279  installexe: ORIGIN=${DIRBIN}          @${test_and_rm}
280  installexe:  
281          @${test_and_cp}  forceinstall: FORCE=-f
282    forceinstall: install
283  installmacros: TOBEMOVED= $(MACROSSRCS:${DIRMACROS}/%=${PAM_MACROS}/%)  
284  installmacros: ORIGIN=${DIRMACROS}  upgrade: FORCE=-u
285  installmacros:  upgrade: install
286          @${test_and_cp}  upgradestandalone: FORCE=-u
287    upgradestandalone: installstandalone
288  installcalib: TOBEMOVED= $(CALIBFILES:${DIRCALIB}/%=${PAM_CALIB}/%)  
289  installcalib: ORIGIN=${DIRCALIB}  install: installlib installinc installmacros installcalib installdoc installcmacro
290  installcalib:  installstandalone: install installexe
291          @${test_and_cp}  
292    installlib: LINK=y
293  installdoc: TOBEMOVED= $(DOCFILES:${DIRDOC}/%=${PAM_DOC}/%)  installlib: TOBEMOVED= $(FULLLIBS:${DIRLIB}%=${PAM_LIB}%)
294  installdoc: ORIGIN=${DIRDOC}  installlib: ORIGIN=${DIRLIB}
295  installdoc:  installlib:
296          @${test_and_cp}          @${test_and_cp}
297    
298  mkverpath:  installcmacro: LINK=y
299  #       @echo '#include <TSystem.h>' >  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp; echo ' void info(){ printf("\nTracker Level2 flight package version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); }' >>  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp  installcmacro: TOBEMOVED= $(FULLMACROCLIBS:${DIRLIB}%=${PAM_LIB}%)
300          @echo '#include <TSystem.h>' >  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp; echo ' char *TrkInfo(bool print){ if ( print ) printf("\nTracker Level2 flight package version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); return("${VER}"); }' >>  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp  installcmacro: ORIGIN=${DIRLIB}
301          @sleep 0.8  installcmacro:
302            @${test_and_cp}
303    
304    installinc: TOBEMOVED= $(INCSRCS:${DIRINC}/%=${PAM_INC}/%)
305  info:  installinc: ORIGIN=${DIRINC}
306          @echo " "  installinc:
307          @${EGREEN} "Infos for package :" ${WHITE} ${PACKAGE}          @${test_and_cp}
308          @${EGREEN} "          VERSION :" ${WHITE} ${VER}  
309          @${EGREEN} "      EXECUTABLES :" ${WHITE} ${EXECUTABLES}  installexe: TOBEMOVED= $(EXESRCS:${DIRBIN}/%=${PAM_BIN}/%)
310          @${EGREEN} "         INCLUDES :" ${WHITE} ${INCLUDE}  installexe: ORIGIN=${DIRBIN}
311          @${EGREEN} "             LIBS :" ${WHITE} ${LIBS}  installexe:
312          @${EGREEN} "             DOCS :" ${WHITE} ${DOCS}          @${test_and_cp}
313          @${EGREEN} "             SRCS :" ${WHITE} ${SRCS}  
314          @${EGREEN} "           MACROS :" ${WHITE} ${MACROS}  installmacros: TOBEMOVED= $(MACROSSRCS:${DIRMACROS}/%=${PAM_MACROS}/%)
315          @echo " "  installmacros: ORIGIN=${DIRMACROS}
316          @${RESET}  installmacros:
317            @${test_and_cp}
318  test: testpamenv  
319    installcalib: TOBEMOVED= $(CALIBFILES:${DIRCALIB}/%=${PAM_CALIB}/%)
320  testpamenv: ${PAM_ENV}  installcalib: ORIGIN=${DIRCALIB}
321    installcalib:
322  root-config: OPT=--cflags          @${test_and_cp}
323  root-config:  
324          @${test_cmd}  installdoc: TOBEMOVED= $(DOCFILES:${DIRDOC}/%=${PAM_DOC}/%)
325    installdoc: ORIGIN=${DIRDOC}
326  # Here follows some usefull macros  installdoc:
327  define  test_and_cp          @${test_and_cp}
328  wd=`pwd`;\  
329  for i in ${TOBEMOVED} ; do \  mkverpath:
330  wv=$${i##/*/}; \  #       @echo '#include <TSystem.h>' >  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp; echo ' void info(){ printf("\nTracker Level2 flight package version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); }' >>  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp
331  dest=$${i/$${wv}/}; \          @echo '#include <TSystem.h>' >  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp; echo ' char *TrkInfo(bool print){ if ( print ) printf("\nTracker Level2 flight package version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); return("${VER}"); }' >>  ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp
332  ${EGREEN} "Testing for :" ${WHITE} "$${i}" ; ${RESET}; \          @sleep 0.8
333  if [ ! "${FORCE}" ] ; then \  
334   if [ ! -f $${i} ]; then  \  
335    ${EGREEN} "Copying : "${WHITE} ${ORIGIN}/$${i##/*/} ;\  
336    ${EGREEN} "      to: "${WHITE} $${i} ; ${RESET}; \  info:
337    cp ${ORIGIN}/$${i##/*/} $${i}; \          @echo " "
338   else \          @${EGREEN} "Infos for package :" ${WHITE} ${PACKAGE}
339     ${ERED} "File already exist !!!! Please delete it " ${WHITE}; ${RESET}; \          @${EGREEN} "          VERSION :" ${WHITE} ${VER}
340   fi;\          @${EGREEN} "      EXECUTABLES :" ${WHITE} ${EXECUTABLES}
341  else \          @${EGREEN} "         INCLUDES :" ${WHITE} ${INCLUDE}
342     if [ "${FORCE}" == "-u" ] ; then \          @${EGREEN} "             LIBS :" ${WHITE} ${LIBS}
343       if [ "`basename $${i}`" != "`basename $${i} _${VER}.so`" ]; then \          @${EGREEN} "             DOCS :" ${WHITE} ${DOCS}
344         ${EYELLOW} "Removing: "${WHITE} ${PAM_LIB}/`basename $${i} _${VER}.so`_v*r*.so; ${RESET}; \          @${EGREEN} "             SRCS :" ${WHITE} ${SRCS}
345         rm -f ${PAM_LIB}/`basename $${i} _${VER}.so`_v*r*.so ; \          @${EGREEN} "           MACROS :" ${WHITE} ${MACROS}
346         ${EGREEN} "Copying : "${WHITE} ${ORIGIN}/$${i##/*/} ;\          @echo " "
347         ${EGREEN} "      to: "${WHITE} $${i} ; ${RESET}; \          @${RESET}
348         cp ${ORIGIN}/$${i##/*/} $${i}; \  
349       else \  test: testpamenv
350         ${EYELLOW} " Forcing copy: "${WHITE} ${ORIGIN}/$${i##/*/} ;\  
351         ${EYELLOW} "          to: "${WHITE} $${i} ; ${RESET}; \  testpamenv: ${PAM_ENV}
352         cp -f ${ORIGIN}/$${i##/*/} $${i}; \  
353       fi; \  root-config: OPT=--cflags
354     else \  root-config:
355       ${EYELLOW} " Forcing copy: "${WHITE} ${ORIGIN}/$${i##/*/} ;\          @${test_cmd}
356       ${EYELLOW} "          to: "${WHITE} $${i} ; ${RESET}; \  
357       cp ${FORCE} ${ORIGIN}/$${i##/*/} $${i}; \  # Here follows some usefull macros
358     fi;\  define  test_and_cp
359  fi ;\  wd=`pwd`;\
360  if [ ! -z ${LINK} ] ; then \  for i in ${TOBEMOVED} ; do \
361    ${EGREEN} "Creating symlink from : "${WHITE} $${wv/_${VER}/} ;\  wv=$${i##/*/}; \
362    ${EGREEN} "                   to : "${WHITE} $${i##/*/} ; ${RESET}; \  dest=$${i/$${wv}/}; \
363    cd $${dest}; \  ${EGREEN} "Testing for :" ${WHITE} "$${i}" ; ${RESET}; \
364    ln -sf $${wv} $${wv/_${VER}/}; \  if [ ! "${FORCE}" ] ; then \
365    cd $${wd}; \   if [ ! -f $${i} ]; then  \
366  fi \    ${EGREEN} "Copying : "${WHITE} ${ORIGIN}/$${i##/*/} ;\
367  done    ${EGREEN} "      to: "${WHITE} $${i} ; ${RESET}; \
368  endef    cp ${ORIGIN}/$${i##/*/} $${i}; \
369     else \
370  define  test_and_mk     ${ERED} "File already exist !!!! Please delete it " ${WHITE}; ${RESET}; \
371  ${EGREEN} "Testing for :" ${WHITE} "$@"; ${RESET}   fi;\
372  test -d "$@" || \  else \
373  (${EGREEN} "Creating : "${WHITE} "$@"; ${RESET}; mkdir -p $@)     if [ "${FORCE}" == "-u" ] ; then \
374  endef       if [ "`basename $${i}`" != "`basename $${i} _${VER}.so`" ]; then \
375           ${EYELLOW} "Removing: "${WHITE} ${PAM_LIB}/`basename $${i} _${VER}.so`_v*r*.so; ${RESET}; \
376  define  test_env         rm -f ${PAM_LIB}/`basename $${i} _${VER}.so`_v*r*.so ; \
377  ${EGREEN} "Testing for env:" ${WHITE} $(patsubst %_env,%,$@); ${RESET}         ${EGREEN} "Copying : "${WHITE} ${ORIGIN}/$${i##/*/} ;\
378  printenv $(patsubst %_env,%,$@) 1>/dev/null || \         ${EGREEN} "      to: "${WHITE} $${i} ; ${RESET}; \
379  (${ERED} "ERROR, variable : "${WHITE} $(patsubst %_env,%,$@) \         cp ${ORIGIN}/$${i##/*/} $${i}; \
380  ${RED} "not defined !!! Check your env. settings"; \       else \
381  ${RESET}; exit 1)         ${EYELLOW} " Forcing copy: "${WHITE} ${ORIGIN}/$${i##/*/} ;\
382  ${EGREEN} " Defined:" ${WHITE} $${$(patsubst %_env,%,$@)}; ${RESET}         ${EYELLOW} "          to: "${WHITE} $${i} ; ${RESET}; \
383  endef         cp -f ${ORIGIN}/$${i##/*/} $${i}; \
384         fi; \
385  define  test_cmd     else \
386  ${EGREEN} "Testing for cmd:" ${WHITE} $@ ${OPT}; ${RESET}       ${EYELLOW} " Forcing copy: "${WHITE} ${ORIGIN}/$${i##/*/} ;\
387  $@ ${OPT} 1>/dev/null 2>&1 || \       ${EYELLOW} "          to: "${WHITE} $${i} ; ${RESET}; \
388  (${ERED} "ERROR, command : "${WHITE} $@ ${OPT}\       cp ${FORCE} ${ORIGIN}/$${i##/*/} $${i}; \
389  ${RED} "not found !!! Check your installation"; \     fi;\
390  ${RESET}; exit 1)  fi ;\
391  ${EGREEN} " Present:" ${WHITE} $@ ${OPT}; ${RESET}  if [ ! -z ${LINK} ] ; then \
392  endef    ${EGREEN} "Creating symlink from : "${WHITE} $${wv/_${VER}/} ;\
393      ${EGREEN} "                   to : "${WHITE} $${i##/*/} ; ${RESET}; \
394  define  test_and_rm    cd $${dest}; \
395  for i in ${TOBEDEL}; do \    ln -sf $${wv} $${wv/_${VER}/}; \
396  test -d $${i} || (${ERED} "Removing file :"${WHITE} $${i}; ${RESET}; \    cd $${wd}; \
397  rm -f $${i} ); \  fi \
398  test ! -d $${i} || (${ERED} "Removing dir :"${WHITE} $${i}; ${RESET}; \  done
399  rm -rf $${i} ); \  endef
400  done  
401  endef  define  test_and_mk
402    ${EGREEN} "Testing for :" ${WHITE} "$@"; ${RESET}
403    test -d "$@" || \
404    (${EGREEN} "Creating : "${WHITE} "$@"; ${RESET}; mkdir -p $@)
405    endef
406    
407    define  test_env
408    ${EGREEN} "Testing for env:" ${WHITE} $(patsubst %_env,%,$@); ${RESET}
409    printenv $(patsubst %_env,%,$@) 1>/dev/null || \
410    (${ERED} "ERROR, variable : "${WHITE} $(patsubst %_env,%,$@) \
411    ${RED} "not defined !!! Check your env. settings"; \
412    ${RESET}; exit 1)
413    ${EGREEN} " Defined:" ${WHITE} $${$(patsubst %_env,%,$@)}; ${RESET}
414    endef
415    
416    define  test_cmd
417    ${EGREEN} "Testing for cmd:" ${WHITE} $@ ${OPT}; ${RESET}
418    $@ ${OPT} 1>/dev/null 2>&1 || \
419    (${ERED} "ERROR, command : "${WHITE} $@ ${OPT}\
420    ${RED} "not found !!! Check your installation"; \
421    ${RESET}; exit 1)
422    ${EGREEN} " Present:" ${WHITE} $@ ${OPT}; ${RESET}
423    endef
424    
425    define  test_and_rm
426    for i in ${TOBEDEL}; do \
427    test -d $${i} || (${ERED} "Removing file :"${WHITE} $${i}; ${RESET}; \
428    rm -f $${i} ); \
429    test ! -d $${i} || (${ERED} "Removing dir :"${WHITE} $${i}; ${RESET}; \
430    rm -rf $${i} ); \
431    done
432    endef

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.36

  ViewVC Help
Powered by ViewVC 1.1.23