]> git.uio.no Git - u/mrichter/AliRoot.git/blame - Makefile
Correct and clean the vertex retrieval in case of SE or ME analysis
[u/mrichter/AliRoot.git] / Makefile
CommitLineData
b9d0a01d 1# Top level Makefile for AliRoot System
2#
3# Author: Jan-Erik Revsbech (revsbech@fys.ku.dk)
4# Developed on idea of Boris Polichtchouk (Boris.Polichtchouk@cern.ch), 15/4/2001
fe4da5cc 5
462ee303 6# /* $Id$ */
fe4da5cc 7
b9d0a01d 8ifdef ALIVERBOSE
9MUTE:=
10else
11MUTE:=@
12endif
fe4da5cc 13
8d7652bd 14CLEAN=$(findstring clean,$(MAKECMDGOALS))
bdfb9593 15
462ee303 16#-------------------------------------------------------------------------------
b9d0a01d 17# IRST coding rule check
462ee303 18
b9d0a01d 19IRST_INSTALLDIR=$(ALICE)/local/IRST
50a3b0ee 20IRST_CONFIG_DIR=$(IRST_INSTALLDIR)/userConfig/ALICE
b9d0a01d 21CLASSPATH=$(IRST_INSTALLDIR)
50a3b0ee 22export CLASSPATH IRST_INSTALLDIR IRST_CONFIG_DIR
b9d0a01d 23CODE_CHECK=java rules.ALICE.ALICERuleChecker
24REV_ENG=$(IRST_INSTALLDIR)/scripts/revEng.sh
fe4da5cc 25
67f2eee7 26SMELL_DETECTOR_DIR=$(IRST_INSTALLDIR)/smell-detector
118c0ae6 27
9be1be4e 28#-------------------------------------------------------------------------------
29# The compilers
ae92cd6c 30CXX := $(shell root-config --cxx)
31F77 := $(shell root-config --f77)
32CC := $(shell root-config --cc)
118c0ae6 33
d76d4136 34CXXWARN =
35
462ee303 36#-------------------------------------------------------------------------------
37# Include machine dependent macros
fe4da5cc 38
b9d0a01d 39-include build/Makefile.$(ALICE_TARGET)
fe4da5cc 40
462ee303 41#-------------------------------------------------------------------------------
42# Check if called with debug
42865053 43
b9d0a01d 44ifeq ($(ALIDEBUG),YES)
b934f194 45override ALICE_TARGET := $(ALICE_TARGET)DEBUG
46FFLAGS := -g $(filter-out -O%,$(FFLAGS))
4448d4ac 47CXXFLAGS := -g $(filter-out -O%,$(CXXFLAGS))
48CFLAGS := -g $(filter-out -O%,$(CFLAGS))
b934f194 49SOFLAGS := -g $(filter-out -O%,$(SOFLAGS))
50LDFLAGS := -g $(filter-out -O%,$(LDFLAGS))
b9d0a01d 51endif
fe4da5cc 52
462ee303 53#-------------------------------------------------------------------------------
54# Check if called with profile
2d8cad5a 55
56ifeq ($(ALIPROFILE),YES)
b934f194 57override ALICE_TARGET := $(ALICE_TARGET)PROF
58FFLAGS += -pg
2d8cad5a 59CXXFLAGS += -pg
b934f194 60CFLAGS += -pg
61SOFLAGS += -pg
62LDFLAGS += -pg
2d8cad5a 63endif
2d8cad5a 64
462ee303 65#-------------------------------------------------------------------------------
66# Check if DATE is installed
b8f3fa00 67
72d18508 68ifeq ($(shell which date-config 2>/dev/null),)
314ddc6c 69DATEFLAGS := -D$(shell uname) -DDATE_SYS=$(shell uname) -Dlong32='int' \
e506ace2 70 -Dlong64='long long' -DdatePointer='long'
72d18508 71DMONLIBS :=
72else
73DATEFLAGS := -DALI_DATE $(shell date-config --cflags | tr \" \')
74DMONLIBS := $(shell date-config --monitorlibs)
75endif
e506ace2 76CXXFLAGS += $(DATEFLAGS)
77CFLAGS += $(DATEFLAGS)
78CINTFLAGS += $(DATEFLAGS)
b934f194 79DEPINC += $(DATEFLAGS)
0a1aa611 80
d76d4136 81#-------------------------------------------------------------------------------
82# Add warning flags if any
83
84ifneq ($(ALICXXWARN),no)
85CXXFLAGS += $(CXXWARN)
86endif
87
49e7d912 88#-------------------------------------------------------------------------------
89# ROOT Stuff
90ROOTCONFIG := root-config
91ROOTLIBDIR := $(shell $(ROOTCONFIG) --libdir)
92ROOTPLUGDIR := $(ROOTLIBDIR)/$(dir $(shell $(ROOTCONFIG) --version))
93ROOTINCDIR := $(shell $(ROOTCONFIG) --incdir)
94ROOTCLIBS := $(shell $(ROOTCONFIG) --glibs) \
95 -lThread \
96 -lMinuit \
97 -lVMC \
98 -lEG \
99 -lGeom \
100 -lTreePlayer \
101 -lXMLIO \
1f943cd9 102 -lXMLParser \
49e7d912 103 -lProof \
104 -lProofPlayer \
105 -lMLP \
106 -lSpectrum \
107 -L$(ROOTPLUGDIR)
8b13487a 108CHECKALIEN := $(shell root-config --has-alien)
109CHECKXML := $(shell root-config --has-xml)
49e7d912 110
e44bc3df 111#-------------------------------------------------------------------------------
112# Location where to install libraries and binaries and common header files
113
114LIBPATH := lib/tgt_$(ALICE_TARGET)
115BINPATH := bin/tgt_$(ALICE_TARGET)
116EXPORTDIR := $(ALICE_ROOT)/include
117BINLIBDIRS := -L$(ALICE_ROOT)/$(LIBPATH)
118
462ee303 119#-------------------------------------------------------------------------------
120# Modules to build
fe4da5cc 121
e3642d02 122ifeq (ALIVERBOSE,2)
462ee303 123$(warning MAKECMDGOALS=$(MAKECMDGOALS))
124endif
fe4da5cc 125
b934f194 126ALIROOTMODULES := STEER PHOS TRD TPC ZDC MUON PMD FMD TOF ITS \
0850b27f 127 ACORDE HMPID T0 BCM STRUCT EVGEN RALICE VZERO \
7dd2cbe4 128 THijing THbtp EMCAL \
ae675276 129 THerwig TEPEMGEN FASTSIM TPHIC RAW MONITOR ANALYSIS \
0b35d932 130 JETAN HLT LHC ESDCheck STAT TTherminator CORRFW DPMJET TDPMjet \
b48d2542 131 PWG0 PWG1 PWG2 PWG3 PWG4 TRIGGER
8db084d0 132
fb1102ea 133# Additional generators
134ALIROOTMODULES += TUHKMgen
135ALIROOTMODULES += EPOS
136
49e7d912 137ifneq ($(shell $(ROOTCONFIG) --has-pythia8), no)
03229d48 138ALIROOTMODULES += PYTHIA8
139endif
140
49e7d912 141ifneq ($(shell $(ROOTCONFIG) --has-opengl), no)
3b85abd6 142ALIROOTMODULES += EVE
8db084d0 143endif
41f6cf69 144
b9d0a01d 145ifeq ($(findstring TFluka,$(MAKECMDGOALS)),TFluka)
462ee303 146ALIROOTMODULES += TFluka
b9d0a01d 147endif
148
c376a06a 149ifeq ($(findstring THydjet,$(MAKECMDGOALS)),THydjet)
150ALIROOTMODULES += THydjet
151endif
152
18d2e4ee 153ifeq ($(findstring SHUTTLE,$(MAKECMDGOALS)),SHUTTLE)
154ALIROOTMODULES += SHUTTLE
155endif
156
8db084d0 157CERNMODULES := LHAPDF HIJING MICROCERN HERWIG
49e7d912 158ifneq ($(wildcard $(ROOTINCDIR)/TPythia6.h),)
8db084d0 159CERNMODULES += PYTHIA6
160endif
b9d0a01d 161
462ee303 162MODULES := $(ALIROOTMODULES) $(CERNMODULES) ALIROOT
b9d0a01d 163
164MODDIRS := $(MODULES)
165
462ee303 166#-------------------------------------------------------------------------------
167# Default include dirs for C++, Fortran, Cint, and dependencies
168# The module directory will be added by each module
b9d0a01d 169
fd334c7b 170GENINC := -I$(ALICE_ROOT)/include -isystem$(shell root-config --incdir)
72d18508 171RCFLAGS := $(shell root-config --auxcflags)
ae92cd6c 172RLFLAGS := $(shell root-config --ldflags)
173CXXFLAGS += $(GENINC) $(RCFLAGS)
72d18508 174CXXFLAGSNO += $(GENINC) $(RCFLAGS) -Wno-write-strings
ae92cd6c 175CFLAGS += $(GENINC) $(RCFLAGS)
176CINTFLAGS += $(GENINC) $(RCFLAGS)
177FFLAGS += $(RCFLAGS)
178LDFLAGS += $(RLFLAGS)
179SOFLAGS += $(RLFLAGS)
19ca05d1 180DEPINC += $(GENINC)
b9d0a01d 181
462ee303 182#-------------------------------------------------------------------------------
183# Libraries to link binaries against
184# Libraries will be linked against SHLIB
de6c7cfd 185# ROOT libraries
186
de6c7cfd 187ALILIBS := -L$(LIBDIR) -lMUON -lTPC -lPMD -lTRD -lFMD -lTOF \
b384f8a4 188 -lITS -lPHOS -lACORDE -lHMPID -lVZERO -lZDC -lSTRUCT \
b48d2542 189 -lT0 -lEVGEN -lSTEER -lTRIGGER
de6c7cfd 190
191LIBS := $(ROOTCLIBS) $(ROOTPLIBS) $(SYSLIBS)
b9d0a01d 192
6635aec0 193ARVERSIONFILE := $(EXPORTDIR)/ARVersion.h
9da71557 194SVNREV := $(strip $(shell LANG=C LANGUAGE=C svn info | grep "Last Changed Rev:" | \
49e7d912 195 cut -d: -f2 ))
d33faa69 196SVNBRANCH := $(subst //alisoft.cern.ch/AliRoot/,,$(shell svn info | grep "URL:" | cut -d: -f3 ))
6635aec0 197
462ee303 198#-------------------------------------------------------------------------------
b9d0a01d 199# default target
462ee303 200
6635aec0 201default: $(ARVERSIONFILE)
0693bbb3 202 $(MUTE)$(MAKE) aliroot
b9d0a01d 203
6635aec0 204#-------------------------------------------------------------------------------
205# Write header file with aliroot svn version and url
206
d33faa69 207$(ARVERSIONFILE): $(ALICE_ROOT)/.svn/entries $(EXPORTDIR)
6635aec0 208 $(MUTE)rm -f $(ARVERSIONFILE)
209 @echo "***** Making $(ARVERSIONFILE) *****"
210 @echo "#ifndef ALIROOT_ARVersion" >> $@
211 @echo "#define ALIROOT_ARVersion" >> $@
212 @echo "#define ALIROOT_SVN_REVISION $(SVNREV)" >> $@
213 @echo "#define ALIROOT_SVN_BRANCH \"$(SVNBRANCH)\"" >> $@
214 @echo "#endif" >> $@
462ee303 215#-------------------------------------------------------------------------------
216# Each module will add to these macros
b9d0a01d 217
218ALLLIBS :=
219ALLEXECS :=
220INCLUDEFILES :=
b934f194 221BINLIBS :=
222EXPORTFILES :=
b9d0a01d 223
462ee303 224#-------------------------------------------------------------------------------
8d7652bd 225# Dependencies of module.mk files if not cleaning
b9d0a01d 226
8ef0bd93 227ifeq ($(CLEAN),)
b9d0a01d 228include build/module.dep
8d7652bd 229endif
b9d0a01d 230
462ee303 231#-------------------------------------------------------------------------------
232# Check if module.mk is present for the library
233
5386b933 234%.mk: build/module.tpl build/header.tpl build/clean.tpl share/alibtool
b9d0a01d 235ifndef ALIQUIET
236 @echo "***** Creating $@ file *****";
237endif
238 @share/alibtool mkmodule $(patsubst %/module.mk,%,$@) > $@;
b9d0a01d 239
462ee303 240#-------------------------------------------------------------------------------
241# If making modules, not not include anything
b9d0a01d 242
bdfb9593 243ifeq ($(findstring modules,$(MAKECMDGOALS)),)
b9d0a01d 244
462ee303 245#-------------------------------------------------------------------------------
246# Include the modules
247
b934f194 248-include $(patsubst %,%/module.mk,$(MODULES))
b9d0a01d 249
bdfb9593 250#-------------------------------------------------------------------------------
251# If cleaning, do not include dependencies or module.mk files.
252
253ifeq ($(CLEAN),)
254
462ee303 255#-------------------------------------------------------------------------------
256# Include dependencies if not making them!
b9d0a01d 257
462ee303 258ifneq ($(MAKECMDGOALS),depend)
9f1751e4 259ifneq ($(MAKECMDGOALS),)
462ee303 260
e3642d02 261ifeq (ALIVERBOSE,2)
462ee303 262$(warning INCLUDEFILES=$(INCLUDEFILES))
b9d0a01d 263endif
462ee303 264-include $(INCLUDEFILES)
b9d0a01d 265
266endif
267endif
462ee303 268endif
9f1751e4 269endif
462ee303 270
271#-------------------------------------------------------------------------------
272# Include dummy dependency file *MUST* be last includefile
b9d0a01d 273
b9d0a01d 274include build/dummy.d
b9d0a01d 275
276
462ee303 277#-------------------------------------------------------------------------------
278# Targets
b9d0a01d 279
2ea00b17 280.PHONY: alilibs aliroot makedistr clean distclean clean-all \
9f1751e4 281 htmldoc profile modules depend
b9d0a01d 282
b934f194 283modules: $(patsubst %,%/module.mk,$(MODULES))
41f6cf69 284
2d8cad5a 285ifeq ($(ALIPROFILE),YES)
3a5e5a40 286alilibs: $(LIBPATH) modules $(ALLLIBS) $(ALLALIBS)
2d8cad5a 287else
3a5e5a40 288alilibs: $(LIBPATH) modules $(ALLLIBS)
2d8cad5a 289endif
41f6cf69 290
b8205a22 291aliroot: alilibs $(BINPATH) $(ALLEXECS)
9f1751e4 292
cf5fccae 293ALIRECO.par: macros/loadlibsrec.C STEER/PROOF-INF.ALIRECO/SETUP.C
294 $(MUTE)echo "***** Creating package archive" $@ "*****"
295 $(MUTE)rm -rf ALIRECO
296 $(MUTE)mkdir -p ALIRECO/PROOF-INF
297 $(MUTE)cat $^ > ALIRECO/PROOF-INF/SETUP.C
298 (tar cfzh $@ ALIRECO 2> /dev/null && echo "Package archive" $@ "created in" $(PWD)/$@) || (tar cfzh /tmp/$@ ALIRECO 2> /dev/null && echo "Package archive" $@ "created in /tmp/"$@)
299 $(MUTE)rm -rf ALIRECO
300
9be2a0b4 301ROOTALIBDIR:=$(shell root-config --libdir)
a6e3afe8 302
913d9052 303ALIMDCSPECFILE=$(RAWDIRO)/alimdc.spec
304ALIMDCVERSION=$(subst -,.,$(notdir $(subst /RAW/mdc.h,,$(shell svn info RAW/mdc.h | grep "URL:" | cut -d: -f3 ))))
305ALIMDCRELEASE=$(firstword $(shell svn info RAW/mdc.h | grep "Revision:" | cut -d: -f2 ))
306
307alimdc-rpm: alimdc-static alimdc-specfile
99102ed0 308 $(MUTE)rm -rf alimdc-root
309 $(MUTE)mkdir -p alimdc-root/opt/alimdc/lib
310 $(MUTE)mkdir -p alimdc-root/opt/alimdc/include
311 $(MUTE)cp RAW/mdc.h alimdc-root/opt/alimdc/include
312 $(MUTE)cp $(LIBPATH)/libAliMDC.a \
313 $(ROOTALIBDIR)/libRoot.a \
314 $(ROOTALIBDIR)/libfreetype.a $(ROOTALIBDIR)/libpcre.a \
315 alimdc-root/opt/alimdc/lib
316 $(MUTE)rm -rf RPMS
6603b075 317 $(MUTE)case `uname -m` in \
318 i?86*) ALIMDCARCHDIR=i386;;\
319 ia64*) ALIMDCARCHDIR=ia64;;\
320 x86_64*) ALIMDCARCHDIR=x86_64;;\
321 *) echo "Unknown architecture: `uname -m`"; exit 1;;\
322 esac; \
323 mkdir -p RPMS/$$ALIMDCARCHDIR; \
324 rpmbuild --verbose --define "_topdir $(ALICE_ROOT)" --define "_tmppath $(ALICE_ROOT)" -bb $(ALIMDCSPECFILE); \
325 cp -p RPMS/$$ALIMDCARCHDIR/alimdc-*.rpm .;
99102ed0 326 $(MUTE)rm -rf alimdc-root
327 $(MUTE)rm -rf RPMS
328 @echo "***** alimdc RPM created and put $(ALICE_ROOT) folder *****"
329
913d9052 330alimdc-specfile: $(RAWDIRO)
331 $(MUTE)rm -rf $(ALIMDCSPECFILE)
332 @echo "***** Making alimdc RPM spec-file $(ALIMDCSPECFILE) *****"
333 @echo "# RPM specfile for alimdc static libs" >> $(ALIMDCSPECFILE)
334 @echo "# Package contains both ROOT and AliRoot" >> $(ALIMDCSPECFILE)
335 @echo "# static libs needed by mStreamRecorder" >> $(ALIMDCSPECFILE)
336 @echo "# in order to ROOT-ify the incoming raw" >> $(ALIMDCSPECFILE)
337 @echo "# data" >> $(ALIMDCSPECFILE)
338 @echo "# Example how-to build alimdc RPM:" >> $(ALIMDCSPECFILE)
339 @echo "# cd $ALICE_ROOT" >> $(ALIMDCSPECFILE)
340 @echo "# make alimdc-rpm" >> $(ALIMDCSPECFILE)
341 @echo "" >> $(ALIMDCSPECFILE)
342 @echo "Summary: AliMDC static libraries" >> $(ALIMDCSPECFILE)
343 @echo "Name: alimdc" >> $(ALIMDCSPECFILE)
344 @echo "Version: $(ALIMDCVERSION)" >> $(ALIMDCSPECFILE)
345 @echo "Release: $(ALIMDCRELEASE)" >> $(ALIMDCSPECFILE)
346 @echo "# Copyright: CERN Alice Off-line" >> $(ALIMDCSPECFILE)
347 @echo "License: CERN Alice Off-line" >> $(ALIMDCSPECFILE)
348 @echo "Vendor: ALICE Core Off-line Group" >> $(ALIMDCSPECFILE)
349 @echo "URL: http://aliceinfo.cern.ch" >> $(ALIMDCSPECFILE)
350 @echo "Group: Applications/Alice" >> $(ALIMDCSPECFILE)
351 @echo "Prefix: /opt/%{name}" >> $(ALIMDCSPECFILE)
352 @echo "BuildRoot: %{_tmppath}/%{name}-root" >> $(ALIMDCSPECFILE)
353 @echo "" >> $(ALIMDCSPECFILE)
354 @echo "# automatic dependencies" >> $(ALIMDCSPECFILE)
355 @echo "AutoReqProv: yes" >> $(ALIMDCSPECFILE)
356 @echo "" >> $(ALIMDCSPECFILE)
357 @echo "# list here required RPM packages for runtime" >> $(ALIMDCSPECFILE)
358 @echo "Requires: glibc" >> $(ALIMDCSPECFILE)
359 @echo "" >> $(ALIMDCSPECFILE)
360 @echo "Provides: alimdc" >> $(ALIMDCSPECFILE)
361 @echo "" >> $(ALIMDCSPECFILE)
362 @echo "# description of the package" >> $(ALIMDCSPECFILE)
363 @echo "%description" >> $(ALIMDCSPECFILE)
364 @echo "Package contains both ROOT and AliRoot" >> $(ALIMDCSPECFILE)
365 @echo "static libs needed by mStreamRecorder" >> $(ALIMDCSPECFILE)
366 @echo "in order to ROOT-ify the incoming raw" >> $(ALIMDCSPECFILE)
367 @echo "data. The package version correspond to" >> $(ALIMDCSPECFILE)
368 @echo "the AliRoot one." >> $(ALIMDCSPECFILE)
369 @echo "" >> $(ALIMDCSPECFILE)
370 @echo "# list of files to be installed" >> $(ALIMDCSPECFILE)
371 @echo "%files" >> $(ALIMDCSPECFILE)
372 @echo "%defattr (-,root,root)" >> $(ALIMDCSPECFILE)
373 @echo "%{prefix}/lib/libAliMDC.a" >> $(ALIMDCSPECFILE)
374 @echo "%{prefix}/lib/libRoot.a" >> $(ALIMDCSPECFILE)
375 @echo "%{prefix}/lib/libpcre.a" >> $(ALIMDCSPECFILE)
376 @echo "%{prefix}/lib/libfreetype.a" >> $(ALIMDCSPECFILE)
377 @echo "%{prefix}/include/mdc.h" >> $(ALIMDCSPECFILE)
378
e66566e2 379alimdc-static: $(LIBPATH) $(BINPATH) $(RAWDatabaseALIB) $(MDCALIB) $(ESDALIB) $(STEERBaseALIB) $(alimdcCXXO)
3c1a04dc 380 $(MUTE)rm -rf $(LIBPATH)/libAliMDC.a
381 $(MUTE)rm -rf junk
e66566e2 382 mkdir junk && cd junk && ar x ../$(RAWDatabaseALIB) && ar x ../$(MDCALIB) && ar x ../$(ESDALIB) && ar x ../$(STEERBaseALIB) && ar r ../$(LIBPATH)/libAliMDC.a *.o && cd .. && rm -rf junk
a6e3afe8 383 $(LD) $(LDFLAGS) -o $(BINPATH)/alimdca $(alimdcCXXO) \
384 $(LIBPATH)/libAliMDC.a \
385 $(ROOTALIBDIR)/libRoot.a \
386 $(ROOTALIBDIR)/libfreetype.a $(ROOTALIBDIR)/libpcre.a \
28133321 387 -pthread -ldl -lcurses
5fdadcc5 388
e5f9749d 389alilibs-static: $(LIBPATH) modules $(ALLALIBS)
390
5fdadcc5 391include build/MakefileDA
392
462ee303 393#-------------------------------------------------------------------------------
b9d0a01d 394# Single Makefile "distribution": Makefile + modules + mkdepend scripts
b934f194 395makedistr: $(MODULES)
b9d0a01d 396 tar -cvf MakeDistr.tar $(patsubst %,%/*.pkg,$(MODULES)) \
b934f194 397 Makefile create build/*
41f6cf69 398
b9d0a01d 399all: aliroot
41f6cf69 400
b934f194 401depend: $(INCLUDEFILES)
41f6cf69 402
b9d0a01d 403debug:
404ifndef ALIQUIET
405 @echo "***** Entering DEBUG mode. *****"
406endif
e1f602dc 407 @(export ALIDEBUG=YES && $(MAKE) aliroot)
b934f194 408
2d8cad5a 409profile:
410ifndef ALIQUIET
411 @echo "***** Entering PROFILE mode. *****"
412endif
e1f602dc 413 @(export ALIPROFILE=YES && $(MAKE) aliroot)
b934f194 414
b9d0a01d 415$(MODULES):
416ifndef ALIQUIET
417 @echo "***** Making $@ *****"
418endif
419 @mkdir -p $@
420
421$(BINPATH):
422ifndef ALIQUIET
423 @echo "***** Making $@ *****"
424endif
425 @mkdir -p $@
426
427$(LIBPATH):
428ifndef ALIQUIET
429 @echo "***** Making $@ *****"
430endif
431 @mkdir -p $@
432
433build/dummy.d: $(EXPORTFILES)
434 @(if [ ! -f $@ ] ; then \
435 touch $@; \
436 fi)
437
438clean:
2ea00b17 439 @echo "***** No target clean, use one of these *****"
b9d0a01d 440 @echo " clean-aliroot : Clean up all aliroot libraries"
441 @echo " clean-MODULENAME : Clean everything from module MODULENAME"
442 @echo " clean-all : Cleans up everything, including cern libraires"
1aa44b64 443 @echo " distclean : Like clean-all + clean all tgt_*'s"
b934f194 444 @echo " clean-modules : Clean all module.mk files in all modules"
b9d0a01d 445 @echo " clean-libs : Clean all libraries (not object files)"
446 @echo "********************************************"
447
448clean-all: clean-modules clean-libs clean-bins
449ifndef ALIQUIET
450 @echo "***** Cleaning up everything ****"
451endif
452 $(MUTE)rm -rf $(patsubst %,%/tgt_$(ALICE_TARGET),$(MODULES))
453 $(MUTE)rm -rf $(EXPORTDIR)
454
2ea00b17 455distclean: clean-all
1aa44b64 456 $(MUTE)rm -rf */tgt_* bin lib
2ea00b17 457
462ee303 458#-------------------------------------------------------------------------------
459# This cleans only libraries that are not CERN-libraries
b9d0a01d 460
461clean-aliroot: $(patsubst %,%/module.mk,$(ALIROOTMODULES)) $(patsubst %,clean-%,$(ALIROOTMODULES))
462
7e96fcc7 463CHECKMODULES := $(MODULES)
0b5dd071 464CHECKMODULES := $(filter-out TPHIC,$(CHECKMODULES))
af4ebdd2 465CHECKMODULES := $(filter-out LHAPDF,$(CHECKMODULES))
7e96fcc7 466CHECKMODULES := $(filter-out MICROCERN,$(CHECKMODULES))
b9d0a01d 467
b934f194 468check-all: $(patsubst %,%/module.mk,$(CHECKMODULES)) $(patsubst %,check-%,$(CHECKMODULES))
b9d0a01d 469
5b0f3b29 470smell-all: $(patsubst %,%/module.mk,$(CHECKMODULES)) $(patsubst %,smell-%,$(CHECKMODULES))
471
b934f194 472reveng-all: $(patsubst %,%/module.mk,$(CHECKMODULES)) $(patsubst %,reveng-%,$(CHECKMODULES))
b9d0a01d 473
b934f194 474revdisp-all: $(patsubst %,%/module.mk,$(CHECKMODULES)) $(patsubst %,revdisp-%,$(CHECKMODULES))
b9d0a01d 475
118c0ae6 476smell-all: $(patsubst %,%/module.mk,$(CHECKMODULES)) $(patsubst %,smell-%,$(CHECKMODULES))
477
b9d0a01d 478clean-dicts:
479ifndef ALIQUIET
480 @echo "***** Cleaning up G__ files *****"
481endif
482 $(MUTE)rm -rf */tgt_$(ALICE_TARGET)/G__*
41f6cf69 483
b9d0a01d 484clean-modules:
485ifndef ALIQUIET
b945e71d 486 @echo "***** Cleaning up module.mk and temporary compilation files *****"
b9d0a01d 487endif
b934f194 488 $(MUTE)rm -rf $(patsubst %,%/module.mk,$(MODULES))
b945e71d 489 $(MUTE)rm -rf $(patsubst %,%/tgt_$(ALICE_TARGET),$(MODULES))
41f6cf69 490
b9d0a01d 491clean-depend:
492ifndef ALIQUIET
493 @echo "***** Cleaning up dependencies *****"
494endif
495 $(MUTE)echo rm `find . -name "*.d"`
496
497clean-objects:
498ifndef ALIQUIET
499 @echo "***** Cleaning up .o files *****"
500endif
501 $(MUTE)echo rm `find . -name "*.o"`
502
503clean-libs:
504ifndef ALIQUIET
505 @echo "***** Cleaning up library files *****"
506endif
507 $(MUTE)rm -rf lib/tgt_$(ALICE_TARGET)/*
508
509clean-bins:
510ifndef ALIQUIET
511 @echo "***** Cleaning up binary files *****"
512endif
513 $(MUTE)rm -rf bin/tgt_$(ALICE_TARGET)
d7a221d0 514
b934f194 515clean-check-all: $(patsubst %,%/module.mk,$(CHECKMODULES)) $(patsubst %,clean-check-%,$(CHECKMODULES))
ba546cfd 516
5b0f3b29 517clean-smell-all: $(patsubst %,%/module.mk,$(CHECKMODULES)) $(patsubst %,clean-smell-%,$(CHECKMODULES))
518
b934f194 519clean-reveng-all: $(patsubst %,%/module.mk,$(CHECKMODULES)) $(patsubst %,clean-reveng-%,$(CHECKMODULES))
ba546cfd 520
d7a221d0 521htmldoc:
522 @rm -rf html/roothtml
523 @rm -f html/picts
524 @rm -f /tmp/macros
525 @cd html ;\
526 aliroot -q -b "mkhtml.C(0,1)" ;\
527 ls ../macros/*.C > /tmp/macros ;\
528 for i in $(ALIROOTMODULES) ; do \
529 ls ../$$i/*.C 2>/dev/null >> /tmp/macros ;\
530 done ;\
531 for i in `cat /tmp/macros` ; do \
532 echo $$i ; \
533 aliroot -b -q "mkhtml.C(\"$$i\")" > /dev/null ;\
534 done ;\
535 ./makeExampleList ;
536 @ln -s ../picts html/picts
537 @ln -s ../../picts html/roothtml/picts
538 @ln -s ../../../picts html/roothtml/src/picts
539 @ln -s ../../../picts html/roothtml/examples/picts