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