1 ############################### Main Makefile #################################
3 # Include machine specific definitions
5 include $(ALICE_ROOT)/conf/GeneralDef
6 include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
14 DOTS = " ................................................................................"
16 PRETTY = $(AWK) '{print $$0 substr($(DOTS),1,79-length($$0))}'
18 ##### Module libraries #####
20 ALIROOT_DIRS = STEER TGeant3 TRD PHOS TPC ZDC MUON PMD FMD TOF ITS \
21 CASTOR RICH START STRUCT EVGEN RALICE ALIFAST \
22 THijing CONTAINERS MEVSIM TMEVSIM THbtp HBTP EMCAL HBTAN
26 default: lib bin alilibs aliroot
32 echo MAKEFLAGS = $(MAKEFLAGS)
33 for i in $(ALIROOT_DIRS) ; do \
34 echo "Making headers in $$i" | $(PRETTY); \
35 ${MAKE} -C $$i headers ; \
37 @for i in $(ALIROOT_DIRS) ; do \
38 echo "Making dependencies in $$i" | $(PRETTY); \
39 ${MAKE} -C $$i depend ; \
41 @for i in $(ALIROOT_DIRS) ; do \
42 echo "Making in $$i" | $(PRETTY); \
46 aliroot geant321 minicern pdf pythia6 hijing: FORCE
47 @DIR=`echo $@ | $(AWK) '{print toupper($$0)}'` ; \
48 echo "Making dependencies in $$DIR" | $(PRETTY); \
49 ${MAKE} -C $$DIR depend;\
50 echo "Making in $$DIR" | $(PRETTY); \
53 TGeant4 AliGeant4 AliFluka : FORCE
55 echo "Making dependencies in $$DIR" | $(PRETTY); \
56 ${MAKE} -C $$DIR depend;\
57 echo "Making in $$DIR" | $(PRETTY); \
60 cernlibs: geant321 pythia6 minicern pdf hijing
62 geant4: TGeant4 AliGeant4
66 echo "Making in $$DIR" | $(PRETTY); \
67 ${MAKE} -C $$DIR/source
69 fluka: Flugg TGeant4 AliGeant4 AliFluka
75 ############################### General Macros ################################
77 # include $(ALICE_ROOT)/conf/GeneralMacros
79 ############################### Specific Macros ###############################
81 STRUCT_DIRS = html conf macros data share include Euclid picts \
82 doc etc Makefile .rootrc
84 LIBRARY_DIRS = MINICERN GEANT321 PYTHIA6 PDF HIJING
86 dist: AliRoot$(VERSION).tar.gz
88 AliRoot$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) ALIROOT
90 distall: AliOffline$(VERSION).tar.gz
92 AliOffline$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) $(LIBRARY_DIRS) ALIROOT
94 distlib: AliLibs$(VERSION).tar.gz
96 AliLibs$(VERSION).tar.gz: $(LIBRARY_DIRS)
98 AliRoot$(VERSION).tar.gz AliLibs$(VERSION).tar.gz AliOffline$(VERSION).tar.gz:
100 @rm -f `find . -name '*~' -print` \
101 `find . -name '*.bak' -print` \
102 `find . -name '.*~' -print` \
103 `find . -name '*\#*' -print`
105 @ls -1d $^ | sed -e "s/^/$(ALICE_LEVEL)\//" > /tmp/saves
107 gtar cvfz $@ --exclude '*.o' --exclude '*Cint.*' \
108 --exclude 'roothtml' --exclude 'CVS' \
109 --exclude Make-depend --exclude '*html/gif' \
110 --exclude "*tgt_*" --exclude check \
114 @for i in $(ALIROOT_DIRS) ; do \
115 echo "Making HTML doc for $$i" ; \
116 rm -rf $(ALICE_ROOT)/$$i/html ; \
117 cd $(ALICE_ROOT)/$$i ; \
118 aliroot -b -q mkhtml.C > /dev/null; \
119 for j in `ls *.C` ; do \
121 aliroot -b -q "mkhtml.C(\"$$j\")" > /dev/null; \
127 @rm -rf html/roothtml
131 aliroot -q -b "mkhtml.C(0,1)" ;\
132 ls ../macros/*.C > /tmp/macros ;\
133 for i in $(ALIROOT_DIRS) ; do \
134 ls ../$$i/*.C 2>/dev/null >> /tmp/macros ;\
136 for i in `cat /tmp/macros` ; do \
138 aliroot -b -q "mkhtml.C(\"$$i\")" > /dev/null ;\
141 @ln -s ../picts html/picts
142 @ln -s ../../picts html/roothtml/picts
143 @ln -s ../../../picts html/roothtml/src/picts
144 @ln -s ../../../picts html/roothtml/examples/picts
149 @for i in $(ALIROOT_DIRS) ALIROOT; do \
150 ${MAKE} -C $$i macroclean ; \
153 @for i in TGeant4 AliGeant4; do \
154 ${MAKE} -C $$i macroclean ; \
160 @for i in $(LIBRARY_DIRS) ; do \
161 ${MAKE} -C $$i macroclean ; \
164 allclean: libclean clean
166 # IRST coding rule check
167 CHECK_DIRS = $(ALIROOT_DIRS) ALIROOT TGeant4 AliGeant4
169 @for i in $(CHECK_DIRS) ; do \
170 echo "Checking $$i" ; \
171 ${MAKE} -C $$i check ; \
174 REVENG_DIRS = $(ALIROOT_DIRS)
177 @for i in $(REVENG_DIRS) ; do \
178 echo "Reverse engineering $$i" ; \
179 ${MAKE} -C $$i reveng ; \