]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - Makefile
Introduce extra scope for non ANSI compliant C++ compilers
[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
22
23##### TARGETS #####
24
25default: lib bin alilibs aliroot
26
27lib bin:
28 @mkdir $@
29
30alilibs: lib
31 for i in $(ALIROOT_DIRS) ; do \
32 echo "Making headers in $$i" | $(PRETTY); \
33 ${MAKE} -C $$i headers ; \
34 done
35 @for i in $(ALIROOT_DIRS) ; do \
36 echo "Making dependencies in $$i" | $(PRETTY); \
37 ${MAKE} -C $$i depend ; \
38 done
39 @for i in $(ALIROOT_DIRS) ; do \
40 echo "Making in $$i" | $(PRETTY); \
41 ${MAKE} -C $$i ; \
42 done
43
44aliroot geant321 minicern pdf pythia: bin
45 @DIR=`echo $@ | awk '{print toupper($$0)}'` ; \
46 echo "Making dependencies in $$DIR" | $(PRETTY); \
47 ${MAKE} -C $$DIR depend;\
48 echo "Making in $$DIR" | $(PRETTY); \
49 ${MAKE} -C $$DIR
50
51cernlibs: geant321 pythia minicern pdf
52
53all: cernlibs default
54
55FORCE:
56
57############################### General Macros ################################
58
59include $(ALICE_ROOT)/conf/GeneralMacros
60
61############################### Specific Macros ###############################
62
63STRUCT_DIRS = html conf macros data share include Euclid picts \
64 doc etc Makefile .rootrc
65
66LIBRARY_DIRS = MINICERN GEANT321 PYTHIA PDF
67
68dist: AliRoot$(VERSION).tar.gz
69
70AliRoot$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) ALIROOT
71
72distall: AliOffline$(VERSION).tar.gz
73
74AliOffline$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) $(LIBRARY_DIRS) ALIROOT
75
76distlib: AliLibs$(VERSION).tar.gz
77
78AliLibs$(VERSION).tar.gz: $(LIBRARY_DIRS)
79
80AliRoot$(VERSION).tar.gz AliLibs$(VERSION).tar.gz AliOffline$(VERSION).tar.gz:
81 @rm -f $(ALICE)/$@
82 @rm -f `find . -name '*~' -print` \
83 `find . -name '*.bak' -print` \
84 `find . -name '.*~' -print` \
85 `find . -name '*\#*' -print`
86 @rm -f /tmp/saves
87 @ls -1d $^ | sed -e "s/^/$(ALICE_LEVEL)\//" > /tmp/saves
88 @cd $(ALICE) ; \
89 gtar cvfz $@ --exclude '*.o' --exclude '*Cint.*' \
90 --exclude 'roothtml' --exclude 'CVS' \
91 --exclude Make-depend --exclude '*html/gif' \
92 --exclude "*tgt_*" --exclude check \
93 `cat /tmp/saves`
94
95htmldocnew: FORCE
96 @for i in $(ALIROOT_DIRS) ; do \
97 echo "Making HTML doc for $$i" ; \
98 rm -rf $(ALICE_ROOT)/$$i/html ; \
99 cd $(ALICE_ROOT)/$$i ; \
100 aliroot -b -q mkhtml.C > /dev/null; \
101 for j in `ls *.C` ; do \
102 echo $$j ; \
103 aliroot -b -q "mkhtml.C(\"$$j\")" > /dev/null; \
104 done \
105 done
106
107
108htmldoc: FORCE
109 @rm -rf html/roothtml
110 @rm -f html/picts
111 @rm -f /tmp/macros
112 @cd html ;\
113 aliroot -q -b "mkhtml.C(0,1)" ;\
114 ls ../macros/*.C > /tmp/macros ;\
115 for i in $(ALIROOT_DIRS) ; do \
116 ls ../$$i/*.C 2>/dev/null >> /tmp/macros ;\
117 done ;\
118 for i in `cat /tmp/macros` ; do \
119 echo $$i ; \
120 aliroot -b -q "mkhtml.C(\"$$i\")" > /dev/null ;\
121 done ;\
122 ./makeExampleList ;
123 @ln -s ../picts html/picts
124 @ln -s ../../picts html/roothtml/picts
125 @ln -s ../../../picts html/roothtml/src/picts
126 @ln -s ../../../picts html/roothtml/examples/picts
127
128clean: FORCE
129 @rm -f *~ \#*
130 @for i in $(ALIROOT_DIRS) ALIROOT ; do \
131 ${MAKE} -C $$i macroclean ; \
132 done
133
134libclean: FORCE
135 @rm -f *~ \#*
136 @for i in $(LIBRARY_DIRS) ; do \
137 ${MAKE} -C $$i macroclean ; \
138 done
139
140allclean: libclean clean
141
142# IRST coding rule check
143CHECK_DIRS = $(ALIROOT_DIRS) ALIROOT
144check:
145 @for i in $(CHECK_DIRS) ; do \
146 echo "Checking $$i" ; \
147 ${MAKE} -C $$i check ; \
148 done
149
150
151
152
153
154
155
156