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