Possibility to have different binaries in the same tree introduced
[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
31ccd13b 27 @for i in $(ALIROOT_DIRS) ; do \
28 ${MAKE} -C $$i headers ; \
29 done
fe4da5cc 30 @for i in $(ALIROOT_DIRS) ; do \
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 \
69 Makefile README .rootrc
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.*' \
4a8984aa 95 --exclude '*/roothtml/*' --exclude '*/CVS' \
ce7c8058 96 --exclude Make-depend --exclude '*html/gif' \
97 `cat /tmp/saves`
fe4da5cc 98
fe4da5cc 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
e95543bd 114 @rm -f html/picts
fe4da5cc 115 @rm -f /tmp/macros
116 @cd html ;\
117 aliroot -q -b "mkhtml.C(0,1)" ;\
118 ls ../macros/*.C > /tmp/macros ;\
119 for i in $(ALIROOT_DIRS) ; do \
120 ls ../$$i/*.C 2>/dev/null >> /tmp/macros ;\
121 done ;\
122 for i in `cat /tmp/macros` ; do \
123 echo $$i ; \
124 aliroot -b -q "mkhtml.C(\"$$i\")" > /dev/null ;\
125 done ;\
126 ./makeExampleList ;
1439f98e 127 @ln -s ../picts html/picts
128 @ln -s ../../picts html/roothtml/picts
129 @ln -s ../../../picts html/roothtml/src/picts
130 @ln -s ../../../picts html/roothtml/examples/picts
fe4da5cc 131
132clean: FORCE
133 @rm -f *~ \#*
8881bdd2 134 @for i in $(ALIROOT_DIRS) ALIROOT ; do \
fe4da5cc 135 ${MAKE} -C $$i macroclean ; \
136 done
137
138libclean: FORCE
139 @rm -f *~ \#*
140 @for i in $(LIBRARY_DIRS) ; do \
141 ${MAKE} -C $$i macroclean ; \
142 done
143
144allclean: libclean clean