]>
Commit | Line | Data |
---|---|---|
1 | #************************************************************************** | |
2 | #**** This file is automatically generated from the mkmodules script ***** | |
3 | #**** DO NOT EDIT!! ***** | |
4 | #************************************************************************** | |
5 | #-*- Mode: Makefile -*- | |
6 | ||
7 | #********** This part is for package ZDC *********** | |
8 | ||
9 | #Determine if it's a library or a executable | |
10 | TYPE=lib | |
11 | ||
12 | # Package head directory, source and include directories | |
13 | MODDIR:=ZDC | |
14 | MODDIRS:=$(MODDIR) | |
15 | MODDIRI:=$(MODDIR) | |
16 | MODDIRO:=$(MODDIR)/tgt_$(ALICE_TARGET) | |
17 | ||
18 | # Reseting variables before importing pkg-file | |
19 | SRCS:= | |
20 | HDRS:= | |
21 | FSRCS:= | |
22 | DHDR:= | |
23 | CSRCS:= | |
24 | CHDRS:= | |
25 | EINCLUDE:= | |
26 | EDEFINE:= | |
27 | ELIBS:= | |
28 | ELIBSDIR:= | |
29 | PACKFFLAGS:= | |
30 | PACKCXXFLAGS:= | |
31 | PACKCFLAGS:= | |
32 | PACKDYFLAGS:= | |
33 | PACKSOFLAGS:= | |
34 | EXPORT:= | |
35 | EHDRS:= | |
36 | CINTHDRS:= | |
37 | ARLIBS:= | |
38 | SHLIBS:= | |
39 | SUBDIR:= | |
40 | ||
41 | SRCS= AliZDC.cxx AliZDCv1.cxx AliZDCv2.cxx AliZDCHit.cxx AliZDCDigit.cxx \ | |
42 | AliGenZDC.cxx AliZDCFragment.cxx AliZDCMerger.cxx \ | |
43 | AliZDCMergedHit.cxx AliZDCReco.cxx | |
44 | ||
45 | HDRS= $(SRCS:.cxx=.h) | |
46 | ||
47 | DHDR:=ZDCLinkDef.h | |
48 | ||
49 | #-*- Mode: Makefile -*- | |
50 | ||
51 | ||
52 | ifndef PACKFFLAGS | |
53 | ZDCFFLAGS:=$(FFLAGS) | |
54 | else | |
55 | ZDCFFLAGS:=$(PACKFFLAGS) | |
56 | endif | |
57 | ||
58 | ifndef PACKCFLAGS | |
59 | ZDCCFLAGS:=$(CFLAGS) | |
60 | else | |
61 | ZDCCFLAGS:=$(PACKCFLAGS) | |
62 | endif | |
63 | ||
64 | ifndef PACKCXXFLAGS | |
65 | ZDCCXXFLAGS:=$(CXXFLAGS) | |
66 | else | |
67 | ZDCCXXFLAGS:=$(PACKCXXFLAGS) | |
68 | endif | |
69 | ||
70 | ifndef PACKSOFLAGS | |
71 | ZDCSOFLAGS:=$(SOFLAGS) | |
72 | else | |
73 | ZDCSOFLAGS:=$(PACKSOFLAGS) | |
74 | endif | |
75 | ||
76 | ifdef DYEXT | |
77 | ifndef PACKDYFLAGS | |
78 | ZDCDYFLAGS:=$(DYFLAGS) | |
79 | else | |
80 | ZDCDYFLAGS:=$(PACKDYFLAGS) | |
81 | endif | |
82 | endif | |
83 | ||
84 | ifndef PACKDCXXFLAGS | |
85 | ZDCDCXXFLAGS:=$(CXXFLAGSNO) | |
86 | else | |
87 | ZDCDCXXFLAGS:=$(PACKDCXXFLAGS) | |
88 | endif | |
89 | ||
90 | ||
91 | ifdef DHDR | |
92 | WITHDICT=YES | |
93 | else | |
94 | WITHDICT= | |
95 | endif | |
96 | ||
97 | # Headerfiles exported to common place: | |
98 | ZDCEXPORT:=$(EXPORT) | |
99 | ZDCEXPORTDEST:=$(patsubst %,$(EXPORTDIR)/%,$(EXPORT)) | |
100 | ||
101 | ||
102 | #Extra include,libs, defines etc. | |
103 | ||
104 | ZDCDEFINE:=$(EDEFINE) -D__MODULE__=\"ZDC\" | |
105 | ||
106 | ZDCINC:=$(patsubst %,-I%,$(EINCLUDE)) -IZDC | |
107 | ||
108 | ZDCELIBS:=$(patsubst %,-l%,$(ELIBS)) | |
109 | ZDCELIBSDEP:=$(patsubst %,lib/tgt_$(ALICE_TARGET)/lib%.$(SOEXT),$(ELIBS)) | |
110 | ZDCELIBSDIR:=$(patsubst %,-L%,$(ELIBSDIR)) | |
111 | ||
112 | #c sources and headers | |
113 | ||
114 | ZDCCS:=$(patsubst %,$(MODDIR)/%,$(CSRCS)) | |
115 | ZDCCH:=$(patsubst %,$(MODDIR)/%,$(CHDRS)) | |
116 | ||
117 | #Fortran sources | |
118 | ZDCFS:=$(patsubst %,$(MODDIR)/%,$(FSRCS)) | |
119 | ||
120 | #c++ sources and header | |
121 | ZDCS:=$(patsubst %,$(MODDIR)/%,$(SRCS)) | |
122 | ZDCH:=$(patsubst %,$(MODDIR)/%,$(HDRS)) $(EHDRS) | |
123 | ||
124 | #c++ source subdirectories | |
125 | ZDCSDIR:=$(SUBDIR) | |
126 | ||
127 | ############################################################################# | |
128 | # | |
129 | # If special rootcint headerfiles is specified use them | |
130 | # else use all headers | |
131 | ||
132 | ifndef CINTHDRS | |
133 | ZDCCINTHDRS:=$(ZDCH) | |
134 | else | |
135 | ZDCCINTHDRS:=$(CINTHDRS) | |
136 | endif | |
137 | ############################################################################# | |
138 | ||
139 | # Package Dictionary | |
140 | ||
141 | ZDCDH:=$(MODDIR)/$(DHDR) | |
142 | ||
143 | ||
144 | #All objects | |
145 | ZDCCO:=$(patsubst %,$(MODDIRO)/%, $(CSRCS:.c=.o)) | |
146 | TEMP:=$(FSRCS:.F=.o) | |
147 | ZDCFO:=$(patsubst %,$(MODDIRO)/%, $(TEMP:.f=.o)) | |
148 | ZDCO:= $(patsubst %,$(MODDIRO)/%, $(SRCS:.cxx=.o)) $(ZDCFO) $(ZDCCO) | |
149 | ||
150 | ||
151 | ||
152 | ifdef WITHDICT | |
153 | ZDCDS:=$(MODDIRO)/G__ZDC.cxx | |
154 | ZDCDO:=$(MODDIRO)/G__ZDC.o | |
155 | ZDCDDEP:=$(ZDCDO:.o=.d) | |
156 | ZDCDEP:=$(ZDCO:.o=.d) $(ZDCDDEP) | |
157 | else | |
158 | ZDCDS:= | |
159 | ZDCDO:= | |
160 | ZDCDDEP:= | |
161 | ZDCDEP:=$(ZDCO:.o=.d) | |
162 | endif | |
163 | ||
164 | ||
165 | #The actual library file | |
166 | ||
167 | ZDCLIB:=$(LIBPATH)/libZDC.$(SOEXT) | |
168 | ||
169 | ifneq ($(DYEXT),) | |
170 | ZDCDLIB:=$(LIBPATH)/libZDC.$(DYEXT) | |
171 | endif | |
172 | ||
173 | ZDCALIB:=$(LIBPATH)/libZDC.$(AEXT) | |
174 | ||
175 | #Add this to the modules libs | |
176 | ZDCLIBS += $(ZDCLIB) | |
177 | ZDCALIBS += $(ZDCALIB) | |
178 | ifneq ($(DYEXT),) | |
179 | ZDCDLIBS += $(ZDCDLIB) | |
180 | endif | |
181 | ||
182 | #The actual binary file | |
183 | ||
184 | ZDCBIN:=$(BINPATH)/ZDC | |
185 | ||
186 | #Add to modules list of binaries | |
187 | ZDCBINS += $(ZDCBIN) | |
188 | ||
189 | # Use in the main Makefile | |
190 | ||
191 | ifeq ($(TYPE),lib) | |
192 | ALLLIBS += $(ZDCLIB) | |
193 | ALLALIBS += $(ZDCALIB) | |
194 | ifneq ($(DYEXT),) | |
195 | ALLLIBS += $(ZDCDLIB) | |
196 | endif | |
197 | BINLIBS += -lZDC | |
198 | else | |
199 | ALLEXECS += $(ZDCBIN) | |
200 | endif | |
201 | ||
202 | ifeq ($(DYEXT),) | |
203 | ZDCLIB := $(ZDCLIB) | |
204 | else | |
205 | ZDCLIB := $(ZDCLIB) | |
206 | endif | |
207 | ||
208 | # include all dependence files | |
209 | INCLUDEFILES +=$(ZDCDEP) | |
210 | ||
211 | EXPORTFILES += $(ZDCEXPORTDEST) | |
212 | ||
213 | #local rules | |
214 | ||
215 | #The exportfiles only include if any!! | |
216 | ||
217 | ifdef ZDCEXPORT | |
218 | #$(ZDCEXPORTDEST): $(patsubst %,ZDC/%,$(ZDCEXPORT)) | |
219 | ||
220 | $(ZDCEXPORTDEST): $(EXPORTDIR)/%.h: ZDC/%.h | |
221 | ifndef ALIQUIET | |
222 | @echo "***** Copying file $^ to $@ *****" | |
223 | endif | |
224 | @[ -d $(dir $@) ] || mkdir -p $(dir $@) | |
225 | @cp $^ $@ | |
226 | endif | |
227 | ||
228 | #------------------------------------------------------------------------ | |
229 | ||
230 | $(ZDCLIB):$(ZDCO) $(ZDCDO) ZDC/module.mk | |
231 | ifndef ALIQUIET | |
232 | @echo "***** Linking library $@ *****" | |
233 | endif | |
234 | $(MUTE)TMPDIR=/tmp/ZDC$$$$.`date +%M%S` ; \ | |
235 | export TMPDIR; mkdir -p $$TMPDIR ; cd $$TMPDIR ; \ | |
236 | find $(CURDIR)/ZDC/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\ | |
237 | \rm -f $(CURDIR)/$@ ;\ | |
238 | TMPLIB=$(notdir $(ZDCLIB)); export TMPLIB;\ | |
239 | $(SHLD) $(ZDCSOFLAGS) -o $(CURDIR)/$@ $(notdir $(ZDCO) $(ZDCDO)) $(ZDCELIBSDIR) $(ZDCELIBS) $(SHLIB);\ | |
240 | chmod a-w $(CURDIR)/$@ ;\ | |
241 | cd $(ALICE_ROOT) ; \rm -rf $$TMPDIR | |
242 | ||
243 | ifneq ($(DYEXT),) | |
244 | $(ZDCDLIB):$(ZDCO) $(ZDCDO) ZDC/module.mk | |
245 | ifndef ALIQUIET | |
246 | @echo "***** Linking library $@ *****" | |
247 | endif | |
248 | $(MUTE)TMPDIR=/tmp/ZDC$$$$.`date +%M%S` ; \ | |
249 | export TMPDIR; mkdir -p $$TMPDIR ; cd $$TMPDIR ; \ | |
250 | find $(CURDIR)/ZDC/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\ | |
251 | \rm -f $(CURDIR)/$@ ;\ | |
252 | $(DYLD) $(ZDCDYFLAGS) -o $(CURDIR)/$@ $(notdir $(ZDCO) $(ZDCDO)) $(ZDCELIBSDIR) $(ZDCELIBS) $(DYLIB);\ | |
253 | chmod a-w $(CURDIR)/$@ ;\ | |
254 | cd $(ALICE_ROOT) ; \rm -rf $$TMPDIR | |
255 | endif | |
256 | ||
257 | #------------------------------------------------------------------------ | |
258 | ||
259 | $(ZDCALIB):$(ZDCO) $(ZDCDO) ZDC/module.mk | |
260 | ifndef ALIQUIET | |
261 | @echo "***** Linking static library $@ *****" | |
262 | endif | |
263 | $(MUTE)TMPDIR=/tmp/ZDC$$$$.`date +%M%S` ; \ | |
264 | export TMPDIR; mkdir -p $$TMPDIR ; cd $$TMPDIR ; \ | |
265 | find $(CURDIR)/ZDC/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\ | |
266 | \rm -f $(CURDIR)/$@ ;\ | |
267 | TMPLIB=$(notdir $(ZDCLIB)); export TMPLIB;\ | |
268 | $(ALLD) $(ALFLAGS) $(CURDIR)/$@ $(notdir $(ZDCO) $(ZDCDO)) $(ZDCELIBSDIR) $(ZDCELIBS) $(ALLIB);\ | |
269 | cd $(CURDIR) ; \rm -rf $$TMPDIR | |
270 | $(MUTE)chmod a-w $@ | |
271 | ||
272 | ||
273 | $(ZDCBIN):$(ZDCO) $(ZDCDO) ZDC/module.mk | |
274 | ifndef ALIQUIET | |
275 | @echo "***** Making executable $@ *****" | |
276 | endif | |
277 | ifeq ($(ALIPROFILE),YES) | |
278 | $(MUTE)$(LD) $(LDFLAGS) $(ZDCO) $(ARLIBS) $(SHLIBS) $(LIBS) $(EXEFLAGS) -o $@ | |
279 | else | |
280 | $(MUTE)$(LD) $(LDFLAGS) $(ZDCO) $(ZDCDO) $(BINLIBDIRS) $(ZDCELIBSDIR) $(ZDCELIBS) $(LIBS) $(EXEFLAGS) -o $@ | |
281 | endif | |
282 | ||
283 | $(ZDCDS): $(ZDCCINTHDRS) $(ZDCDH) ZDC/module.mk | |
284 | ifndef ALIQUIET | |
285 | @echo "***** Creating $@ *****"; | |
286 | endif | |
287 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
288 | @\rm -f $(patsubst %.cxx,%.d, $@) | |
289 | $(MUTE)rootcint -f $@ -c $(ZDCDEFINE) $(CINTFLAGS) $(ZDCINC) $(ZDCCINTHDRS) $(ZDCDH) | |
290 | ||
291 | $(ZDCDO): $(ZDCDS) | |
292 | ifndef ALIQUIET | |
293 | @echo "***** Compiling $< *****"; | |
294 | endif | |
295 | $(MUTE)$(CXX) $(ZDCDEFINE) -c $(ZDCINC) -I$(ALICE_ROOT) $< -o $@ $(ZDCDCXXFLAGS) | |
296 | ||
297 | #Different targets for the module | |
298 | ||
299 | ifeq ($(TYPE),lib) | |
300 | all-ZDC: $(ZDCLIB) | |
301 | ifneq ($(DYEXT),) | |
302 | all-ZDC: $(ZDCDLIB) | |
303 | endif | |
304 | else | |
305 | all-ZDC: $(ZDCBIN) | |
306 | endif | |
307 | ||
308 | depend-ZDC: $(ZDCDEP) | |
309 | ||
310 | # determination of object files | |
311 | $(MODDIRO)/%.o: $(MODDIR)/%.cxx $(MODDIRO)/%.d | |
312 | ifndef ALIQUIET | |
313 | @echo "***** Compiling $< *****"; | |
314 | endif | |
315 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
316 | $(MUTE)$(CXX) $(ZDCDEFINE) -c $(ZDCINC) $< -o $@ $(ZDCCXXFLAGS) | |
317 | ||
318 | $(MODDIRO)/%.o: $(MODDIR)/%.F $(MODDIRO)/%.d | |
319 | ifndef ALIQUIET | |
320 | @echo "***** Compiling $< *****"; | |
321 | endif | |
322 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
323 | $(MUTE)$(F77) -c $(ZDCINC) $< -o $@ $(ZDCFFLAGS) | |
324 | ||
325 | $(MODDIRO)/%.o: $(MODDIR)/%.f $(MODDIRO)/%.d | |
326 | ifndef ALIQUIET | |
327 | @echo "***** Compiling $< *****"; | |
328 | endif | |
329 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
330 | $(MUTE)$(F77) -c $(ZDCINC) $< -o $@ $(ZDCFFLAGS) | |
331 | ||
332 | $(MODDIRO)/%.o: $(MODDIR)/%.c $(MODDIRO)/%.d | |
333 | ifndef ALIQUIET | |
334 | @echo "***** Compiling $< *****"; | |
335 | endif | |
336 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
337 | $(MUTE)$(CC) $(ZDCDEFINE) -c $(ZDCINC) $< -o $@ $(ZDCCFLAGS) | |
338 | ||
339 | $(ZDCDDEP): $(ZDCDS) | |
340 | ifndef ALIQUIET | |
341 | @echo "***** Making dependences for $< *****"; | |
342 | endif | |
343 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
344 | @share/alibtool depend "$(ZDCELIBSDIR) $(ZDCINC) $(DEPINC) $<" > $@ | |
345 | ||
346 | $(MODDIRO)/%.d: $(MODDIRS)/%.cxx | |
347 | ifndef ALIQUIET | |
348 | @echo "***** Making dependences for $< *****"; | |
349 | endif | |
350 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
351 | @share/alibtool depend "$(ZDCDEFINE) $(ZDCELIBSDIR) $(ZDCINC) $(DEPINC) $<" > $@ | |
352 | $(MODDIRO)/%.d: $(MODDIRS)/%.f | |
353 | ifndef ALIQUIET | |
354 | @echo "***** Making dependences for $< *****"; | |
355 | endif | |
356 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
357 | @share/alibtool dependF "$(ZDCELIBSDIR) $(ZDCINC) $(DEPINC) $<" > $@ | |
358 | $(MODDIRO)/%.d: $(MODDIRS)/%.F | |
359 | ifndef ALIQUIET | |
360 | @echo "***** Making dependences for $< *****"; | |
361 | endif | |
362 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
363 | $(MUTE)share/alibtool dependF "$(ZDCELIBSDIR) $(ZDCINC) $(DEPINC) $<" > $@ | |
364 | $(MODDIRO)/%.d: $(MODDIRS)/%.c | |
365 | ifndef ALIQUIET | |
366 | @echo "***** Making dependences for $< *****"; | |
367 | endif | |
368 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
369 | @share/alibtool depend "$(ZDCDEFINE) $(ZDCELIBSDIR) $(ZDCINC) $(DEPINC) $<" > $@ | |
370 | ||
371 | .PRECIOUS: $(patsubst %.cxx,$(MODDIRO)/%.d,$(SRCS)) | |
372 | .PRECIOUS: $(patsubst %.c,$(MODDIRO)/%.d,$(CSRCS)) | |
373 | .PRECIOUS: $(patsubst %.F,$(MODDIRO)/%.d,$(patsubst %.f,$(MODDIRO)/%.d,$(FSRCS))) | |
374 | ||
375 | ZDCCHECKS := $(patsubst %.cxx,ZDC/check/%.viol,$(SRCS)) | |
376 | ||
377 | check-ZDC: $(ZDCCHECKS) | |
378 | ||
379 | # IRST coding rule check | |
380 | ZDC/check/%.i : ZDC/%.cxx ZDC/%.h | |
381 | @[ -d $(dir $@) ] || mkdir -p $(dir $@) | |
382 | $(MUTE)$(CXX) -E $(ZDCDEFINE) $(ZDCINC) $< > $@ $(ZDCCXXFLAGS) | |
383 | @cd $(dir $@) ; $(IRST_INSTALLDIR)/patch/patch4alice.prl $(notdir $@) | |
384 | ||
385 | # IRST coding rule check | |
386 | ZDC/check/$(SUBDIR)/%.viol : ZDC/check/$(SUBDIR)/%.i | |
387 | @cd ZDC ; [ -r ZDC ] || ln -s ../ZDC ZDC | |
388 | $(MUTE)echo $@ ; $(CODE_CHECK) $< ./ZDC/$(ZDCSDIR) > $@ | |
389 | ||
390 | # IRST coding rule check | |
391 | ZDC/check/%.viol : ZDC/check/%.i | |
392 | @cd ZDC ; [ -r ZDC ] || ln -s ../ZDC ZDC | |
393 | $(MUTE)echo $@ ; $(CODE_CHECK) $< ./ZDC > $@ | |
394 | ||
395 | ZDCPREPROC = $(patsubst %.viol,%.i,$(ZDCCHECKS)) | |
396 | ||
397 | ZDCREVENGS = $(patsubst %.viol,%.ii,$(ZDCCHECKS)) | |
398 | ||
399 | .SECONDARY: $(ZDCREVENGS) $(ZDCPREPROC) | |
400 | ||
401 | reveng-ZDC: ZDC/check/classDiagram.dot | |
402 | ||
403 | ZDC/check/classDiagram.dot: $(ZDCPREPROC) | |
404 | @$(REV_ENG) $^ | |
405 | @-mv classDiagram.dot $@ | |
406 | ||
407 | revdisp-ZDC: reveng-ZDC | |
408 | @echo revdisp for ZDC | |
409 | @cd ZDC/check ; \ | |
410 | $(IRST_INSTALLDIR)/webreveng/create-class-diagram-pages.sh | |
411 | @sed -e "s/\@PACKAGE\@/ZDC/g" < $(ALICE_ROOT)/build/HomePage.html > ZDC/check/HomePage.html | |
412 | ||
413 | #-*- Mode: Makefile -*- | |
414 | ||
415 | #********** This part is for package ZDCbase *********** | |
416 | ||
417 | #Determine if it's a library or a executable | |
418 | TYPE=lib | |
419 | ||
420 | # Package head directory, source and include directories | |
421 | MODDIR:=ZDC | |
422 | MODDIRS:=$(MODDIR) | |
423 | MODDIRI:=$(MODDIR) | |
424 | MODDIRO:=$(MODDIR)/tgt_$(ALICE_TARGET) | |
425 | ||
426 | # Reseting variables before importing pkg-file | |
427 | SRCS:= | |
428 | HDRS:= | |
429 | FSRCS:= | |
430 | DHDR:= | |
431 | CSRCS:= | |
432 | CHDRS:= | |
433 | EINCLUDE:= | |
434 | EDEFINE:= | |
435 | ELIBS:= | |
436 | ELIBSDIR:= | |
437 | PACKFFLAGS:= | |
438 | PACKCXXFLAGS:= | |
439 | PACKCFLAGS:= | |
440 | PACKDYFLAGS:= | |
441 | PACKSOFLAGS:= | |
442 | EXPORT:= | |
443 | EHDRS:= | |
444 | CINTHDRS:= | |
445 | ARLIBS:= | |
446 | SHLIBS:= | |
447 | SUBDIR:= | |
448 | ||
449 | #-*- Mode: Makefile -*- | |
450 | # $Id$ | |
451 | ||
452 | SRCS= AliZDCDigit.cxx AliZDCRawStream.cxx | |
453 | ||
454 | HDRS= $(SRCS:.cxx=.h) | |
455 | ||
456 | DHDR:=ZDCbaseLinkDef.h | |
457 | ||
458 | EINCLUDE:=RAW | |
459 | ||
460 | #-*- Mode: Makefile -*- | |
461 | ||
462 | ||
463 | ifndef PACKFFLAGS | |
464 | ZDCbaseFFLAGS:=$(FFLAGS) | |
465 | else | |
466 | ZDCbaseFFLAGS:=$(PACKFFLAGS) | |
467 | endif | |
468 | ||
469 | ifndef PACKCFLAGS | |
470 | ZDCbaseCFLAGS:=$(CFLAGS) | |
471 | else | |
472 | ZDCbaseCFLAGS:=$(PACKCFLAGS) | |
473 | endif | |
474 | ||
475 | ifndef PACKCXXFLAGS | |
476 | ZDCbaseCXXFLAGS:=$(CXXFLAGS) | |
477 | else | |
478 | ZDCbaseCXXFLAGS:=$(PACKCXXFLAGS) | |
479 | endif | |
480 | ||
481 | ifndef PACKSOFLAGS | |
482 | ZDCbaseSOFLAGS:=$(SOFLAGS) | |
483 | else | |
484 | ZDCbaseSOFLAGS:=$(PACKSOFLAGS) | |
485 | endif | |
486 | ||
487 | ifdef DYEXT | |
488 | ifndef PACKDYFLAGS | |
489 | ZDCbaseDYFLAGS:=$(DYFLAGS) | |
490 | else | |
491 | ZDCbaseDYFLAGS:=$(PACKDYFLAGS) | |
492 | endif | |
493 | endif | |
494 | ||
495 | ifndef PACKDCXXFLAGS | |
496 | ZDCbaseDCXXFLAGS:=$(CXXFLAGSNO) | |
497 | else | |
498 | ZDCbaseDCXXFLAGS:=$(PACKDCXXFLAGS) | |
499 | endif | |
500 | ||
501 | ||
502 | ifdef DHDR | |
503 | WITHDICT=YES | |
504 | else | |
505 | WITHDICT= | |
506 | endif | |
507 | ||
508 | # Headerfiles exported to common place: | |
509 | ZDCbaseEXPORT:=$(EXPORT) | |
510 | ZDCbaseEXPORTDEST:=$(patsubst %,$(EXPORTDIR)/%,$(EXPORT)) | |
511 | ||
512 | ||
513 | #Extra include,libs, defines etc. | |
514 | ||
515 | ZDCbaseDEFINE:=$(EDEFINE) -D__MODULE__=\"ZDC\" | |
516 | ||
517 | ZDCbaseINC:=$(patsubst %,-I%,$(EINCLUDE)) -IZDC | |
518 | ||
519 | ZDCbaseELIBS:=$(patsubst %,-l%,$(ELIBS)) | |
520 | ZDCbaseELIBSDEP:=$(patsubst %,lib/tgt_$(ALICE_TARGET)/lib%.$(SOEXT),$(ELIBS)) | |
521 | ZDCbaseELIBSDIR:=$(patsubst %,-L%,$(ELIBSDIR)) | |
522 | ||
523 | #c sources and headers | |
524 | ||
525 | ZDCbaseCS:=$(patsubst %,$(MODDIR)/%,$(CSRCS)) | |
526 | ZDCbaseCH:=$(patsubst %,$(MODDIR)/%,$(CHDRS)) | |
527 | ||
528 | #Fortran sources | |
529 | ZDCbaseFS:=$(patsubst %,$(MODDIR)/%,$(FSRCS)) | |
530 | ||
531 | #c++ sources and header | |
532 | ZDCbaseS:=$(patsubst %,$(MODDIR)/%,$(SRCS)) | |
533 | ZDCbaseH:=$(patsubst %,$(MODDIR)/%,$(HDRS)) $(EHDRS) | |
534 | ||
535 | #c++ source subdirectories | |
536 | ZDCbaseSDIR:=$(SUBDIR) | |
537 | ||
538 | ############################################################################# | |
539 | # | |
540 | # If special rootcint headerfiles is specified use them | |
541 | # else use all headers | |
542 | ||
543 | ifndef CINTHDRS | |
544 | ZDCbaseCINTHDRS:=$(ZDCbaseH) | |
545 | else | |
546 | ZDCbaseCINTHDRS:=$(CINTHDRS) | |
547 | endif | |
548 | ############################################################################# | |
549 | ||
550 | # Package Dictionary | |
551 | ||
552 | ZDCbaseDH:=$(MODDIR)/$(DHDR) | |
553 | ||
554 | ||
555 | #All objects | |
556 | ZDCbaseCO:=$(patsubst %,$(MODDIRO)/%, $(CSRCS:.c=.o)) | |
557 | TEMP:=$(FSRCS:.F=.o) | |
558 | ZDCbaseFO:=$(patsubst %,$(MODDIRO)/%, $(TEMP:.f=.o)) | |
559 | ZDCbaseO:= $(patsubst %,$(MODDIRO)/%, $(SRCS:.cxx=.o)) $(ZDCbaseFO) $(ZDCbaseCO) | |
560 | ||
561 | ||
562 | ||
563 | ifdef WITHDICT | |
564 | ZDCbaseDS:=$(MODDIRO)/G__ZDCbase.cxx | |
565 | ZDCbaseDO:=$(MODDIRO)/G__ZDCbase.o | |
566 | ZDCbaseDDEP:=$(ZDCbaseDO:.o=.d) | |
567 | ZDCbaseDEP:=$(ZDCbaseO:.o=.d) $(ZDCbaseDDEP) | |
568 | else | |
569 | ZDCbaseDS:= | |
570 | ZDCbaseDO:= | |
571 | ZDCbaseDDEP:= | |
572 | ZDCbaseDEP:=$(ZDCbaseO:.o=.d) | |
573 | endif | |
574 | ||
575 | ||
576 | #The actual library file | |
577 | ||
578 | ZDCbaseLIB:=$(LIBPATH)/libZDCbase.$(SOEXT) | |
579 | ||
580 | ifneq ($(DYEXT),) | |
581 | ZDCbaseDLIB:=$(LIBPATH)/libZDCbase.$(DYEXT) | |
582 | endif | |
583 | ||
584 | ZDCbaseALIB:=$(LIBPATH)/libZDCbase.$(AEXT) | |
585 | ||
586 | #Add this to the modules libs | |
587 | ZDCLIBS += $(ZDCbaseLIB) | |
588 | ZDCALIBS += $(ZDCbaseALIB) | |
589 | ifneq ($(DYEXT),) | |
590 | ZDCDLIBS += $(ZDCbaseDLIB) | |
591 | endif | |
592 | ||
593 | #The actual binary file | |
594 | ||
595 | ZDCbaseBIN:=$(BINPATH)/ZDCbase | |
596 | ||
597 | #Add to modules list of binaries | |
598 | ZDCBINS += $(ZDCbaseBIN) | |
599 | ||
600 | # Use in the main Makefile | |
601 | ||
602 | ifeq ($(TYPE),lib) | |
603 | ALLLIBS += $(ZDCbaseLIB) | |
604 | ALLALIBS += $(ZDCbaseALIB) | |
605 | ifneq ($(DYEXT),) | |
606 | ALLLIBS += $(ZDCbaseDLIB) | |
607 | endif | |
608 | BINLIBS += -lZDCbase | |
609 | else | |
610 | ALLEXECS += $(ZDCbaseBIN) | |
611 | endif | |
612 | ||
613 | ifeq ($(DYEXT),) | |
614 | ZDCbaseLIB := $(ZDCbaseLIB) | |
615 | else | |
616 | ZDCbaseLIB := $(ZDCbaseLIB) | |
617 | endif | |
618 | ||
619 | # include all dependence files | |
620 | INCLUDEFILES +=$(ZDCbaseDEP) | |
621 | ||
622 | EXPORTFILES += $(ZDCbaseEXPORTDEST) | |
623 | ||
624 | #local rules | |
625 | ||
626 | #The exportfiles only include if any!! | |
627 | ||
628 | ifdef ZDCbaseEXPORT | |
629 | #$(ZDCbaseEXPORTDEST): $(patsubst %,ZDC/%,$(ZDCbaseEXPORT)) | |
630 | ||
631 | $(ZDCbaseEXPORTDEST): $(EXPORTDIR)/%.h: ZDC/%.h | |
632 | ifndef ALIQUIET | |
633 | @echo "***** Copying file $^ to $@ *****" | |
634 | endif | |
635 | @[ -d $(dir $@) ] || mkdir -p $(dir $@) | |
636 | @cp $^ $@ | |
637 | endif | |
638 | ||
639 | #------------------------------------------------------------------------ | |
640 | ||
641 | $(ZDCbaseLIB):$(ZDCbaseO) $(ZDCbaseDO) ZDC/module.mk | |
642 | ifndef ALIQUIET | |
643 | @echo "***** Linking library $@ *****" | |
644 | endif | |
645 | $(MUTE)TMPDIR=/tmp/ZDC$$$$.`date +%M%S` ; \ | |
646 | export TMPDIR; mkdir -p $$TMPDIR ; cd $$TMPDIR ; \ | |
647 | find $(CURDIR)/ZDC/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\ | |
648 | \rm -f $(CURDIR)/$@ ;\ | |
649 | TMPLIB=$(notdir $(ZDCbaseLIB)); export TMPLIB;\ | |
650 | $(SHLD) $(ZDCbaseSOFLAGS) -o $(CURDIR)/$@ $(notdir $(ZDCbaseO) $(ZDCbaseDO)) $(ZDCbaseELIBSDIR) $(ZDCbaseELIBS) $(SHLIB);\ | |
651 | chmod a-w $(CURDIR)/$@ ;\ | |
652 | cd $(ALICE_ROOT) ; \rm -rf $$TMPDIR | |
653 | ||
654 | ifneq ($(DYEXT),) | |
655 | $(ZDCbaseDLIB):$(ZDCbaseO) $(ZDCbaseDO) ZDC/module.mk | |
656 | ifndef ALIQUIET | |
657 | @echo "***** Linking library $@ *****" | |
658 | endif | |
659 | $(MUTE)TMPDIR=/tmp/ZDC$$$$.`date +%M%S` ; \ | |
660 | export TMPDIR; mkdir -p $$TMPDIR ; cd $$TMPDIR ; \ | |
661 | find $(CURDIR)/ZDC/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\ | |
662 | \rm -f $(CURDIR)/$@ ;\ | |
663 | $(DYLD) $(ZDCbaseDYFLAGS) -o $(CURDIR)/$@ $(notdir $(ZDCbaseO) $(ZDCbaseDO)) $(ZDCbaseELIBSDIR) $(ZDCbaseELIBS) $(DYLIB);\ | |
664 | chmod a-w $(CURDIR)/$@ ;\ | |
665 | cd $(ALICE_ROOT) ; \rm -rf $$TMPDIR | |
666 | endif | |
667 | ||
668 | #------------------------------------------------------------------------ | |
669 | ||
670 | $(ZDCbaseALIB):$(ZDCbaseO) $(ZDCbaseDO) ZDC/module.mk | |
671 | ifndef ALIQUIET | |
672 | @echo "***** Linking static library $@ *****" | |
673 | endif | |
674 | $(MUTE)TMPDIR=/tmp/ZDC$$$$.`date +%M%S` ; \ | |
675 | export TMPDIR; mkdir -p $$TMPDIR ; cd $$TMPDIR ; \ | |
676 | find $(CURDIR)/ZDC/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\ | |
677 | \rm -f $(CURDIR)/$@ ;\ | |
678 | TMPLIB=$(notdir $(ZDCbaseLIB)); export TMPLIB;\ | |
679 | $(ALLD) $(ALFLAGS) $(CURDIR)/$@ $(notdir $(ZDCbaseO) $(ZDCbaseDO)) $(ZDCbaseELIBSDIR) $(ZDCbaseELIBS) $(ALLIB);\ | |
680 | cd $(CURDIR) ; \rm -rf $$TMPDIR | |
681 | $(MUTE)chmod a-w $@ | |
682 | ||
683 | ||
684 | $(ZDCbaseBIN):$(ZDCbaseO) $(ZDCbaseDO) ZDC/module.mk | |
685 | ifndef ALIQUIET | |
686 | @echo "***** Making executable $@ *****" | |
687 | endif | |
688 | ifeq ($(ALIPROFILE),YES) | |
689 | $(MUTE)$(LD) $(LDFLAGS) $(ZDCbaseO) $(ARLIBS) $(SHLIBS) $(LIBS) $(EXEFLAGS) -o $@ | |
690 | else | |
691 | $(MUTE)$(LD) $(LDFLAGS) $(ZDCbaseO) $(ZDCbaseDO) $(BINLIBDIRS) $(ZDCbaseELIBSDIR) $(ZDCbaseELIBS) $(LIBS) $(EXEFLAGS) -o $@ | |
692 | endif | |
693 | ||
694 | $(ZDCbaseDS): $(ZDCbaseCINTHDRS) $(ZDCbaseDH) ZDC/module.mk | |
695 | ifndef ALIQUIET | |
696 | @echo "***** Creating $@ *****"; | |
697 | endif | |
698 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
699 | @\rm -f $(patsubst %.cxx,%.d, $@) | |
700 | $(MUTE)rootcint -f $@ -c $(ZDCbaseDEFINE) $(CINTFLAGS) $(ZDCbaseINC) $(ZDCbaseCINTHDRS) $(ZDCbaseDH) | |
701 | ||
702 | $(ZDCbaseDO): $(ZDCbaseDS) | |
703 | ifndef ALIQUIET | |
704 | @echo "***** Compiling $< *****"; | |
705 | endif | |
706 | $(MUTE)$(CXX) $(ZDCbaseDEFINE) -c $(ZDCbaseINC) -I$(ALICE_ROOT) $< -o $@ $(ZDCbaseDCXXFLAGS) | |
707 | ||
708 | #Different targets for the module | |
709 | ||
710 | ifeq ($(TYPE),lib) | |
711 | all-ZDCbase: $(ZDCbaseLIB) | |
712 | ifneq ($(DYEXT),) | |
713 | all-ZDCbase: $(ZDCbaseDLIB) | |
714 | endif | |
715 | else | |
716 | all-ZDCbase: $(ZDCbaseBIN) | |
717 | endif | |
718 | ||
719 | depend-ZDCbase: $(ZDCbaseDEP) | |
720 | ||
721 | # determination of object files | |
722 | $(MODDIRO)/%.o: $(MODDIR)/%.cxx $(MODDIRO)/%.d | |
723 | ifndef ALIQUIET | |
724 | @echo "***** Compiling $< *****"; | |
725 | endif | |
726 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
727 | $(MUTE)$(CXX) $(ZDCbaseDEFINE) -c $(ZDCbaseINC) $< -o $@ $(ZDCbaseCXXFLAGS) | |
728 | ||
729 | $(MODDIRO)/%.o: $(MODDIR)/%.F $(MODDIRO)/%.d | |
730 | ifndef ALIQUIET | |
731 | @echo "***** Compiling $< *****"; | |
732 | endif | |
733 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
734 | $(MUTE)$(F77) -c $(ZDCbaseINC) $< -o $@ $(ZDCbaseFFLAGS) | |
735 | ||
736 | $(MODDIRO)/%.o: $(MODDIR)/%.f $(MODDIRO)/%.d | |
737 | ifndef ALIQUIET | |
738 | @echo "***** Compiling $< *****"; | |
739 | endif | |
740 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
741 | $(MUTE)$(F77) -c $(ZDCbaseINC) $< -o $@ $(ZDCbaseFFLAGS) | |
742 | ||
743 | $(MODDIRO)/%.o: $(MODDIR)/%.c $(MODDIRO)/%.d | |
744 | ifndef ALIQUIET | |
745 | @echo "***** Compiling $< *****"; | |
746 | endif | |
747 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
748 | $(MUTE)$(CC) $(ZDCbaseDEFINE) -c $(ZDCbaseINC) $< -o $@ $(ZDCbaseCFLAGS) | |
749 | ||
750 | $(ZDCbaseDDEP): $(ZDCbaseDS) | |
751 | ifndef ALIQUIET | |
752 | @echo "***** Making dependences for $< *****"; | |
753 | endif | |
754 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
755 | @share/alibtool depend "$(ZDCbaseELIBSDIR) $(ZDCbaseINC) $(DEPINC) $<" > $@ | |
756 | ||
757 | $(MODDIRO)/%.d: $(MODDIRS)/%.cxx | |
758 | ifndef ALIQUIET | |
759 | @echo "***** Making dependences for $< *****"; | |
760 | endif | |
761 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
762 | @share/alibtool depend "$(ZDCbaseDEFINE) $(ZDCbaseELIBSDIR) $(ZDCbaseINC) $(DEPINC) $<" > $@ | |
763 | $(MODDIRO)/%.d: $(MODDIRS)/%.f | |
764 | ifndef ALIQUIET | |
765 | @echo "***** Making dependences for $< *****"; | |
766 | endif | |
767 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
768 | @share/alibtool dependF "$(ZDCbaseELIBSDIR) $(ZDCbaseINC) $(DEPINC) $<" > $@ | |
769 | $(MODDIRO)/%.d: $(MODDIRS)/%.F | |
770 | ifndef ALIQUIET | |
771 | @echo "***** Making dependences for $< *****"; | |
772 | endif | |
773 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
774 | $(MUTE)share/alibtool dependF "$(ZDCbaseELIBSDIR) $(ZDCbaseINC) $(DEPINC) $<" > $@ | |
775 | $(MODDIRO)/%.d: $(MODDIRS)/%.c | |
776 | ifndef ALIQUIET | |
777 | @echo "***** Making dependences for $< *****"; | |
778 | endif | |
779 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
780 | @share/alibtool depend "$(ZDCbaseDEFINE) $(ZDCbaseELIBSDIR) $(ZDCbaseINC) $(DEPINC) $<" > $@ | |
781 | ||
782 | .PRECIOUS: $(patsubst %.cxx,$(MODDIRO)/%.d,$(SRCS)) | |
783 | .PRECIOUS: $(patsubst %.c,$(MODDIRO)/%.d,$(CSRCS)) | |
784 | .PRECIOUS: $(patsubst %.F,$(MODDIRO)/%.d,$(patsubst %.f,$(MODDIRO)/%.d,$(FSRCS))) | |
785 | ||
786 | ZDCbaseCHECKS := $(patsubst %.cxx,ZDC/check/%.viol,$(SRCS)) | |
787 | ||
788 | check-ZDC: $(ZDCbaseCHECKS) | |
789 | ||
790 | # IRST coding rule check | |
791 | ZDC/check/%.i : ZDC/%.cxx ZDC/%.h | |
792 | @[ -d $(dir $@) ] || mkdir -p $(dir $@) | |
793 | $(MUTE)$(CXX) -E $(ZDCbaseDEFINE) $(ZDCbaseINC) $< > $@ $(ZDCbaseCXXFLAGS) | |
794 | @cd $(dir $@) ; $(IRST_INSTALLDIR)/patch/patch4alice.prl $(notdir $@) | |
795 | ||
796 | # IRST coding rule check | |
797 | ZDC/check/$(SUBDIR)/%.viol : ZDC/check/$(SUBDIR)/%.i | |
798 | @cd ZDC ; [ -r ZDC ] || ln -s ../ZDC ZDC | |
799 | $(MUTE)echo $@ ; $(CODE_CHECK) $< ./ZDC/$(ZDCbaseSDIR) > $@ | |
800 | ||
801 | # IRST coding rule check | |
802 | ZDC/check/%.viol : ZDC/check/%.i | |
803 | @cd ZDC ; [ -r ZDC ] || ln -s ../ZDC ZDC | |
804 | $(MUTE)echo $@ ; $(CODE_CHECK) $< ./ZDC > $@ | |
805 | ||
806 | ZDCbasePREPROC = $(patsubst %.viol,%.i,$(ZDCbaseCHECKS)) | |
807 | ||
808 | ZDCbaseREVENGS = $(patsubst %.viol,%.ii,$(ZDCbaseCHECKS)) | |
809 | ||
810 | .SECONDARY: $(ZDCbaseREVENGS) $(ZDCbasePREPROC) | |
811 | ||
812 | reveng-ZDCbase: ZDCbase/check/classDiagram.dot | |
813 | ||
814 | ZDCbase/check/classDiagram.dot: $(ZDCbasePREPROC) | |
815 | @$(REV_ENG) $^ | |
816 | @-mv classDiagram.dot $@ | |
817 | ||
818 | revdisp-ZDCbase: reveng-ZDCbase | |
819 | @echo revdisp for ZDCbase | |
820 | @cd ZDCbase/check ; \ | |
821 | $(IRST_INSTALLDIR)/webreveng/create-class-diagram-pages.sh | |
822 | @sed -e "s/\@PACKAGE\@/ZDCbase/g" < $(ALICE_ROOT)/build/HomePage.html > ZDCbase/check/HomePage.html | |
823 | ||
824 | #-*- Mode: Makefile -*- | |
825 | ||
826 | #********** This part is for package ZDCrec *********** | |
827 | ||
828 | #Determine if it's a library or a executable | |
829 | TYPE=lib | |
830 | ||
831 | # Package head directory, source and include directories | |
832 | MODDIR:=ZDC | |
833 | MODDIRS:=$(MODDIR) | |
834 | MODDIRI:=$(MODDIR) | |
835 | MODDIRO:=$(MODDIR)/tgt_$(ALICE_TARGET) | |
836 | ||
837 | # Reseting variables before importing pkg-file | |
838 | SRCS:= | |
839 | HDRS:= | |
840 | FSRCS:= | |
841 | DHDR:= | |
842 | CSRCS:= | |
843 | CHDRS:= | |
844 | EINCLUDE:= | |
845 | EDEFINE:= | |
846 | ELIBS:= | |
847 | ELIBSDIR:= | |
848 | PACKFFLAGS:= | |
849 | PACKCXXFLAGS:= | |
850 | PACKCFLAGS:= | |
851 | PACKDYFLAGS:= | |
852 | PACKSOFLAGS:= | |
853 | EXPORT:= | |
854 | EHDRS:= | |
855 | CINTHDRS:= | |
856 | ARLIBS:= | |
857 | SHLIBS:= | |
858 | SUBDIR:= | |
859 | ||
860 | #-*- Mode: Makefile -*- | |
861 | # $Id$ | |
862 | ||
863 | SRCS= AliZDCReco.cxx AliZDCReconstructor.cxx | |
864 | ||
865 | HDRS= $(SRCS:.cxx=.h) | |
866 | ||
867 | DHDR:=ZDCrecLinkDef.h | |
868 | ||
869 | EINCLUDE:=RAW | |
870 | ||
871 | #-*- Mode: Makefile -*- | |
872 | ||
873 | ||
874 | ifndef PACKFFLAGS | |
875 | ZDCrecFFLAGS:=$(FFLAGS) | |
876 | else | |
877 | ZDCrecFFLAGS:=$(PACKFFLAGS) | |
878 | endif | |
879 | ||
880 | ifndef PACKCFLAGS | |
881 | ZDCrecCFLAGS:=$(CFLAGS) | |
882 | else | |
883 | ZDCrecCFLAGS:=$(PACKCFLAGS) | |
884 | endif | |
885 | ||
886 | ifndef PACKCXXFLAGS | |
887 | ZDCrecCXXFLAGS:=$(CXXFLAGS) | |
888 | else | |
889 | ZDCrecCXXFLAGS:=$(PACKCXXFLAGS) | |
890 | endif | |
891 | ||
892 | ifndef PACKSOFLAGS | |
893 | ZDCrecSOFLAGS:=$(SOFLAGS) | |
894 | else | |
895 | ZDCrecSOFLAGS:=$(PACKSOFLAGS) | |
896 | endif | |
897 | ||
898 | ifdef DYEXT | |
899 | ifndef PACKDYFLAGS | |
900 | ZDCrecDYFLAGS:=$(DYFLAGS) | |
901 | else | |
902 | ZDCrecDYFLAGS:=$(PACKDYFLAGS) | |
903 | endif | |
904 | endif | |
905 | ||
906 | ifndef PACKDCXXFLAGS | |
907 | ZDCrecDCXXFLAGS:=$(CXXFLAGSNO) | |
908 | else | |
909 | ZDCrecDCXXFLAGS:=$(PACKDCXXFLAGS) | |
910 | endif | |
911 | ||
912 | ||
913 | ifdef DHDR | |
914 | WITHDICT=YES | |
915 | else | |
916 | WITHDICT= | |
917 | endif | |
918 | ||
919 | # Headerfiles exported to common place: | |
920 | ZDCrecEXPORT:=$(EXPORT) | |
921 | ZDCrecEXPORTDEST:=$(patsubst %,$(EXPORTDIR)/%,$(EXPORT)) | |
922 | ||
923 | ||
924 | #Extra include,libs, defines etc. | |
925 | ||
926 | ZDCrecDEFINE:=$(EDEFINE) -D__MODULE__=\"ZDC\" | |
927 | ||
928 | ZDCrecINC:=$(patsubst %,-I%,$(EINCLUDE)) -IZDC | |
929 | ||
930 | ZDCrecELIBS:=$(patsubst %,-l%,$(ELIBS)) | |
931 | ZDCrecELIBSDEP:=$(patsubst %,lib/tgt_$(ALICE_TARGET)/lib%.$(SOEXT),$(ELIBS)) | |
932 | ZDCrecELIBSDIR:=$(patsubst %,-L%,$(ELIBSDIR)) | |
933 | ||
934 | #c sources and headers | |
935 | ||
936 | ZDCrecCS:=$(patsubst %,$(MODDIR)/%,$(CSRCS)) | |
937 | ZDCrecCH:=$(patsubst %,$(MODDIR)/%,$(CHDRS)) | |
938 | ||
939 | #Fortran sources | |
940 | ZDCrecFS:=$(patsubst %,$(MODDIR)/%,$(FSRCS)) | |
941 | ||
942 | #c++ sources and header | |
943 | ZDCrecS:=$(patsubst %,$(MODDIR)/%,$(SRCS)) | |
944 | ZDCrecH:=$(patsubst %,$(MODDIR)/%,$(HDRS)) $(EHDRS) | |
945 | ||
946 | #c++ source subdirectories | |
947 | ZDCrecSDIR:=$(SUBDIR) | |
948 | ||
949 | ############################################################################# | |
950 | # | |
951 | # If special rootcint headerfiles is specified use them | |
952 | # else use all headers | |
953 | ||
954 | ifndef CINTHDRS | |
955 | ZDCrecCINTHDRS:=$(ZDCrecH) | |
956 | else | |
957 | ZDCrecCINTHDRS:=$(CINTHDRS) | |
958 | endif | |
959 | ############################################################################# | |
960 | ||
961 | # Package Dictionary | |
962 | ||
963 | ZDCrecDH:=$(MODDIR)/$(DHDR) | |
964 | ||
965 | ||
966 | #All objects | |
967 | ZDCrecCO:=$(patsubst %,$(MODDIRO)/%, $(CSRCS:.c=.o)) | |
968 | TEMP:=$(FSRCS:.F=.o) | |
969 | ZDCrecFO:=$(patsubst %,$(MODDIRO)/%, $(TEMP:.f=.o)) | |
970 | ZDCrecO:= $(patsubst %,$(MODDIRO)/%, $(SRCS:.cxx=.o)) $(ZDCrecFO) $(ZDCrecCO) | |
971 | ||
972 | ||
973 | ||
974 | ifdef WITHDICT | |
975 | ZDCrecDS:=$(MODDIRO)/G__ZDCrec.cxx | |
976 | ZDCrecDO:=$(MODDIRO)/G__ZDCrec.o | |
977 | ZDCrecDDEP:=$(ZDCrecDO:.o=.d) | |
978 | ZDCrecDEP:=$(ZDCrecO:.o=.d) $(ZDCrecDDEP) | |
979 | else | |
980 | ZDCrecDS:= | |
981 | ZDCrecDO:= | |
982 | ZDCrecDDEP:= | |
983 | ZDCrecDEP:=$(ZDCrecO:.o=.d) | |
984 | endif | |
985 | ||
986 | ||
987 | #The actual library file | |
988 | ||
989 | ZDCrecLIB:=$(LIBPATH)/libZDCrec.$(SOEXT) | |
990 | ||
991 | ifneq ($(DYEXT),) | |
992 | ZDCrecDLIB:=$(LIBPATH)/libZDCrec.$(DYEXT) | |
993 | endif | |
994 | ||
995 | ZDCrecALIB:=$(LIBPATH)/libZDCrec.$(AEXT) | |
996 | ||
997 | #Add this to the modules libs | |
998 | ZDCLIBS += $(ZDCrecLIB) | |
999 | ZDCALIBS += $(ZDCrecALIB) | |
1000 | ifneq ($(DYEXT),) | |
1001 | ZDCDLIBS += $(ZDCrecDLIB) | |
1002 | endif | |
1003 | ||
1004 | #The actual binary file | |
1005 | ||
1006 | ZDCrecBIN:=$(BINPATH)/ZDCrec | |
1007 | ||
1008 | #Add to modules list of binaries | |
1009 | ZDCBINS += $(ZDCrecBIN) | |
1010 | ||
1011 | # Use in the main Makefile | |
1012 | ||
1013 | ifeq ($(TYPE),lib) | |
1014 | ALLLIBS += $(ZDCrecLIB) | |
1015 | ALLALIBS += $(ZDCrecALIB) | |
1016 | ifneq ($(DYEXT),) | |
1017 | ALLLIBS += $(ZDCrecDLIB) | |
1018 | endif | |
1019 | BINLIBS += -lZDCrec | |
1020 | else | |
1021 | ALLEXECS += $(ZDCrecBIN) | |
1022 | endif | |
1023 | ||
1024 | ifeq ($(DYEXT),) | |
1025 | ZDCrecLIB := $(ZDCrecLIB) | |
1026 | else | |
1027 | ZDCrecLIB := $(ZDCrecLIB) | |
1028 | endif | |
1029 | ||
1030 | # include all dependence files | |
1031 | INCLUDEFILES +=$(ZDCrecDEP) | |
1032 | ||
1033 | EXPORTFILES += $(ZDCrecEXPORTDEST) | |
1034 | ||
1035 | #local rules | |
1036 | ||
1037 | #The exportfiles only include if any!! | |
1038 | ||
1039 | ifdef ZDCrecEXPORT | |
1040 | #$(ZDCrecEXPORTDEST): $(patsubst %,ZDC/%,$(ZDCrecEXPORT)) | |
1041 | ||
1042 | $(ZDCrecEXPORTDEST): $(EXPORTDIR)/%.h: ZDC/%.h | |
1043 | ifndef ALIQUIET | |
1044 | @echo "***** Copying file $^ to $@ *****" | |
1045 | endif | |
1046 | @[ -d $(dir $@) ] || mkdir -p $(dir $@) | |
1047 | @cp $^ $@ | |
1048 | endif | |
1049 | ||
1050 | #------------------------------------------------------------------------ | |
1051 | ||
1052 | $(ZDCrecLIB):$(ZDCrecO) $(ZDCrecDO) ZDC/module.mk | |
1053 | ifndef ALIQUIET | |
1054 | @echo "***** Linking library $@ *****" | |
1055 | endif | |
1056 | $(MUTE)TMPDIR=/tmp/ZDC$$$$.`date +%M%S` ; \ | |
1057 | export TMPDIR; mkdir -p $$TMPDIR ; cd $$TMPDIR ; \ | |
1058 | find $(CURDIR)/ZDC/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\ | |
1059 | \rm -f $(CURDIR)/$@ ;\ | |
1060 | TMPLIB=$(notdir $(ZDCrecLIB)); export TMPLIB;\ | |
1061 | $(SHLD) $(ZDCrecSOFLAGS) -o $(CURDIR)/$@ $(notdir $(ZDCrecO) $(ZDCrecDO)) $(ZDCrecELIBSDIR) $(ZDCrecELIBS) $(SHLIB);\ | |
1062 | chmod a-w $(CURDIR)/$@ ;\ | |
1063 | cd $(ALICE_ROOT) ; \rm -rf $$TMPDIR | |
1064 | ||
1065 | ifneq ($(DYEXT),) | |
1066 | $(ZDCrecDLIB):$(ZDCrecO) $(ZDCrecDO) ZDC/module.mk | |
1067 | ifndef ALIQUIET | |
1068 | @echo "***** Linking library $@ *****" | |
1069 | endif | |
1070 | $(MUTE)TMPDIR=/tmp/ZDC$$$$.`date +%M%S` ; \ | |
1071 | export TMPDIR; mkdir -p $$TMPDIR ; cd $$TMPDIR ; \ | |
1072 | find $(CURDIR)/ZDC/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\ | |
1073 | \rm -f $(CURDIR)/$@ ;\ | |
1074 | $(DYLD) $(ZDCrecDYFLAGS) -o $(CURDIR)/$@ $(notdir $(ZDCrecO) $(ZDCrecDO)) $(ZDCrecELIBSDIR) $(ZDCrecELIBS) $(DYLIB);\ | |
1075 | chmod a-w $(CURDIR)/$@ ;\ | |
1076 | cd $(ALICE_ROOT) ; \rm -rf $$TMPDIR | |
1077 | endif | |
1078 | ||
1079 | #------------------------------------------------------------------------ | |
1080 | ||
1081 | $(ZDCrecALIB):$(ZDCrecO) $(ZDCrecDO) ZDC/module.mk | |
1082 | ifndef ALIQUIET | |
1083 | @echo "***** Linking static library $@ *****" | |
1084 | endif | |
1085 | $(MUTE)TMPDIR=/tmp/ZDC$$$$.`date +%M%S` ; \ | |
1086 | export TMPDIR; mkdir -p $$TMPDIR ; cd $$TMPDIR ; \ | |
1087 | find $(CURDIR)/ZDC/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\ | |
1088 | \rm -f $(CURDIR)/$@ ;\ | |
1089 | TMPLIB=$(notdir $(ZDCrecLIB)); export TMPLIB;\ | |
1090 | $(ALLD) $(ALFLAGS) $(CURDIR)/$@ $(notdir $(ZDCrecO) $(ZDCrecDO)) $(ZDCrecELIBSDIR) $(ZDCrecELIBS) $(ALLIB);\ | |
1091 | cd $(CURDIR) ; \rm -rf $$TMPDIR | |
1092 | $(MUTE)chmod a-w $@ | |
1093 | ||
1094 | ||
1095 | $(ZDCrecBIN):$(ZDCrecO) $(ZDCrecDO) ZDC/module.mk | |
1096 | ifndef ALIQUIET | |
1097 | @echo "***** Making executable $@ *****" | |
1098 | endif | |
1099 | ifeq ($(ALIPROFILE),YES) | |
1100 | $(MUTE)$(LD) $(LDFLAGS) $(ZDCrecO) $(ARLIBS) $(SHLIBS) $(LIBS) $(EXEFLAGS) -o $@ | |
1101 | else | |
1102 | $(MUTE)$(LD) $(LDFLAGS) $(ZDCrecO) $(ZDCrecDO) $(BINLIBDIRS) $(ZDCrecELIBSDIR) $(ZDCrecELIBS) $(LIBS) $(EXEFLAGS) -o $@ | |
1103 | endif | |
1104 | ||
1105 | $(ZDCrecDS): $(ZDCrecCINTHDRS) $(ZDCrecDH) ZDC/module.mk | |
1106 | ifndef ALIQUIET | |
1107 | @echo "***** Creating $@ *****"; | |
1108 | endif | |
1109 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
1110 | @\rm -f $(patsubst %.cxx,%.d, $@) | |
1111 | $(MUTE)rootcint -f $@ -c $(ZDCrecDEFINE) $(CINTFLAGS) $(ZDCrecINC) $(ZDCrecCINTHDRS) $(ZDCrecDH) | |
1112 | ||
1113 | $(ZDCrecDO): $(ZDCrecDS) | |
1114 | ifndef ALIQUIET | |
1115 | @echo "***** Compiling $< *****"; | |
1116 | endif | |
1117 | $(MUTE)$(CXX) $(ZDCrecDEFINE) -c $(ZDCrecINC) -I$(ALICE_ROOT) $< -o $@ $(ZDCrecDCXXFLAGS) | |
1118 | ||
1119 | #Different targets for the module | |
1120 | ||
1121 | ifeq ($(TYPE),lib) | |
1122 | all-ZDCrec: $(ZDCrecLIB) | |
1123 | ifneq ($(DYEXT),) | |
1124 | all-ZDCrec: $(ZDCrecDLIB) | |
1125 | endif | |
1126 | else | |
1127 | all-ZDCrec: $(ZDCrecBIN) | |
1128 | endif | |
1129 | ||
1130 | depend-ZDCrec: $(ZDCrecDEP) | |
1131 | ||
1132 | # determination of object files | |
1133 | $(MODDIRO)/%.o: $(MODDIR)/%.cxx $(MODDIRO)/%.d | |
1134 | ifndef ALIQUIET | |
1135 | @echo "***** Compiling $< *****"; | |
1136 | endif | |
1137 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
1138 | $(MUTE)$(CXX) $(ZDCrecDEFINE) -c $(ZDCrecINC) $< -o $@ $(ZDCrecCXXFLAGS) | |
1139 | ||
1140 | $(MODDIRO)/%.o: $(MODDIR)/%.F $(MODDIRO)/%.d | |
1141 | ifndef ALIQUIET | |
1142 | @echo "***** Compiling $< *****"; | |
1143 | endif | |
1144 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
1145 | $(MUTE)$(F77) -c $(ZDCrecINC) $< -o $@ $(ZDCrecFFLAGS) | |
1146 | ||
1147 | $(MODDIRO)/%.o: $(MODDIR)/%.f $(MODDIRO)/%.d | |
1148 | ifndef ALIQUIET | |
1149 | @echo "***** Compiling $< *****"; | |
1150 | endif | |
1151 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
1152 | $(MUTE)$(F77) -c $(ZDCrecINC) $< -o $@ $(ZDCrecFFLAGS) | |
1153 | ||
1154 | $(MODDIRO)/%.o: $(MODDIR)/%.c $(MODDIRO)/%.d | |
1155 | ifndef ALIQUIET | |
1156 | @echo "***** Compiling $< *****"; | |
1157 | endif | |
1158 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
1159 | $(MUTE)$(CC) $(ZDCrecDEFINE) -c $(ZDCrecINC) $< -o $@ $(ZDCrecCFLAGS) | |
1160 | ||
1161 | $(ZDCrecDDEP): $(ZDCrecDS) | |
1162 | ifndef ALIQUIET | |
1163 | @echo "***** Making dependences for $< *****"; | |
1164 | endif | |
1165 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
1166 | @share/alibtool depend "$(ZDCrecELIBSDIR) $(ZDCrecINC) $(DEPINC) $<" > $@ | |
1167 | ||
1168 | $(MODDIRO)/%.d: $(MODDIRS)/%.cxx | |
1169 | ifndef ALIQUIET | |
1170 | @echo "***** Making dependences for $< *****"; | |
1171 | endif | |
1172 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
1173 | @share/alibtool depend "$(ZDCrecDEFINE) $(ZDCrecELIBSDIR) $(ZDCrecINC) $(DEPINC) $<" > $@ | |
1174 | $(MODDIRO)/%.d: $(MODDIRS)/%.f | |
1175 | ifndef ALIQUIET | |
1176 | @echo "***** Making dependences for $< *****"; | |
1177 | endif | |
1178 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
1179 | @share/alibtool dependF "$(ZDCrecELIBSDIR) $(ZDCrecINC) $(DEPINC) $<" > $@ | |
1180 | $(MODDIRO)/%.d: $(MODDIRS)/%.F | |
1181 | ifndef ALIQUIET | |
1182 | @echo "***** Making dependences for $< *****"; | |
1183 | endif | |
1184 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
1185 | $(MUTE)share/alibtool dependF "$(ZDCrecELIBSDIR) $(ZDCrecINC) $(DEPINC) $<" > $@ | |
1186 | $(MODDIRO)/%.d: $(MODDIRS)/%.c | |
1187 | ifndef ALIQUIET | |
1188 | @echo "***** Making dependences for $< *****"; | |
1189 | endif | |
1190 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
1191 | @share/alibtool depend "$(ZDCrecDEFINE) $(ZDCrecELIBSDIR) $(ZDCrecINC) $(DEPINC) $<" > $@ | |
1192 | ||
1193 | .PRECIOUS: $(patsubst %.cxx,$(MODDIRO)/%.d,$(SRCS)) | |
1194 | .PRECIOUS: $(patsubst %.c,$(MODDIRO)/%.d,$(CSRCS)) | |
1195 | .PRECIOUS: $(patsubst %.F,$(MODDIRO)/%.d,$(patsubst %.f,$(MODDIRO)/%.d,$(FSRCS))) | |
1196 | ||
1197 | ZDCrecCHECKS := $(patsubst %.cxx,ZDC/check/%.viol,$(SRCS)) | |
1198 | ||
1199 | check-ZDC: $(ZDCrecCHECKS) | |
1200 | ||
1201 | # IRST coding rule check | |
1202 | ZDC/check/%.i : ZDC/%.cxx ZDC/%.h | |
1203 | @[ -d $(dir $@) ] || mkdir -p $(dir $@) | |
1204 | $(MUTE)$(CXX) -E $(ZDCrecDEFINE) $(ZDCrecINC) $< > $@ $(ZDCrecCXXFLAGS) | |
1205 | @cd $(dir $@) ; $(IRST_INSTALLDIR)/patch/patch4alice.prl $(notdir $@) | |
1206 | ||
1207 | # IRST coding rule check | |
1208 | ZDC/check/$(SUBDIR)/%.viol : ZDC/check/$(SUBDIR)/%.i | |
1209 | @cd ZDC ; [ -r ZDC ] || ln -s ../ZDC ZDC | |
1210 | $(MUTE)echo $@ ; $(CODE_CHECK) $< ./ZDC/$(ZDCrecSDIR) > $@ | |
1211 | ||
1212 | # IRST coding rule check | |
1213 | ZDC/check/%.viol : ZDC/check/%.i | |
1214 | @cd ZDC ; [ -r ZDC ] || ln -s ../ZDC ZDC | |
1215 | $(MUTE)echo $@ ; $(CODE_CHECK) $< ./ZDC > $@ | |
1216 | ||
1217 | ZDCrecPREPROC = $(patsubst %.viol,%.i,$(ZDCrecCHECKS)) | |
1218 | ||
1219 | ZDCrecREVENGS = $(patsubst %.viol,%.ii,$(ZDCrecCHECKS)) | |
1220 | ||
1221 | .SECONDARY: $(ZDCrecREVENGS) $(ZDCrecPREPROC) | |
1222 | ||
1223 | reveng-ZDCrec: ZDCrec/check/classDiagram.dot | |
1224 | ||
1225 | ZDCrec/check/classDiagram.dot: $(ZDCrecPREPROC) | |
1226 | @$(REV_ENG) $^ | |
1227 | @-mv classDiagram.dot $@ | |
1228 | ||
1229 | revdisp-ZDCrec: reveng-ZDCrec | |
1230 | @echo revdisp for ZDCrec | |
1231 | @cd ZDCrec/check ; \ | |
1232 | $(IRST_INSTALLDIR)/webreveng/create-class-diagram-pages.sh | |
1233 | @sed -e "s/\@PACKAGE\@/ZDCrec/g" < $(ALICE_ROOT)/build/HomePage.html > ZDCrec/check/HomePage.html | |
1234 | ||
1235 | #-*- Mode: Makefile -*- | |
1236 | ||
1237 | #********** This part is for package ZDCsim *********** | |
1238 | ||
1239 | #Determine if it's a library or a executable | |
1240 | TYPE=lib | |
1241 | ||
1242 | # Package head directory, source and include directories | |
1243 | MODDIR:=ZDC | |
1244 | MODDIRS:=$(MODDIR) | |
1245 | MODDIRI:=$(MODDIR) | |
1246 | MODDIRO:=$(MODDIR)/tgt_$(ALICE_TARGET) | |
1247 | ||
1248 | # Reseting variables before importing pkg-file | |
1249 | SRCS:= | |
1250 | HDRS:= | |
1251 | FSRCS:= | |
1252 | DHDR:= | |
1253 | CSRCS:= | |
1254 | CHDRS:= | |
1255 | EINCLUDE:= | |
1256 | EDEFINE:= | |
1257 | ELIBS:= | |
1258 | ELIBSDIR:= | |
1259 | PACKFFLAGS:= | |
1260 | PACKCXXFLAGS:= | |
1261 | PACKCFLAGS:= | |
1262 | PACKDYFLAGS:= | |
1263 | PACKSOFLAGS:= | |
1264 | EXPORT:= | |
1265 | EHDRS:= | |
1266 | CINTHDRS:= | |
1267 | ARLIBS:= | |
1268 | SHLIBS:= | |
1269 | SUBDIR:= | |
1270 | ||
1271 | #-*- Mode: Makefile -*- | |
1272 | # $Id$ | |
1273 | ||
1274 | SRCS= AliZDC.cxx AliZDCv1.cxx AliZDCv2.cxx \ | |
1275 | AliZDCHit.cxx AliZDCSDigit.cxx AliZDCFragment.cxx AliZDCDigitizer.cxx \ | |
1276 | AliGenZDC.cxx AliZDCMergedHit.cxx AliZDCMerger.cxx | |
1277 | ||
1278 | HDRS= $(SRCS:.cxx=.h) | |
1279 | ||
1280 | DHDR:=ZDCsimLinkDef.h | |
1281 | ||
1282 | EINCLUDE:=RAW | |
1283 | ||
1284 | #-*- Mode: Makefile -*- | |
1285 | ||
1286 | ||
1287 | ifndef PACKFFLAGS | |
1288 | ZDCsimFFLAGS:=$(FFLAGS) | |
1289 | else | |
1290 | ZDCsimFFLAGS:=$(PACKFFLAGS) | |
1291 | endif | |
1292 | ||
1293 | ifndef PACKCFLAGS | |
1294 | ZDCsimCFLAGS:=$(CFLAGS) | |
1295 | else | |
1296 | ZDCsimCFLAGS:=$(PACKCFLAGS) | |
1297 | endif | |
1298 | ||
1299 | ifndef PACKCXXFLAGS | |
1300 | ZDCsimCXXFLAGS:=$(CXXFLAGS) | |
1301 | else | |
1302 | ZDCsimCXXFLAGS:=$(PACKCXXFLAGS) | |
1303 | endif | |
1304 | ||
1305 | ifndef PACKSOFLAGS | |
1306 | ZDCsimSOFLAGS:=$(SOFLAGS) | |
1307 | else | |
1308 | ZDCsimSOFLAGS:=$(PACKSOFLAGS) | |
1309 | endif | |
1310 | ||
1311 | ifdef DYEXT | |
1312 | ifndef PACKDYFLAGS | |
1313 | ZDCsimDYFLAGS:=$(DYFLAGS) | |
1314 | else | |
1315 | ZDCsimDYFLAGS:=$(PACKDYFLAGS) | |
1316 | endif | |
1317 | endif | |
1318 | ||
1319 | ifndef PACKDCXXFLAGS | |
1320 | ZDCsimDCXXFLAGS:=$(CXXFLAGSNO) | |
1321 | else | |
1322 | ZDCsimDCXXFLAGS:=$(PACKDCXXFLAGS) | |
1323 | endif | |
1324 | ||
1325 | ||
1326 | ifdef DHDR | |
1327 | WITHDICT=YES | |
1328 | else | |
1329 | WITHDICT= | |
1330 | endif | |
1331 | ||
1332 | # Headerfiles exported to common place: | |
1333 | ZDCsimEXPORT:=$(EXPORT) | |
1334 | ZDCsimEXPORTDEST:=$(patsubst %,$(EXPORTDIR)/%,$(EXPORT)) | |
1335 | ||
1336 | ||
1337 | #Extra include,libs, defines etc. | |
1338 | ||
1339 | ZDCsimDEFINE:=$(EDEFINE) -D__MODULE__=\"ZDC\" | |
1340 | ||
1341 | ZDCsimINC:=$(patsubst %,-I%,$(EINCLUDE)) -IZDC | |
1342 | ||
1343 | ZDCsimELIBS:=$(patsubst %,-l%,$(ELIBS)) | |
1344 | ZDCsimELIBSDEP:=$(patsubst %,lib/tgt_$(ALICE_TARGET)/lib%.$(SOEXT),$(ELIBS)) | |
1345 | ZDCsimELIBSDIR:=$(patsubst %,-L%,$(ELIBSDIR)) | |
1346 | ||
1347 | #c sources and headers | |
1348 | ||
1349 | ZDCsimCS:=$(patsubst %,$(MODDIR)/%,$(CSRCS)) | |
1350 | ZDCsimCH:=$(patsubst %,$(MODDIR)/%,$(CHDRS)) | |
1351 | ||
1352 | #Fortran sources | |
1353 | ZDCsimFS:=$(patsubst %,$(MODDIR)/%,$(FSRCS)) | |
1354 | ||
1355 | #c++ sources and header | |
1356 | ZDCsimS:=$(patsubst %,$(MODDIR)/%,$(SRCS)) | |
1357 | ZDCsimH:=$(patsubst %,$(MODDIR)/%,$(HDRS)) $(EHDRS) | |
1358 | ||
1359 | #c++ source subdirectories | |
1360 | ZDCsimSDIR:=$(SUBDIR) | |
1361 | ||
1362 | ############################################################################# | |
1363 | # | |
1364 | # If special rootcint headerfiles is specified use them | |
1365 | # else use all headers | |
1366 | ||
1367 | ifndef CINTHDRS | |
1368 | ZDCsimCINTHDRS:=$(ZDCsimH) | |
1369 | else | |
1370 | ZDCsimCINTHDRS:=$(CINTHDRS) | |
1371 | endif | |
1372 | ############################################################################# | |
1373 | ||
1374 | # Package Dictionary | |
1375 | ||
1376 | ZDCsimDH:=$(MODDIR)/$(DHDR) | |
1377 | ||
1378 | ||
1379 | #All objects | |
1380 | ZDCsimCO:=$(patsubst %,$(MODDIRO)/%, $(CSRCS:.c=.o)) | |
1381 | TEMP:=$(FSRCS:.F=.o) | |
1382 | ZDCsimFO:=$(patsubst %,$(MODDIRO)/%, $(TEMP:.f=.o)) | |
1383 | ZDCsimO:= $(patsubst %,$(MODDIRO)/%, $(SRCS:.cxx=.o)) $(ZDCsimFO) $(ZDCsimCO) | |
1384 | ||
1385 | ||
1386 | ||
1387 | ifdef WITHDICT | |
1388 | ZDCsimDS:=$(MODDIRO)/G__ZDCsim.cxx | |
1389 | ZDCsimDO:=$(MODDIRO)/G__ZDCsim.o | |
1390 | ZDCsimDDEP:=$(ZDCsimDO:.o=.d) | |
1391 | ZDCsimDEP:=$(ZDCsimO:.o=.d) $(ZDCsimDDEP) | |
1392 | else | |
1393 | ZDCsimDS:= | |
1394 | ZDCsimDO:= | |
1395 | ZDCsimDDEP:= | |
1396 | ZDCsimDEP:=$(ZDCsimO:.o=.d) | |
1397 | endif | |
1398 | ||
1399 | ||
1400 | #The actual library file | |
1401 | ||
1402 | ZDCsimLIB:=$(LIBPATH)/libZDCsim.$(SOEXT) | |
1403 | ||
1404 | ifneq ($(DYEXT),) | |
1405 | ZDCsimDLIB:=$(LIBPATH)/libZDCsim.$(DYEXT) | |
1406 | endif | |
1407 | ||
1408 | ZDCsimALIB:=$(LIBPATH)/libZDCsim.$(AEXT) | |
1409 | ||
1410 | #Add this to the modules libs | |
1411 | ZDCLIBS += $(ZDCsimLIB) | |
1412 | ZDCALIBS += $(ZDCsimALIB) | |
1413 | ifneq ($(DYEXT),) | |
1414 | ZDCDLIBS += $(ZDCsimDLIB) | |
1415 | endif | |
1416 | ||
1417 | #The actual binary file | |
1418 | ||
1419 | ZDCsimBIN:=$(BINPATH)/ZDCsim | |
1420 | ||
1421 | #Add to modules list of binaries | |
1422 | ZDCBINS += $(ZDCsimBIN) | |
1423 | ||
1424 | # Use in the main Makefile | |
1425 | ||
1426 | ifeq ($(TYPE),lib) | |
1427 | ALLLIBS += $(ZDCsimLIB) | |
1428 | ALLALIBS += $(ZDCsimALIB) | |
1429 | ifneq ($(DYEXT),) | |
1430 | ALLLIBS += $(ZDCsimDLIB) | |
1431 | endif | |
1432 | BINLIBS += -lZDCsim | |
1433 | else | |
1434 | ALLEXECS += $(ZDCsimBIN) | |
1435 | endif | |
1436 | ||
1437 | ifeq ($(DYEXT),) | |
1438 | ZDCsimLIB := $(ZDCsimLIB) | |
1439 | else | |
1440 | ZDCsimLIB := $(ZDCsimLIB) | |
1441 | endif | |
1442 | ||
1443 | # include all dependence files | |
1444 | INCLUDEFILES +=$(ZDCsimDEP) | |
1445 | ||
1446 | EXPORTFILES += $(ZDCsimEXPORTDEST) | |
1447 | ||
1448 | #local rules | |
1449 | ||
1450 | #The exportfiles only include if any!! | |
1451 | ||
1452 | ifdef ZDCsimEXPORT | |
1453 | #$(ZDCsimEXPORTDEST): $(patsubst %,ZDC/%,$(ZDCsimEXPORT)) | |
1454 | ||
1455 | $(ZDCsimEXPORTDEST): $(EXPORTDIR)/%.h: ZDC/%.h | |
1456 | ifndef ALIQUIET | |
1457 | @echo "***** Copying file $^ to $@ *****" | |
1458 | endif | |
1459 | @[ -d $(dir $@) ] || mkdir -p $(dir $@) | |
1460 | @cp $^ $@ | |
1461 | endif | |
1462 | ||
1463 | #------------------------------------------------------------------------ | |
1464 | ||
1465 | $(ZDCsimLIB):$(ZDCsimO) $(ZDCsimDO) ZDC/module.mk | |
1466 | ifndef ALIQUIET | |
1467 | @echo "***** Linking library $@ *****" | |
1468 | endif | |
1469 | $(MUTE)TMPDIR=/tmp/ZDC$$$$.`date +%M%S` ; \ | |
1470 | export TMPDIR; mkdir -p $$TMPDIR ; cd $$TMPDIR ; \ | |
1471 | find $(CURDIR)/ZDC/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\ | |
1472 | \rm -f $(CURDIR)/$@ ;\ | |
1473 | TMPLIB=$(notdir $(ZDCsimLIB)); export TMPLIB;\ | |
1474 | $(SHLD) $(ZDCsimSOFLAGS) -o $(CURDIR)/$@ $(notdir $(ZDCsimO) $(ZDCsimDO)) $(ZDCsimELIBSDIR) $(ZDCsimELIBS) $(SHLIB);\ | |
1475 | chmod a-w $(CURDIR)/$@ ;\ | |
1476 | cd $(ALICE_ROOT) ; \rm -rf $$TMPDIR | |
1477 | ||
1478 | ifneq ($(DYEXT),) | |
1479 | $(ZDCsimDLIB):$(ZDCsimO) $(ZDCsimDO) ZDC/module.mk | |
1480 | ifndef ALIQUIET | |
1481 | @echo "***** Linking library $@ *****" | |
1482 | endif | |
1483 | $(MUTE)TMPDIR=/tmp/ZDC$$$$.`date +%M%S` ; \ | |
1484 | export TMPDIR; mkdir -p $$TMPDIR ; cd $$TMPDIR ; \ | |
1485 | find $(CURDIR)/ZDC/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\ | |
1486 | \rm -f $(CURDIR)/$@ ;\ | |
1487 | $(DYLD) $(ZDCsimDYFLAGS) -o $(CURDIR)/$@ $(notdir $(ZDCsimO) $(ZDCsimDO)) $(ZDCsimELIBSDIR) $(ZDCsimELIBS) $(DYLIB);\ | |
1488 | chmod a-w $(CURDIR)/$@ ;\ | |
1489 | cd $(ALICE_ROOT) ; \rm -rf $$TMPDIR | |
1490 | endif | |
1491 | ||
1492 | #------------------------------------------------------------------------ | |
1493 | ||
1494 | $(ZDCsimALIB):$(ZDCsimO) $(ZDCsimDO) ZDC/module.mk | |
1495 | ifndef ALIQUIET | |
1496 | @echo "***** Linking static library $@ *****" | |
1497 | endif | |
1498 | $(MUTE)TMPDIR=/tmp/ZDC$$$$.`date +%M%S` ; \ | |
1499 | export TMPDIR; mkdir -p $$TMPDIR ; cd $$TMPDIR ; \ | |
1500 | find $(CURDIR)/ZDC/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\ | |
1501 | \rm -f $(CURDIR)/$@ ;\ | |
1502 | TMPLIB=$(notdir $(ZDCsimLIB)); export TMPLIB;\ | |
1503 | $(ALLD) $(ALFLAGS) $(CURDIR)/$@ $(notdir $(ZDCsimO) $(ZDCsimDO)) $(ZDCsimELIBSDIR) $(ZDCsimELIBS) $(ALLIB);\ | |
1504 | cd $(CURDIR) ; \rm -rf $$TMPDIR | |
1505 | $(MUTE)chmod a-w $@ | |
1506 | ||
1507 | ||
1508 | $(ZDCsimBIN):$(ZDCsimO) $(ZDCsimDO) ZDC/module.mk | |
1509 | ifndef ALIQUIET | |
1510 | @echo "***** Making executable $@ *****" | |
1511 | endif | |
1512 | ifeq ($(ALIPROFILE),YES) | |
1513 | $(MUTE)$(LD) $(LDFLAGS) $(ZDCsimO) $(ARLIBS) $(SHLIBS) $(LIBS) $(EXEFLAGS) -o $@ | |
1514 | else | |
1515 | $(MUTE)$(LD) $(LDFLAGS) $(ZDCsimO) $(ZDCsimDO) $(BINLIBDIRS) $(ZDCsimELIBSDIR) $(ZDCsimELIBS) $(LIBS) $(EXEFLAGS) -o $@ | |
1516 | endif | |
1517 | ||
1518 | $(ZDCsimDS): $(ZDCsimCINTHDRS) $(ZDCsimDH) ZDC/module.mk | |
1519 | ifndef ALIQUIET | |
1520 | @echo "***** Creating $@ *****"; | |
1521 | endif | |
1522 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
1523 | @\rm -f $(patsubst %.cxx,%.d, $@) | |
1524 | $(MUTE)rootcint -f $@ -c $(ZDCsimDEFINE) $(CINTFLAGS) $(ZDCsimINC) $(ZDCsimCINTHDRS) $(ZDCsimDH) | |
1525 | ||
1526 | $(ZDCsimDO): $(ZDCsimDS) | |
1527 | ifndef ALIQUIET | |
1528 | @echo "***** Compiling $< *****"; | |
1529 | endif | |
1530 | $(MUTE)$(CXX) $(ZDCsimDEFINE) -c $(ZDCsimINC) -I$(ALICE_ROOT) $< -o $@ $(ZDCsimDCXXFLAGS) | |
1531 | ||
1532 | #Different targets for the module | |
1533 | ||
1534 | ifeq ($(TYPE),lib) | |
1535 | all-ZDCsim: $(ZDCsimLIB) | |
1536 | ifneq ($(DYEXT),) | |
1537 | all-ZDCsim: $(ZDCsimDLIB) | |
1538 | endif | |
1539 | else | |
1540 | all-ZDCsim: $(ZDCsimBIN) | |
1541 | endif | |
1542 | ||
1543 | depend-ZDCsim: $(ZDCsimDEP) | |
1544 | ||
1545 | # determination of object files | |
1546 | $(MODDIRO)/%.o: $(MODDIR)/%.cxx $(MODDIRO)/%.d | |
1547 | ifndef ALIQUIET | |
1548 | @echo "***** Compiling $< *****"; | |
1549 | endif | |
1550 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
1551 | $(MUTE)$(CXX) $(ZDCsimDEFINE) -c $(ZDCsimINC) $< -o $@ $(ZDCsimCXXFLAGS) | |
1552 | ||
1553 | $(MODDIRO)/%.o: $(MODDIR)/%.F $(MODDIRO)/%.d | |
1554 | ifndef ALIQUIET | |
1555 | @echo "***** Compiling $< *****"; | |
1556 | endif | |
1557 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
1558 | $(MUTE)$(F77) -c $(ZDCsimINC) $< -o $@ $(ZDCsimFFLAGS) | |
1559 | ||
1560 | $(MODDIRO)/%.o: $(MODDIR)/%.f $(MODDIRO)/%.d | |
1561 | ifndef ALIQUIET | |
1562 | @echo "***** Compiling $< *****"; | |
1563 | endif | |
1564 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
1565 | $(MUTE)$(F77) -c $(ZDCsimINC) $< -o $@ $(ZDCsimFFLAGS) | |
1566 | ||
1567 | $(MODDIRO)/%.o: $(MODDIR)/%.c $(MODDIRO)/%.d | |
1568 | ifndef ALIQUIET | |
1569 | @echo "***** Compiling $< *****"; | |
1570 | endif | |
1571 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
1572 | $(MUTE)$(CC) $(ZDCsimDEFINE) -c $(ZDCsimINC) $< -o $@ $(ZDCsimCFLAGS) | |
1573 | ||
1574 | $(ZDCsimDDEP): $(ZDCsimDS) | |
1575 | ifndef ALIQUIET | |
1576 | @echo "***** Making dependences for $< *****"; | |
1577 | endif | |
1578 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
1579 | @share/alibtool depend "$(ZDCsimELIBSDIR) $(ZDCsimINC) $(DEPINC) $<" > $@ | |
1580 | ||
1581 | $(MODDIRO)/%.d: $(MODDIRS)/%.cxx | |
1582 | ifndef ALIQUIET | |
1583 | @echo "***** Making dependences for $< *****"; | |
1584 | endif | |
1585 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
1586 | @share/alibtool depend "$(ZDCsimDEFINE) $(ZDCsimELIBSDIR) $(ZDCsimINC) $(DEPINC) $<" > $@ | |
1587 | $(MODDIRO)/%.d: $(MODDIRS)/%.f | |
1588 | ifndef ALIQUIET | |
1589 | @echo "***** Making dependences for $< *****"; | |
1590 | endif | |
1591 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
1592 | @share/alibtool dependF "$(ZDCsimELIBSDIR) $(ZDCsimINC) $(DEPINC) $<" > $@ | |
1593 | $(MODDIRO)/%.d: $(MODDIRS)/%.F | |
1594 | ifndef ALIQUIET | |
1595 | @echo "***** Making dependences for $< *****"; | |
1596 | endif | |
1597 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
1598 | $(MUTE)share/alibtool dependF "$(ZDCsimELIBSDIR) $(ZDCsimINC) $(DEPINC) $<" > $@ | |
1599 | $(MODDIRO)/%.d: $(MODDIRS)/%.c | |
1600 | ifndef ALIQUIET | |
1601 | @echo "***** Making dependences for $< *****"; | |
1602 | endif | |
1603 | @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) | |
1604 | @share/alibtool depend "$(ZDCsimDEFINE) $(ZDCsimELIBSDIR) $(ZDCsimINC) $(DEPINC) $<" > $@ | |
1605 | ||
1606 | .PRECIOUS: $(patsubst %.cxx,$(MODDIRO)/%.d,$(SRCS)) | |
1607 | .PRECIOUS: $(patsubst %.c,$(MODDIRO)/%.d,$(CSRCS)) | |
1608 | .PRECIOUS: $(patsubst %.F,$(MODDIRO)/%.d,$(patsubst %.f,$(MODDIRO)/%.d,$(FSRCS))) | |
1609 | ||
1610 | ZDCsimCHECKS := $(patsubst %.cxx,ZDC/check/%.viol,$(SRCS)) | |
1611 | ||
1612 | check-ZDC: $(ZDCsimCHECKS) | |
1613 | ||
1614 | # IRST coding rule check | |
1615 | ZDC/check/%.i : ZDC/%.cxx ZDC/%.h | |
1616 | @[ -d $(dir $@) ] || mkdir -p $(dir $@) | |
1617 | $(MUTE)$(CXX) -E $(ZDCsimDEFINE) $(ZDCsimINC) $< > $@ $(ZDCsimCXXFLAGS) | |
1618 | @cd $(dir $@) ; $(IRST_INSTALLDIR)/patch/patch4alice.prl $(notdir $@) | |
1619 | ||
1620 | # IRST coding rule check | |
1621 | ZDC/check/$(SUBDIR)/%.viol : ZDC/check/$(SUBDIR)/%.i | |
1622 | @cd ZDC ; [ -r ZDC ] || ln -s ../ZDC ZDC | |
1623 | $(MUTE)echo $@ ; $(CODE_CHECK) $< ./ZDC/$(ZDCsimSDIR) > $@ | |
1624 | ||
1625 | # IRST coding rule check | |
1626 | ZDC/check/%.viol : ZDC/check/%.i | |
1627 | @cd ZDC ; [ -r ZDC ] || ln -s ../ZDC ZDC | |
1628 | $(MUTE)echo $@ ; $(CODE_CHECK) $< ./ZDC > $@ | |
1629 | ||
1630 | ZDCsimPREPROC = $(patsubst %.viol,%.i,$(ZDCsimCHECKS)) | |
1631 | ||
1632 | ZDCsimREVENGS = $(patsubst %.viol,%.ii,$(ZDCsimCHECKS)) | |
1633 | ||
1634 | .SECONDARY: $(ZDCsimREVENGS) $(ZDCsimPREPROC) | |
1635 | ||
1636 | reveng-ZDCsim: ZDCsim/check/classDiagram.dot | |
1637 | ||
1638 | ZDCsim/check/classDiagram.dot: $(ZDCsimPREPROC) | |
1639 | @$(REV_ENG) $^ | |
1640 | @-mv classDiagram.dot $@ | |
1641 | ||
1642 | revdisp-ZDCsim: reveng-ZDCsim | |
1643 | @echo revdisp for ZDCsim | |
1644 | @cd ZDCsim/check ; \ | |
1645 | $(IRST_INSTALLDIR)/webreveng/create-class-diagram-pages.sh | |
1646 | @sed -e "s/\@PACKAGE\@/ZDCsim/g" < $(ALICE_ROOT)/build/HomePage.html > ZDCsim/check/HomePage.html | |
1647 | ||
1648 | ||
1649 | # Clean option for the whole module | |
1650 | clean-ZDC: | |
1651 | ifndef ALIQUIET | |
1652 | @echo "***** Cleaning ZDC *****" | |
1653 | endif | |
1654 | $(MUTE)rm ZDC/module.mk | |
1655 | $(MUTE)rm -rf ZDC/tgt_$(ALICE_TARGET) | |
1656 | $(MUTE)rm -f $(ZDCLIBS) | |
1657 | $(MUTE)rm -f $(ZDCBINS) | |
1658 | ||
1659 | clean-check-ZDC: | |
1660 | ifndef ALIQUIET | |
1661 | @echo "***** Cleaning code check for ZDC *****" | |
1662 | endif | |
1663 | $(MUTE)rm -f `find ZDC/check -name '*.i'` `find ZDC/check -name '*.ii'` `find ZDC/check -name '*.viol'` | |
1664 | ||
1665 | clean-reveng-ZDC: | |
1666 | ifndef ALIQUIET | |
1667 | @echo "***** Cleaning reverse engineering files for ZDC *****" | |
1668 | endif | |
1669 | $(MUTE)rm -f `find ZDC/check -name '*.dot'` | |
1670 |