HBTAN added to the makefiles
[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                           CASTOR RICH START STRUCT EVGEN RALICE ALIFAST \
22                           THijing CONTAINERS MEVSIM TMEVSIM THbtp HBTP EMCAL HBTAN
23
24 ##### TARGETS #####
25  
26 default:      lib bin alilibs aliroot
27
28 lib bin:
29         @mkdir $@
30
31 alilibs:  lib
32         echo MAKEFLAGS = $(MAKEFLAGS)
33         for i in $(ALIROOT_DIRS) ; do \
34            echo "Making headers in $$i" | $(PRETTY); \
35            ${MAKE} -C $$i headers ; \
36         done
37         @for i in $(ALIROOT_DIRS) ; do \
38            echo "Making dependencies in $$i" | $(PRETTY); \
39            ${MAKE} -C $$i depend ; \
40         done
41         @for i in $(ALIROOT_DIRS) ; do \
42            echo "Making in $$i" | $(PRETTY); \
43            ${MAKE} -C $$i ; \
44         done
45
46 aliroot geant321 minicern pdf pythia6 hijing: FORCE
47         @DIR=`echo $@ | $(AWK) '{print toupper($$0)}'` ; \
48         echo "Making dependencies in $$DIR" | $(PRETTY); \
49         ${MAKE} -C $$DIR depend;\
50         echo "Making in $$DIR" | $(PRETTY); \
51         ${MAKE} -C $$DIR
52
53 TGeant4 AliGeant4: FORCE
54         @DIR=$@; \
55         echo "Making dependencies in $$DIR" | $(PRETTY); \
56         ${MAKE} -C $$DIR depend;\
57         echo "Making in $$DIR" | $(PRETTY); \
58         ${MAKE} -C $$DIR
59
60 cernlibs: geant321 pythia6 minicern pdf hijing
61
62 geant4: TGeant4 AliGeant4
63
64 all:    cernlibs default
65
66 FORCE:
67
68 ############################### General Macros ################################
69
70 # include $(ALICE_ROOT)/conf/GeneralMacros
71
72 ############################### Specific Macros ###############################
73
74 STRUCT_DIRS     = html conf macros data share include Euclid picts \
75                   doc etc Makefile .rootrc
76
77 LIBRARY_DIRS    = MINICERN GEANT321 PYTHIA6 PDF HIJING
78
79 dist: AliRoot$(VERSION).tar.gz
80
81 AliRoot$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) ALIROOT
82
83 distall: AliOffline$(VERSION).tar.gz
84
85 AliOffline$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) $(LIBRARY_DIRS) ALIROOT
86
87 distlib: AliLibs$(VERSION).tar.gz
88
89 AliLibs$(VERSION).tar.gz: $(LIBRARY_DIRS)
90
91 AliRoot$(VERSION).tar.gz AliLibs$(VERSION).tar.gz AliOffline$(VERSION).tar.gz:
92                 @rm -f $(ALICE)/$@ 
93                 @rm -f `find . -name '*~' -print` \
94                        `find . -name '*.bak' -print` \
95                        `find . -name '.*~' -print` \
96                        `find . -name '*\#*' -print` 
97                 @rm -f /tmp/saves
98                 @ls -1d $^ | sed -e "s/^/$(ALICE_LEVEL)\//" > /tmp/saves
99                 @cd $(ALICE) ; \
100                 gtar cvfz $@ --exclude '*.o' --exclude '*Cint.*' \
101                 --exclude 'roothtml' --exclude 'CVS' \
102                 --exclude Make-depend --exclude '*html/gif' \
103                 --exclude "*tgt_*" --exclude check \
104                 `cat /tmp/saves` 
105
106 htmldocnew:             FORCE
107                 @for i in $(ALIROOT_DIRS) ; do \
108                     echo "Making HTML doc for $$i" ; \
109                     rm -rf $(ALICE_ROOT)/$$i/html ; \
110                     cd $(ALICE_ROOT)/$$i ; \
111                     aliroot -b -q mkhtml.C > /dev/null; \
112                     for j in `ls *.C` ; do \
113                        echo $$j ; \
114                        aliroot -b -q "mkhtml.C(\"$$j\")" > /dev/null; \
115                     done \
116                 done
117
118
119 htmldoc:                FORCE
120                 @rm -rf html/roothtml
121                 @rm -f  html/picts
122                 @rm -f /tmp/macros
123                 @cd html ;\
124                 aliroot -q -b "mkhtml.C(0,1)" ;\
125                 ls ../macros/*.C > /tmp/macros ;\
126                 for i in $(ALIROOT_DIRS) ; do \
127                         ls ../$$i/*.C 2>/dev/null >> /tmp/macros ;\
128                 done ;\
129                 for i in `cat /tmp/macros` ; do \
130                         echo $$i ; \
131                         aliroot -b -q "mkhtml.C(\"$$i\")" > /dev/null ;\
132                 done ;\
133                 ./makeExampleList ;
134                 @ln -s ../picts html/picts
135                 @ln -s ../../picts html/roothtml/picts
136                 @ln -s ../../../picts html/roothtml/src/picts
137                 @ln -s ../../../picts html/roothtml/examples/picts
138
139 clean:  FORCE
140                 @rm -f *~ \#*
141                 @rm -f include/*
142                 @for i in $(ALIROOT_DIRS) ALIROOT; do \
143                     ${MAKE} -C $$i macroclean ; \
144                 done
145                 ifdef G4INSTALL
146                   @for i in TGeant4 AliGeant4; do \
147                     ${MAKE} -C $$i macroclean ; \
148                   done
149                 endif  
150
151 libclean:  FORCE
152                 @rm -f *~ \#*
153                 @for i in $(LIBRARY_DIRS) ; do \
154                     ${MAKE} -C $$i macroclean ; \
155                 done
156
157 allclean: libclean clean
158
159 # IRST coding rule check
160 CHECK_DIRS = $(ALIROOT_DIRS) ALIROOT TGeant4 AliGeant4
161 check:     
162                 @for i in $(CHECK_DIRS) ; do \
163                     echo "Checking $$i" ; \
164                     ${MAKE} -C $$i check ; \
165                 done
166
167 REVENG_DIRS = $(ALIROOT_DIRS)
168
169 reveng:
170         @for i in $(REVENG_DIRS) ; do \
171                 echo "Reverse engineering $$i" ; \
172                 ${MAKE} -C $$i reveng ; \
173         done
174
175
176
177
178
179
180
181