]> git.uio.no Git - u/mrichter/AliRoot.git/blob - Makefile
Revised detailed geomtry from G. Chabratova.
[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
22
23 ##### TARGETS #####
24  
25 default:      lib bin alilibs aliroot
26
27 lib bin:
28         @mkdir $@
29
30 alilibs:  lib
31         echo MAKEFLAGS = $(MAKEFLAGS)
32         for i in $(ALIROOT_DIRS) ; do \
33            echo "Making headers in $$i" | $(PRETTY); \
34            ${MAKE} -C $$i headers ; \
35         done
36         @for i in $(ALIROOT_DIRS) ; do \
37            echo "Making dependencies in $$i" | $(PRETTY); \
38            ${MAKE} -C $$i depend ; \
39         done
40         @for i in $(ALIROOT_DIRS) ; do \
41            echo "Making in $$i" | $(PRETTY); \
42            ${MAKE} -C $$i ; \
43         done
44
45 aliroot geant321 minicern pdf pythia: bin
46         @DIR=`echo $@ | $(AWK) '{print toupper($$0)}'` ; \
47         echo "Making dependencies in $$DIR" | $(PRETTY); \
48         ${MAKE} -C $$DIR depend;\
49         echo "Making in $$DIR" | $(PRETTY); \
50         ${MAKE} -C $$DIR
51
52 cernlibs: geant321 pythia minicern pdf
53
54 all:    cernlibs default
55
56 FORCE:
57
58 ############################### General Macros ################################
59
60 include $(ALICE_ROOT)/conf/GeneralMacros
61
62 ############################### Specific Macros ###############################
63
64 STRUCT_DIRS     = html conf macros data share include Euclid picts \
65                   doc etc Makefile .rootrc
66
67 LIBRARY_DIRS    = MINICERN GEANT321 PYTHIA PDF
68
69 dist: AliRoot$(VERSION).tar.gz
70
71 AliRoot$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) ALIROOT
72
73 distall: AliOffline$(VERSION).tar.gz
74
75 AliOffline$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) $(LIBRARY_DIRS) ALIROOT
76
77 distlib: AliLibs$(VERSION).tar.gz
78
79 AliLibs$(VERSION).tar.gz: $(LIBRARY_DIRS)
80
81 AliRoot$(VERSION).tar.gz AliLibs$(VERSION).tar.gz AliOffline$(VERSION).tar.gz:
82                 @rm -f $(ALICE)/$@ 
83                 @rm -f `find . -name '*~' -print` \
84                        `find . -name '*.bak' -print` \
85                        `find . -name '.*~' -print` \
86                        `find . -name '*\#*' -print` 
87                 @rm -f /tmp/saves
88                 @ls -1d $^ | sed -e "s/^/$(ALICE_LEVEL)\//" > /tmp/saves
89                 @cd $(ALICE) ; \
90                 gtar cvfz $@ --exclude '*.o' --exclude '*Cint.*' \
91                 --exclude 'roothtml' --exclude 'CVS' \
92                 --exclude Make-depend --exclude '*html/gif' \
93                 --exclude "*tgt_*" --exclude check \
94                 `cat /tmp/saves` 
95
96 htmldocnew:             FORCE
97                 @for i in $(ALIROOT_DIRS) ; do \
98                     echo "Making HTML doc for $$i" ; \
99                     rm -rf $(ALICE_ROOT)/$$i/html ; \
100                     cd $(ALICE_ROOT)/$$i ; \
101                     aliroot -b -q mkhtml.C > /dev/null; \
102                     for j in `ls *.C` ; do \
103                        echo $$j ; \
104                        aliroot -b -q "mkhtml.C(\"$$j\")" > /dev/null; \
105                     done \
106                 done
107
108
109 htmldoc:                FORCE
110                 @rm -rf html/roothtml
111                 @rm -f  html/picts
112                 @rm -f /tmp/macros
113                 @cd html ;\
114                 aliroot -q -b "mkhtml.C(0,1)" ;\
115                 ls ../macros/*.C > /tmp/macros ;\
116                 for i in $(ALIROOT_DIRS) ; do \
117                         ls ../$$i/*.C 2>/dev/null >> /tmp/macros ;\
118                 done ;\
119                 for i in `cat /tmp/macros` ; do \
120                         echo $$i ; \
121                         aliroot -b -q "mkhtml.C(\"$$i\")" > /dev/null ;\
122                 done ;\
123                 ./makeExampleList ;
124                 @ln -s ../picts html/picts
125                 @ln -s ../../picts html/roothtml/picts
126                 @ln -s ../../../picts html/roothtml/src/picts
127                 @ln -s ../../../picts html/roothtml/examples/picts
128
129 clean:  FORCE
130                 @rm -f *~ \#*
131                 @for i in $(ALIROOT_DIRS) ALIROOT ; do \
132                     ${MAKE} -C $$i macroclean ; \
133                 done
134
135 libclean:  FORCE
136                 @rm -f *~ \#*
137                 @for i in $(LIBRARY_DIRS) ; do \
138                     ${MAKE} -C $$i macroclean ; \
139                 done
140
141 allclean: libclean clean
142
143 # IRST coding rule check
144 CHECK_DIRS = $(ALIROOT_DIRS) ALIROOT
145 check:     
146                 @for i in $(CHECK_DIRS) ; do \
147                     echo "Checking $$i" ; \
148                     ${MAKE} -C $$i check ; \
149                 done
150
151
152
153
154
155
156
157