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