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