]> git.uio.no Git - u/mrichter/AliRoot.git/blob - Makefile
New viewing/drawing routines
[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 THijing
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 pythia6 hijing: FORCE
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 TGeant4 AliGeant4: FORCE
53         @DIR=$@; \
54         echo "Making dependencies in $$DIR" | $(PRETTY); \
55         ${MAKE} -C $$DIR depend;\
56         echo "Making in $$DIR" | $(PRETTY); \
57         ${MAKE} -C $$DIR
58
59 cernlibs: geant321 pythia6 minicern pdf hijing
60
61 geant4: TGeant4 AliGeant4
62
63 all:    cernlibs default
64
65 FORCE:
66
67 ############################### General Macros ################################
68
69 # include $(ALICE_ROOT)/conf/GeneralMacros
70
71 ############################### Specific Macros ###############################
72
73 STRUCT_DIRS     = html conf macros data share include Euclid picts \
74                   doc etc Makefile .rootrc
75
76 LIBRARY_DIRS    = MINICERN GEANT321 PYTHIA6 PDF
77
78 dist: AliRoot$(VERSION).tar.gz
79
80 AliRoot$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) ALIROOT
81
82 distall: AliOffline$(VERSION).tar.gz
83
84 AliOffline$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) $(LIBRARY_DIRS) ALIROOT
85
86 distlib: AliLibs$(VERSION).tar.gz
87
88 AliLibs$(VERSION).tar.gz: $(LIBRARY_DIRS)
89
90 AliRoot$(VERSION).tar.gz AliLibs$(VERSION).tar.gz AliOffline$(VERSION).tar.gz:
91                 @rm -f $(ALICE)/$@ 
92                 @rm -f `find . -name '*~' -print` \
93                        `find . -name '*.bak' -print` \
94                        `find . -name '.*~' -print` \
95                        `find . -name '*\#*' -print` 
96                 @rm -f /tmp/saves
97                 @ls -1d $^ | sed -e "s/^/$(ALICE_LEVEL)\//" > /tmp/saves
98                 @cd $(ALICE) ; \
99                 gtar cvfz $@ --exclude '*.o' --exclude '*Cint.*' \
100                 --exclude 'roothtml' --exclude 'CVS' \
101                 --exclude Make-depend --exclude '*html/gif' \
102                 --exclude "*tgt_*" --exclude check \
103                 `cat /tmp/saves` 
104
105 htmldocnew:             FORCE
106                 @for i in $(ALIROOT_DIRS) ; do \
107                     echo "Making HTML doc for $$i" ; \
108                     rm -rf $(ALICE_ROOT)/$$i/html ; \
109                     cd $(ALICE_ROOT)/$$i ; \
110                     aliroot -b -q mkhtml.C > /dev/null; \
111                     for j in `ls *.C` ; do \
112                        echo $$j ; \
113                        aliroot -b -q "mkhtml.C(\"$$j\")" > /dev/null; \
114                     done \
115                 done
116
117
118 htmldoc:                FORCE
119                 @rm -rf html/roothtml
120                 @rm -f  html/picts
121                 @rm -f /tmp/macros
122                 @cd html ;\
123                 aliroot -q -b "mkhtml.C(0,1)" ;\
124                 ls ../macros/*.C > /tmp/macros ;\
125                 for i in $(ALIROOT_DIRS) ; do \
126                         ls ../$$i/*.C 2>/dev/null >> /tmp/macros ;\
127                 done ;\
128                 for i in `cat /tmp/macros` ; do \
129                         echo $$i ; \
130                         aliroot -b -q "mkhtml.C(\"$$i\")" > /dev/null ;\
131                 done ;\
132                 ./makeExampleList ;
133                 @ln -s ../picts html/picts
134                 @ln -s ../../picts html/roothtml/picts
135                 @ln -s ../../../picts html/roothtml/src/picts
136                 @ln -s ../../../picts html/roothtml/examples/picts
137
138 clean:  FORCE
139                 @rm -f *~ \#*
140                 @for i in $(ALIROOT_DIRS) ALIROOT ; do \
141                     ${MAKE} -C $$i macroclean ; \
142                 done
143
144 libclean:  FORCE
145                 @rm -f *~ \#*
146                 @for i in $(LIBRARY_DIRS) ; do \
147                     ${MAKE} -C $$i macroclean ; \
148                 done
149
150 allclean: libclean clean
151
152 # IRST coding rule check
153 CHECK_DIRS = $(ALIROOT_DIRS) ALIROOT TGeant4 AliGeant4
154 check:     
155                 @for i in $(CHECK_DIRS) ; do \
156                     echo "Checking $$i" ; \
157                     ${MAKE} -C $$i check ; \
158                 done
159
160 REVENG_DIRS = $(ALIROOT_DIRS)
161
162 reveng:
163         @for i in $(REVENG_DIRS) ; do \
164                 echo "Reverse engineering $$i" ; \
165                 ${MAKE} -C $$i reveng ; \
166         done
167
168
169
170
171
172
173
174