1 |
# DarthVader flight analysis software |
# Trigger flight analysis software |
2 |
# SOFTWARE VERSION |
# SOFTWARE VERSION |
3 |
VER= v0r01 |
VER= v3r00 |
4 |
# An almost general purpouse Makefile for PAMELA repository |
# An almost general purpouse Makefile for PAMELA repository |
5 |
# Let's start with some usefull definition for colorize the echo |
# Let's start with some usefull definition for colorize the echo |
6 |
RED='\E[1;31;40m' |
RED='\E[1;31;40m' |
21 |
# Reset the terminal |
# Reset the terminal |
22 |
RESET=tput sgr0 |
RESET=tput sgr0 |
23 |
# Here the variables used to override the standard make flags |
# Here the variables used to override the standard make flags |
|
#MAKE |
|
|
MAKE=make |
|
24 |
# C |
# C |
25 |
CC=gcc |
CC=gcc |
26 |
#CFLAGS=-Wall -O -fPIC -pthread -g |
#CFLAGS=-Wall -O -fPIC -pthread -g |
41 |
ROOTCINT=rootcint |
ROOTCINT=rootcint |
42 |
# Here the variables definig the local directories |
# Here the variables definig the local directories |
43 |
DIRTOP=${shell pwd} |
DIRTOP=${shell pwd} |
44 |
#DIRLIB=../lib/${ARCH} |
DIRLIB=../lib/${ARCH} |
45 |
#DIRBIN=../bin/${ARCH} |
DIRBIN=../bin/${ARCH} |
46 |
DIRLIB=lib/${ARCH} |
#DIRLIB=lib/${ARCH} |
47 |
DIRBIN=bin/${ARCH} |
#DIRBIN=bin/${ARCH} |
48 |
DIRSRC=src |
DIRSRC=src |
49 |
DIRINC=inc |
DIRINC=inc |
50 |
DIRDOC=doc |
DIRDOC=doc |
51 |
DIRMACROS=macros |
DIRMACROS=macros |
52 |
DIRCALIB=param |
DIRCALIB=calib |
53 |
# Here the PAMELA environmental variables to be checked |
# Here the PAMELA environmental variables to be checked |
54 |
PAM_ENV= PAM_BIN_env PAM_LIB_env PAM_INC_env PAM_DOC_env PAM_CALIB_env PAM_YODA_env |
PAM_ENV= PAM_BIN_env PAM_LIB_env PAM_INC_env PAM_DOC_env PAM_YODA_env |
55 |
|
|
56 |
# Here the local variables used to build the targets |
# Here the local variables used to build the targets |
57 |
# -- F77 - no libraries -- |
# -- F77 - no libraries -- |
59 |
FOBJS=$(FSRCS:${DIRSRC}%.for=${DIRLIB}%.o) |
FOBJS=$(FSRCS:${DIRSRC}%.for=${DIRLIB}%.o) |
60 |
|
|
61 |
# -- CPP - no libraries -- |
# -- CPP - no libraries -- |
62 |
CPPSRCS=${DIRSRC}/DarthVaderVerl2.cpp |
CPPSRCS= |
63 |
CPPOBJS=$(CPPSRCS:${DIRSRC}%.cpp=${DIRLIB}%.o) |
CPPOBJS=$(CPPSRCS:${DIRSRC}%.cpp=${DIRLIB}%.o) |
64 |
|
|
65 |
# -- C - no libraries -- |
# -- C - no libraries -- |
66 |
CSRCS= |
CSRCS= |
67 |
COBJS=$(CSRCS:${DIRSRC}%.c=${DIRLIB}%.o) |
COBJS=$(CSRCS:${DIRSRC}%.c=${DIRLIB}%.o) |
68 |
|
|
69 |
# -- CPP - ROOT libraries -- |
# -- CPP - ROOT libraries -- |
70 |
LIBROOTSRCS= |
LIBROOTSRCS=${DIRSRC}/TrigLevel2.cpp |
71 |
|
|
72 |
LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so) |
LIBROOTLIBS=$(LIBROOTSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so) |
73 |
LIBROOTCLIBS= |
LIBROOTCLIBS=libTrigLevel2 |
74 |
FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so) |
FULLROOTCLIBS=$(LIBROOTCLIBS:%=${DIRLIB}/%_${VER}.so) |
75 |
|
|
76 |
# -- CPP - NON-ROOT libraries -- |
# -- CPP - NON-ROOT libraries -- |
77 |
LIBCPPSRCS= |
LIBCPPSRCS= ${DIRSRC}/TrigCore.cpp \ |
78 |
|
${DIRSRC}/TrigVerl2.cpp |
79 |
LIBCPPLIBS=$(LIBCPPSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so) |
LIBCPPLIBS=$(LIBCPPSRCS:${DIRSRC}/%.cpp=${DIRLIB}/lib%_${VER}.so) |
80 |
LIBCPPCLIBS= |
LIBCPPCLIBS=libTrigCore libTrigVerl2 |
81 |
FULLLIBCPPLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so) |
FULLLIBCPPLIBS=$(LIBCPPCLIBS:%=${DIRLIB}/%_${VER}.so) |
82 |
|
|
83 |
# -- CPP - Executables -- |
# -- CPP - Executables -- |
84 |
CXXEXESRCS=${DIRSRC}/DarthVader.cpp |
CXXEXESRCS=${DIRSRC}/TriggerLevel2.cpp |
85 |
CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=${DIRLIB}%.o) |
CXXEXEOBJS=$(CXXEXESRCS:${DIRSRC}%.cpp=${DIRLIB}%.o) |
86 |
CXXEXELIBS:=DarthVader |
CXXEXELIBS:=TriggerLevel2 |
87 |
|
|
88 |
# -- list of tracker objects needed to link |
# -- list of tracker objects needed to link |
89 |
#TRKOBJS=${DIRTOP}/../lib2/libTrkLevel2.so ${DIRTOP}/../lib2/libtrack.so |
TRKOBJS=${DIRLIB}/libGLTables.so ${DIRLIB}/libRunInfo.so |
|
#TRKOBJS=$(shell for lib in `ls ${DIRLIB}`; do echo ${lib}; done) |
|
|
OBJS=${DIRLIB}/* |
|
|
#TRKOBJS= |
|
|
|
|
90 |
# -- directory where to find tracker headers needed to compile |
# -- directory where to find tracker headers needed to compile |
91 |
#TRKHEAD=${DIRTOP}/../tracker/inc |
SUBDIR=../GLTables ../RunInfo |
|
#TRKHEAD=-I${PAM_INC} -ITrackerLevel2/inc/ -IRunInfo/inc/ -IGLTables/inc/ |
|
|
|
|
|
# |
|
|
SUBDIR=./GLTables ./RunInfo ./S4Level2 ./NDLevel2 ./TrackerLevel2 ./TriggerLevel2 ./ToFLevel2 ./CalorimeterLevel2 ./AnticounterLevel2 ./OrbitalInfo |
|
92 |
SUBINC=$(shell for dir in `echo ${SUBDIR}`; do echo -I$${dir}/inc; done) |
SUBINC=$(shell for dir in `echo ${SUBDIR}`; do echo -I$${dir}/inc; done) |
93 |
|
|
94 |
# List of all libraries we want to install |
# List of all libraries we want to install |
95 |
FULLLIBS = ${FULLROOTCLIBS} ${FULLLIBCPPLIBS} |
FULLLIBS = ${FULLROOTCLIBS} ${FULLLIBCPPLIBS} |
96 |
|
|
97 |
# Other objects to install |
# Other objects to install |
98 |
EXESRCS=${DIRBIN}/DarthVader |
EXESRCS=${DIRBIN}/TriggerLevel2 |
99 |
|
|
100 |
INCSRCS= |
INCSRCS=${DIRINC}/TrigLevel2.h |
101 |
|
|
102 |
MACROSSRCS= |
MACROSSRCS= |
103 |
|
|
104 |
CALIBFILES=${DIRCALIB}/trk-param ${DIRCALIB}/cal-param ${DIRCALIB}/tof-param |
CALIBFILES= |
105 |
|
|
106 |
DOCFILES= |
DOCFILES= |
107 |
|
|
108 |
# Here the Variables used for info target |
# Here the Variables used for info target |
109 |
PACKAGE=PAMELA analysis flight software |
PACKAGE=Trigger analysis flight software |
110 |
EXECUTABLES= ${EXESRCS} |
EXECUTABLES= ${EXESRCS} |
111 |
LIBS= ${FULLLIBS} |
LIBS= ${FULLLIBS} |
112 |
DOCS= |
DOCS= |
118 |
TOBEDEL = junk |
TOBEDEL = junk |
119 |
ROOTINC=$$${shell root-config --incdir} |
ROOTINC=$$${shell root-config --incdir} |
120 |
NROOTINC=${shell root-config --incdir} |
NROOTINC=${shell root-config --incdir} |
|
# Directories where you place detectors software |
|
|
#SUBDIR=./GLTables ./RunInfo ./TrackerLevel2 ./CalorimeterLevel2 |
|
|
|
|
121 |
# Let's start |
# Let's start |
122 |
#all: test mkbindir mklibdir mkverpath ${FOBJS} ${CPPOBJS} ${LIBROOTLIBS} ${LIBCPPLIBS} ${CXXEXELIBS} |
#all: test mkbindir mklibdir mkverpath ${FOBJS} ${CPPOBJS} ${LIBROOTLIBS} ${LIBCPPLIBS} ${CXXEXELIBS} |
123 |
|
all: prepare libs |
124 |
all: |
all: |
|
@for dir in `echo ${SUBDIR}`; do \ |
|
|
echo "Making all in $${dir}"; \ |
|
|
(cd $${dir} && ${MAKE} all); \ |
|
|
done; make locall |
|
|
|
|
|
locall: prepare libs exe |
|
|
locall: |
|
125 |
@echo -e ${GREEN} "" |
@echo -e ${GREEN} "" |
126 |
@(${EGREEN} " Finished, now you can install the package \n (use: make install or make upgrade or make forceinstall) "; ${RESET}) |
@(${EGREEN} " Finished, now you can install the package \n (use: make install or make upgrade or make forceinstall) "; ${RESET}) |
127 |
@echo -e ${GREEN} "" |
@echo -e ${GREEN} "" |
128 |
@${RESET} |
@${RESET} |
129 |
|
|
130 |
#subdir: |
standalone: all exe |
|
# @for dir in `echo ${SUBDIR}`; do \ |
|
|
# echo "Making ${target} in $${dir}"; \ |
|
|
# (cd $${dir} && ${MAKE} ${target}); \ |
|
|
# done; |
|
131 |
|
|
132 |
prepare: test mkbindir mklibdir mkverpath |
prepare: test mkbindir mklibdir mkverpath |
133 |
|
|
138 |
# Here some general rules to produce objects in our local dir |
# Here some general rules to produce objects in our local dir |
139 |
${DIRLIB}/%.o: ${DIRSRC}/%.cpp |
${DIRLIB}/%.o: ${DIRSRC}/%.cpp |
140 |
@(${EGREEN} "Creating CPP object file: "${WHITE} "`basename $@`"; ${RESET}) |
@(${EGREEN} "Creating CPP object file: "${WHITE} "`basename $@`"; ${RESET}) |
141 |
@${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.cpp -I${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ `root-config --cflags` |
@${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.cpp -I${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${PAM_YODA}/include/utils/ `root-config --cflags` |
142 |
|
|
143 |
${DIRLIB}/%.o: ${DIRSRC}/%.c |
${DIRLIB}/%.o: ${DIRSRC}/%.c |
144 |
@(${EGREEN} "Creating C object file: "${WHITE} "`basename $@`"; ${RESET}) |
@(${EGREEN} "Creating C object file: "${WHITE} "`basename $@`"; ${RESET}) |
145 |
@${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.c -I${DIRINC} -I${PAM_YODA}/include/yoda/ `root-config --cflags` |
@${CXX} ${CXXFLAGS} -c -o $@ ${DIRSRC}/`basename ${@} .o`.c -I${DIRINC} ${SUBINC} -I${PAM_YODA}/include/yoda/ `root-config --cflags` |
146 |
|
|
147 |
${DIRLIB}/%.o: ${DIRSRC}/%.for |
${DIRLIB}/%.o: ${DIRSRC}/%.for |
148 |
@(${EGREEN} "Creating F77 object file: "${WHITE} "`basename $@`"; ${RESET}) |
@(${EGREEN} "Creating F77 object file: "${WHITE} "`basename $@`"; ${RESET}) |
158 |
# create .o |
# create .o |
159 |
# |
# |
160 |
@(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET}) |
@(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET}) |
161 |
@cd ${DIRSRC} &>/dev/null && ${CXX} ${CXXFLAGS} -c `basename $(@F) _${VER}.so | sed s/lib//`.cpp -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${NROOTINC}; |
@${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${NROOTINC}; |
162 |
@(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET}) |
@(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp"; ${RESET}) |
163 |
@cd ${DIRSRC} &>/dev/null && ${CXX} ${CXXFLAGS} -c `basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${NROOTINC}; |
@${CXX} ${CXXFLAGS} -c ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.cpp -o ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o -I${DIRTOP}/${DIRINC} -I${DIRTOP} ${SUBINC} -I${PAM_YODA}/include/yoda/ -I${NROOTINC}; |
164 |
# |
# |
165 |
# create .so |
# create .so |
166 |
# |
# |
167 |
@(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET}) |
@(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET}) |
168 |
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`Dict.o 1>/dev/null |
@${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 |
169 |
@ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
@ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
170 |
|
|
171 |
${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOBJS} |
${LIBCPPLIBS}: ${LIBSRCS} ${COBJS} ${FOBJS} |
173 |
# create .o |
# create .o |
174 |
# |
# |
175 |
@(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET}) |
@(${EGREEN} "Compiling CPP file: "${WHITE} "`basename $(@F) _${VER}.so | sed s/lib//`.cpp"; ${RESET}) |
176 |
@cd ${DIRSRC} &>/dev/null && ${CXX} ${CXXFLAGS} -c `basename $(@F) _${VER}.so | sed s/lib//`.cpp -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${PAM_YODA}/include/yoda/ -I${NROOTINC} ${SUBINC}; |
@${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${NROOTINC}; |
177 |
# |
# |
178 |
# create .so |
# create .so |
179 |
# |
# |
180 |
@(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET}) |
@(${EGREEN} "Creating shared library: "${WHITE} "`basename $@`"; ${RESET}) |
181 |
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} -I${SUBINC} -I${PAM_YODA}/include/yoda/ ${DIRTOP}/${DIRSRC}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${FOBJS} ${COBJS} 1>/dev/null |
@${CXX} ${CXXFLAGS} -Xlinker -soname=$(@F) -shared -o $@ -lg2c -I${DIRTOP}/${DIRINC} -I${DIRTOP} ${SUBINC} -I${PAM_YODA}/include/yoda/ ${DIRTOP}/${DIRLIB}/`basename $(@F) _${VER}.so | sed s/lib//`.o ${FOBJS} ${COBJS} 1>/dev/null |
182 |
@ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
@ln -sf ${DIRTOP}/${DIRLIB}/$(@F) ${DIRTOP}/${DIRLIB}/$(patsubst %_${VER}.so,%.so,$(@F)) |
183 |
|
|
184 |
${CXXEXELIBS}: ${CPPOBJS} ${COBJS} ${CXXEXEOBJS} |
${CXXEXELIBS}: ${CPPOBJS} ${COBJS} ${CXXEXEOBJS} |
185 |
@(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET}) |
@(${EGREEN} "Creating exec file: "${WHITE} "$@"; ${RESET}) |
186 |
# @${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o ${FULLROOTCLIBS} ${FULLLIBCPPLIBS} ${CPPOBJS} ${FOBJS} ${TRKOBJS} ${PAM_YODA}/lib/libyoda.so -I${DIRINC} -I${PAM_INC} -I${PAM_YODA}/include/yoda/ -lThread `root-config --cflags --glibs` `cernlib mathlib` |
@${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${DIRLIB}/$@.o ${FULLROOTCLIBS} ${FULLLIBCPPLIBS} ${TRKOBJS} ${CPPOBJS} ${COBJS} ${FOBJS} ${PAM_YODA}/lib/libyoda.so -lThread `root-config --cflags --glibs` `cernlib mathlib` |
|
@${CXX} ${CXXFLAGS} -o ${DIRBIN}/$@ ${OBJS} ${PAM_YODA}/lib/libyoda.so -lThread `root-config --cflags --glibs` `cernlib mathlib` |
|
187 |
|
|
188 |
# A small target to check environmental variables |
# A small target to check environmental variables |
189 |
%_env: |
%_env: |
201 |
@${test_and_mk} |
@${test_and_mk} |
202 |
|
|
203 |
# Here what has to be deleted in clean target |
# Here what has to be deleted in clean target |
204 |
clean: |
clean: TOBEDEL= ${DIRSRC}/*.o ${DIRSRC}/*Dict.cpp ${DIRSRC}/*Dict.h ${FOBJS} ${FULLLIBS} ${DIRBIN}/${CXXEXELIBS} ${CPPOBJS} ${CXXEXEOBJS} ${FULLLINKCLIBS} ${FULLMACROCLIBS} ${FULLLINKMACROCLIBS} ${DIRSRC}/TrigVerl2.cpp |
205 |
@for dir in `echo ${SUBDIR}`; do \ |
clean: |
|
echo "Making clean in $${dir}"; \ |
|
|
(cd $${dir} && ${MAKE} clean); \ |
|
|
done; make locclean |
|
|
|
|
|
locclean: TOBEDEL= ${DIRSRC}/*.o ${DIRSRC}/*Dict.cpp ${DIRSRC}/*Dict.h ${FOBJS} ${FULLLIBS} ${DIRBIN}/${CXXEXELIBS} ${CPPOBJS} ${CXXEXEOBJS} ${FULLLINKCLIBS} ${FULLMACROCLIBS} ${FULLLINKMACROCLIBS} ${DIRSRC}/DarthVaderVerl2.cpp |
|
|
locclean: |
|
206 |
@${test_and_rm} |
@${test_and_rm} |
207 |
|
|
208 |
distclean: |
distclean: clean |
209 |
@for dir in `echo ${SUBDIR}`; do \ |
distclean: TOBEDEL= ${DIRBIN} ${DIRLIB} |
210 |
echo "Making distclean in $${dir}"; \ |
distclean: |
|
(cd $${dir} && ${MAKE} distclean); \ |
|
|
done; make locdistclean |
|
|
|
|
|
locdistclean: clean |
|
|
locdistclean: TOBEDEL= ${DIRBIN} ${DIRLIB} |
|
|
locdistclean: |
|
211 |
@${test_and_rm} |
@${test_and_rm} |
212 |
|
|
213 |
|
|
214 |
forceinstall: |
forceinstall: FORCE=-f |
215 |
@for dir in `echo ${SUBDIR}`; do \ |
forceinstall: install |
216 |
echo "Making forceinstall in $${dir}"; \ |
|
217 |
(cd $${dir} && ${MAKE} forceinstall); \ |
forceinstallstandalone: FORCE=-f |
218 |
done; make locforceinstall |
forceinstallstandalone: installstandalone |
219 |
|
|
220 |
locforceinstall: FORCE=-f |
upgrade: FORCE=-u |
221 |
locforceinstall: install |
upgrade: install |
222 |
|
|
223 |
upgrade: |
upgradestandalone: FORCE=-u |
224 |
@for dir in `echo ${SUBDIR}`; do \ |
upgradestandalone: installstandalone |
|
echo "Making upgrade in $${dir}"; \ |
|
|
(cd $${dir} && ${MAKE} upgrade); \ |
|
|
done; make locupgrade |
|
|
|
|
|
locupgrade: FORCE=-u |
|
|
locupgrade: locinstall |
|
|
|
|
|
install: |
|
|
@for dir in `echo ${SUBDIR}`; do \ |
|
|
echo "Making install in $${dir}"; \ |
|
|
(cd $${dir} && ${MAKE} install); \ |
|
|
done; make locinstall |
|
225 |
|
|
226 |
locinstall: installlib installinc installmacros installcalib installdoc installexe installcmacro |
install: installlib installinc installmacros installcalib installdoc installcmacro |
227 |
|
|
228 |
|
installstandalone: install installexe |
229 |
|
|
230 |
installlib: LINK=y |
installlib: LINK=y |
231 |
installlib: TOBEMOVED= $(FULLLIBS:${DIRLIB}%=${PAM_LIB}%) |
installlib: TOBEMOVED= $(FULLLIBS:${DIRLIB}%=${PAM_LIB}%) |
257 |
installcalib: TOBEMOVED= $(CALIBFILES:${DIRCALIB}/%=${PAM_CALIB}/%) |
installcalib: TOBEMOVED= $(CALIBFILES:${DIRCALIB}/%=${PAM_CALIB}/%) |
258 |
installcalib: ORIGIN=${DIRCALIB} |
installcalib: ORIGIN=${DIRCALIB} |
259 |
installcalib: |
installcalib: |
260 |
@${cp_dir} |
@${test_and_cp} |
261 |
|
|
262 |
installdoc: TOBEMOVED= $(DOCFILES:${DIRDOC}/%=${PAM_DOC}/%) |
installdoc: TOBEMOVED= $(DOCFILES:${DIRDOC}/%=${PAM_DOC}/%) |
263 |
installdoc: ORIGIN=${DIRDOC} |
installdoc: ORIGIN=${DIRDOC} |
265 |
@${test_and_cp} |
@${test_and_cp} |
266 |
|
|
267 |
mkverpath: |
mkverpath: |
268 |
@echo '#include <TSystem.h>' > ${DIRTOP}/${DIRSRC}/DarthVaderVerl2.cpp; echo ' char *DarthVaderInfo(bool print){ if ( print ) printf("\nPAMELA Level2 flight package version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); return("${VER}"); }' >> ${DIRTOP}/${DIRSRC}/DarthVaderVerl2.cpp |
@echo '#include <TSystem.h>' > ${DIRTOP}/${DIRSRC}/TrigVerl2.cpp; echo ' char *TrigInfo(bool print){ if ( print ) printf("\nTrigger Level2 flight package version: ${VER}\n\nCompiled on '${TODAY}' with: '${GCCVER}'\n\nOn: '${UNAMEA}'\n\n"); return("${VER}"); }' >> ${DIRTOP}/${DIRSRC}/TrigVerl2.cpp |
269 |
@sleep 0.8 |
@sleep 0.8 |
270 |
|
|
271 |
|
|
335 |
done |
done |
336 |
endef |
endef |
337 |
|
|
|
define cp_dir |
|
|
wd=`pwd`;\ |
|
|
for i in ${TOBEMOVED} ; do \ |
|
|
wv=$${i##/*/}; \ |
|
|
dest=$${i/$${wv}/}; \ |
|
|
${EYELLOW} " Copying directory: "${WHITE} ${ORIGIN}/$${i##/*/} ;\ |
|
|
${EYELLOW} " to: "${WHITE} $${i} ; ${RESET}; \ |
|
|
cp -rf ${ORIGIN}/$${i##/*/} $${i}; \ |
|
|
done |
|
|
endef |
|
|
|
|
338 |
define test_and_mk |
define test_and_mk |
339 |
${EGREEN} "Testing for :" ${WHITE} "$@"; ${RESET} |
${EGREEN} "Testing for :" ${WHITE} "$@"; ${RESET} |
340 |
test -d "$@" || \ |
test -d "$@" || \ |