Do not export any Make-depend, so we had to change the name of the
[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
8MAKEFLAGS =
9
10##### MACROS #####
11
12PACKAGE = Main
13
14##### Module libraries #####
15
16ALIROOT_DIRS = STEER TGeant3 TRD PHOS TPC ZDC MUON PMD FMD TOF ITS CASTOR \
17 RICH STRUCT EVGEN
18
19##### TARGETS #####
20
21default: lib bin alilibs aliroot
22
23lib bin:
24 @mkdir $@
25
26alilibs: lib
27 @for i in $(ALIROOT_DIRS) ; do \
28 ${MAKE} -C $$i depend ; \
29 done
30 @for i in $(ALIROOT_DIRS) ; do \
31 ${MAKE} -C $$i ; \
32 done
33
34aliroot: bin
35 @${MAKE} -C ALIROOT
36
37geant321: lib
38 @-${MAKE} -C GEANT321 depend
39 @${MAKE} -C GEANT321
40
41pythia: lib
42 @-${MAKE} -C PYTHIA depend
43 @${MAKE} -C PYTHIA
44
45pdf: lib
46 @-${MAKE} -C PDF depend
47 @${MAKE} -C PDF
48
49minicern: lib
50 @-${MAKE} -C MINICERN depend
51 @${MAKE} -C MINICERN
52
53cernlibs: geant321 pythia minicern pdf
54
55all: default cernlibs
56
57FORCE:
58
59############################### General Macros ################################
60
61include $(ALICE_ROOT)/conf/GeneralMacros
62
63############################### Specific Macros ###############################
64
65STRUCT_DIRS = html conf macros data share include Euclid picts \
66 Makefile README .rootrc
67
68LIBRARY_DIRS = MINICERN GEANT321 PYTHIA PDF
69
70dist: AliRoot3.01.tar.gz
71
72AliRoot3.01.tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) ALIROOT
73
74distall: AliOffline3.01.tar.gz
75
76AliOffline3.01.tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) $(LIBRARY_DIRS) ALIROOT
77
78distlib: AliLib3.10.tar.gz
79
80AliLib3.01.tar.gz: $(LIBRARY_DIRS)
81
82AliRoot3.01.tar.gz AliLibs3.01.tar.gz AliOffline3.01.tar.gz:
83 @rm -f $(ALICE)/$@
84 @rm -f `find . -name '*~' -print` \
85 `find . -name '*.bak' -print` \
cec56ef0 86 `find . -name '.*~' -print` \
18778aed 87 `find . -name '*\#*' -print`
fe4da5cc 88 @rm -f /tmp/saves
89 @ls -1d $^ | sed -e "s/^/$(ALICE_LEVEL)\//" > /tmp/saves
90 @cd $(ALICE) ; \
91 gtar cvfz $@ --exclude '*.o' --exclude '*Cint.*' \
02be514c 92 --exclude '*/roothtml/*' --exclude '*/CVS' `cat /tmp/saves`
fe4da5cc 93
94alidepend:
95 @for i in $(ALIROOT_DIRS) ; do \
96 ${MAKE} -C $$i depend ; \
97 done
98
99htmldocnew: FORCE
100 @for i in $(ALIROOT_DIRS) ; do \
101 echo "Making HTML doc for $$i" ; \
102 rm -rf $(ALICE_ROOT)/$$i/html ; \
103 cd $(ALICE_ROOT)/$$i ; \
104 aliroot -b -q mkhtml.C > /dev/null; \
105 for j in `ls *.C` ; do \
106 echo $$j ; \
107 aliroot -b -q "mkhtml.C(\"$$j\")" > /dev/null; \
108 done \
109 done
110
111
112htmldoc: FORCE
113 @rm -rf html/roothtml
114 @rm -f /tmp/macros
115 @cd html ;\
116 aliroot -q -b "mkhtml.C(0,1)" ;\
117 ls ../macros/*.C > /tmp/macros ;\
118 for i in $(ALIROOT_DIRS) ; do \
119 ls ../$$i/*.C 2>/dev/null >> /tmp/macros ;\
120 done ;\
121 for i in `cat /tmp/macros` ; do \
122 echo $$i ; \
123 aliroot -b -q "mkhtml.C(\"$$i\")" > /dev/null ;\
124 done ;\
125 ./makeExampleList ;
126 @ln -s ../../picts html/roothtml/gif
127 @ln -s ../../../picts html/roothtml/src/gif
128 @ln -s ../../../picts html/roothtml/examples/gif
129
130clean: FORCE
131 @rm -f *~ \#*
132 @for i in $(ALIROOT_DIRS) ; do \
133 ${MAKE} -C $$i macroclean ; \
134 done
135
136libclean: FORCE
137 @rm -f *~ \#*
138 @for i in $(LIBRARY_DIRS) ; do \
139 ${MAKE} -C $$i macroclean ; \
140 done
141
142allclean: libclean clean