]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - Makefile
First commit of the MeVSim Fortran code.
[u/mrichter/AliRoot.git] / Makefile
... / ...
CommitLineData
1############################### Main Makefile #################################
2
3# Include machine specific definitions
4
5include $(ALICE_ROOT)/conf/GeneralDef
6include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
7
8MAKEFLAGS += -s
9
10##### MACROS #####
11
12PACKAGE = Main
13
14DOTS = " ................................................................................"
15
16PRETTY = $(AWK) '{print $$0 substr($(DOTS),1,79-length($$0))}'
17
18##### Module libraries #####
19
20ALIROOT_DIRS = STEER TGeant3 TRD PHOS TPC ZDC MUON PMD FMD TOF ITS \
21 CASTOR RICH START STRUCT EVGEN RALICE ALIFAST THijing CONTAINERS
22
23##### TARGETS #####
24
25default: lib bin alilibs aliroot
26
27lib bin:
28 @mkdir $@
29
30alilibs: 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
45aliroot 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
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
59cernlibs: geant321 pythia6 minicern pdf hijing
60
61geant4: TGeant4 AliGeant4
62
63all: cernlibs default
64
65FORCE:
66
67############################### General Macros ################################
68
69# include $(ALICE_ROOT)/conf/GeneralMacros
70
71############################### Specific Macros ###############################
72
73STRUCT_DIRS = html conf macros data share include Euclid picts \
74 doc etc Makefile .rootrc
75
76LIBRARY_DIRS = MINICERN GEANT321 PYTHIA6 PDF HIJING
77
78dist: AliRoot$(VERSION).tar.gz
79
80AliRoot$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) ALIROOT
81
82distall: AliOffline$(VERSION).tar.gz
83
84AliOffline$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) $(LIBRARY_DIRS) ALIROOT
85
86distlib: AliLibs$(VERSION).tar.gz
87
88AliLibs$(VERSION).tar.gz: $(LIBRARY_DIRS)
89
90AliRoot$(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
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
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
138clean: FORCE
139 @rm -f *~ \#*
140 @rm -f include/*
141 @for i in $(ALIROOT_DIRS) ALIROOT; do \
142 ${MAKE} -C $$i macroclean ; \
143 done
144 ifdef G4INSTALL
145 @for i in TGeant4 AliGeant4; do \
146 ${MAKE} -C $$i macroclean ; \
147 done
148 endif
149
150libclean: FORCE
151 @rm -f *~ \#*
152 @for i in $(LIBRARY_DIRS) ; do \
153 ${MAKE} -C $$i macroclean ; \
154 done
155
156allclean: libclean clean
157
158# IRST coding rule check
159CHECK_DIRS = $(ALIROOT_DIRS) ALIROOT TGeant4 AliGeant4
160check:
161 @for i in $(CHECK_DIRS) ; do \
162 echo "Checking $$i" ; \
163 ${MAKE} -C $$i check ; \
164 done
165
166REVENG_DIRS = $(ALIROOT_DIRS)
167
168reveng:
169 @for i in $(REVENG_DIRS) ; do \
170 echo "Reverse engineering $$i" ; \
171 ${MAKE} -C $$i reveng ; \
172 done
173
174
175
176
177
178
179
180