Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / Makefile
CommitLineData
fe4da5cc 1############################### Main Makefile #################################
2
3# Include machine specific definitions
4
5include $(ALICE_ROOT)/conf/GeneralDef
6include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
7
08301132 8MAKEFLAGS += -s
fe4da5cc 9
10##### MACROS #####
11
12PACKAGE = Main
13
47b969ba 14DOTS = " ................................................................................"
15
0237511c 16PRETTY = $(AWK) '{print $$0 substr($(DOTS),1,79-length($$0))}'
47b969ba 17
fe4da5cc 18##### Module libraries #####
19
09898eb4 20ALIROOT_DIRS = STEER TGeant3 TRD PHOS TPC ZDC MUON PMD FMD TOF ITS \
42865053 21 CRT RICH START STRUCT EVGEN RALICE ALIFAST \
0584ec40 22 THijing CONTAINERS MEVSIM TMEVSIM THbtp HBTP \
23 EMCAL HBTAN VZERO
fe4da5cc 24
25##### TARGETS #####
42865053 26
fe4da5cc 27default: lib bin alilibs aliroot
28
29lib bin:
30 @mkdir $@
31
32alilibs: lib
0237511c 33 echo MAKEFLAGS = $(MAKEFLAGS)
47b969ba 34 for i in $(ALIROOT_DIRS) ; do \
35 echo "Making headers in $$i" | $(PRETTY); \
31ccd13b 36 ${MAKE} -C $$i headers ; \
47b969ba 37 done
31ccd13b 38 @for i in $(ALIROOT_DIRS) ; do \
47b969ba 39 echo "Making dependencies in $$i" | $(PRETTY); \
fe4da5cc 40 ${MAKE} -C $$i depend ; \
41 done
42 @for i in $(ALIROOT_DIRS) ; do \
47b969ba 43 echo "Making in $$i" | $(PRETTY); \
fe4da5cc 44 ${MAKE} -C $$i ; \
45 done
46
2c7de6df 47aliroot geant321 minicern pdf pythia6 hijing: FORCE
0237511c 48 @DIR=`echo $@ | $(AWK) '{print toupper($$0)}'` ; \
47b969ba 49 echo "Making dependencies in $$DIR" | $(PRETTY); \
50 ${MAKE} -C $$DIR depend;\
51 echo "Making in $$DIR" | $(PRETTY); \
52 ${MAKE} -C $$DIR
fe4da5cc 53
8a3bc8e5 54TGeant4 AliGeant4 AliFluka : FORCE
5adf8bdf 55 @DIR=$@; \
56 echo "Making dependencies in $$DIR" | $(PRETTY); \
57 ${MAKE} -C $$DIR depend;\
58 echo "Making in $$DIR" | $(PRETTY); \
59 ${MAKE} -C $$DIR
60
2c7de6df 61cernlibs: geant321 pythia6 minicern pdf hijing
5adf8bdf 62
63geant4: TGeant4 AliGeant4
fe4da5cc 64
8a3bc8e5 65Flugg: FORCE
66 @DIR=$@; \
67 echo "Making in $$DIR" | $(PRETTY); \
68 ${MAKE} -C $$DIR/source
69
70fluka: Flugg TGeant4 AliGeant4 AliFluka
71
b83f95da 72all: cernlibs default
fe4da5cc 73
74FORCE:
75
76############################### General Macros ################################
77
3e27ea2b 78# include $(ALICE_ROOT)/conf/GeneralMacros
fe4da5cc 79
80############################### Specific Macros ###############################
81
82STRUCT_DIRS = html conf macros data share include Euclid picts \
4bff45ae 83 doc etc Makefile .rootrc
fe4da5cc 84
36022826 85LIBRARY_DIRS = MINICERN GEANT321 PYTHIA6 PDF HIJING
fe4da5cc 86
6ac62af5 87dist: AliRoot$(VERSION).tar.gz
fe4da5cc 88
6ac62af5 89AliRoot$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) ALIROOT
fe4da5cc 90
6ac62af5 91distall: AliOffline$(VERSION).tar.gz
fe4da5cc 92
6ac62af5 93AliOffline$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) $(LIBRARY_DIRS) ALIROOT
fe4da5cc 94
6ac62af5 95distlib: AliLibs$(VERSION).tar.gz
fe4da5cc 96
6ac62af5 97AliLibs$(VERSION).tar.gz: $(LIBRARY_DIRS)
fe4da5cc 98
6ac62af5 99AliRoot$(VERSION).tar.gz AliLibs$(VERSION).tar.gz AliOffline$(VERSION).tar.gz:
fe4da5cc 100 @rm -f $(ALICE)/$@
101 @rm -f `find . -name '*~' -print` \
102 `find . -name '*.bak' -print` \
cec56ef0 103 `find . -name '.*~' -print` \
18778aed 104 `find . -name '*\#*' -print`
fe4da5cc 105 @rm -f /tmp/saves
106 @ls -1d $^ | sed -e "s/^/$(ALICE_LEVEL)\//" > /tmp/saves
107 @cd $(ALICE) ; \
108 gtar cvfz $@ --exclude '*.o' --exclude '*Cint.*' \
e9fe1fae 109 --exclude 'roothtml' --exclude 'CVS' \
ce7c8058 110 --exclude Make-depend --exclude '*html/gif' \
ee854967 111 --exclude "*tgt_*" --exclude check \
ce7c8058 112 `cat /tmp/saves`
fe4da5cc 113
fe4da5cc 114htmldocnew: FORCE
115 @for i in $(ALIROOT_DIRS) ; do \
116 echo "Making HTML doc for $$i" ; \
117 rm -rf $(ALICE_ROOT)/$$i/html ; \
118 cd $(ALICE_ROOT)/$$i ; \
119 aliroot -b -q mkhtml.C > /dev/null; \
120 for j in `ls *.C` ; do \
121 echo $$j ; \
122 aliroot -b -q "mkhtml.C(\"$$j\")" > /dev/null; \
123 done \
124 done
125
126
127htmldoc: FORCE
128 @rm -rf html/roothtml
e95543bd 129 @rm -f html/picts
fe4da5cc 130 @rm -f /tmp/macros
131 @cd html ;\
132 aliroot -q -b "mkhtml.C(0,1)" ;\
133 ls ../macros/*.C > /tmp/macros ;\
134 for i in $(ALIROOT_DIRS) ; do \
135 ls ../$$i/*.C 2>/dev/null >> /tmp/macros ;\
136 done ;\
137 for i in `cat /tmp/macros` ; do \
138 echo $$i ; \
139 aliroot -b -q "mkhtml.C(\"$$i\")" > /dev/null ;\
140 done ;\
141 ./makeExampleList ;
1439f98e 142 @ln -s ../picts html/picts
143 @ln -s ../../picts html/roothtml/picts
144 @ln -s ../../../picts html/roothtml/src/picts
145 @ln -s ../../../picts html/roothtml/examples/picts
fe4da5cc 146
147clean: FORCE
148 @rm -f *~ \#*
6c83c8fa 149 @rm -f include/*
38c7852e 150 @for i in $(ALIROOT_DIRS) ALIROOT; do \
fe4da5cc 151 ${MAKE} -C $$i macroclean ; \
152 done
38c7852e 153 ifdef G4INSTALL
154 @for i in TGeant4 AliGeant4; do \
155 ${MAKE} -C $$i macroclean ; \
156 done
157 endif
fe4da5cc 158
159libclean: FORCE
160 @rm -f *~ \#*
161 @for i in $(LIBRARY_DIRS) ; do \
162 ${MAKE} -C $$i macroclean ; \
163 done
164
165allclean: libclean clean
41f6cf69 166
167# IRST coding rule check
c40fbac6 168CHECK_DIRS = $(ALIROOT_DIRS) ALIROOT TGeant4 AliGeant4
41f6cf69 169check:
170 @for i in $(CHECK_DIRS) ; do \
171 echo "Checking $$i" ; \
172 ${MAKE} -C $$i check ; \
173 done
174
3e27ea2b 175REVENG_DIRS = $(ALIROOT_DIRS)
176
177reveng:
178 @for i in $(REVENG_DIRS) ; do \
179 echo "Reverse engineering $$i" ; \
180 ${MAKE} -C $$i reveng ; \
181 done
182
41f6cf69 183
184
185
186
187
188
189