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 CRT RICH START STRUCT EVGEN RALICE ALIFAST \
22 THijing CONTAINERS MEVSIM TMEVSIM THbtp HBTP \
27 default: lib bin alilibs aliroot
33 echo MAKEFLAGS = $(MAKEFLAGS)
34 for i in $(ALIROOT_DIRS) ; do \
35 echo "Making headers in $$i" | $(PRETTY); \
36 ${MAKE} -C $$i headers ; \
38 @for i in $(ALIROOT_DIRS) ; do \
39 echo "Making dependencies in $$i" | $(PRETTY); \
40 ${MAKE} -C $$i depend ; \
42 @for i in $(ALIROOT_DIRS) ; do \
43 echo "Making in $$i" | $(PRETTY); \
47 aliroot geant321 minicern pdf pythia6 hijing: FORCE
48 @DIR=`echo $@ | $(AWK) '{print toupper($$0)}'` ; \
49 echo "Making dependencies in $$DIR" | $(PRETTY); \
50 ${MAKE} -C $$DIR depend;\
51 echo "Making in $$DIR" | $(PRETTY); \
54 TGeant4 AliGeant4 AliFluka : FORCE
56 echo "Making dependencies in $$DIR" | $(PRETTY); \
57 ${MAKE} -C $$DIR depend;\
58 echo "Making in $$DIR" | $(PRETTY); \
61 cernlibs: geant321 pythia6 minicern pdf hijing
63 geant4: TGeant4 AliGeant4
67 echo "Making in $$DIR" | $(PRETTY); \
68 ${MAKE} -C $$DIR/source
70 fluka: Flugg TGeant4 AliGeant4 AliFluka
76 ############################### General Macros ################################
78 # include $(ALICE_ROOT)/conf/GeneralMacros
80 ############################### Specific Macros ###############################
82 STRUCT_DIRS = html conf macros data share include Euclid picts \
83 doc etc Makefile .rootrc
85 LIBRARY_DIRS = MINICERN GEANT321 PYTHIA6 PDF HIJING
87 dist: AliRoot$(VERSION).tar.gz
89 AliRoot$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) ALIROOT
91 distall: AliOffline$(VERSION).tar.gz
93 AliOffline$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) $(LIBRARY_DIRS) ALIROOT
95 distlib: AliLibs$(VERSION).tar.gz
97 AliLibs$(VERSION).tar.gz: $(LIBRARY_DIRS)
99 AliRoot$(VERSION).tar.gz AliLibs$(VERSION).tar.gz AliOffline$(VERSION).tar.gz:
101 @rm -f `find . -name '*~' -print` \
102 `find . -name '*.bak' -print` \
103 `find . -name '.*~' -print` \
104 `find . -name '*\#*' -print`
106 @ls -1d $^ | sed -e "s/^/$(ALICE_LEVEL)\//" > /tmp/saves
108 gtar cvfz $@ --exclude '*.o' --exclude '*Cint.*' \
109 --exclude 'roothtml' --exclude 'CVS' \
110 --exclude Make-depend --exclude '*html/gif' \
111 --exclude "*tgt_*" --exclude check \
115 @for i in $(ALIROOT_DIRS) ; do \
116 echo "Making HTML doc for $$i" ; \
117 rm -rf $(ALICE_ROOT)/$$i/html ; \
118 cd $(ALICE_ROOT)/$$i ; \
119 aliroot -b -q mkhtml.C > /dev/null; \
120 for j in `ls *.C` ; do \
122 aliroot -b -q "mkhtml.C(\"$$j\")" > /dev/null; \
128 @rm -rf html/roothtml
132 aliroot -q -b "mkhtml.C(0,1)" ;\
133 ls ../macros/*.C > /tmp/macros ;\
134 for i in $(ALIROOT_DIRS) ; do \
135 ls ../$$i/*.C 2>/dev/null >> /tmp/macros ;\
137 for i in `cat /tmp/macros` ; do \
139 aliroot -b -q "mkhtml.C(\"$$i\")" > /dev/null ;\
142 @ln -s ../picts html/picts
143 @ln -s ../../picts html/roothtml/picts
144 @ln -s ../../../picts html/roothtml/src/picts
145 @ln -s ../../../picts html/roothtml/examples/picts
150 @for i in $(ALIROOT_DIRS) ALIROOT; do \
151 ${MAKE} -C $$i macroclean ; \
154 @for i in TGeant4 AliGeant4; do \
155 ${MAKE} -C $$i macroclean ; \
161 @for i in $(LIBRARY_DIRS) ; do \
162 ${MAKE} -C $$i macroclean ; \
165 allclean: libclean clean
167 # IRST coding rule check
168 CHECK_DIRS = $(ALIROOT_DIRS) ALIROOT TGeant4 AliGeant4
170 @for i in $(CHECK_DIRS) ; do \
171 echo "Checking $$i" ; \
172 ${MAKE} -C $$i check ; \
175 REVENG_DIRS = $(ALIROOT_DIRS)
178 @for i in $(REVENG_DIRS) ; do \
179 echo "Reverse engineering $$i" ; \
180 ${MAKE} -C $$i reveng ; \