1 |
# Tracker flight analysis software |
# Tracker flight analysis software |
2 |
# SOFTWARE VERSION |
# SOFTWARE VERSION |
3 |
VER= v2r00 |
VER= v6r10 |
4 |
DEBUG=0 |
DEBUG=0 |
5 |
# An almost general purpouse Makefile for PAMELA repository |
# |
6 |
# Let's start with some usefull definition for colorize the echo |
include ../Make.def |
7 |
RED='\E[1;31;40m' |
ifeq ($(PAM_BIT),"-m32") |
8 |
GREEN='\E[1;32;40m' |
MALIGN=-malign-double |
9 |
YELLOW='\E[1;33;40m' |
else |
10 |
BLUE='\E[1;34;40m' |
MALIGN= |
11 |
WHITE='\E[1;37;40m' |
endif |
12 |
VIOLET='\E[1;35;40m' |
ifeq ($(GCC4),0) |
13 |
CYAN='\E[1;36;40m' |
EXTRAOPT=-Wno-globals -fvxt |
14 |
# Here the echo definition to use them |
else |
15 |
EVIOLET=echo -e ${VIOLET} |
EXTRAOPT= |
16 |
ECYAN=echo -e ${CYAN} |
endif |
17 |
ERED=echo -e ${RED} |
#F77FLAGS= -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash ${PAM_BIT} |
18 |
EGREEN=echo -e ${GREEN} |
#F77FLAGS= -malign-double -Wall -funroll-loops -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash -fPIC ${PAM_BIT} |
19 |
EYELLOW=echo -e ${YELLOW} |
#F77FLAGS= -malign-double -Wall -funroll-loops -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash -fPIC ${PAM_BIT} |
20 |
EBLUE=echo -e ${BLUE} |
export F77FLAGS= -O2 $(MALIGN) -Wall -funroll-loops $(EXTRAOPT) -fno-automatic -fbounds-check -extend_source -static -fno-backslash -fPIC ${PAM_BIT} |
21 |
EWHITE=echo -e ${WHITE} |
#F77FLAGS= -malign-double -Wall -funroll-loops -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash -fPIC ${PAM_BIT} |
22 |
# Reset the terminal |
#F77FLAGS= -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash -fPIC ${PAM_BIT} |
23 |
RESET=tput sgr0 |
#F77FLAGS= -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash -fPIC ${PAM_BIT} |
24 |
# Here the variables used to override the standard make flags |
ROOTCINT=rootcint |
25 |
# C |
# Here the variables definig the local directories |
26 |
CC=gcc |
DIRTOP=${shell pwd} |
27 |
#CFLAGS=-Wall -O -fPIC -pthread -g |
#DIRLIB=lib/${ARCH}/ |
28 |
CFLAGS=-Wall -O -fPIC -pthread |
#DIRBIN=bin/${ARCH}/ |
29 |
# Enviroment: |
DIRLIB=../lib/${ARCH}/ |
30 |
GCCVER=`gcc --version | head -1` |
DIRBIN=../bin/${ARCH}/ |
31 |
UNAMEA=`uname -a` |
DIRSRC=src |
32 |
TODAY=`date` |
DIRINC=inc |
33 |
# F77 |
DIRDOC=doc |
34 |
F77=g77 |
DIRMACROS=macros |
35 |
#F77FLAGS= -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -g -extend_source -static -fno-backslash |
DIRCALIB=calib |
36 |
F77FLAGS= -Wall -Wno-globals -fvxt -fno-automatic -fbounds-check -extend_source -static -fno-backslash |
|
37 |
# C++ |
# Here the PAMELA environmental variables to be checked |
38 |
CXX=g++ |
PAM_ENV= PAM_BIN_env PAM_LIB_env PAM_INC_env PAM_DOC_env PAM_YODA_env |
39 |
#CXXFLAGS=-Wall -O -fPIC -pthread -g -D'DEBUG=${DEBUG}' |
# Here the local variables used to build the targets |
40 |
#CXXFLAGS=-Wall -O -fPIC -pthread -g -D'DEBUG=0' |
#------------------------------------------------- |
41 |
#CXXFLAGS=-Wall -O -fPIC -pthread -fpermissive |
FSRCS=${DIRSRC}/F77/fillpedsig.f \ |
42 |
CXXFLAGS=-Wall -O -fPIC -pthread |
${DIRSRC}/F77/readallparam.f \ |
43 |
# ROOTCINT |
${DIRSRC}/F77/functions.f \ |
44 |
ROOTCINT=rootcint |
${DIRSRC}/F77/cncomp.f \ |
45 |
# Here the variables definig the local directories |
${DIRSRC}/F77/filladc.f \ |
46 |
DIRTOP=${shell pwd} |
${DIRSRC}/F77/reductionflight.f \ |
47 |
#DIRLIB=lib/${ARCH}/ |
${DIRSRC}/F77/functionspfa.f \ |
48 |
#DIRBIN=bin/${ARCH}/ |
${DIRSRC}/F77/mini.f \ |
49 |
DIRLIB=../lib/${ARCH}/ |
${DIRSRC}/F77/tricircle.f \ |
50 |
DIRBIN=../bin/${ARCH}/ |
${DIRSRC}/F77/analysissubroutines.f \ |
51 |
DIRSRC=src |
${DIRSRC}/F77/analysisflight.f \ |
52 |
DIRINC=inc |
${DIRSRC}/F77/readB.f \ |
53 |
DIRDOC=doc |
${DIRSRC}/F77/interB.f \ |
54 |
DIRMACROS=macros |
${DIRSRC}/F77/track.f \ |
55 |
DIRCALIB=calib |
${DIRSRC}/F77/grkuta.f \ |
56 |
# Here the PAMELA environmental variables to be checked |
${DIRSRC}/F77/bdll.f # ***PP*** |
57 |
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 |
FOBJS=$(FSRCS:${DIRSRC}/F77/%.f=${DIRLIB}/%.o) |
59 |
#------------------------------------------------- |
#------------------------------------------------- |
60 |
FSRCS=${DIRSRC}/F77/fillpedsig.f \ |
CSRCS= |
61 |
${DIRSRC}/F77/readallparam.f \ |
COBJS=$(CSRCS:${DIRSRC}%.cpp=${DIRLIB}/%.o) |
62 |
${DIRSRC}/F77/functions.f \ |
#------------------------------------------------- |
63 |
${DIRSRC}/F77/cncomp.f \ |
# librerie utilizzabili da root (ci deve essere anche il ***LinkDef.h ) |
64 |
${DIRSRC}/F77/filladc.f \ |
LIBROOTSRCS=${DIRSRC}/TrkParams.cpp \ |
65 |
${DIRSRC}/F77/reductionflight.f \ |
${DIRSRC}/TrkLevel2.cpp \ |
66 |
${DIRSRC}/F77/functionspfa.f \ |
${DIRSRC}/TrkLevel1.cpp \ |
67 |
${DIRSRC}/F77/mini.f \ |
${DIRSRC}/TrkLevel0.cpp \ |
68 |
${DIRSRC}/F77/tricircle.f \ |
${DIRSRC}/TrkHough.cpp \ |
69 |
${DIRSRC}/F77/analysissubroutines.f \ |
${DIRSRC}/TrkCalib.cpp |
70 |
${DIRSRC}/F77/analysisflight.f \ |
|
71 |
${DIRSRC}/F77/readB.f \ |
#LIBROOTSRCS= |
72 |
${DIRSRC}/F77/interB.f \ |
LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so) |
73 |
${DIRSRC}/F77/track.f \ |
LIBROOTOBJS=${DIRLIB}/readB.o \ |
74 |
${DIRSRC}/F77/grkuta.f |
${DIRLIB}/interB.o \ |
75 |
|
${DIRLIB}/track.o \ |
76 |
FOBJS=$(FSRCS:${DIRSRC}/F77/%.f=${DIRLIB}/%.o) |
${DIRLIB}/grkuta.o \ |
77 |
#------------------------------------------------- |
${DIRLIB}/bdll.o \ |
78 |
CSRCS= |
${DIRLIB}/functionspfa.o \ |
79 |
COBJS=$(CSRCS:${DIRSRC}%.cpp=${DIRLIB}/%.o) |
${DIRLIB}/readallparam.o \ |
80 |
#------------------------------------------------- |
${DIRLIB}/functions.o \ |
81 |
# librerie utilizzabili da root (ci deve essere anche il ***LinkDef.h ) |
${DIRLIB}/mini.o \ |
82 |
LIBROOTSRCS= ${DIRSRC}/TrkLevel2.cpp \ |
${DIRLIB}/tricircle.o \ |
83 |
${DIRSRC}/TrkLevel1.cpp |
${DIRLIB}/analysisflight.o \ |
84 |
#LIBROOTSRCS= |
${DIRLIB}/analysissubroutines.o \ |
85 |
LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so) |
${DIRLIB}/fillpedsig.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 |
${DIRLIB}/cncomp.o \ |
87 |
LIBROOTCLIBS=libTrkLevel2 libTrkLevel1 |
${DIRLIB}/filladc.o \ |
88 |
#LIBROOTCLIBS= |
${DIRLIB}/reductionflight.o |
89 |
FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so) |
LIBROOTCLIBS= libTrkParams libTrkLevel2 libTrkLevel1 libTrkLevel0 libTrkHough libTrkCalib |
90 |
#------------------------------------------------- |
|
91 |
# librerie C++ NON utilizzabili da root |
#LIBROOTCLIBS= |
92 |
#LIBCPPSRCS= ${DIRSRC}/TrkLevel2.cpp \ |
FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so) |
93 |
# ${DIRSRC}/TrkLevel0.cpp |
#------------------------------------------------- |
94 |
LIBCPPSRCS=${DIRSRC}/TrkLevel0.cpp \ |
# librerie C++ NON utilizzabili da root |
95 |
${DIRSRC}/TrkStruct.cpp \ |
#LIBCPPSRCS= ${DIRSRC}/TrkLevel2.cpp \ |
96 |
${DIRSRC}/TrkProcess.cpp \ |
# ${DIRSRC}/TrkLevel0.cpp |
97 |
${DIRSRC}/TrkVerl2.cpp \ |
LIBCPPSRCS=${DIRSRC}/TrkStruct.cpp \ |
98 |
${DIRSRC}/TrkCore.cpp |
${DIRSRC}/TrkProcess.cpp \ |
99 |
LIBCPPLIBS=$(LIBCPPSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so) |
${DIRSRC}/TrkVerl2.cpp \ |
100 |
#LIBCPPCLIBS=libTrkLevel2 libTrkLevel0 |
${DIRSRC}/TrkCore.cpp \ |
101 |
LIBCPPCLIBS=libTrkLevel0 libTrkStruct libTrkProcess libTrkCore libTrkVerl2 |
# ${DIRSRC}/TrkLevel0.cpp |
102 |
FULLCPPCLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so) |
|
103 |
#------------------------------------------------- |
LIBCPPLIBSTRK=$(LIBCPPSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so) |
104 |
# librerie F77 NON utilizzabili da root |
#LIBCPPCLIBS=libTrkLevel2 libTrkLevel0 |
105 |
LIBF77SRCS= |
LIBCPPCLIBS= libTrkStruct libTrkProcess libTrkCore libTrkVerl2 #libTrkLevel0 |
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}/TrkParams.h \ |
137 |
# Here the Variables used for info target |
${DIRINC}/TrkStruct.h \ |
138 |
PACKAGE=Tracker flight software |
${DIRINC}/TrkProcess.h \ |
139 |
EXECUTABLES=${EXESRCS} |
${DIRINC}/TrkCore.h \ |
140 |
LIBS= ${FULLLIBS} ${OTHERLIBS} |
${DIRINC}/TrkVerl2.h |
141 |
DOCS= |
MACROSSRCS= |
142 |
SRCS= |
CALIBFILES= |
143 |
MACROS= ${MACROSSRCS} |
DOCFILES= |
144 |
INCLUDE= ${INCSRCS} |
# Here the Variables used for info target |
145 |
# |
PACKAGE=Tracker flight software |
146 |
TOBEDEL = junk |
EXECUTABLES=${EXESRCS} |
147 |
ROOTINC=$$${shell root-config --incdir} |
LIBS= ${FULLLIBS} ${OTHERLIBS} |
148 |
NROOTINC=${shell root-config --incdir} |
DOCS= |
149 |
# Let's start |
SRCS= |
150 |
#all : test mkbindir mklibdir mkverpath ${LIBF77LIBS} ${LIBROOTLIBS} ${LIBCPPLIBS} ${FOBJS} ${COBJS} ${CXXEXELIBS} |
MACROS= ${MACROSSRCS} |
151 |
all : test mkbindir mklibdir mkverpath ${LIBF77LIBS} ${LIBROOTLIBS} ${LIBCPPLIBS} |
INCLUDE= ${INCSRCS} |
152 |
all: |
# |
153 |
@echo -e ${GREEN} "" |
TOBEDEL = junk |
154 |
@(${EGREEN} " Finished, now you can install the package \n (use: make install or make upgrade or make forceinstall) "; ${RESET}) |
ROOTINC=$$${shell root-config --incdir} |
155 |
@echo -e ${GREEN} "" |
NROOTINC=${shell root-config --incdir} |
156 |
@${RESET} |
# Let's start |
157 |
|
#all : test mkbindir mklibdir mkverpath ${LIBF77LIBS} ${LIBROOTLIBS} ${LIBCPPLIBS} ${FOBJS} ${COBJS} ${CXXEXELIBS} |
158 |
standalone: all ${CXXEXELIBS} |
all : test mkbindir mklibdir mkverpath ${LIBF77LIBS} ${LIBROOTLIBS} ${LIBCPPLIBSTRK} |
159 |
|
all: |
160 |
# Here some general rules to produce objects in our local dir |
# @echo -e ${GREEN} "" |
161 |
${DIRLIB}/%.o: ${DIRSRC}/%.cpp |
# @(${EGREEN} " Finished, now you can install the package \n (use: make install or make upgrade or make forceinstall) "; ${RESET}) |
162 |
# @(${EYELLOW} " C++ object ------------------------") |
@echo -e ${GREEN} "" |
163 |
@(${EGREEN} "Creating C++ object file: "${WHITE} "$@"; ${RESET}) |
@${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` |
|
165 |
|
standalone: all ${CXXEXELIBS} |
166 |
${DIRLIB}/%.o : ${DIRSRC}/F77/%.f |
|
167 |
# @(${EYELLOW} " F77 object ------------------------") |
include ../Make.dect |
168 |
@(${EGREEN} "Creating F77 object file: "${WHITE} "$@"; ${RESET}) |
|
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}/ |
${DIRLIB}/%.o : ${DIRSRC}/F77/%.f |
170 |
|
@(${EGREEN} "Creating tracker F77 object file: "${WHITE} "$@"; ${RESET}) |
171 |
# .so from .o fortran |
@${F77} ${F77FLAGS} -c -o $@ ${DIRSRC}/F77/`basename ${@} .o`.f -I${DIRTOP}/${DIRINC}/F77 -I${NROOTINC} ${SUBINC} -I${PAM_YODA}/include/yoda -I${PAM_INC}/ |
172 |
${LIBF77LIBS}: ${LIBF77OBJS} |
|
173 |
@(${EYELLOW} " F77 shared library --------------------------") |
|
174 |
@(${EGREEN} "Creating library: "${WHITE} "$@"; ${RESET}) |
${LIBCPPLIBSTRK}: ${LIBSRCS} ${COBJS} ${FOBJS} |
175 |
# @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $^ `cernlib mathlib` /usr/lib/libg2c.so.0 |
# |
176 |
## @${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c $^ `cernlib mathlib` |
# create .o |
177 |
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c $^ |
# |
178 |
|
@(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET}) |
179 |
${LIBROOTLIBS}: ${LIBROOTSRCS} ${FOBJS} |
@${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} -I${DIRTOP}/../CalorimeterLevel2/inc -I${DIRTOP}/../ToFLevel2/inc -I${DIRTOP}/../TriggerLevel2/inc -I${DIRTOP}/../OrbitalInfo/inc |
180 |
@(${EYELLOW} " ROOT library ------------------------") |
# |
181 |
@(${EGREEN} "Creating file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET}) |
# create .so |
182 |
# |
# |
183 |
# Create *Dict.cpp and *Dict.h |
@(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET}) |
184 |
# |
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ $(LG2C) ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${FOBJS} ${COBJS} 1>/dev/null |
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 |
@ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
186 |
# |
|
187 |
# create .o |
# A small target to check environmental variables |
188 |
# |
%_env: |
189 |
@(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET}) |
@${test_env} |
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}) |
.PHONY: install installdoc installlib installmacros installinc installexe installcmacro |
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}; |
.PHONY: clean depclean info mkbindir mklibdir testcern testpamenv test |
193 |
@ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
|
194 |
# |
mkbindir: ${DIRBIN} |
195 |
# create .so |
${DIRBIN}: |
196 |
# |
@${test_and_mk} |
197 |
@(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${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 |
mklibdir: ${DIRLIB} |
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 |
${DIRLIB}: |
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 |
@${test_and_mk} |
201 |
@ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
|
202 |
@(${EYELLOW} " -------------------------------------") |
# Here what has to be deleted in clean target |
203 |
|
clean: TOBEDEL= ${DIRSRC}/*.o ${DIRSRC}/*Dict.cpp ${DIRSRC}/*Dict.h ${FOBJS} ${FULLLIBS} ${DIRBIN}/${CXXEXELIBS} ${COBJS} ${CXXEXEOBJS} ${DIRSRC}/TrkVerl2.cpp |
204 |
${LIBCPPLIBS}: ${LIBCPPSRCS} |
clean: |
205 |
# |
@${test_and_rm} |
206 |
# create .o |
|
207 |
# |
distclean: clean |
208 |
@(${EGREEN} "Compiling file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET}) |
distclean: TOBEDEL= ${DIRBIN} ${DIRLIB} |
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}; |
distclean: |
210 |
# |
@${test_and_rm} |
211 |
# create .so |
|
212 |
# |
forceinstall: FORCE=-f |
213 |
@(${EGREEN} "Compiling shared library: "${WHITE} "$@"; ${RESET}) |
forceinstall: install |
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 |
|
215 |
@ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
upgrade: FORCE=-u |
216 |
|
upgrade: install |
217 |
|
upgradestandalone: FORCE=-u |
218 |
${CXXEXELIBS}: ${COBJS} ${FOBJS} ${CXXEXEOBJS} |
upgradestandalone: installstandalone |
219 |
@(${EVIOLET} "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *") |
|
220 |
@(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET}) |
install: installlib installinc installmacros installcalib installdoc installcmacro |
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; |
installstandalone: install installexe |
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 |
|
installlib: LINK=y |
224 |
|
installlib: TOBEMOVED= $(FULLLIBS:${DIRLIB}%=${PAM_LIB}%) |
225 |
# A small target to check environmental variables |
installlib: ORIGIN=${DIRLIB} |
226 |
%_env: |
installlib: |
227 |
@${test_env} |
@${test_and_cp} |
228 |
|
|
229 |
.PHONY: install installdoc installlib installmacros installinc installexe installcmacro |
installcmacro: LINK=y |
230 |
.PHONY: clean depclean info mkbindir mklibdir testcern testpamenv test |
installcmacro: TOBEMOVED= $(FULLMACROCLIBS:${DIRLIB}%=${PAM_LIB}%) |
231 |
|
installcmacro: ORIGIN=${DIRLIB} |
232 |
mkbindir: ${DIRBIN} |
installcmacro: |
233 |
${DIRBIN}: |
@${test_and_cp} |
234 |
@${test_and_mk} |
|
235 |
|
installinc: TOBEMOVED= $(INCSRCS:${DIRINC}/%=${PAM_INC}/%) |
236 |
mklibdir: ${DIRLIB} |
installinc: ORIGIN=${DIRINC} |
237 |
${DIRLIB}: |
installinc: |
238 |
@${test_and_mk} |
@${test_and_cp} |
239 |
|
|
240 |
# Here what has to be deleted in clean target |
installexe: TOBEMOVED= $(EXESRCS:${DIRBIN}/%=${PAM_BIN}/%) |
241 |
clean: TOBEDEL= ${DIRSRC}/*.o ${DIRSRC}/*Dict.cpp ${DIRSRC}/*Dict.h ${FOBJS} ${FULLLIBS} ${DIRBIN}/${CXXEXELIBS} ${COBJS} ${CXXEXEOBJS} ${DIRSRC}/TrkVerl2.cpp |
installexe: ORIGIN=${DIRBIN} |
242 |
clean: |
installexe: |
243 |
@${test_and_rm} |
@${test_and_cp} |
244 |
|
|
245 |
distclean: clean |
installmacros: TOBEMOVED= $(MACROSSRCS:${DIRMACROS}/%=${PAM_MACROS}/%) |
246 |
distclean: TOBEDEL= ${DIRBIN} ${DIRLIB} |
installmacros: ORIGIN=${DIRMACROS} |
247 |
distclean: |
installmacros: |
248 |
@${test_and_rm} |
@${test_and_cp} |
249 |
|
|
250 |
forceinstall: FORCE=-f |
installcalib: TOBEMOVED= $(CALIBFILES:${DIRCALIB}/%=${PAM_CALIB}/%) |
251 |
forceinstall: install |
installcalib: ORIGIN=${DIRCALIB} |
252 |
|
installcalib: |
253 |
upgrade: FORCE=-u |
@${test_and_cp} |
254 |
upgrade: install |
|
255 |
upgradestandalone: FORCE=-u |
installdoc: TOBEMOVED= $(DOCFILES:${DIRDOC}/%=${PAM_DOC}/%) |
256 |
upgradestandalone: installstandalone |
installdoc: ORIGIN=${DIRDOC} |
257 |
|
installdoc: |
258 |
install: installlib installinc installmacros installcalib installdoc installcmacro |
@${test_and_cp} |
259 |
installstandalone: install installexe |
|
260 |
|
mkverpath: |
261 |
installlib: LINK=y |
# @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 |
262 |
installlib: TOBEMOVED= $(FULLLIBS:${DIRLIB}%=${PAM_LIB}%) |
@echo '#include <TSystem.h>' > ${DIRTOP}/${DIRSRC}/TrkVerl2.cpp; echo ' const 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 |
263 |
installlib: ORIGIN=${DIRLIB} |
@sleep 0.8 |
264 |
installlib: |
|
265 |
@${test_and_cp} |
|
266 |
|
|
267 |
installcmacro: LINK=y |
info: |
268 |
installcmacro: TOBEMOVED= $(FULLMACROCLIBS:${DIRLIB}%=${PAM_LIB}%) |
@echo " " |
269 |
installcmacro: ORIGIN=${DIRLIB} |
@${EGREEN} "Infos for package :" ${WHITE} ${PACKAGE} |
270 |
installcmacro: |
@${EGREEN} " VERSION :" ${WHITE} ${VER} |
271 |
@${test_and_cp} |
@${EGREEN} " EXECUTABLES :" ${WHITE} ${EXECUTABLES} |
272 |
|
@${EGREEN} " INCLUDES :" ${WHITE} ${INCLUDE} |
273 |
installinc: TOBEMOVED= $(INCSRCS:${DIRINC}/%=${PAM_INC}/%) |
@${EGREEN} " LIBS :" ${WHITE} ${LIBS} |
274 |
installinc: ORIGIN=${DIRINC} |
@${EGREEN} " DOCS :" ${WHITE} ${DOCS} |
275 |
installinc: |
@${EGREEN} " SRCS :" ${WHITE} ${SRCS} |
276 |
@${test_and_cp} |
@${EGREEN} " MACROS :" ${WHITE} ${MACROS} |
277 |
|
@echo " " |
278 |
installexe: TOBEMOVED= $(EXESRCS:${DIRBIN}/%=${PAM_BIN}/%) |
@${RESET} |
279 |
installexe: ORIGIN=${DIRBIN} |
|
280 |
installexe: |
test: testpamenv |
281 |
@${test_and_cp} |
|
282 |
|
testpamenv: ${PAM_ENV} |
283 |
installmacros: TOBEMOVED= $(MACROSSRCS:${DIRMACROS}/%=${PAM_MACROS}/%) |
|
284 |
installmacros: ORIGIN=${DIRMACROS} |
root-config: OPT=--cflags |
285 |
installmacros: |
root-config: |
286 |
@${test_and_cp} |
@${test_cmd} |
287 |
|
|
288 |
installcalib: TOBEMOVED= $(CALIBFILES:${DIRCALIB}/%=${PAM_CALIB}/%) |
# Here follows some usefull macros |
289 |
installcalib: ORIGIN=${DIRCALIB} |
define test_and_cp |
290 |
installcalib: |
wd=`pwd`;\ |
291 |
@${test_and_cp} |
for i in ${TOBEMOVED} ; do \ |
292 |
|
wv=$${i##/*/}; \ |
293 |
installdoc: TOBEMOVED= $(DOCFILES:${DIRDOC}/%=${PAM_DOC}/%) |
dest=$${i/$${wv}/}; \ |
294 |
installdoc: ORIGIN=${DIRDOC} |
${EGREEN} "Testing for :" ${WHITE} "$${i}" ; ${RESET}; \ |
295 |
installdoc: |
if [ ! "${FORCE}" ] ; then \ |
296 |
@${test_and_cp} |
if [ ! -f $${i} ]; then \ |
297 |
|
${EGREEN} "Copying : "${WHITE} ${ORIGIN}/$${i##/*/} ;\ |
298 |
mkverpath: |
${EGREEN} " to: "${WHITE} $${i} ; ${RESET}; \ |
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 |
cp ${ORIGIN}/$${i##/*/} $${i}; \ |
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 |
else \ |
301 |
@sleep 0.8 |
${ERED} "File already exist !!!! Please delete it " ${WHITE}; ${RESET}; \ |
302 |
|
fi;\ |
303 |
|
else \ |
304 |
|
if [ "${FORCE}" == "-u" ] ; then \ |
305 |
info: |
if [ "`basename $${i}`" != "`basename $${i} _${VER}.so`" ]; then \ |
306 |
@echo " " |
${EYELLOW} "Removing: "${WHITE} ${PAM_LIB}/`basename $${i} _${VER}.so`_v*r*.so; ${RESET}; \ |
307 |
@${EGREEN} "Infos for package :" ${WHITE} ${PACKAGE} |
rm -f ${PAM_LIB}/`basename $${i} _${VER}.so`_v*r*.so ; \ |
308 |
@${EGREEN} " VERSION :" ${WHITE} ${VER} |
${EGREEN} "Copying : "${WHITE} ${ORIGIN}/$${i##/*/} ;\ |
309 |
@${EGREEN} " EXECUTABLES :" ${WHITE} ${EXECUTABLES} |
${EGREEN} " to: "${WHITE} $${i} ; ${RESET}; \ |
310 |
@${EGREEN} " INCLUDES :" ${WHITE} ${INCLUDE} |
cp ${ORIGIN}/$${i##/*/} $${i}; \ |
311 |
@${EGREEN} " LIBS :" ${WHITE} ${LIBS} |
else \ |
312 |
@${EGREEN} " DOCS :" ${WHITE} ${DOCS} |
${EYELLOW} " Forcing copy: "${WHITE} ${ORIGIN}/$${i##/*/} ;\ |
313 |
@${EGREEN} " SRCS :" ${WHITE} ${SRCS} |
${EYELLOW} " to: "${WHITE} $${i} ; ${RESET}; \ |
314 |
@${EGREEN} " MACROS :" ${WHITE} ${MACROS} |
cp -f ${ORIGIN}/$${i##/*/} $${i}; \ |
315 |
@echo " " |
fi; \ |
316 |
@${RESET} |
else \ |
317 |
|
${EYELLOW} " Forcing copy: "${WHITE} ${ORIGIN}/$${i##/*/} ;\ |
318 |
test: testpamenv |
${EYELLOW} " to: "${WHITE} $${i} ; ${RESET}; \ |
319 |
|
cp ${FORCE} ${ORIGIN}/$${i##/*/} $${i}; \ |
320 |
testpamenv: ${PAM_ENV} |
fi;\ |
321 |
|
fi ;\ |
322 |
root-config: OPT=--cflags |
if [ ! -z ${LINK} ] ; then \ |
323 |
root-config: |
${EGREEN} "Creating symlink from : "${WHITE} $${wv/_${VER}/} ;\ |
324 |
@${test_cmd} |
${EGREEN} " to : "${WHITE} $${i##/*/} ; ${RESET}; \ |
325 |
|
cd $${dest}; \ |
326 |
# Here follows some usefull macros |
ln -sf $${wv} $${wv/_${VER}/}; \ |
327 |
define test_and_cp |
cd $${wd}; \ |
328 |
wd=`pwd`;\ |
fi \ |
329 |
for i in ${TOBEMOVED} ; do \ |
done |
330 |
wv=$${i##/*/}; \ |
endef |
331 |
dest=$${i/$${wv}/}; \ |
|
332 |
${EGREEN} "Testing for :" ${WHITE} "$${i}" ; ${RESET}; \ |
define test_and_mk |
333 |
if [ ! "${FORCE}" ] ; then \ |
${EGREEN} "Testing for :" ${WHITE} "$@"; ${RESET} |
334 |
if [ ! -f $${i} ]; then \ |
test -d "$@" || \ |
335 |
${EGREEN} "Copying : "${WHITE} ${ORIGIN}/$${i##/*/} ;\ |
(${EGREEN} "Creating : "${WHITE} "$@"; ${RESET}; mkdir -p $@) |
336 |
${EGREEN} " to: "${WHITE} $${i} ; ${RESET}; \ |
endef |
337 |
cp ${ORIGIN}/$${i##/*/} $${i}; \ |
|
338 |
else \ |
define test_env |
339 |
${ERED} "File already exist !!!! Please delete it " ${WHITE}; ${RESET}; \ |
${EGREEN} "Testing for env:" ${WHITE} $(patsubst %_env,%,$@); ${RESET} |
340 |
fi;\ |
printenv $(patsubst %_env,%,$@) 1>/dev/null || \ |
341 |
else \ |
(${ERED} "ERROR, variable : "${WHITE} $(patsubst %_env,%,$@) \ |
342 |
if [ "${FORCE}" == "-u" ] ; then \ |
${RED} "not defined !!! Check your env. settings"; \ |
343 |
if [ "`basename $${i}`" != "`basename $${i} _${VER}.so`" ]; then \ |
${RESET}; exit 1) |
344 |
${EYELLOW} "Removing: "${WHITE} ${PAM_LIB}/`basename $${i} _${VER}.so`_v*r*.so; ${RESET}; \ |
${EGREEN} " Defined:" ${WHITE} $${$(patsubst %_env,%,$@)}; ${RESET} |
345 |
rm -f ${PAM_LIB}/`basename $${i} _${VER}.so`_v*r*.so ; \ |
endef |
346 |
${EGREEN} "Copying : "${WHITE} ${ORIGIN}/$${i##/*/} ;\ |
|
347 |
${EGREEN} " to: "${WHITE} $${i} ; ${RESET}; \ |
define test_cmd |
348 |
cp ${ORIGIN}/$${i##/*/} $${i}; \ |
${EGREEN} "Testing for cmd:" ${WHITE} $@ ${OPT}; ${RESET} |
349 |
else \ |
$@ ${OPT} 1>/dev/null 2>&1 || \ |
350 |
${EYELLOW} " Forcing copy: "${WHITE} ${ORIGIN}/$${i##/*/} ;\ |
(${ERED} "ERROR, command : "${WHITE} $@ ${OPT}\ |
351 |
${EYELLOW} " to: "${WHITE} $${i} ; ${RESET}; \ |
${RED} "not found !!! Check your installation"; \ |
352 |
cp -f ${ORIGIN}/$${i##/*/} $${i}; \ |
${RESET}; exit 1) |
353 |
fi; \ |
${EGREEN} " Present:" ${WHITE} $@ ${OPT}; ${RESET} |
354 |
else \ |
endef |
355 |
${EYELLOW} " Forcing copy: "${WHITE} ${ORIGIN}/$${i##/*/} ;\ |
|
356 |
${EYELLOW} " to: "${WHITE} $${i} ; ${RESET}; \ |
define test_and_rm |
357 |
cp ${FORCE} ${ORIGIN}/$${i##/*/} $${i}; \ |
for i in ${TOBEDEL}; do \ |
358 |
fi;\ |
test -d $${i} || (${ERED} "Removing file :"${WHITE} $${i}; ${RESET}; \ |
359 |
fi ;\ |
rm -f $${i} ); \ |
360 |
if [ ! -z ${LINK} ] ; then \ |
test ! -d $${i} || (${ERED} "Removing dir :"${WHITE} $${i}; ${RESET}; \ |
361 |
${EGREEN} "Creating symlink from : "${WHITE} $${wv/_${VER}/} ;\ |
rm -rf $${i} ); \ |
362 |
${EGREEN} " to : "${WHITE} $${i##/*/} ; ${RESET}; \ |
done |
363 |
cd $${dest}; \ |
endef |
|
ln -sf $${wv} $${wv/_${VER}/}; \ |
|
|
cd $${wd}; \ |
|
|
fi \ |
|
|
done |
|
|
endef |
|
|
|
|
|
define test_and_mk |
|
|
${EGREEN} "Testing for :" ${WHITE} "$@"; ${RESET} |
|
|
test -d "$@" || \ |
|
|
(${EGREEN} "Creating : "${WHITE} "$@"; ${RESET}; mkdir -p $@) |
|
|
endef |
|
|
|
|
|
define test_env |
|
|
${EGREEN} "Testing for env:" ${WHITE} $(patsubst %_env,%,$@); ${RESET} |
|
|
printenv $(patsubst %_env,%,$@) 1>/dev/null || \ |
|
|
(${ERED} "ERROR, variable : "${WHITE} $(patsubst %_env,%,$@) \ |
|
|
${RED} "not defined !!! Check your env. settings"; \ |
|
|
${RESET}; exit 1) |
|
|
${EGREEN} " Defined:" ${WHITE} $${$(patsubst %_env,%,$@)}; ${RESET} |
|
|
endef |
|
|
|
|
|
define test_cmd |
|
|
${EGREEN} "Testing for cmd:" ${WHITE} $@ ${OPT}; ${RESET} |
|
|
$@ ${OPT} 1>/dev/null 2>&1 || \ |
|
|
(${ERED} "ERROR, command : "${WHITE} $@ ${OPT}\ |
|
|
${RED} "not found !!! Check your installation"; \ |
|
|
${RESET}; exit 1) |
|
|
${EGREEN} " Present:" ${WHITE} $@ ${OPT}; ${RESET} |
|
|
endef |
|
|
|
|
|
define test_and_rm |
|
|
for i in ${TOBEDEL}; do \ |
|
|
test -d $${i} || (${ERED} "Removing file :"${WHITE} $${i}; ${RESET}; \ |
|
|
rm -f $${i} ); \ |
|
|
test ! -d $${i} || (${ERED} "Removing dir :"${WHITE} $${i}; ${RESET}; \ |
|
|
rm -rf $${i} ); \ |
|
|
done |
|
|
endef |
|