Major update of the HFE package (comments inside the code
[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#-------------------------------------------------------------------------------
462ee303 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
bef53f4a 81#-------------------------------------------------------------------------------
d76d4136 82# Add warning flags if any
83
84ifneq ($(ALICXXWARN),no)
85CXXFLAGS += $(CXXWARN)
86endif
87
88#-------------------------------------------------------------------------------
49e7d912 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
462ee303 111#-------------------------------------------------------------------------------
e44bc3df 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
119#-------------------------------------------------------------------------------
462ee303 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
03229d48 136ALIROOTMODULES += PYTHIA8
0119ef9a 137ALIROOTMODULES += TAmpt
03229d48 138
49e7d912 139ifneq ($(shell $(ROOTCONFIG) --has-opengl), no)
3b85abd6 140ALIROOTMODULES += EVE
8db084d0 141endif
41f6cf69 142
b9d0a01d 143ifeq ($(findstring TFluka,$(MAKECMDGOALS)),TFluka)
462ee303 144ALIROOTMODULES += TFluka
b9d0a01d 145endif
146
c376a06a 147ifeq ($(findstring THydjet,$(MAKECMDGOALS)),THydjet)
148ALIROOTMODULES += THydjet
149endif
150
18d2e4ee 151ifeq ($(findstring SHUTTLE,$(MAKECMDGOALS)),SHUTTLE)
152ALIROOTMODULES += SHUTTLE
153endif
154
6ef3145f 155CERNMODULES := LHAPDF HIJING MICROCERN HERWIG
49e7d912 156ifneq ($(wildcard $(ROOTINCDIR)/TPythia6.h),)
8db084d0 157CERNMODULES += PYTHIA6
158endif
b9d0a01d 159
462ee303 160MODULES := $(ALIROOTMODULES) $(CERNMODULES) ALIROOT
b9d0a01d 161
162MODDIRS := $(MODULES)
163
462ee303 164#-------------------------------------------------------------------------------
165# Default include dirs for C++, Fortran, Cint, and dependencies
166# The module directory will be added by each module
b9d0a01d 167
fd334c7b 168GENINC := -I$(ALICE_ROOT)/include -isystem$(shell root-config --incdir)
72d18508 169RCFLAGS := $(shell root-config --auxcflags)
ae92cd6c 170RLFLAGS := $(shell root-config --ldflags)
171CXXFLAGS += $(GENINC) $(RCFLAGS)
72d18508 172CXXFLAGSNO += $(GENINC) $(RCFLAGS) -Wno-write-strings
ae92cd6c 173CFLAGS += $(GENINC) $(RCFLAGS)
174CINTFLAGS += $(GENINC) $(RCFLAGS)
175FFLAGS += $(RCFLAGS)
176LDFLAGS += $(RLFLAGS)
177SOFLAGS += $(RLFLAGS)
19ca05d1 178DEPINC += $(GENINC)
b9d0a01d 179
462ee303 180#-------------------------------------------------------------------------------
181# Libraries to link binaries against
182# Libraries will be linked against SHLIB
de6c7cfd 183# ROOT libraries
184
de6c7cfd 185ALILIBS := -L$(LIBDIR) -lMUON -lTPC -lPMD -lTRD -lFMD -lTOF \
b384f8a4 186 -lITS -lPHOS -lACORDE -lHMPID -lVZERO -lZDC -lSTRUCT \
b48d2542 187 -lT0 -lEVGEN -lSTEER -lTRIGGER
de6c7cfd 188
189LIBS := $(ROOTCLIBS) $(ROOTPLIBS) $(SYSLIBS)
b9d0a01d 190
6635aec0 191ARVERSIONFILE := $(EXPORTDIR)/ARVersion.h
9da71557 192SVNREV := $(strip $(shell LANG=C LANGUAGE=C svn info | grep "Last Changed Rev:" | \
49e7d912 193 cut -d: -f2 ))
d33faa69 194SVNBRANCH := $(subst //alisoft.cern.ch/AliRoot/,,$(shell svn info | grep "URL:" | cut -d: -f3 ))
6635aec0 195
462ee303 196#-------------------------------------------------------------------------------
b9d0a01d 197# default target
462ee303 198
6635aec0 199default: $(ARVERSIONFILE)
0693bbb3 200 $(MUTE)$(MAKE) aliroot
b9d0a01d 201
462ee303 202#-------------------------------------------------------------------------------
6635aec0 203# Write header file with aliroot svn version and url
204
d33faa69 205$(ARVERSIONFILE): $(ALICE_ROOT)/.svn/entries $(EXPORTDIR)
6635aec0 206 $(MUTE)rm -f $(ARVERSIONFILE)
207 @echo "***** Making $(ARVERSIONFILE) *****"
208 @echo "#ifndef ALIROOT_ARVersion" >> $@
209 @echo "#define ALIROOT_ARVersion" >> $@
210 @echo "#define ALIROOT_SVN_REVISION $(SVNREV)" >> $@
211 @echo "#define ALIROOT_SVN_BRANCH \"$(SVNBRANCH)\"" >> $@
212 @echo "#endif" >> $@
213#-------------------------------------------------------------------------------
462ee303 214# Each module will add to these macros
b9d0a01d 215
216ALLLIBS :=
217ALLEXECS :=
218INCLUDEFILES :=
b934f194 219BINLIBS :=
220EXPORTFILES :=
b9d0a01d 221
462ee303 222#-------------------------------------------------------------------------------
8d7652bd 223# Dependencies of module.mk files if not cleaning
b9d0a01d 224
8ef0bd93 225ifeq ($(CLEAN),)
b9d0a01d 226include build/module.dep
8d7652bd 227endif
b9d0a01d 228
462ee303 229#-------------------------------------------------------------------------------
230# Check if module.mk is present for the library
231
5386b933 232%.mk: build/module.tpl build/header.tpl build/clean.tpl share/alibtool
b9d0a01d 233ifndef ALIQUIET
234 @echo "***** Creating $@ file *****";
235endif
236 @share/alibtool mkmodule $(patsubst %/module.mk,%,$@) > $@;
b9d0a01d 237
462ee303 238#-------------------------------------------------------------------------------
462ee303 239# If making modules, not not include anything
b9d0a01d 240
bdfb9593 241ifeq ($(findstring modules,$(MAKECMDGOALS)),)
b9d0a01d 242
462ee303 243#-------------------------------------------------------------------------------
244# Include the modules
245
b934f194 246-include $(patsubst %,%/module.mk,$(MODULES))
b9d0a01d 247
462ee303 248#-------------------------------------------------------------------------------
bdfb9593 249# If cleaning, do not include dependencies or module.mk files.
250
251ifeq ($(CLEAN),)
252
253#-------------------------------------------------------------------------------
462ee303 254# Include dependencies if not making them!
b9d0a01d 255
462ee303 256ifneq ($(MAKECMDGOALS),depend)
9f1751e4 257ifneq ($(MAKECMDGOALS),)
462ee303 258
e3642d02 259ifeq (ALIVERBOSE,2)
462ee303 260$(warning INCLUDEFILES=$(INCLUDEFILES))
b9d0a01d 261endif
462ee303 262-include $(INCLUDEFILES)
b9d0a01d 263
264endif
265endif
462ee303 266endif
9f1751e4 267endif
462ee303 268
269#-------------------------------------------------------------------------------
270# Include dummy dependency file *MUST* be last includefile
b9d0a01d 271
b9d0a01d 272include build/dummy.d
b9d0a01d 273
274
462ee303 275#-------------------------------------------------------------------------------
276# Targets
b9d0a01d 277
2ea00b17 278.PHONY: alilibs aliroot makedistr clean distclean clean-all \
9f1751e4 279 htmldoc profile modules depend
b9d0a01d 280
b934f194 281modules: $(patsubst %,%/module.mk,$(MODULES))
41f6cf69 282
2d8cad5a 283ifeq ($(ALIPROFILE),YES)
3a5e5a40 284alilibs: $(LIBPATH) modules $(ALLLIBS) $(ALLALIBS)
2d8cad5a 285else
3a5e5a40 286alilibs: $(LIBPATH) modules $(ALLLIBS)
2d8cad5a 287endif
41f6cf69 288
b8205a22 289aliroot: alilibs $(BINPATH) $(ALLEXECS)
9f1751e4 290
cf5fccae 291ALIRECO.par: macros/loadlibsrec.C STEER/PROOF-INF.ALIRECO/SETUP.C
292 $(MUTE)echo "***** Creating package archive" $@ "*****"
293 $(MUTE)rm -rf ALIRECO
294 $(MUTE)mkdir -p ALIRECO/PROOF-INF
295 $(MUTE)cat $^ > ALIRECO/PROOF-INF/SETUP.C
296 (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/"$@)
297 $(MUTE)rm -rf ALIRECO
298
9be2a0b4 299ROOTALIBDIR:=$(shell root-config --libdir)
a6e3afe8 300
913d9052 301ALIMDCSPECFILE=$(RAWDIRO)/alimdc.spec
302ALIMDCVERSION=$(subst -,.,$(notdir $(subst /RAW/mdc.h,,$(shell svn info RAW/mdc.h | grep "URL:" | cut -d: -f3 ))))
303ALIMDCRELEASE=$(firstword $(shell svn info RAW/mdc.h | grep "Revision:" | cut -d: -f2 ))
304
305alimdc-rpm: alimdc-static alimdc-specfile
99102ed0 306 $(MUTE)rm -rf alimdc-root
307 $(MUTE)mkdir -p alimdc-root/opt/alimdc/lib
308 $(MUTE)mkdir -p alimdc-root/opt/alimdc/include
309 $(MUTE)cp RAW/mdc.h alimdc-root/opt/alimdc/include
310 $(MUTE)cp $(LIBPATH)/libAliMDC.a \
311 $(ROOTALIBDIR)/libRoot.a \
312 $(ROOTALIBDIR)/libfreetype.a $(ROOTALIBDIR)/libpcre.a \
313 alimdc-root/opt/alimdc/lib
314 $(MUTE)rm -rf RPMS
6603b075 315 $(MUTE)case `uname -m` in \
316 i?86*) ALIMDCARCHDIR=i386;;\
317 ia64*) ALIMDCARCHDIR=ia64;;\
318 x86_64*) ALIMDCARCHDIR=x86_64;;\
319 *) echo "Unknown architecture: `uname -m`"; exit 1;;\
320 esac; \
321 mkdir -p RPMS/$$ALIMDCARCHDIR; \
322 rpmbuild --verbose --define "_topdir $(ALICE_ROOT)" --define "_tmppath $(ALICE_ROOT)" -bb $(ALIMDCSPECFILE); \
323 cp -p RPMS/$$ALIMDCARCHDIR/alimdc-*.rpm .;
99102ed0 324 $(MUTE)rm -rf alimdc-root
325 $(MUTE)rm -rf RPMS
326 @echo "***** alimdc RPM created and put $(ALICE_ROOT) folder *****"
327
913d9052 328alimdc-specfile: $(RAWDIRO)
329 $(MUTE)rm -rf $(ALIMDCSPECFILE)
330 @echo "***** Making alimdc RPM spec-file $(ALIMDCSPECFILE) *****"
331 @echo "# RPM specfile for alimdc static libs" >> $(ALIMDCSPECFILE)
332 @echo "# Package contains both ROOT and AliRoot" >> $(ALIMDCSPECFILE)
333 @echo "# static libs needed by mStreamRecorder" >> $(ALIMDCSPECFILE)
334 @echo "# in order to ROOT-ify the incoming raw" >> $(ALIMDCSPECFILE)
335 @echo "# data" >> $(ALIMDCSPECFILE)
336 @echo "# Example how-to build alimdc RPM:" >> $(ALIMDCSPECFILE)
337 @echo "# cd $ALICE_ROOT" >> $(ALIMDCSPECFILE)
338 @echo "# make alimdc-rpm" >> $(ALIMDCSPECFILE)
339 @echo "" >> $(ALIMDCSPECFILE)
340 @echo "Summary: AliMDC static libraries" >> $(ALIMDCSPECFILE)
341 @echo "Name: alimdc" >> $(ALIMDCSPECFILE)
342 @echo "Version: $(ALIMDCVERSION)" >> $(ALIMDCSPECFILE)
343 @echo "Release: $(ALIMDCRELEASE)" >> $(ALIMDCSPECFILE)
344 @echo "# Copyright: CERN Alice Off-line" >> $(ALIMDCSPECFILE)
345 @echo "License: CERN Alice Off-line" >> $(ALIMDCSPECFILE)
346 @echo "Vendor: ALICE Core Off-line Group" >> $(ALIMDCSPECFILE)
347 @echo "URL: http://aliceinfo.cern.ch" >> $(ALIMDCSPECFILE)
348 @echo "Group: Applications/Alice" >> $(ALIMDCSPECFILE)
349 @echo "Prefix: /opt/%{name}" >> $(ALIMDCSPECFILE)
350 @echo "BuildRoot: %{_tmppath}/%{name}-root" >> $(ALIMDCSPECFILE)
351 @echo "" >> $(ALIMDCSPECFILE)
352 @echo "# automatic dependencies" >> $(ALIMDCSPECFILE)
353 @echo "AutoReqProv: yes" >> $(ALIMDCSPECFILE)
354 @echo "" >> $(ALIMDCSPECFILE)
355 @echo "# list here required RPM packages for runtime" >> $(ALIMDCSPECFILE)
356 @echo "Requires: glibc" >> $(ALIMDCSPECFILE)
357 @echo "" >> $(ALIMDCSPECFILE)
358 @echo "Provides: alimdc" >> $(ALIMDCSPECFILE)
359 @echo "" >> $(ALIMDCSPECFILE)
360 @echo "# description of the package" >> $(ALIMDCSPECFILE)
361 @echo "%description" >> $(ALIMDCSPECFILE)
362 @echo "Package contains both ROOT and AliRoot" >> $(ALIMDCSPECFILE)
363 @echo "static libs needed by mStreamRecorder" >> $(ALIMDCSPECFILE)
364 @echo "in order to ROOT-ify the incoming raw" >> $(ALIMDCSPECFILE)
365 @echo "data. The package version correspond to" >> $(ALIMDCSPECFILE)
366 @echo "the AliRoot one." >> $(ALIMDCSPECFILE)
367 @echo "" >> $(ALIMDCSPECFILE)
368 @echo "# list of files to be installed" >> $(ALIMDCSPECFILE)
369 @echo "%files" >> $(ALIMDCSPECFILE)
370 @echo "%defattr (-,root,root)" >> $(ALIMDCSPECFILE)
371 @echo "%{prefix}/lib/libAliMDC.a" >> $(ALIMDCSPECFILE)
372 @echo "%{prefix}/lib/libRoot.a" >> $(ALIMDCSPECFILE)
373 @echo "%{prefix}/lib/libpcre.a" >> $(ALIMDCSPECFILE)
374 @echo "%{prefix}/lib/libfreetype.a" >> $(ALIMDCSPECFILE)
375 @echo "%{prefix}/include/mdc.h" >> $(ALIMDCSPECFILE)
376
e66566e2 377alimdc-static: $(LIBPATH) $(BINPATH) $(RAWDatabaseALIB) $(MDCALIB) $(ESDALIB) $(STEERBaseALIB) $(alimdcCXXO)
3c1a04dc 378 $(MUTE)rm -rf $(LIBPATH)/libAliMDC.a
379 $(MUTE)rm -rf junk
e66566e2 380 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 381 $(LD) $(LDFLAGS) -o $(BINPATH)/alimdca $(alimdcCXXO) \
382 $(LIBPATH)/libAliMDC.a \
383 $(ROOTALIBDIR)/libRoot.a \
384 $(ROOTALIBDIR)/libfreetype.a $(ROOTALIBDIR)/libpcre.a \
28133321 385 -pthread -ldl -lcurses
5fdadcc5 386
e5f9749d 387alilibs-static: $(LIBPATH) modules $(ALLALIBS)
388
5fdadcc5 389include build/MakefileDA
390
462ee303 391#-------------------------------------------------------------------------------
b9d0a01d 392# Single Makefile "distribution": Makefile + modules + mkdepend scripts
b934f194 393makedistr: $(MODULES)
b9d0a01d 394 tar -cvf MakeDistr.tar $(patsubst %,%/*.pkg,$(MODULES)) \
b934f194 395 Makefile create build/*
41f6cf69 396
b9d0a01d 397all: aliroot
41f6cf69 398
b934f194 399depend: $(INCLUDEFILES)
41f6cf69 400
b9d0a01d 401debug:
402ifndef ALIQUIET
403 @echo "***** Entering DEBUG mode. *****"
404endif
e1f602dc 405 @(export ALIDEBUG=YES && $(MAKE) aliroot)
b934f194 406
2d8cad5a 407profile:
408ifndef ALIQUIET
409 @echo "***** Entering PROFILE mode. *****"
410endif
e1f602dc 411 @(export ALIPROFILE=YES && $(MAKE) aliroot)
b934f194 412
b9d0a01d 413$(MODULES):
414ifndef ALIQUIET
415 @echo "***** Making $@ *****"
416endif
417 @mkdir -p $@
418
419$(BINPATH):
420ifndef ALIQUIET
421 @echo "***** Making $@ *****"
422endif
423 @mkdir -p $@
424
425$(LIBPATH):
426ifndef ALIQUIET
427 @echo "***** Making $@ *****"
428endif
429 @mkdir -p $@
430
431build/dummy.d: $(EXPORTFILES)
432 @(if [ ! -f $@ ] ; then \
433 touch $@; \
434 fi)
435
436clean:
2ea00b17 437 @echo "***** No target clean, use one of these *****"
b9d0a01d 438 @echo " clean-aliroot : Clean up all aliroot libraries"
439 @echo " clean-MODULENAME : Clean everything from module MODULENAME"
440 @echo " clean-all : Cleans up everything, including cern libraires"
1aa44b64 441 @echo " distclean : Like clean-all + clean all tgt_*'s"
b934f194 442 @echo " clean-modules : Clean all module.mk files in all modules"
b9d0a01d 443 @echo " clean-libs : Clean all libraries (not object files)"
444 @echo "********************************************"
445
446clean-all: clean-modules clean-libs clean-bins
447ifndef ALIQUIET
448 @echo "***** Cleaning up everything ****"
449endif
450 $(MUTE)rm -rf $(patsubst %,%/tgt_$(ALICE_TARGET),$(MODULES))
451 $(MUTE)rm -rf $(EXPORTDIR)
452
2ea00b17 453distclean: clean-all
1aa44b64 454 $(MUTE)rm -rf */tgt_* bin lib
2ea00b17 455
462ee303 456#-------------------------------------------------------------------------------
457# This cleans only libraries that are not CERN-libraries
b9d0a01d 458
459clean-aliroot: $(patsubst %,%/module.mk,$(ALIROOTMODULES)) $(patsubst %,clean-%,$(ALIROOTMODULES))
460
7e96fcc7 461CHECKMODULES := $(MODULES)
0b5dd071 462CHECKMODULES := $(filter-out TPHIC,$(CHECKMODULES))
af4ebdd2 463CHECKMODULES := $(filter-out LHAPDF,$(CHECKMODULES))
7e96fcc7 464CHECKMODULES := $(filter-out MICROCERN,$(CHECKMODULES))
b9d0a01d 465
b934f194 466check-all: $(patsubst %,%/module.mk,$(CHECKMODULES)) $(patsubst %,check-%,$(CHECKMODULES))
b9d0a01d 467
5b0f3b29 468smell-all: $(patsubst %,%/module.mk,$(CHECKMODULES)) $(patsubst %,smell-%,$(CHECKMODULES))
469
b934f194 470reveng-all: $(patsubst %,%/module.mk,$(CHECKMODULES)) $(patsubst %,reveng-%,$(CHECKMODULES))
b9d0a01d 471
b934f194 472revdisp-all: $(patsubst %,%/module.mk,$(CHECKMODULES)) $(patsubst %,revdisp-%,$(CHECKMODULES))
b9d0a01d 473
118c0ae6 474smell-all: $(patsubst %,%/module.mk,$(CHECKMODULES)) $(patsubst %,smell-%,$(CHECKMODULES))
475
b9d0a01d 476clean-dicts:
477ifndef ALIQUIET
478 @echo "***** Cleaning up G__ files *****"
479endif
480 $(MUTE)rm -rf */tgt_$(ALICE_TARGET)/G__*
41f6cf69 481
b9d0a01d 482clean-modules:
483ifndef ALIQUIET
b945e71d 484 @echo "***** Cleaning up module.mk and temporary compilation files *****"
b9d0a01d 485endif
b934f194 486 $(MUTE)rm -rf $(patsubst %,%/module.mk,$(MODULES))
b945e71d 487 $(MUTE)rm -rf $(patsubst %,%/tgt_$(ALICE_TARGET),$(MODULES))
41f6cf69 488
b9d0a01d 489clean-depend:
490ifndef ALIQUIET
491 @echo "***** Cleaning up dependencies *****"
492endif
493 $(MUTE)echo rm `find . -name "*.d"`
494
495clean-objects:
496ifndef ALIQUIET
497 @echo "***** Cleaning up .o files *****"
498endif
499 $(MUTE)echo rm `find . -name "*.o"`
500
501clean-libs:
502ifndef ALIQUIET
503 @echo "***** Cleaning up library files *****"
504endif
505 $(MUTE)rm -rf lib/tgt_$(ALICE_TARGET)/*
506
507clean-bins:
508ifndef ALIQUIET
509 @echo "***** Cleaning up binary files *****"
510endif
511 $(MUTE)rm -rf bin/tgt_$(ALICE_TARGET)
d7a221d0 512
b934f194 513clean-check-all: $(patsubst %,%/module.mk,$(CHECKMODULES)) $(patsubst %,clean-check-%,$(CHECKMODULES))
ba546cfd 514
5b0f3b29 515clean-smell-all: $(patsubst %,%/module.mk,$(CHECKMODULES)) $(patsubst %,clean-smell-%,$(CHECKMODULES))
516
b934f194 517clean-reveng-all: $(patsubst %,%/module.mk,$(CHECKMODULES)) $(patsubst %,clean-reveng-%,$(CHECKMODULES))
ba546cfd 518
d7a221d0 519htmldoc:
520 @rm -rf html/roothtml
521 @rm -f html/picts
522 @rm -f /tmp/macros
523 @cd html ;\
524 aliroot -q -b "mkhtml.C(0,1)" ;\
525 ls ../macros/*.C > /tmp/macros ;\
526 for i in $(ALIROOTMODULES) ; do \
527 ls ../$$i/*.C 2>/dev/null >> /tmp/macros ;\
528 done ;\
529 for i in `cat /tmp/macros` ; do \
530 echo $$i ; \
531 aliroot -b -q "mkhtml.C(\"$$i\")" > /dev/null ;\
532 done ;\
533 ./makeExampleList ;
534 @ln -s ../picts html/picts
535 @ln -s ../../picts html/roothtml/picts
536 @ln -s ../../../picts html/roothtml/src/picts
537 @ln -s ../../../picts html/roothtml/examples/picts