]> git.uio.no Git - u/mrichter/AliRoot.git/blame - Makefile
Adding example macro
[u/mrichter/AliRoot.git] / Makefile
CommitLineData
fe4da5cc 1############################### Main Makefile #################################
2
3# Include machine specific definitions
4
5include $(ALICE_ROOT)/conf/GeneralDef
6include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
7
08301132 8MAKEFLAGS += -s
fe4da5cc 9
10##### MACROS #####
11
12PACKAGE = Main
13
47b969ba 14DOTS = " ................................................................................"
15
0237511c 16PRETTY = $(AWK) '{print $$0 substr($(DOTS),1,79-length($$0))}'
47b969ba 17
fe4da5cc 18##### Module libraries #####
19
09898eb4 20ALIROOT_DIRS = STEER TGeant3 TRD PHOS TPC ZDC MUON PMD FMD TOF ITS \
e72c66aa 21 CASTOR RICH START STRUCT EVGEN RALICE ALIFAST \
22 THijing CONTAINERS MEVSIM TMEVSIM
fe4da5cc 23
24##### TARGETS #####
25
26default: lib bin alilibs aliroot
27
28lib bin:
29 @mkdir $@
30
31alilibs: lib
0237511c 32 echo MAKEFLAGS = $(MAKEFLAGS)
47b969ba 33 for i in $(ALIROOT_DIRS) ; do \
34 echo "Making headers in $$i" | $(PRETTY); \
31ccd13b 35 ${MAKE} -C $$i headers ; \
47b969ba 36 done
fe4da5cc 37 @for i in $(ALIROOT_DIRS) ; do \
47b969ba 38 echo "Making dependencies in $$i" | $(PRETTY); \
fe4da5cc 39 ${MAKE} -C $$i depend ; \
40 done
41 @for i in $(ALIROOT_DIRS) ; do \
47b969ba 42 echo "Making in $$i" | $(PRETTY); \
fe4da5cc 43 ${MAKE} -C $$i ; \
44 done
45
2c7de6df 46aliroot geant321 minicern pdf pythia6 hijing: FORCE
0237511c 47 @DIR=`echo $@ | $(AWK) '{print toupper($$0)}'` ; \
47b969ba 48 echo "Making dependencies in $$DIR" | $(PRETTY); \
49 ${MAKE} -C $$DIR depend;\
50 echo "Making in $$DIR" | $(PRETTY); \
51 ${MAKE} -C $$DIR
fe4da5cc 52
5adf8bdf 53TGeant4 AliGeant4: FORCE
54 @DIR=$@; \
55 echo "Making dependencies in $$DIR" | $(PRETTY); \
56 ${MAKE} -C $$DIR depend;\
57 echo "Making in $$DIR" | $(PRETTY); \
58 ${MAKE} -C $$DIR
59
2c7de6df 60cernlibs: geant321 pythia6 minicern pdf hijing
5adf8bdf 61
62geant4: TGeant4 AliGeant4
fe4da5cc 63
b83f95da 64all: cernlibs default
fe4da5cc 65
66FORCE:
67
68############################### General Macros ################################
69
3e27ea2b 70# include $(ALICE_ROOT)/conf/GeneralMacros
fe4da5cc 71
72############################### Specific Macros ###############################
73
74STRUCT_DIRS = html conf macros data share include Euclid picts \
4bff45ae 75 doc etc Makefile .rootrc
fe4da5cc 76
36022826 77LIBRARY_DIRS = MINICERN GEANT321 PYTHIA6 PDF HIJING
fe4da5cc 78
6ac62af5 79dist: AliRoot$(VERSION).tar.gz
fe4da5cc 80
6ac62af5 81AliRoot$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) ALIROOT
fe4da5cc 82
6ac62af5 83distall: AliOffline$(VERSION).tar.gz
fe4da5cc 84
6ac62af5 85AliOffline$(VERSION).tar.gz: $(STRUCT_DIRS) $(ALIROOT_DIRS) $(LIBRARY_DIRS) ALIROOT
fe4da5cc 86
6ac62af5 87distlib: AliLibs$(VERSION).tar.gz
fe4da5cc 88
6ac62af5 89AliLibs$(VERSION).tar.gz: $(LIBRARY_DIRS)
fe4da5cc 90
6ac62af5 91AliRoot$(VERSION).tar.gz AliLibs$(VERSION).tar.gz AliOffline$(VERSION).tar.gz:
fe4da5cc 92 @rm -f $(ALICE)/$@
93 @rm -f `find . -name '*~' -print` \
94 `find . -name '*.bak' -print` \
cec56ef0 95 `find . -name '.*~' -print` \
18778aed 96 `find . -name '*\#*' -print`
fe4da5cc 97 @rm -f /tmp/saves
98 @ls -1d $^ | sed -e "s/^/$(ALICE_LEVEL)\//" > /tmp/saves
99 @cd $(ALICE) ; \
100 gtar cvfz $@ --exclude '*.o' --exclude '*Cint.*' \
e9fe1fae 101 --exclude 'roothtml' --exclude 'CVS' \
ce7c8058 102 --exclude Make-depend --exclude '*html/gif' \
ee854967 103 --exclude "*tgt_*" --exclude check \
ce7c8058 104 `cat /tmp/saves`
fe4da5cc 105
fe4da5cc 106htmldocnew: FORCE
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 \
113 echo $$j ; \
114 aliroot -b -q "mkhtml.C(\"$$j\")" > /dev/null; \
115 done \
116 done
117
118
119htmldoc: FORCE
120 @rm -rf html/roothtml
e95543bd 121 @rm -f html/picts
fe4da5cc 122 @rm -f /tmp/macros
123 @cd html ;\
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 ;\
128 done ;\
129 for i in `cat /tmp/macros` ; do \
130 echo $$i ; \
131 aliroot -b -q "mkhtml.C(\"$$i\")" > /dev/null ;\
132 done ;\
133 ./makeExampleList ;
1439f98e 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
fe4da5cc 138
139clean: FORCE
140 @rm -f *~ \#*
6c83c8fa 141 @rm -f include/*
38c7852e 142 @for i in $(ALIROOT_DIRS) ALIROOT; do \
fe4da5cc 143 ${MAKE} -C $$i macroclean ; \
144 done
38c7852e 145 ifdef G4INSTALL
146 @for i in TGeant4 AliGeant4; do \
147 ${MAKE} -C $$i macroclean ; \
148 done
149 endif
fe4da5cc 150
151libclean: FORCE
152 @rm -f *~ \#*
153 @for i in $(LIBRARY_DIRS) ; do \
154 ${MAKE} -C $$i macroclean ; \
155 done
156
157allclean: libclean clean
41f6cf69 158
159# IRST coding rule check
c40fbac6 160CHECK_DIRS = $(ALIROOT_DIRS) ALIROOT TGeant4 AliGeant4
41f6cf69 161check:
162 @for i in $(CHECK_DIRS) ; do \
163 echo "Checking $$i" ; \
164 ${MAKE} -C $$i check ; \
165 done
166
3e27ea2b 167REVENG_DIRS = $(ALIROOT_DIRS)
168
169reveng:
170 @for i in $(REVENG_DIRS) ; do \
171 echo "Reverse engineering $$i" ; \
172 ${MAKE} -C $$i reveng ; \
173 done
174
41f6cf69 175
176
177
178
179
180
181