Default is no shunting.
[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
08301132 8MAKEFLAGS += -s
fe4da5cc 9
10##### MACROS #####
11
12PACKAGE = Main
13
47b969ba 14DOTS = " ................................................................................"
15
0237511c 16PRETTY = $(AWK) '{print $$0 substr($(DOTS),1,79-length($$0))}'
47b969ba 17
fe4da5cc 18##### Module libraries #####
19
09898eb4 20ALIROOT_DIRS = STEER TGeant3 TRD PHOS TPC ZDC MUON PMD FMD TOF ITS \
8ed53241 21 CASTOR RICH START STRUCT EVGEN RALICE ALIFAST THijing CONTAINERS
fe4da5cc 22
23##### TARGETS #####
24
25default: lib bin alilibs aliroot
26
27lib bin:
28 @mkdir $@
29
30alilibs: lib
0237511c 31 echo MAKEFLAGS = $(MAKEFLAGS)
47b969ba 32 for i in $(ALIROOT_DIRS) ; do \
33 echo "Making headers in $$i" | $(PRETTY); \
31ccd13b 34 ${MAKE} -C $$i headers ; \
47b969ba 35 done
fe4da5cc 36 @for i in $(ALIROOT_DIRS) ; do \
47b969ba 37 echo "Making dependencies in $$i" | $(PRETTY); \
fe4da5cc 38 ${MAKE} -C $$i depend ; \
39 done
40 @for i in $(ALIROOT_DIRS) ; do \
47b969ba 41 echo "Making in $$i" | $(PRETTY); \
fe4da5cc 42 ${MAKE} -C $$i ; \
43 done
44
2c7de6df 45aliroot geant321 minicern pdf pythia6 hijing: FORCE
0237511c 46 @DIR=`echo $@ | $(AWK) '{print toupper($$0)}'` ; \
47b969ba 47 echo "Making dependencies in $$DIR" | $(PRETTY); \
48 ${MAKE} -C $$DIR depend;\
49 echo "Making in $$DIR" | $(PRETTY); \
50 ${MAKE} -C $$DIR
fe4da5cc 51
5adf8bdf 52TGeant4 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
2c7de6df 59cernlibs: geant321 pythia6 minicern pdf hijing
5adf8bdf 60
61geant4: TGeant4 AliGeant4
fe4da5cc 62
b83f95da 63all: cernlibs default
fe4da5cc 64
65FORCE:
66
67############################### General Macros ################################
68
3e27ea2b 69# include $(ALICE_ROOT)/conf/GeneralMacros
fe4da5cc 70
71############################### Specific Macros ###############################
72
73STRUCT_DIRS = html conf macros data share include Euclid picts \
4bff45ae 74 doc etc Makefile .rootrc
fe4da5cc 75
36022826 76LIBRARY_DIRS = MINICERN GEANT321 PYTHIA6 PDF HIJING
fe4da5cc 77
6ac62af5 78dist: AliRoot$(VERSION).tar.gz
fe4da5cc 79
6ac62af5 80AliRoot$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) ALIROOT
fe4da5cc 81
6ac62af5 82distall: AliOffline$(VERSION).tar.gz
fe4da5cc 83
6ac62af5 84AliOffline$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) $(LIBRARY_DIRS) ALIROOT
fe4da5cc 85
6ac62af5 86distlib: AliLibs$(VERSION).tar.gz
fe4da5cc 87
6ac62af5 88AliLibs$(VERSION).tar.gz: $(LIBRARY_DIRS)
fe4da5cc 89
6ac62af5 90AliRoot$(VERSION).tar.gz AliLibs$(VERSION).tar.gz AliOffline$(VERSION).tar.gz:
fe4da5cc 91 @rm -f $(ALICE)/$@
92 @rm -f `find . -name '*~' -print` \
93 `find . -name '*.bak' -print` \
cec56ef0 94 `find . -name '.*~' -print` \
18778aed 95 `find . -name '*\#*' -print`
fe4da5cc 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.*' \
e9fe1fae 100 --exclude 'roothtml' --exclude 'CVS' \
ce7c8058 101 --exclude Make-depend --exclude '*html/gif' \
ee854967 102 --exclude "*tgt_*" --exclude check \
ce7c8058 103 `cat /tmp/saves`
fe4da5cc 104
fe4da5cc 105htmldocnew: 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
118htmldoc: FORCE
119 @rm -rf html/roothtml
e95543bd 120 @rm -f html/picts
fe4da5cc 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 ;
1439f98e 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
fe4da5cc 137
138clean: FORCE
139 @rm -f *~ \#*
6c83c8fa 140 @rm -f include/*
976426db 141 @for i in $(ALIROOT_DIRS) ALIROOT TGeant4 AliGeant4; do \
fe4da5cc 142 ${MAKE} -C $$i macroclean ; \
143 done
144
145libclean: FORCE
146 @rm -f *~ \#*
147 @for i in $(LIBRARY_DIRS) ; do \
148 ${MAKE} -C $$i macroclean ; \
149 done
150
151allclean: libclean clean
41f6cf69 152
153# IRST coding rule check
c40fbac6 154CHECK_DIRS = $(ALIROOT_DIRS) ALIROOT TGeant4 AliGeant4
41f6cf69 155check:
156 @for i in $(CHECK_DIRS) ; do \
157 echo "Checking $$i" ; \
158 ${MAKE} -C $$i check ; \
159 done
160
3e27ea2b 161REVENG_DIRS = $(ALIROOT_DIRS)
162
163reveng:
164 @for i in $(REVENG_DIRS) ; do \
165 echo "Reverse engineering $$i" ; \
166 ${MAKE} -C $$i reveng ; \
167 done
168
41f6cf69 169
170
171
172
173
174
175