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