Add const to SolenoidField() method for correct overwriting from the parent class
[u/mrichter/AliRoot.git] / Makefile
1 ############################### Main Makefile #################################
2
3 # Include machine specific definitions
4
5 include $(ALICE_ROOT)/conf/GeneralDef
6 include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
7
8 MAKEFLAGS += -s
9
10 ##### MACROS #####
11
12 PACKAGE = Main
13
14 DOTS = " ................................................................................"
15
16 PRETTY =  $(AWK) '{print $$0 substr($(DOTS),1,79-length($$0))}'
17
18 ##### Module libraries #####
19
20 ALIROOT_DIRS            = STEER TGeant3 TRD PHOS TPC ZDC MUON PMD FMD TOF ITS \
21                           CRT RICH START STRUCT EVGEN RALICE ALIFAST \
22                           THijing CONTAINERS MEVSIM TMEVSIM THbtp HBTP \
23                           EMCAL HBTAN VZERO
24
25 ##### TARGETS #####
26
27 default:      lib bin alilibs aliroot
28
29 lib bin:
30         @mkdir $@
31
32 alilibs:  lib
33         echo MAKEFLAGS = $(MAKEFLAGS)
34         for i in $(ALIROOT_DIRS) ; do \
35            echo "Making headers in $$i" | $(PRETTY); \
36            ${MAKE} -C $$i headers ; \
37         done
38         @for i in $(ALIROOT_DIRS) ; do \
39            echo "Making dependencies in $$i" | $(PRETTY); \
40            ${MAKE} -C $$i depend ; \
41         done
42         @for i in $(ALIROOT_DIRS) ; do \
43            echo "Making in $$i" | $(PRETTY); \
44            ${MAKE} -C $$i ; \
45         done
46
47 aliroot geant321 minicern pdf pythia6 hijing: FORCE
48         @DIR=`echo $@ | $(AWK) '{print toupper($$0)}'` ; \
49         echo "Making dependencies in $$DIR" | $(PRETTY); \
50         ${MAKE} -C $$DIR depend;\
51         echo "Making in $$DIR" | $(PRETTY); \
52         ${MAKE} -C $$DIR
53
54 TGeant4 AliGeant4 AliFluka : FORCE
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
61 cernlibs: geant321 pythia6 minicern pdf hijing
62
63 geant4: TGeant4 AliGeant4
64
65 Flugg: FORCE
66         @DIR=$@; \
67         echo "Making in $$DIR" | $(PRETTY); \
68         ${MAKE} -C $$DIR/source
69
70 fluka:  Flugg TGeant4 AliGeant4 AliFluka
71
72 all:    cernlibs default
73
74 FORCE:
75
76 ############################### General Macros ################################
77
78 # include $(ALICE_ROOT)/conf/GeneralMacros
79
80 ############################### Specific Macros ###############################
81
82 STRUCT_DIRS     = html conf macros data share include Euclid picts \
83                   doc etc Makefile .rootrc
84
85 LIBRARY_DIRS    = MINICERN GEANT321 PYTHIA6 PDF HIJING
86
87 dist: AliRoot$(VERSION).tar.gz
88
89 AliRoot$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) ALIROOT
90
91 distall: AliOffline$(VERSION).tar.gz
92
93 AliOffline$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) $(LIBRARY_DIRS) ALIROOT
94
95 distlib: AliLibs$(VERSION).tar.gz
96
97 AliLibs$(VERSION).tar.gz: $(LIBRARY_DIRS)
98
99 AliRoot$(VERSION).tar.gz AliLibs$(VERSION).tar.gz AliOffline$(VERSION).tar.gz:
100                 @rm -f $(ALICE)/$@ 
101                 @rm -f `find . -name '*~' -print` \
102                        `find . -name '*.bak' -print` \
103                        `find . -name '.*~' -print` \
104                        `find . -name '*\#*' -print` 
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.*' \
109                 --exclude 'roothtml' --exclude 'CVS' \
110                 --exclude Make-depend --exclude '*html/gif' \
111                 --exclude "*tgt_*" --exclude check \
112                 `cat /tmp/saves` 
113
114 htmldocnew:             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
127 htmldoc:                FORCE
128                 @rm -rf html/roothtml
129                 @rm -f  html/picts
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 ;
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
146
147 clean:  FORCE
148                 @rm -f *~ \#*
149                 @rm -f include/*
150                 @for i in $(ALIROOT_DIRS) ALIROOT; do \
151                     ${MAKE} -C $$i macroclean ; \
152                 done
153                 ifdef G4INSTALL
154                   @for i in TGeant4 AliGeant4; do \
155                     ${MAKE} -C $$i macroclean ; \
156                   done
157                 endif  
158
159 libclean:  FORCE
160                 @rm -f *~ \#*
161                 @for i in $(LIBRARY_DIRS) ; do \
162                     ${MAKE} -C $$i macroclean ; \
163                 done
164
165 allclean: libclean clean
166
167 # IRST coding rule check
168 CHECK_DIRS = $(ALIROOT_DIRS) ALIROOT TGeant4 AliGeant4
169 check:     
170                 @for i in $(CHECK_DIRS) ; do \
171                     echo "Checking $$i" ; \
172                     ${MAKE} -C $$i check ; \
173                 done
174
175 REVENG_DIRS = $(ALIROOT_DIRS)
176
177 reveng:
178         @for i in $(REVENG_DIRS) ; do \
179                 echo "Reverse engineering $$i" ; \
180                 ${MAKE} -C $$i reveng ; \
181         done
182
183
184
185
186
187
188
189