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
25 default: lib bin alilibs aliroot
31 echo MAKEFLAGS = $(MAKEFLAGS)
32 for i in $(ALIROOT_DIRS) ; do \
33 echo "Making headers in $$i" | $(PRETTY); \
34 ${MAKE} -C $$i headers ; \
36 @for i in $(ALIROOT_DIRS) ; do \
37 echo "Making dependencies in $$i" | $(PRETTY); \
38 ${MAKE} -C $$i depend ; \
40 @for i in $(ALIROOT_DIRS) ; do \
41 echo "Making in $$i" | $(PRETTY); \
45 aliroot geant321 minicern pdf pythia: bin
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); \
52 cernlibs: geant321 pythia minicern pdf
58 ############################### General Macros ################################
60 include $(ALICE_ROOT)/conf/GeneralMacros
62 ############################### Specific Macros ###############################
64 STRUCT_DIRS = html conf macros data share include Euclid picts \
65 doc etc Makefile .rootrc
67 LIBRARY_DIRS = MINICERN GEANT321 PYTHIA PDF
69 dist: AliRoot$(VERSION).tar.gz
71 AliRoot$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) ALIROOT
73 distall: AliOffline$(VERSION).tar.gz
75 AliOffline$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) $(LIBRARY_DIRS) ALIROOT
77 distlib: AliLibs$(VERSION).tar.gz
79 AliLibs$(VERSION).tar.gz: $(LIBRARY_DIRS)
81 AliRoot$(VERSION).tar.gz AliLibs$(VERSION).tar.gz AliOffline$(VERSION).tar.gz:
83 @rm -f `find . -name '*~' -print` \
84 `find . -name '*.bak' -print` \
85 `find . -name '.*~' -print` \
86 `find . -name '*\#*' -print`
88 @ls -1d $^ | sed -e "s/^/$(ALICE_LEVEL)\//" > /tmp/saves
90 gtar cvfz $@ --exclude '*.o' --exclude '*Cint.*' \
91 --exclude 'roothtml' --exclude 'CVS' \
92 --exclude Make-depend --exclude '*html/gif' \
93 --exclude "*tgt_*" --exclude check \
97 @for i in $(ALIROOT_DIRS) ; do \
98 echo "Making HTML doc for $$i" ; \
99 rm -rf $(ALICE_ROOT)/$$i/html ; \
100 cd $(ALICE_ROOT)/$$i ; \
101 aliroot -b -q mkhtml.C > /dev/null; \
102 for j in `ls *.C` ; do \
104 aliroot -b -q "mkhtml.C(\"$$j\")" > /dev/null; \
110 @rm -rf html/roothtml
114 aliroot -q -b "mkhtml.C(0,1)" ;\
115 ls ../macros/*.C > /tmp/macros ;\
116 for i in $(ALIROOT_DIRS) ; do \
117 ls ../$$i/*.C 2>/dev/null >> /tmp/macros ;\
119 for i in `cat /tmp/macros` ; do \
121 aliroot -b -q "mkhtml.C(\"$$i\")" > /dev/null ;\
124 @ln -s ../picts html/picts
125 @ln -s ../../picts html/roothtml/picts
126 @ln -s ../../../picts html/roothtml/src/picts
127 @ln -s ../../../picts html/roothtml/examples/picts
131 @for i in $(ALIROOT_DIRS) ALIROOT ; do \
132 ${MAKE} -C $$i macroclean ; \
137 @for i in $(LIBRARY_DIRS) ; do \
138 ${MAKE} -C $$i macroclean ; \
141 allclean: libclean clean
143 # IRST coding rule check
144 CHECK_DIRS = $(ALIROOT_DIRS) ALIROOT
146 @for i in $(CHECK_DIRS) ; do \
147 echo "Checking $$i" ; \
148 ${MAKE} -C $$i check ; \