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