Temporary mod for CMake
[u/mrichter/AliRoot.git] / build / MakefileDA
CommitLineData
17cb72ed 1#-*- Mode: Makefile -*-
2
0c662ab2 3ONLINEDETECTORNAME:=$(firstword $(subst -, ,$(subst -clean,,$(subst -rpm,,$(subst daqDA-,,$(filter daqDA-% daqDA-%-rpm daqDA-%-clean,$(MAKECMDGOALS)))))))
4DAMODULE:=$(subst SPD,ITS,$(subst SDD,ITS,$(subst SSD,ITS,$(subst HMP,HMPID,$(subst PHS,PHOS,$(subst CPV,PHOS,$(subst MCH,MUON,$(subst MTR,MUON,$(subst T00,T0,$(subst V00,VZERO,$(subst ACO,ACORDE,$(subst EMC,EMCAL,$(ONLINEDETECTORNAME)))))))))))))
35f91121 5
0c662ab2 6ifeq ($(ONLINEDETECTORNAME),SPD)
7SUBDAMODULE:=SPD
35f91121 8else
0c662ab2 9ifeq ($(ONLINEDETECTORNAME),SDD)
10SUBDAMODULE:=SDD
11else
12ifeq ($(ONLINEDETECTORNAME),SSD)
13SUBDAMODULE:=SSD
14else
15ifeq ($(ONLINEDETECTORNAME),CPV)
16SUBDAMODULE:=CPV
17else
18ifeq ($(ONLINEDETECTORNAME),MCH)
19SUBDAMODULE:=TRK
20else
21ifeq ($(ONLINEDETECTORNAME),MTR)
22SUBDAMODULE:=TRG
23endif
24endif
25endif
26endif
27endif
28endif
29
30DANAME=$(word 2,$(subst -, ,$(subst -clean,,$(subst -rpm,,$(subst daqDA-,,$(filter daqDA-% daqDA-%-rpm daqDA-%-clean,$(MAKECMDGOALS)))))))
31
32ifneq ($(DANAME),)
33
34DATARGETNAME:=daqDA-$(ONLINEDETECTORNAME)-$(DANAME)
35
36ifeq ($(DANAME),NONAME)
37DANAME:=
35f91121 38endif
39
40ifneq ($(findstring $(DAMODULE),$(MODULES)),)
4179078a 41
1a5b20b8 42CXXFLAGS:=$(filter-out -pedantic-errors,$(CXXFLAGS))
17cb72ed 43CXXFLAGS+=-I${ALICE_ROOT}/RAW
4caead95 44CXXFLAGS+=-I${ALICE_ROOT}/$(DAMODULE)
5297a78f 45CXXFLAGS+=$(addprefix -I,$(filter-out %tgt_${ALICE_TARGET},$(patsubst %/,%,$(shell ls -d ${ALICE_ROOT}/$(DAMODULE)/*/))))
17cb72ed 46
f2d76654 47DATARGETDIR=${DAMODULE}/tgt_${ALICE_TARGET}
0c662ab2 48DASRC=${DAMODULE}/${DAMODULE}$(SUBDAMODULE)${DANAME}da.cxx
49DAOBJ=${DATARGETDIR}/${DAMODULE}$(SUBDAMODULE)${DANAME}da.o
50DADEP=${DATARGETDIR}/${DAMODULE}$(SUBDAMODULE)${DANAME}da.d
51DALIB=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET}/lib${DAMODULE}$(SUBDAMODULE)${DANAME}DA.a
52DAEXE=${ALICE_ROOT}/bin/tgt_${ALICE_TARGET}/${DAMODULE}$(SUBDAMODULE)${DANAME}da.exe
17cb72ed 53
5297a78f 54DAVERSION=$(firstword $(shell svn info $(DASRC) | grep "Last Changed Rev:" | cut -d: -f2 ))
35f91121 55
56DAROOTRELEASE=$(subst /,.,$(shell root-config --version))
f2d76654 57
5297a78f 58#DAALIROOTRELEASE=$(notdir $(subst /$(DASRC),,$(shell svn info $(DASRC) | grep "URL:" | cut -d: -f3 )))
59DAALIROOTRELEASE+=$(subst -,.,$(notdir $(subst /$(DASRC),,$(shell svn info $(DASRC) | grep "URL:" | cut -d: -f3 ))))"."$(firstword $(shell svn info $(DASRC) | grep "Revision:" | cut -d: -f2 ))
f2d76654 60
0c662ab2 61DAARCNAME=$(patsubst %-,%,daqDA-${ONLINEDETECTORNAME}-${DANAME})
62DAARC=$(DAARCNAME)-$(DAVERSION)
f2d76654 63DATAR=${DATARGETDIR}/$(DAARC).src.tar.gz
0c662ab2 64DASPECFILE=${DATARGETDIR}/$(DAMODULE)$(SUBDAMODULE)$(DANAME)da.spec
65DAMAKEFILE=${DATARGETDIR}/${DAMODULE}$(SUBDAMODULE)${DANAME}da.make
e06bd7b4 66
35f91121 67ifeq ($(DAQDALIB_PATH),)
17cb72ed 68DAQDADIR=${ALICE}/daqDAlib
35f91121 69else
70DAQDADIR=${DAQDALIB_PATH}
71endif
17cb72ed 72DAQDALIB=$(DAQDADIR)/libdaqDA.a
73
396cdc74 74ifneq ($(shell amore-config 2>&1 |grep -i usage),)
75AMOREFLAGS = -DALI_AMORE $(shell amore-config --cflags --includes)
76CXXFLAGS += $(AMOREFLAGS)
77CFLAGS += $(AMOREFLAGS)
78CINTFLAGS += $(AMOREFLAGS)
79DEPINC += $(AMOREFLAGS)
3b59469c 80AMOREDALIBS+=$(shell amore-config --auxlibs)
81else
82AMOREDALIBS=
396cdc74 83endif
84
17cb72ed 85ROOTLIBDIR=$(shell root-config --libdir)
86
84195f62 87SYSLIBS=-ldl -lpthread
e06bd7b4 88
17cb72ed 89MONITORLIBS=$(shell date-config --monitorlibs=noshift)
90
9c678667 91ALIROOTALIBS=$(RAWDatabaseALIB) $(RAWDatarecALIB) $(RAWDatasimALIB) $(STEERBaseALIB) $(STEERALIB) $(CDBALIB) $(ESDALIB) $(AODALIB)
17cb72ed 92
4caead95 93ALIROOTALIBS+=$($(DAMODULE)ALIBS)
17cb72ed 94
35f91121 95EXTRAROOTLIB=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET}/libRootExtra.a
17cb72ed 96
35f91121 97EXTRADAMODULE:=$(firstword $(subst /,,$(subst $(ALICE_ROOT),,$(filter-out $(ALICE_ROOT)/STEER/ $(ALICE_ROOT)/RAW/ $(ALICE_ROOT)/$(DAMODULE)% $(ALICE_ROOT)/include/,$(sort $(dir $(filter $(ALICE_ROOT)%,$(filter-out %.o:,$(filter-out %.cxx,$(filter-out \,$(shell if [ -f "${DADEP}" ]; then cat $(DADEP); fi)))))))))))
17cb72ed 98
35f91121 99ifneq ($(EXTRADAMODULE),)
100CXXFLAGS+=-I${ALICE_ROOT}/$(EXTRADAMODULE)
101CXXFLAGS+=$(addprefix -I,$(filter-out %tgt_${ALICE_TARGET},$(filter-out %CVS,$(patsubst %/,%,$(shell ls -d ${ALICE_ROOT}/$(EXTRADAMODULE)/*/)))))
102ALIROOTALIBS+=$($(EXTRADAMODULE)ALIBS)
17cb72ed 103endif
104
292ef3be 105DACONTACT=$(sort $(shell grep -i "Contact:" $(DASRC) | cut -d':' -f2))
2e9766df 106DALINKPAGE=$(sort $(subst Link:,,$(shell grep -i "Link:" $(DASRC))))
107DAREFRUN=$(sort $(shell grep -i "Reference Run:" $(DASRC) | cut -d':' -f2))
292ef3be 108DARUNTYPE=$(sort $(shell grep -i "Run Type:" $(DASRC) | cut -d':' -f2))
109DATYPE=$(sort $(shell grep -i "DA Type:" $(DASRC) | cut -d':' -f2))
110DANUMBEROFEVENTS=$(sort $(shell grep -i "Number of events needed:" $(DASRC) | cut -d':' -f2))
111DAINPUTFILES=$(sort $(shell grep -i "Input Files:" $(DASRC) | cut -d':' -f2))
112DAOUTPUTFILES=$(sort $(shell grep -i "Output Files:" $(DASRC) | cut -d':' -f2))
113DATRIGGERTYPE=$(sort $(shell grep -i "Trigger types used:" $(DASRC) | cut -d':' -f2))
114
35f91121 115$(DATARGETNAME): $(DAEXE)
116
117$(DAEXE): $(DAOBJ) $(LIBPATH) $(DALIB) $(DAQDALIB) $(EXTRAROOTLIB)
f2d76654 118 @echo "***** Making executable $(DAEXE) *****"
35f91121 119 $(MUTE)$(LD) $(LDFLAGS) -o $@ $< \
120 $(DALIB) \
121 $(EXTRAROOTLIB) \
4179078a 122 $(ROOTLIBDIR)/libRoot.a \
123 $(ROOTLIBDIR)/libfreetype.a $(ROOTLIBDIR)/libpcre.a \
3b59469c 124 $(DAQDALIB) $(MONITORLIBS) $(AMOREDALIBS) \
35f91121 125 $(SYSLIBS)
17cb72ed 126
f2d76654 127$(DAOBJ): $(DASRC) $(DAQDADIR) $(DADEP) $(DATARGETDIR)
128 @echo "***** Compiling $(DASRC) *****"
4caead95 129 $(MUTE)$(CXX) -c $(CXXFLAGS) -I$(DAQDADIR) $< -o $@
4179078a 130
f2d76654 131$(DADEP): $(DASRC) $(DAQDADIR) $(DATARGETDIR)
132 @echo "***** Making detector-algorithm dependencies $(DADEP) *****"
35f91121 133 $(MUTE)$(CPP) -MM $(CXXFLAGS) $(addprefix -I$(ALICE_ROOT)/,$(MODULES)) -I$(DAQDADIR) $< > $@
17cb72ed 134
135-include $(DADEP)
136
f2d76654 137$(DATARGETDIR):
138 $(MUTE)if [ ! -d '$@' ]; then echo "***** Making directory $@ *****"; mkdir -p $@; fi
139
17cb72ed 140$(DALIB): $(ALIROOTALIBS)
f2d76654 141 @echo "***** Linking static library $(DALIB) *****"
4caead95 142 $(MUTE)rm -rf $@
143 $(MUTE)rm -rf junk
144 $(MUTE)mkdir junk && cd junk && $(addprefix $(AR) x ../,$(addsuffix &&,$^)) $(AR) r $@ *.o && cd .. && rm -rf junk
17cb72ed 145
35f91121 146$(EXTRAROOTLIB): $(LIBPATH)
2849a133 147 $(MUTE)$(AR) r $@ `ls ${ROOTSYS}/montecarlo/vmc/src/*.o ${ROOTSYS}/tree/treeplayer/src/*.o`
35f91121 148
149$(DATARGETNAME)-clean:
0c662ab2 150 @echo "***** Cleaning $(DAMODULE)$(SUBDAMODULE)$(DANAME) detector-algorithm *****"
f2d76654 151 $(MUTE)rm -f $(DASPECFILE)
152 $(MUTE)rm -f $(DATAR)
4caead95 153 $(MUTE)rm -f $(DAEXE)
154 $(MUTE)rm -f $(DAOBJ)
155 $(MUTE)rm -f $(DADEP)
156 $(MUTE)rm -f $(DAMAKEFILE)
157 $(MUTE)rm -f $(DALIB)
158 $(MUTE)rm -f $(ALIROOTALIBS)
35f91121 159 $(MUTE)rm -f $(EXTRAROOTLIB)
17cb72ed 160
f2d76654 161$(DAMAKEFILE): $(DATARGETDIR)
35f91121 162 $(MUTE)rm -f $(DAMAKEFILE)
f2d76654 163 @echo "***** Making makefile $(DAMAKEFILE) *****"
35f91121 164 @echo "####################################################" >> $@
165 @echo "# Makefile for Detector Algorithm" >> $@
166 @echo "#" >> $@
167 @echo "# It is necessary to setup build environment before" >> $@
168 @echo "# using make:" >> $@
169 @echo "# - define path to daqDAlib (env. DAQDALIB_PATH)" >> $@
170 @echo "#" >> $@
171 @echo "####################################################" >> $@
172 @echo "" >> $@
173 @echo "CXX=$(CXX)" >> $@
174 @echo "LD=$(LD)" >> $@
175 @echo "" >> $@
176 @echo "CXXFLAGS=$(CXXFLAGS)" >> $@
177 @echo "LDFLAGS=$(LDFLAGS)" >> $@
178 @echo "" >> $@
179 @echo "ifeq (""$$""(DAQDALIB_PATH),)" >> $@
180 @echo "DAQDADIR=${ALICE}/daqDAlib" >> $@
181 @echo "else" >> $@
182 @echo "DAQDADIR=""$$""(DAQDALIB_PATH)" >> $@
183 @echo "endif" >> $@
184 @echo "" >> $@
e06bd7b4 185 @echo "DAQDALIB=""$$""(DAQDADIR)/libdaqDA.a" >> $@
3b59469c 186 @echo "AMOREDALIBS=""$$""(shell amore-config --auxlibs)" >> $@
e06bd7b4 187 @echo "MONITORLIBS=""$$""(shell date-config --monitorlibs=noshift)" >> $@
35f91121 188 @echo "" >> $@
0c662ab2 189 @echo "${DAMODULE}${SUBDAMODULE}${DANAME}da.exe: ${DAMODULE}${SUBDAMODULE}${DANAME}da.o" >> $@
35f91121 190 @echo " ""$$""(LD) ""$$""(LDFLAGS) -o ""$$""@ ""$$""< \\" >> $@
191 @echo " $(DALIB) \\" >> $@
192 @echo " $(EXTRAROOTLIB) \\" >> $@
193 @echo " ""$$""(ROOTSYS)/lib/libRoot.a \\" >> $@
194 @echo " ""$$""(ROOTSYS)/lib/libfreetype.a ""$$""(ROOTSYS)/lib/libpcre.a \\" >> $@
3b59469c 195 @echo " ""$$""(DAQDALIB) ""$$""(MONITORLIBS) ""$$""(AMOREDALIBS) \\" >> $@
35f91121 196 @echo " $(SYSLIBS)" >> $@
197 @echo "" >> $@
0c662ab2 198 @echo "${DAMODULE}${SUBDAMODULE}${DANAME}da.o: ${DAMODULE}${SUBDAMODULE}${DANAME}da.cxx" >> $@
e06bd7b4 199 @echo " ""$$""(CXX) -c ""$$""(CXXFLAGS) -I""$$""(DAQDADIR) ""$$""< -o ""$$""@" >> $@
35f91121 200 @echo "" >> $@
e06bd7b4 201 @echo "clean:" >> $@
0c662ab2 202 @echo " @rm -f ${DAMODULE}${SUBDAMODULE}${DANAME}da.exe ${DAMODULE}${SUBDAMODULE}${DANAME}da.o" >> $@
35f91121 203 @echo "" >> $@
0c662ab2 204 @echo "install: ${DAMODULE}${SUBDAMODULE}${DANAME}da.exe" >> $@
f2d76654 205 @echo " @if [ '""$$""(INSTALL_PATH)' == '' ]; then \\" >> $@
206 @echo " echo Environment variable INSTALL_PATH undefined, cannot continue; \\" >> $@
207 @echo " exit 1; \\" >> $@
208 @echo " fi" >> $@
0c662ab2 209 @echo " @cp -p ${DAMODULE}${SUBDAMODULE}${DANAME}da.exe ""$$""(INSTALL_PATH)" >> $@
f2d76654 210
35f91121 211$(DATAR): $(DASRC) $(DAMAKEFILE) $(DASPECFILE)
f2d76654 212 @echo "***** Making archive $(DATAR) *****"
213 $(MUTE)rm -rf $(DATAR)
4caead95 214 $(MUTE)rm -rf junk
35f91121 215 $(MUTE)mkdir junk && mkdir junk/$(DAARC) && \
216 cp -a $(DASRC) junk/$(DAARC) && \
f2d76654 217 cp -a $(DAMAKEFILE) junk/$(DAARC)/Makefile && \
0c662ab2 218 cp -a $(DASPECFILE) junk/$(DAARC)/$(DAMODULE)${SUBDAMODULE}$(DANAME)da.spec && \
17cb72ed 219 cd junk && \
f2d76654 220 tar czf ../$(DATAR) * && \
17cb72ed 221 cd .. && rm -rf junk
4179078a 222
f2d76654 223$(DASPECFILE): $(DATARGETDIR)
35f91121 224 $(MUTE)rm -f $(DASPECFILE)
f2d76654 225 @echo "***** Making RPM spec-file $(DASPECFILE) *****"
0c662ab2 226 @echo "# RPM specfile for $(DAMODULE)${SUBDAMODULE}$(DANAME) Detector Algorithm" >> $@
227 @echo "Summary: $(ONLINEDETECTORNAME) Detector Algorithm" >> $@
228 @echo "Name: $(DAARCNAME)" >> $@
f2d76654 229 @echo "Version: $(DAVERSION)" >> $@
0c662ab2 230 @echo "Release: $(DAALIROOTRELEASE)" >> $@
f2d76654 231 @echo "Copyright: CERN Alice DAQ/Offine" >> $@
232 @echo "Source: %{name}-%{version}.src.tar.gz" >> $@
233 @echo "Group: Applications/Alice" >> $@
234 @echo "Prefix: /opt/%{name}" >> $@
235 @echo "BuildRoot: %{_tmppath}/%{name}-root" >> $@
236 @echo "" >> $@
237 @echo "# automatic dependencies" >> $@
238 @echo "AutoReqProv: yes" >> $@
239 @echo "" >> $@
240 @echo "# list here required RPM packages for compilation" >> $@
241 @echo "BuildRequires: date" >> $@
242 @echo "" >> $@
243 @echo "# list here required RPM packages for runtime" >> $@
244 @echo "Requires: date" >> $@
245 @echo "" >> $@
246 @echo "# You can specify other dependencies in the description tag below." >> $@
247 @echo "" >> $@
248 @echo "# description of the package" >> $@
249 @echo "%description" >> $@
0c662ab2 250 @echo "This is the $(ONLINEDETECTORNAME) $(DANAME) DA for online calibration." >> $@
35f91121 251 @echo "It uses data from $(DAMODULE) and $(EXTRADAMODULE) detectors at run time." >> $@
252 @echo "Build requires: daqDAlib, date, AliRoot $(DAALIROOTRELEASE), ROOT $(DAROOTRELEASE)." >> $@
253 @echo "Runtime requires: date." >> $@
292ef3be 254 @echo "Contact: $(DACONTACT)" >> $@
255 @echo "Link: $(DALINKPAGE)" >> $@
2e9766df 256 @echo "Reference Run: $(DAREFRUN)" >> $@
292ef3be 257 @echo "Run type: $(DARUNTYPE)" >> $@
258 @echo "DA type: $(DATYPE)" >> $@
259 @echo "Number of events needed: $(DANUMBEROFEVENTS)" >> $@
260 @echo "Input files: $(DAINPUTFILES)" >> $@
261 @echo "Output files: $(DAOUTPUTFILES)" >> $@
262 @echo "Trigger types used: $(DATRIGGERTYPE)" >> $@
f2d76654 263 @echo "" >> $@
264 @echo "#################################################################" >> $@
265 @echo "# Do not modify following scripts" >> $@
266 @echo "#################################################################" >> $@
267 @echo "" >> $@
268 @echo "# here is defined the installation root directory" >> $@
269 @echo "%define pkgname %{name}-%{version}" >> $@
270 @echo "%define destdir %{prefix}" >> $@
271 @echo "" >> $@
272 @echo "# pre-compilation script: extract from tarball" >> $@
273 @echo "%prep" >> $@
274 @echo "# extract archive" >> $@
275 @echo "%setup -n %{pkgname}" >> $@
276 @echo "" >> $@
277 @echo "# compile" >> $@
278 @echo "%build" >> $@
279 @echo "export DATE_SITE=" >> $@
280 @echo ". /date/setup.sh" >> $@
281 @echo "gmake" >> $@
282 @echo "" >> $@
283 @echo "# install runtime files" >> $@
284 @echo "%install" >> $@
285 @echo "#remove install dir if existing" >> $@
286 @echo "[ -d ""$$""RPM_BUILD_ROOT ] && rm -rf ""$$""RPM_BUILD_ROOT" >> $@
287 @echo "#make install in install root directory" >> $@
288 @echo "mkdir -p ""$$""RPM_BUILD_ROOT/%{prefix}" >> $@
289 @echo "make install INSTALL_PATH=""$$""RPM_BUILD_ROOT/%{prefix}" >> $@
290 @echo "" >> $@
291 @echo "# clean RPM build files" >> $@
292 @echo "%clean" >> $@
f2d76654 293 @echo "# remove installed files" >> $@
294 @echo "rm -rf ""$$""RPM_BUILD_ROOT" >> $@
0bc0c8b0 295 @echo "# remove source files" >> $@
296 @echo "rm -rf ""$$""RPM_BUILD_DIR/%{pkgname}" >> $@
f2d76654 297 @echo "" >> $@
298 @echo "# pre-install script" >> $@
299 @echo "%pre" >> $@
300 @echo "" >> $@
301 @echo "# list of files to be installed" >> $@
302 @echo "%files" >> $@
303 @echo "%defattr (-,root,root)" >> $@
304 @echo "%{destdir}" >> $@
305 @echo "" >> $@
306 @echo "# post-install script" >> $@
307 @echo "# launched after rpm installed" >> $@
308 @echo "%post" >> $@
309 @echo "" >> $@
310 @echo "# post-uninstall script" >> $@
311 @echo "# launched after rpm removed" >> $@
312 @echo "%postun" >> $@
313
35f91121 314$(DATARGETNAME)-rpm: $(DATAR) $(DASPECFILE) $(DALIB) $(DADEP) $(EXTRAROOTLIB)
0c662ab2 315 @echo "***** Making RPMS for $(DAMODULE)$(SUBDAMODULE)$(DANAME) detector-algorithm *****"
f2d76654 316 $(MUTE)rm -rf junk
317 $(MUTE)mkdir -p junk/SOURCES junk/SPECS junk/BUILD junk/RPMS junk/SRPMS
318 $(MUTE)cp $(DATAR) junk/SOURCES
35f91121 319 $(MUTE)rpmbuild --quiet --define "_topdir $(ALICE_ROOT)/junk" --nodeps -bb $(DASPECFILE)
f2d76654 320 $(MUTE)find junk/ -name "$(DAARC)-*.rpm" -exec cp -p {} . \;
321 $(MUTE)rm -rf junk
322 @echo "***** RPMS created and put $(ALICE_ROOT) folder *****"
323
4179078a 324else
325
35f91121 326$(DATARGETNAME): $(DATARGETNAME)-clean
feddbf46 327$(DATARGETNAME)-clean: $(DATARGETNAME)-rpm
35f91121 328$(DATARGETNAME)-rpm:
4179078a 329 @echo
35f91121 330 @echo "*******************************************************************************************************"
331 @echo "* In order to build a detector-algorithm package you have run AliRoot make with the following syntax: *"
02a4345b 332 @echo "* For example: make daqDA-TPC (compiles and link all the TPC DAs and produces the corresponding DA *"
f851a9ee 333 @echo "* executables) *"
02a4345b 334 @echo "* make daqDA-MCH (MCH is the online code for MUON TRK detector. *"
335 @echo "* this target will compile and link MUON/MUONTRKda.cxx and will *"
336 @echo "* produce MUONTRKda.exe) *"
feddbf46 337 @echo "* In case you want to build the corresponding DA binary RPM, you have to add -rpm to your target name,*"
338 @echo "* for example: *"
02a4345b 339 @echo "* make daqDA-TOF-rpm (compiles, links TOF/TOFda.cxx and builds the TOF DA binary RPM) *"
340 @echo "* make daqDA-SPD-rpm (compiles, link ITS/ITSSPDda.cxx and builds ITS SPD DA binary RPM) *"
341 @echo "* For more details about the DA targets, please refer to: *"
342 @echo "* http://aliceinfo.cern.ch/static/people/cheshkov/da-packaging/ *"
35f91121 343 @echo "*******************************************************************************************************"
4179078a 344 @echo
345
4179078a 346endif
0c662ab2 347
348else
349
f851a9ee 350ifneq ($(findstring $(DAMODULE),$(MODULES)),)
351
0c662ab2 352DAMODULEALLTARGETS:=$(notdir $(wildcard $(DAMODULE)/$(DAMODULE)$(SUBDAMODULE)*da.cxx))
353
354daqDA-$(ONLINEDETECTORNAME): $(DAMODULEALLTARGETS)
355 @echo "***** All available detector-algorithms for $(ONLINEDETECTORNAME) have been built *****"
356
357%da.cxx:
358 $(MUTE)make $(patsubst %-,%-NONAME,$(addprefix daqDA-,$(subst $(DAMODULE)$(SUBDAMODULE),$(ONLINEDETECTORNAME)-,$(subst da.cxx,,$@))))
359
360daqDA-$(ONLINEDETECTORNAME)-rpm: $(addsuffix -rpm,$(DAMODULEALLTARGETS))
361 @echo "***** All available detector-algorithm RPMs for $(ONLINEDETECTORNAME) have been built *****"
362
363%da.cxx-rpm:
364 $(MUTE)make $(subst --,-NONAME-,$(addsuffix -rpm,$(addprefix daqDA-,$(subst $(DAMODULE)$(SUBDAMODULE),$(ONLINEDETECTORNAME)-,$(subst da.cxx-rpm,,$@)))))
365
366daqDA-$(ONLINEDETECTORNAME)-clean: $(addsuffix -clean,$(DAMODULEALLTARGETS))
367 @echo "***** All available detector-algorithms for $(ONLINEDETECTORNAME) have been cleaned *****"
368
369%da.cxx-clean:
370 $(MUTE)make $(subst --,-NONAME-,$(addsuffix -clean,$(addprefix daqDA-,$(subst $(DAMODULE)$(SUBDAMODULE),$(ONLINEDETECTORNAME)-,$(subst da.cxx-clean,,$@)))))
371
f851a9ee 372else
373
374daqDA-$(ONLINEDETECTORNAME): daqDA-$(ONLINEDETECTORNAME)-rpm
375daqDA-$(ONLINEDETECTORNAME)-rpm: daqDA-$(ONLINEDETECTORNAME)-clean
376daqDA-$(ONLINEDETECTORNAME)-clean:
377 @echo
378 @echo "========================================================================================================================="
379 @echo " $(ONLINEDETECTORNAME) is not a valid online detector code. "
380 @echo " The list of the valid codes is SPD SDD SSD TPC TRD TOF HMP PHS CPV PMD MCH MTR FMD T00 V00 ZDC ACO TRI EMC HLT TST GRP "
381 @echo "========================================================================================================================="
382 @echo
383
384endif
385
0c662ab2 386endif