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
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: 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
68 ############################### General Macros ################################
70 # include $(ALICE_ROOT)/conf/GeneralMacros
72 ############################### Specific Macros ###############################
74 STRUCT_DIRS = html conf macros data share include Euclid picts \
75 doc etc Makefile .rootrc
77 LIBRARY_DIRS = MINICERN GEANT321 PYTHIA6 PDF HIJING
79 dist: AliRoot$(VERSION).tar.gz
81 AliRoot$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) ALIROOT
83 distall: AliOffline$(VERSION).tar.gz
85 AliOffline$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) $(LIBRARY_DIRS) ALIROOT
87 distlib: AliLibs$(VERSION).tar.gz
89 AliLibs$(VERSION).tar.gz: $(LIBRARY_DIRS)
91 AliRoot$(VERSION).tar.gz AliLibs$(VERSION).tar.gz AliOffline$(VERSION).tar.gz:
93 @rm -f `find . -name '*~' -print` \
94 `find . -name '*.bak' -print` \
95 `find . -name '.*~' -print` \
96 `find . -name '*\#*' -print`
98 @ls -1d $^ | sed -e "s/^/$(ALICE_LEVEL)\//" > /tmp/saves
100 gtar cvfz $@ --exclude '*.o' --exclude '*Cint.*' \
101 --exclude 'roothtml' --exclude 'CVS' \
102 --exclude Make-depend --exclude '*html/gif' \
103 --exclude "*tgt_*" --exclude check \
107 @for i in $(ALIROOT_DIRS) ; do \
108 echo "Making HTML doc for $$i" ; \
109 rm -rf $(ALICE_ROOT)/$$i/html ; \
110 cd $(ALICE_ROOT)/$$i ; \
111 aliroot -b -q mkhtml.C > /dev/null; \
112 for j in `ls *.C` ; do \
114 aliroot -b -q "mkhtml.C(\"$$j\")" > /dev/null; \
120 @rm -rf html/roothtml
124 aliroot -q -b "mkhtml.C(0,1)" ;\
125 ls ../macros/*.C > /tmp/macros ;\
126 for i in $(ALIROOT_DIRS) ; do \
127 ls ../$$i/*.C 2>/dev/null >> /tmp/macros ;\
129 for i in `cat /tmp/macros` ; do \
131 aliroot -b -q "mkhtml.C(\"$$i\")" > /dev/null ;\
134 @ln -s ../picts html/picts
135 @ln -s ../../picts html/roothtml/picts
136 @ln -s ../../../picts html/roothtml/src/picts
137 @ln -s ../../../picts html/roothtml/examples/picts
142 @for i in $(ALIROOT_DIRS) ALIROOT; do \
143 ${MAKE} -C $$i macroclean ; \
146 @for i in TGeant4 AliGeant4; do \
147 ${MAKE} -C $$i macroclean ; \
153 @for i in $(LIBRARY_DIRS) ; do \
154 ${MAKE} -C $$i macroclean ; \
157 allclean: libclean clean
159 # IRST coding rule check
160 CHECK_DIRS = $(ALIROOT_DIRS) ALIROOT TGeant4 AliGeant4
162 @for i in $(CHECK_DIRS) ; do \
163 echo "Checking $$i" ; \
164 ${MAKE} -C $$i check ; \
167 REVENG_DIRS = $(ALIROOT_DIRS)
170 @for i in $(REVENG_DIRS) ; do \
171 echo "Reverse engineering $$i" ; \
172 ${MAKE} -C $$i reveng ; \