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