Splitted libraries
[u/mrichter/AliRoot.git] / ZDC / module.mk
CommitLineData
4198f73e 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
10TYPE=lib
11
12# Package head directory, source and include directories
13MODDIR:=ZDC
14MODDIRS:=$(MODDIR)
15MODDIRI:=$(MODDIR)
16MODDIRO:=$(MODDIR)/tgt_$(ALICE_TARGET)
17
18# Reseting variables before importing pkg-file
19SRCS:=
20HDRS:=
21FSRCS:=
22DHDR:=
23CSRCS:=
24CHDRS:=
25EINCLUDE:=
26EDEFINE:=
27ELIBS:=
28ELIBSDIR:=
29PACKFFLAGS:=
30PACKCXXFLAGS:=
31PACKCFLAGS:=
32PACKDYFLAGS:=
33PACKSOFLAGS:=
34EXPORT:=
35EHDRS:=
36CINTHDRS:=
37ARLIBS:=
38SHLIBS:=
39SUBDIR:=
40
41SRCS= AliZDC.cxx AliZDCv1.cxx AliZDCv2.cxx AliZDCHit.cxx AliZDCDigit.cxx \
42 AliGenZDC.cxx AliZDCFragment.cxx AliZDCMerger.cxx \
43 AliZDCMergedHit.cxx AliZDCReco.cxx
44
45HDRS= $(SRCS:.cxx=.h)
46
47DHDR:=ZDCLinkDef.h
48
49#-*- Mode: Makefile -*-
50
51
52ifndef PACKFFLAGS
53ZDCFFLAGS:=$(FFLAGS)
54else
55ZDCFFLAGS:=$(PACKFFLAGS)
56endif
57
58ifndef PACKCFLAGS
59ZDCCFLAGS:=$(CFLAGS)
60else
61ZDCCFLAGS:=$(PACKCFLAGS)
62endif
63
64ifndef PACKCXXFLAGS
65ZDCCXXFLAGS:=$(CXXFLAGS)
66else
67ZDCCXXFLAGS:=$(PACKCXXFLAGS)
68endif
69
70ifndef PACKSOFLAGS
71ZDCSOFLAGS:=$(SOFLAGS)
72else
73ZDCSOFLAGS:=$(PACKSOFLAGS)
74endif
75
76ifdef DYEXT
77ifndef PACKDYFLAGS
78ZDCDYFLAGS:=$(DYFLAGS)
79else
80ZDCDYFLAGS:=$(PACKDYFLAGS)
81endif
82endif
83
84ifndef PACKDCXXFLAGS
85ZDCDCXXFLAGS:=$(CXXFLAGSNO)
86else
87ZDCDCXXFLAGS:=$(PACKDCXXFLAGS)
88endif
89
90
91ifdef DHDR
92WITHDICT=YES
93else
94WITHDICT=
95endif
96
97# Headerfiles exported to common place:
98ZDCEXPORT:=$(EXPORT)
99ZDCEXPORTDEST:=$(patsubst %,$(EXPORTDIR)/%,$(EXPORT))
100
101
102#Extra include,libs, defines etc.
103
104ZDCDEFINE:=$(EDEFINE) -D__MODULE__=\"ZDC\"
105
106ZDCINC:=$(patsubst %,-I%,$(EINCLUDE)) -IZDC
107
108ZDCELIBS:=$(patsubst %,-l%,$(ELIBS))
109ZDCELIBSDEP:=$(patsubst %,lib/tgt_$(ALICE_TARGET)/lib%.$(SOEXT),$(ELIBS))
110ZDCELIBSDIR:=$(patsubst %,-L%,$(ELIBSDIR))
111
112#c sources and headers
113
114ZDCCS:=$(patsubst %,$(MODDIR)/%,$(CSRCS))
115ZDCCH:=$(patsubst %,$(MODDIR)/%,$(CHDRS))
116
117#Fortran sources
118ZDCFS:=$(patsubst %,$(MODDIR)/%,$(FSRCS))
119
120#c++ sources and header
121ZDCS:=$(patsubst %,$(MODDIR)/%,$(SRCS))
122ZDCH:=$(patsubst %,$(MODDIR)/%,$(HDRS)) $(EHDRS)
123
124#c++ source subdirectories
125ZDCSDIR:=$(SUBDIR)
126
127#############################################################################
128#
129# If special rootcint headerfiles is specified use them
130# else use all headers
131
132ifndef CINTHDRS
133ZDCCINTHDRS:=$(ZDCH)
134else
135ZDCCINTHDRS:=$(CINTHDRS)
136endif
137#############################################################################
138
139# Package Dictionary
140
141ZDCDH:=$(MODDIR)/$(DHDR)
142
143
144#All objects
145ZDCCO:=$(patsubst %,$(MODDIRO)/%, $(CSRCS:.c=.o))
146TEMP:=$(FSRCS:.F=.o)
147ZDCFO:=$(patsubst %,$(MODDIRO)/%, $(TEMP:.f=.o))
148ZDCO:= $(patsubst %,$(MODDIRO)/%, $(SRCS:.cxx=.o)) $(ZDCFO) $(ZDCCO)
149
150
151
152ifdef WITHDICT
153 ZDCDS:=$(MODDIRO)/G__ZDC.cxx
154 ZDCDO:=$(MODDIRO)/G__ZDC.o
155 ZDCDDEP:=$(ZDCDO:.o=.d)
156 ZDCDEP:=$(ZDCO:.o=.d) $(ZDCDDEP)
157else
158 ZDCDS:=
159 ZDCDO:=
160 ZDCDDEP:=
161 ZDCDEP:=$(ZDCO:.o=.d)
162endif
163
164
165#The actual library file
166
167ZDCLIB:=$(LIBPATH)/libZDC.$(SOEXT)
168
169ifneq ($(DYEXT),)
170ZDCDLIB:=$(LIBPATH)/libZDC.$(DYEXT)
171endif
172
173ZDCALIB:=$(LIBPATH)/libZDC.$(AEXT)
174
175#Add this to the modules libs
176ZDCLIBS += $(ZDCLIB)
177ZDCALIBS += $(ZDCALIB)
178ifneq ($(DYEXT),)
179ZDCDLIBS += $(ZDCDLIB)
180endif
181
182#The actual binary file
183
184ZDCBIN:=$(BINPATH)/ZDC
185
186#Add to modules list of binaries
187ZDCBINS += $(ZDCBIN)
188
189# Use in the main Makefile
190
191ifeq ($(TYPE),lib)
192ALLLIBS += $(ZDCLIB)
193ALLALIBS += $(ZDCALIB)
194ifneq ($(DYEXT),)
195ALLLIBS += $(ZDCDLIB)
196endif
197BINLIBS += -lZDC
198else
199ALLEXECS += $(ZDCBIN)
200endif
201
202ifeq ($(DYEXT),)
203ZDCLIB := $(ZDCLIB)
204else
205ZDCLIB := $(ZDCLIB)
206endif
207
208# include all dependence files
209INCLUDEFILES +=$(ZDCDEP)
210
211EXPORTFILES += $(ZDCEXPORTDEST)
212
213#local rules
214
215#The exportfiles only include if any!!
216
217ifdef ZDCEXPORT
218#$(ZDCEXPORTDEST): $(patsubst %,ZDC/%,$(ZDCEXPORT))
219
220$(ZDCEXPORTDEST): $(EXPORTDIR)/%.h: ZDC/%.h
221ifndef ALIQUIET
222 @echo "***** Copying file $^ to $@ *****"
223endif
224 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
225 @cp $^ $@
226endif
227
228#------------------------------------------------------------------------
229
230$(ZDCLIB):$(ZDCO) $(ZDCDO) ZDC/module.mk
231ifndef ALIQUIET
232 @echo "***** Linking library $@ *****"
233endif
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
243ifneq ($(DYEXT),)
244$(ZDCDLIB):$(ZDCO) $(ZDCDO) ZDC/module.mk
245ifndef ALIQUIET
246 @echo "***** Linking library $@ *****"
247endif
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
255endif
256
257#------------------------------------------------------------------------
258
259$(ZDCALIB):$(ZDCO) $(ZDCDO) ZDC/module.mk
260ifndef ALIQUIET
261 @echo "***** Linking static library $@ *****"
262endif
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
274ifndef ALIQUIET
275 @echo "***** Making executable $@ *****"
276endif
277ifeq ($(ALIPROFILE),YES)
278 $(MUTE)$(LD) $(LDFLAGS) $(ZDCO) $(ARLIBS) $(SHLIBS) $(LIBS) $(EXEFLAGS) -o $@
279else
280 $(MUTE)$(LD) $(LDFLAGS) $(ZDCO) $(ZDCDO) $(BINLIBDIRS) $(ZDCELIBSDIR) $(ZDCELIBS) $(LIBS) $(EXEFLAGS) -o $@
281endif
282
283$(ZDCDS): $(ZDCCINTHDRS) $(ZDCDH) ZDC/module.mk
284ifndef ALIQUIET
285 @echo "***** Creating $@ *****";
286endif
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)
292ifndef ALIQUIET
293 @echo "***** Compiling $< *****";
294endif
295 $(MUTE)$(CXX) $(ZDCDEFINE) -c $(ZDCINC) -I$(ALICE_ROOT) $< -o $@ $(ZDCDCXXFLAGS)
296
297#Different targets for the module
298
299ifeq ($(TYPE),lib)
300all-ZDC: $(ZDCLIB)
301ifneq ($(DYEXT),)
302all-ZDC: $(ZDCDLIB)
303endif
304else
305all-ZDC: $(ZDCBIN)
306endif
307
308depend-ZDC: $(ZDCDEP)
309
310# determination of object files
311$(MODDIRO)/%.o: $(MODDIR)/%.cxx $(MODDIRO)/%.d
312ifndef ALIQUIET
313 @echo "***** Compiling $< *****";
314endif
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
319ifndef ALIQUIET
320 @echo "***** Compiling $< *****";
321endif
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
326ifndef ALIQUIET
327 @echo "***** Compiling $< *****";
328endif
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
333ifndef ALIQUIET
334 @echo "***** Compiling $< *****";
335endif
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)
340ifndef ALIQUIET
341 @echo "***** Making dependences for $< *****";
342endif
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
347ifndef ALIQUIET
348 @echo "***** Making dependences for $< *****";
349endif
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
353ifndef ALIQUIET
354 @echo "***** Making dependences for $< *****";
355endif
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
359ifndef ALIQUIET
360 @echo "***** Making dependences for $< *****";
361endif
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
365ifndef ALIQUIET
366 @echo "***** Making dependences for $< *****";
367endif
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
375ZDCCHECKS := $(patsubst %.cxx,ZDC/check/%.viol,$(SRCS))
376
377check-ZDC: $(ZDCCHECKS)
378
379# IRST coding rule check
380ZDC/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
386ZDC/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
391ZDC/check/%.viol : ZDC/check/%.i
392 @cd ZDC ; [ -r ZDC ] || ln -s ../ZDC ZDC
393 $(MUTE)echo $@ ; $(CODE_CHECK) $< ./ZDC > $@
394
395ZDCPREPROC = $(patsubst %.viol,%.i,$(ZDCCHECKS))
396
397ZDCREVENGS = $(patsubst %.viol,%.ii,$(ZDCCHECKS))
398
399.SECONDARY: $(ZDCREVENGS) $(ZDCPREPROC)
400
401reveng-ZDC: ZDC/check/classDiagram.dot
402
403ZDC/check/classDiagram.dot: $(ZDCPREPROC)
404 @$(REV_ENG) $^
405 @-mv classDiagram.dot $@
406
407revdisp-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
418TYPE=lib
419
420# Package head directory, source and include directories
421MODDIR:=ZDC
422MODDIRS:=$(MODDIR)
423MODDIRI:=$(MODDIR)
424MODDIRO:=$(MODDIR)/tgt_$(ALICE_TARGET)
425
426# Reseting variables before importing pkg-file
427SRCS:=
428HDRS:=
429FSRCS:=
430DHDR:=
431CSRCS:=
432CHDRS:=
433EINCLUDE:=
434EDEFINE:=
435ELIBS:=
436ELIBSDIR:=
437PACKFFLAGS:=
438PACKCXXFLAGS:=
439PACKCFLAGS:=
440PACKDYFLAGS:=
441PACKSOFLAGS:=
442EXPORT:=
443EHDRS:=
444CINTHDRS:=
445ARLIBS:=
446SHLIBS:=
447SUBDIR:=
448
449#-*- Mode: Makefile -*-
450# $Id$
451
452SRCS= AliZDCDigit.cxx AliZDCRawStream.cxx
453
454HDRS= $(SRCS:.cxx=.h)
455
456DHDR:=ZDCbaseLinkDef.h
457
458EINCLUDE:=RAW
459
460#-*- Mode: Makefile -*-
461
462
463ifndef PACKFFLAGS
464ZDCbaseFFLAGS:=$(FFLAGS)
465else
466ZDCbaseFFLAGS:=$(PACKFFLAGS)
467endif
468
469ifndef PACKCFLAGS
470ZDCbaseCFLAGS:=$(CFLAGS)
471else
472ZDCbaseCFLAGS:=$(PACKCFLAGS)
473endif
474
475ifndef PACKCXXFLAGS
476ZDCbaseCXXFLAGS:=$(CXXFLAGS)
477else
478ZDCbaseCXXFLAGS:=$(PACKCXXFLAGS)
479endif
480
481ifndef PACKSOFLAGS
482ZDCbaseSOFLAGS:=$(SOFLAGS)
483else
484ZDCbaseSOFLAGS:=$(PACKSOFLAGS)
485endif
486
487ifdef DYEXT
488ifndef PACKDYFLAGS
489ZDCbaseDYFLAGS:=$(DYFLAGS)
490else
491ZDCbaseDYFLAGS:=$(PACKDYFLAGS)
492endif
493endif
494
495ifndef PACKDCXXFLAGS
496ZDCbaseDCXXFLAGS:=$(CXXFLAGSNO)
497else
498ZDCbaseDCXXFLAGS:=$(PACKDCXXFLAGS)
499endif
500
501
502ifdef DHDR
503WITHDICT=YES
504else
505WITHDICT=
506endif
507
508# Headerfiles exported to common place:
509ZDCbaseEXPORT:=$(EXPORT)
510ZDCbaseEXPORTDEST:=$(patsubst %,$(EXPORTDIR)/%,$(EXPORT))
511
512
513#Extra include,libs, defines etc.
514
515ZDCbaseDEFINE:=$(EDEFINE) -D__MODULE__=\"ZDC\"
516
517ZDCbaseINC:=$(patsubst %,-I%,$(EINCLUDE)) -IZDC
518
519ZDCbaseELIBS:=$(patsubst %,-l%,$(ELIBS))
520ZDCbaseELIBSDEP:=$(patsubst %,lib/tgt_$(ALICE_TARGET)/lib%.$(SOEXT),$(ELIBS))
521ZDCbaseELIBSDIR:=$(patsubst %,-L%,$(ELIBSDIR))
522
523#c sources and headers
524
525ZDCbaseCS:=$(patsubst %,$(MODDIR)/%,$(CSRCS))
526ZDCbaseCH:=$(patsubst %,$(MODDIR)/%,$(CHDRS))
527
528#Fortran sources
529ZDCbaseFS:=$(patsubst %,$(MODDIR)/%,$(FSRCS))
530
531#c++ sources and header
532ZDCbaseS:=$(patsubst %,$(MODDIR)/%,$(SRCS))
533ZDCbaseH:=$(patsubst %,$(MODDIR)/%,$(HDRS)) $(EHDRS)
534
535#c++ source subdirectories
536ZDCbaseSDIR:=$(SUBDIR)
537
538#############################################################################
539#
540# If special rootcint headerfiles is specified use them
541# else use all headers
542
543ifndef CINTHDRS
544ZDCbaseCINTHDRS:=$(ZDCbaseH)
545else
546ZDCbaseCINTHDRS:=$(CINTHDRS)
547endif
548#############################################################################
549
550# Package Dictionary
551
552ZDCbaseDH:=$(MODDIR)/$(DHDR)
553
554
555#All objects
556ZDCbaseCO:=$(patsubst %,$(MODDIRO)/%, $(CSRCS:.c=.o))
557TEMP:=$(FSRCS:.F=.o)
558ZDCbaseFO:=$(patsubst %,$(MODDIRO)/%, $(TEMP:.f=.o))
559ZDCbaseO:= $(patsubst %,$(MODDIRO)/%, $(SRCS:.cxx=.o)) $(ZDCbaseFO) $(ZDCbaseCO)
560
561
562
563ifdef WITHDICT
564 ZDCbaseDS:=$(MODDIRO)/G__ZDCbase.cxx
565 ZDCbaseDO:=$(MODDIRO)/G__ZDCbase.o
566 ZDCbaseDDEP:=$(ZDCbaseDO:.o=.d)
567 ZDCbaseDEP:=$(ZDCbaseO:.o=.d) $(ZDCbaseDDEP)
568else
569 ZDCbaseDS:=
570 ZDCbaseDO:=
571 ZDCbaseDDEP:=
572 ZDCbaseDEP:=$(ZDCbaseO:.o=.d)
573endif
574
575
576#The actual library file
577
578ZDCbaseLIB:=$(LIBPATH)/libZDCbase.$(SOEXT)
579
580ifneq ($(DYEXT),)
581ZDCbaseDLIB:=$(LIBPATH)/libZDCbase.$(DYEXT)
582endif
583
584ZDCbaseALIB:=$(LIBPATH)/libZDCbase.$(AEXT)
585
586#Add this to the modules libs
587ZDCLIBS += $(ZDCbaseLIB)
588ZDCALIBS += $(ZDCbaseALIB)
589ifneq ($(DYEXT),)
590ZDCDLIBS += $(ZDCbaseDLIB)
591endif
592
593#The actual binary file
594
595ZDCbaseBIN:=$(BINPATH)/ZDCbase
596
597#Add to modules list of binaries
598ZDCBINS += $(ZDCbaseBIN)
599
600# Use in the main Makefile
601
602ifeq ($(TYPE),lib)
603ALLLIBS += $(ZDCbaseLIB)
604ALLALIBS += $(ZDCbaseALIB)
605ifneq ($(DYEXT),)
606ALLLIBS += $(ZDCbaseDLIB)
607endif
608BINLIBS += -lZDCbase
609else
610ALLEXECS += $(ZDCbaseBIN)
611endif
612
613ifeq ($(DYEXT),)
614ZDCbaseLIB := $(ZDCbaseLIB)
615else
616ZDCbaseLIB := $(ZDCbaseLIB)
617endif
618
619# include all dependence files
620INCLUDEFILES +=$(ZDCbaseDEP)
621
622EXPORTFILES += $(ZDCbaseEXPORTDEST)
623
624#local rules
625
626#The exportfiles only include if any!!
627
628ifdef ZDCbaseEXPORT
629#$(ZDCbaseEXPORTDEST): $(patsubst %,ZDC/%,$(ZDCbaseEXPORT))
630
631$(ZDCbaseEXPORTDEST): $(EXPORTDIR)/%.h: ZDC/%.h
632ifndef ALIQUIET
633 @echo "***** Copying file $^ to $@ *****"
634endif
635 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
636 @cp $^ $@
637endif
638
639#------------------------------------------------------------------------
640
641$(ZDCbaseLIB):$(ZDCbaseO) $(ZDCbaseDO) ZDC/module.mk
642ifndef ALIQUIET
643 @echo "***** Linking library $@ *****"
644endif
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
654ifneq ($(DYEXT),)
655$(ZDCbaseDLIB):$(ZDCbaseO) $(ZDCbaseDO) ZDC/module.mk
656ifndef ALIQUIET
657 @echo "***** Linking library $@ *****"
658endif
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
666endif
667
668#------------------------------------------------------------------------
669
670$(ZDCbaseALIB):$(ZDCbaseO) $(ZDCbaseDO) ZDC/module.mk
671ifndef ALIQUIET
672 @echo "***** Linking static library $@ *****"
673endif
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
685ifndef ALIQUIET
686 @echo "***** Making executable $@ *****"
687endif
688ifeq ($(ALIPROFILE),YES)
689 $(MUTE)$(LD) $(LDFLAGS) $(ZDCbaseO) $(ARLIBS) $(SHLIBS) $(LIBS) $(EXEFLAGS) -o $@
690else
691 $(MUTE)$(LD) $(LDFLAGS) $(ZDCbaseO) $(ZDCbaseDO) $(BINLIBDIRS) $(ZDCbaseELIBSDIR) $(ZDCbaseELIBS) $(LIBS) $(EXEFLAGS) -o $@
692endif
693
694$(ZDCbaseDS): $(ZDCbaseCINTHDRS) $(ZDCbaseDH) ZDC/module.mk
695ifndef ALIQUIET
696 @echo "***** Creating $@ *****";
697endif
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)
703ifndef ALIQUIET
704 @echo "***** Compiling $< *****";
705endif
706 $(MUTE)$(CXX) $(ZDCbaseDEFINE) -c $(ZDCbaseINC) -I$(ALICE_ROOT) $< -o $@ $(ZDCbaseDCXXFLAGS)
707
708#Different targets for the module
709
710ifeq ($(TYPE),lib)
711all-ZDCbase: $(ZDCbaseLIB)
712ifneq ($(DYEXT),)
713all-ZDCbase: $(ZDCbaseDLIB)
714endif
715else
716all-ZDCbase: $(ZDCbaseBIN)
717endif
718
719depend-ZDCbase: $(ZDCbaseDEP)
720
721# determination of object files
722$(MODDIRO)/%.o: $(MODDIR)/%.cxx $(MODDIRO)/%.d
723ifndef ALIQUIET
724 @echo "***** Compiling $< *****";
725endif
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
730ifndef ALIQUIET
731 @echo "***** Compiling $< *****";
732endif
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
737ifndef ALIQUIET
738 @echo "***** Compiling $< *****";
739endif
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
744ifndef ALIQUIET
745 @echo "***** Compiling $< *****";
746endif
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)
751ifndef ALIQUIET
752 @echo "***** Making dependences for $< *****";
753endif
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
758ifndef ALIQUIET
759 @echo "***** Making dependences for $< *****";
760endif
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
764ifndef ALIQUIET
765 @echo "***** Making dependences for $< *****";
766endif
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
770ifndef ALIQUIET
771 @echo "***** Making dependences for $< *****";
772endif
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
776ifndef ALIQUIET
777 @echo "***** Making dependences for $< *****";
778endif
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
786ZDCbaseCHECKS := $(patsubst %.cxx,ZDC/check/%.viol,$(SRCS))
787
788check-ZDC: $(ZDCbaseCHECKS)
789
790# IRST coding rule check
791ZDC/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
797ZDC/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
802ZDC/check/%.viol : ZDC/check/%.i
803 @cd ZDC ; [ -r ZDC ] || ln -s ../ZDC ZDC
804 $(MUTE)echo $@ ; $(CODE_CHECK) $< ./ZDC > $@
805
806ZDCbasePREPROC = $(patsubst %.viol,%.i,$(ZDCbaseCHECKS))
807
808ZDCbaseREVENGS = $(patsubst %.viol,%.ii,$(ZDCbaseCHECKS))
809
810.SECONDARY: $(ZDCbaseREVENGS) $(ZDCbasePREPROC)
811
812reveng-ZDCbase: ZDCbase/check/classDiagram.dot
813
814ZDCbase/check/classDiagram.dot: $(ZDCbasePREPROC)
815 @$(REV_ENG) $^
816 @-mv classDiagram.dot $@
817
818revdisp-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
829TYPE=lib
830
831# Package head directory, source and include directories
832MODDIR:=ZDC
833MODDIRS:=$(MODDIR)
834MODDIRI:=$(MODDIR)
835MODDIRO:=$(MODDIR)/tgt_$(ALICE_TARGET)
836
837# Reseting variables before importing pkg-file
838SRCS:=
839HDRS:=
840FSRCS:=
841DHDR:=
842CSRCS:=
843CHDRS:=
844EINCLUDE:=
845EDEFINE:=
846ELIBS:=
847ELIBSDIR:=
848PACKFFLAGS:=
849PACKCXXFLAGS:=
850PACKCFLAGS:=
851PACKDYFLAGS:=
852PACKSOFLAGS:=
853EXPORT:=
854EHDRS:=
855CINTHDRS:=
856ARLIBS:=
857SHLIBS:=
858SUBDIR:=
859
860#-*- Mode: Makefile -*-
861# $Id$
862
863SRCS= AliZDCReco.cxx AliZDCReconstructor.cxx
864
865HDRS= $(SRCS:.cxx=.h)
866
867DHDR:=ZDCrecLinkDef.h
868
869EINCLUDE:=RAW
870
871#-*- Mode: Makefile -*-
872
873
874ifndef PACKFFLAGS
875ZDCrecFFLAGS:=$(FFLAGS)
876else
877ZDCrecFFLAGS:=$(PACKFFLAGS)
878endif
879
880ifndef PACKCFLAGS
881ZDCrecCFLAGS:=$(CFLAGS)
882else
883ZDCrecCFLAGS:=$(PACKCFLAGS)
884endif
885
886ifndef PACKCXXFLAGS
887ZDCrecCXXFLAGS:=$(CXXFLAGS)
888else
889ZDCrecCXXFLAGS:=$(PACKCXXFLAGS)
890endif
891
892ifndef PACKSOFLAGS
893ZDCrecSOFLAGS:=$(SOFLAGS)
894else
895ZDCrecSOFLAGS:=$(PACKSOFLAGS)
896endif
897
898ifdef DYEXT
899ifndef PACKDYFLAGS
900ZDCrecDYFLAGS:=$(DYFLAGS)
901else
902ZDCrecDYFLAGS:=$(PACKDYFLAGS)
903endif
904endif
905
906ifndef PACKDCXXFLAGS
907ZDCrecDCXXFLAGS:=$(CXXFLAGSNO)
908else
909ZDCrecDCXXFLAGS:=$(PACKDCXXFLAGS)
910endif
911
912
913ifdef DHDR
914WITHDICT=YES
915else
916WITHDICT=
917endif
918
919# Headerfiles exported to common place:
920ZDCrecEXPORT:=$(EXPORT)
921ZDCrecEXPORTDEST:=$(patsubst %,$(EXPORTDIR)/%,$(EXPORT))
922
923
924#Extra include,libs, defines etc.
925
926ZDCrecDEFINE:=$(EDEFINE) -D__MODULE__=\"ZDC\"
927
928ZDCrecINC:=$(patsubst %,-I%,$(EINCLUDE)) -IZDC
929
930ZDCrecELIBS:=$(patsubst %,-l%,$(ELIBS))
931ZDCrecELIBSDEP:=$(patsubst %,lib/tgt_$(ALICE_TARGET)/lib%.$(SOEXT),$(ELIBS))
932ZDCrecELIBSDIR:=$(patsubst %,-L%,$(ELIBSDIR))
933
934#c sources and headers
935
936ZDCrecCS:=$(patsubst %,$(MODDIR)/%,$(CSRCS))
937ZDCrecCH:=$(patsubst %,$(MODDIR)/%,$(CHDRS))
938
939#Fortran sources
940ZDCrecFS:=$(patsubst %,$(MODDIR)/%,$(FSRCS))
941
942#c++ sources and header
943ZDCrecS:=$(patsubst %,$(MODDIR)/%,$(SRCS))
944ZDCrecH:=$(patsubst %,$(MODDIR)/%,$(HDRS)) $(EHDRS)
945
946#c++ source subdirectories
947ZDCrecSDIR:=$(SUBDIR)
948
949#############################################################################
950#
951# If special rootcint headerfiles is specified use them
952# else use all headers
953
954ifndef CINTHDRS
955ZDCrecCINTHDRS:=$(ZDCrecH)
956else
957ZDCrecCINTHDRS:=$(CINTHDRS)
958endif
959#############################################################################
960
961# Package Dictionary
962
963ZDCrecDH:=$(MODDIR)/$(DHDR)
964
965
966#All objects
967ZDCrecCO:=$(patsubst %,$(MODDIRO)/%, $(CSRCS:.c=.o))
968TEMP:=$(FSRCS:.F=.o)
969ZDCrecFO:=$(patsubst %,$(MODDIRO)/%, $(TEMP:.f=.o))
970ZDCrecO:= $(patsubst %,$(MODDIRO)/%, $(SRCS:.cxx=.o)) $(ZDCrecFO) $(ZDCrecCO)
971
972
973
974ifdef WITHDICT
975 ZDCrecDS:=$(MODDIRO)/G__ZDCrec.cxx
976 ZDCrecDO:=$(MODDIRO)/G__ZDCrec.o
977 ZDCrecDDEP:=$(ZDCrecDO:.o=.d)
978 ZDCrecDEP:=$(ZDCrecO:.o=.d) $(ZDCrecDDEP)
979else
980 ZDCrecDS:=
981 ZDCrecDO:=
982 ZDCrecDDEP:=
983 ZDCrecDEP:=$(ZDCrecO:.o=.d)
984endif
985
986
987#The actual library file
988
989ZDCrecLIB:=$(LIBPATH)/libZDCrec.$(SOEXT)
990
991ifneq ($(DYEXT),)
992ZDCrecDLIB:=$(LIBPATH)/libZDCrec.$(DYEXT)
993endif
994
995ZDCrecALIB:=$(LIBPATH)/libZDCrec.$(AEXT)
996
997#Add this to the modules libs
998ZDCLIBS += $(ZDCrecLIB)
999ZDCALIBS += $(ZDCrecALIB)
1000ifneq ($(DYEXT),)
1001ZDCDLIBS += $(ZDCrecDLIB)
1002endif
1003
1004#The actual binary file
1005
1006ZDCrecBIN:=$(BINPATH)/ZDCrec
1007
1008#Add to modules list of binaries
1009ZDCBINS += $(ZDCrecBIN)
1010
1011# Use in the main Makefile
1012
1013ifeq ($(TYPE),lib)
1014ALLLIBS += $(ZDCrecLIB)
1015ALLALIBS += $(ZDCrecALIB)
1016ifneq ($(DYEXT),)
1017ALLLIBS += $(ZDCrecDLIB)
1018endif
1019BINLIBS += -lZDCrec
1020else
1021ALLEXECS += $(ZDCrecBIN)
1022endif
1023
1024ifeq ($(DYEXT),)
1025ZDCrecLIB := $(ZDCrecLIB)
1026else
1027ZDCrecLIB := $(ZDCrecLIB)
1028endif
1029
1030# include all dependence files
1031INCLUDEFILES +=$(ZDCrecDEP)
1032
1033EXPORTFILES += $(ZDCrecEXPORTDEST)
1034
1035#local rules
1036
1037#The exportfiles only include if any!!
1038
1039ifdef ZDCrecEXPORT
1040#$(ZDCrecEXPORTDEST): $(patsubst %,ZDC/%,$(ZDCrecEXPORT))
1041
1042$(ZDCrecEXPORTDEST): $(EXPORTDIR)/%.h: ZDC/%.h
1043ifndef ALIQUIET
1044 @echo "***** Copying file $^ to $@ *****"
1045endif
1046 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
1047 @cp $^ $@
1048endif
1049
1050#------------------------------------------------------------------------
1051
1052$(ZDCrecLIB):$(ZDCrecO) $(ZDCrecDO) ZDC/module.mk
1053ifndef ALIQUIET
1054 @echo "***** Linking library $@ *****"
1055endif
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
1065ifneq ($(DYEXT),)
1066$(ZDCrecDLIB):$(ZDCrecO) $(ZDCrecDO) ZDC/module.mk
1067ifndef ALIQUIET
1068 @echo "***** Linking library $@ *****"
1069endif
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
1077endif
1078
1079#------------------------------------------------------------------------
1080
1081$(ZDCrecALIB):$(ZDCrecO) $(ZDCrecDO) ZDC/module.mk
1082ifndef ALIQUIET
1083 @echo "***** Linking static library $@ *****"
1084endif
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
1096ifndef ALIQUIET
1097 @echo "***** Making executable $@ *****"
1098endif
1099ifeq ($(ALIPROFILE),YES)
1100 $(MUTE)$(LD) $(LDFLAGS) $(ZDCrecO) $(ARLIBS) $(SHLIBS) $(LIBS) $(EXEFLAGS) -o $@
1101else
1102 $(MUTE)$(LD) $(LDFLAGS) $(ZDCrecO) $(ZDCrecDO) $(BINLIBDIRS) $(ZDCrecELIBSDIR) $(ZDCrecELIBS) $(LIBS) $(EXEFLAGS) -o $@
1103endif
1104
1105$(ZDCrecDS): $(ZDCrecCINTHDRS) $(ZDCrecDH) ZDC/module.mk
1106ifndef ALIQUIET
1107 @echo "***** Creating $@ *****";
1108endif
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)
1114ifndef ALIQUIET
1115 @echo "***** Compiling $< *****";
1116endif
1117 $(MUTE)$(CXX) $(ZDCrecDEFINE) -c $(ZDCrecINC) -I$(ALICE_ROOT) $< -o $@ $(ZDCrecDCXXFLAGS)
1118
1119#Different targets for the module
1120
1121ifeq ($(TYPE),lib)
1122all-ZDCrec: $(ZDCrecLIB)
1123ifneq ($(DYEXT),)
1124all-ZDCrec: $(ZDCrecDLIB)
1125endif
1126else
1127all-ZDCrec: $(ZDCrecBIN)
1128endif
1129
1130depend-ZDCrec: $(ZDCrecDEP)
1131
1132# determination of object files
1133$(MODDIRO)/%.o: $(MODDIR)/%.cxx $(MODDIRO)/%.d
1134ifndef ALIQUIET
1135 @echo "***** Compiling $< *****";
1136endif
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
1141ifndef ALIQUIET
1142 @echo "***** Compiling $< *****";
1143endif
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
1148ifndef ALIQUIET
1149 @echo "***** Compiling $< *****";
1150endif
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
1155ifndef ALIQUIET
1156 @echo "***** Compiling $< *****";
1157endif
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)
1162ifndef ALIQUIET
1163 @echo "***** Making dependences for $< *****";
1164endif
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
1169ifndef ALIQUIET
1170 @echo "***** Making dependences for $< *****";
1171endif
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
1175ifndef ALIQUIET
1176 @echo "***** Making dependences for $< *****";
1177endif
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
1181ifndef ALIQUIET
1182 @echo "***** Making dependences for $< *****";
1183endif
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
1187ifndef ALIQUIET
1188 @echo "***** Making dependences for $< *****";
1189endif
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
1197ZDCrecCHECKS := $(patsubst %.cxx,ZDC/check/%.viol,$(SRCS))
1198
1199check-ZDC: $(ZDCrecCHECKS)
1200
1201# IRST coding rule check
1202ZDC/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
1208ZDC/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
1213ZDC/check/%.viol : ZDC/check/%.i
1214 @cd ZDC ; [ -r ZDC ] || ln -s ../ZDC ZDC
1215 $(MUTE)echo $@ ; $(CODE_CHECK) $< ./ZDC > $@
1216
1217ZDCrecPREPROC = $(patsubst %.viol,%.i,$(ZDCrecCHECKS))
1218
1219ZDCrecREVENGS = $(patsubst %.viol,%.ii,$(ZDCrecCHECKS))
1220
1221.SECONDARY: $(ZDCrecREVENGS) $(ZDCrecPREPROC)
1222
1223reveng-ZDCrec: ZDCrec/check/classDiagram.dot
1224
1225ZDCrec/check/classDiagram.dot: $(ZDCrecPREPROC)
1226 @$(REV_ENG) $^
1227 @-mv classDiagram.dot $@
1228
1229revdisp-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
1240TYPE=lib
1241
1242# Package head directory, source and include directories
1243MODDIR:=ZDC
1244MODDIRS:=$(MODDIR)
1245MODDIRI:=$(MODDIR)
1246MODDIRO:=$(MODDIR)/tgt_$(ALICE_TARGET)
1247
1248# Reseting variables before importing pkg-file
1249SRCS:=
1250HDRS:=
1251FSRCS:=
1252DHDR:=
1253CSRCS:=
1254CHDRS:=
1255EINCLUDE:=
1256EDEFINE:=
1257ELIBS:=
1258ELIBSDIR:=
1259PACKFFLAGS:=
1260PACKCXXFLAGS:=
1261PACKCFLAGS:=
1262PACKDYFLAGS:=
1263PACKSOFLAGS:=
1264EXPORT:=
1265EHDRS:=
1266CINTHDRS:=
1267ARLIBS:=
1268SHLIBS:=
1269SUBDIR:=
1270
1271#-*- Mode: Makefile -*-
1272# $Id$
1273
1274SRCS= AliZDC.cxx AliZDCv1.cxx AliZDCv2.cxx \
1275 AliZDCHit.cxx AliZDCSDigit.cxx AliZDCFragment.cxx AliZDCDigitizer.cxx \
1276 AliGenZDC.cxx AliZDCMergedHit.cxx AliZDCMerger.cxx
1277
1278HDRS= $(SRCS:.cxx=.h)
1279
1280DHDR:=ZDCsimLinkDef.h
1281
1282EINCLUDE:=RAW
1283
1284#-*- Mode: Makefile -*-
1285
1286
1287ifndef PACKFFLAGS
1288ZDCsimFFLAGS:=$(FFLAGS)
1289else
1290ZDCsimFFLAGS:=$(PACKFFLAGS)
1291endif
1292
1293ifndef PACKCFLAGS
1294ZDCsimCFLAGS:=$(CFLAGS)
1295else
1296ZDCsimCFLAGS:=$(PACKCFLAGS)
1297endif
1298
1299ifndef PACKCXXFLAGS
1300ZDCsimCXXFLAGS:=$(CXXFLAGS)
1301else
1302ZDCsimCXXFLAGS:=$(PACKCXXFLAGS)
1303endif
1304
1305ifndef PACKSOFLAGS
1306ZDCsimSOFLAGS:=$(SOFLAGS)
1307else
1308ZDCsimSOFLAGS:=$(PACKSOFLAGS)
1309endif
1310
1311ifdef DYEXT
1312ifndef PACKDYFLAGS
1313ZDCsimDYFLAGS:=$(DYFLAGS)
1314else
1315ZDCsimDYFLAGS:=$(PACKDYFLAGS)
1316endif
1317endif
1318
1319ifndef PACKDCXXFLAGS
1320ZDCsimDCXXFLAGS:=$(CXXFLAGSNO)
1321else
1322ZDCsimDCXXFLAGS:=$(PACKDCXXFLAGS)
1323endif
1324
1325
1326ifdef DHDR
1327WITHDICT=YES
1328else
1329WITHDICT=
1330endif
1331
1332# Headerfiles exported to common place:
1333ZDCsimEXPORT:=$(EXPORT)
1334ZDCsimEXPORTDEST:=$(patsubst %,$(EXPORTDIR)/%,$(EXPORT))
1335
1336
1337#Extra include,libs, defines etc.
1338
1339ZDCsimDEFINE:=$(EDEFINE) -D__MODULE__=\"ZDC\"
1340
1341ZDCsimINC:=$(patsubst %,-I%,$(EINCLUDE)) -IZDC
1342
1343ZDCsimELIBS:=$(patsubst %,-l%,$(ELIBS))
1344ZDCsimELIBSDEP:=$(patsubst %,lib/tgt_$(ALICE_TARGET)/lib%.$(SOEXT),$(ELIBS))
1345ZDCsimELIBSDIR:=$(patsubst %,-L%,$(ELIBSDIR))
1346
1347#c sources and headers
1348
1349ZDCsimCS:=$(patsubst %,$(MODDIR)/%,$(CSRCS))
1350ZDCsimCH:=$(patsubst %,$(MODDIR)/%,$(CHDRS))
1351
1352#Fortran sources
1353ZDCsimFS:=$(patsubst %,$(MODDIR)/%,$(FSRCS))
1354
1355#c++ sources and header
1356ZDCsimS:=$(patsubst %,$(MODDIR)/%,$(SRCS))
1357ZDCsimH:=$(patsubst %,$(MODDIR)/%,$(HDRS)) $(EHDRS)
1358
1359#c++ source subdirectories
1360ZDCsimSDIR:=$(SUBDIR)
1361
1362#############################################################################
1363#
1364# If special rootcint headerfiles is specified use them
1365# else use all headers
1366
1367ifndef CINTHDRS
1368ZDCsimCINTHDRS:=$(ZDCsimH)
1369else
1370ZDCsimCINTHDRS:=$(CINTHDRS)
1371endif
1372#############################################################################
1373
1374# Package Dictionary
1375
1376ZDCsimDH:=$(MODDIR)/$(DHDR)
1377
1378
1379#All objects
1380ZDCsimCO:=$(patsubst %,$(MODDIRO)/%, $(CSRCS:.c=.o))
1381TEMP:=$(FSRCS:.F=.o)
1382ZDCsimFO:=$(patsubst %,$(MODDIRO)/%, $(TEMP:.f=.o))
1383ZDCsimO:= $(patsubst %,$(MODDIRO)/%, $(SRCS:.cxx=.o)) $(ZDCsimFO) $(ZDCsimCO)
1384
1385
1386
1387ifdef WITHDICT
1388 ZDCsimDS:=$(MODDIRO)/G__ZDCsim.cxx
1389 ZDCsimDO:=$(MODDIRO)/G__ZDCsim.o
1390 ZDCsimDDEP:=$(ZDCsimDO:.o=.d)
1391 ZDCsimDEP:=$(ZDCsimO:.o=.d) $(ZDCsimDDEP)
1392else
1393 ZDCsimDS:=
1394 ZDCsimDO:=
1395 ZDCsimDDEP:=
1396 ZDCsimDEP:=$(ZDCsimO:.o=.d)
1397endif
1398
1399
1400#The actual library file
1401
1402ZDCsimLIB:=$(LIBPATH)/libZDCsim.$(SOEXT)
1403
1404ifneq ($(DYEXT),)
1405ZDCsimDLIB:=$(LIBPATH)/libZDCsim.$(DYEXT)
1406endif
1407
1408ZDCsimALIB:=$(LIBPATH)/libZDCsim.$(AEXT)
1409
1410#Add this to the modules libs
1411ZDCLIBS += $(ZDCsimLIB)
1412ZDCALIBS += $(ZDCsimALIB)
1413ifneq ($(DYEXT),)
1414ZDCDLIBS += $(ZDCsimDLIB)
1415endif
1416
1417#The actual binary file
1418
1419ZDCsimBIN:=$(BINPATH)/ZDCsim
1420
1421#Add to modules list of binaries
1422ZDCBINS += $(ZDCsimBIN)
1423
1424# Use in the main Makefile
1425
1426ifeq ($(TYPE),lib)
1427ALLLIBS += $(ZDCsimLIB)
1428ALLALIBS += $(ZDCsimALIB)
1429ifneq ($(DYEXT),)
1430ALLLIBS += $(ZDCsimDLIB)
1431endif
1432BINLIBS += -lZDCsim
1433else
1434ALLEXECS += $(ZDCsimBIN)
1435endif
1436
1437ifeq ($(DYEXT),)
1438ZDCsimLIB := $(ZDCsimLIB)
1439else
1440ZDCsimLIB := $(ZDCsimLIB)
1441endif
1442
1443# include all dependence files
1444INCLUDEFILES +=$(ZDCsimDEP)
1445
1446EXPORTFILES += $(ZDCsimEXPORTDEST)
1447
1448#local rules
1449
1450#The exportfiles only include if any!!
1451
1452ifdef ZDCsimEXPORT
1453#$(ZDCsimEXPORTDEST): $(patsubst %,ZDC/%,$(ZDCsimEXPORT))
1454
1455$(ZDCsimEXPORTDEST): $(EXPORTDIR)/%.h: ZDC/%.h
1456ifndef ALIQUIET
1457 @echo "***** Copying file $^ to $@ *****"
1458endif
1459 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
1460 @cp $^ $@
1461endif
1462
1463#------------------------------------------------------------------------
1464
1465$(ZDCsimLIB):$(ZDCsimO) $(ZDCsimDO) ZDC/module.mk
1466ifndef ALIQUIET
1467 @echo "***** Linking library $@ *****"
1468endif
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
1478ifneq ($(DYEXT),)
1479$(ZDCsimDLIB):$(ZDCsimO) $(ZDCsimDO) ZDC/module.mk
1480ifndef ALIQUIET
1481 @echo "***** Linking library $@ *****"
1482endif
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
1490endif
1491
1492#------------------------------------------------------------------------
1493
1494$(ZDCsimALIB):$(ZDCsimO) $(ZDCsimDO) ZDC/module.mk
1495ifndef ALIQUIET
1496 @echo "***** Linking static library $@ *****"
1497endif
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
1509ifndef ALIQUIET
1510 @echo "***** Making executable $@ *****"
1511endif
1512ifeq ($(ALIPROFILE),YES)
1513 $(MUTE)$(LD) $(LDFLAGS) $(ZDCsimO) $(ARLIBS) $(SHLIBS) $(LIBS) $(EXEFLAGS) -o $@
1514else
1515 $(MUTE)$(LD) $(LDFLAGS) $(ZDCsimO) $(ZDCsimDO) $(BINLIBDIRS) $(ZDCsimELIBSDIR) $(ZDCsimELIBS) $(LIBS) $(EXEFLAGS) -o $@
1516endif
1517
1518$(ZDCsimDS): $(ZDCsimCINTHDRS) $(ZDCsimDH) ZDC/module.mk
1519ifndef ALIQUIET
1520 @echo "***** Creating $@ *****";
1521endif
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)
1527ifndef ALIQUIET
1528 @echo "***** Compiling $< *****";
1529endif
1530 $(MUTE)$(CXX) $(ZDCsimDEFINE) -c $(ZDCsimINC) -I$(ALICE_ROOT) $< -o $@ $(ZDCsimDCXXFLAGS)
1531
1532#Different targets for the module
1533
1534ifeq ($(TYPE),lib)
1535all-ZDCsim: $(ZDCsimLIB)
1536ifneq ($(DYEXT),)
1537all-ZDCsim: $(ZDCsimDLIB)
1538endif
1539else
1540all-ZDCsim: $(ZDCsimBIN)
1541endif
1542
1543depend-ZDCsim: $(ZDCsimDEP)
1544
1545# determination of object files
1546$(MODDIRO)/%.o: $(MODDIR)/%.cxx $(MODDIRO)/%.d
1547ifndef ALIQUIET
1548 @echo "***** Compiling $< *****";
1549endif
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
1554ifndef ALIQUIET
1555 @echo "***** Compiling $< *****";
1556endif
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
1561ifndef ALIQUIET
1562 @echo "***** Compiling $< *****";
1563endif
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
1568ifndef ALIQUIET
1569 @echo "***** Compiling $< *****";
1570endif
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)
1575ifndef ALIQUIET
1576 @echo "***** Making dependences for $< *****";
1577endif
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
1582ifndef ALIQUIET
1583 @echo "***** Making dependences for $< *****";
1584endif
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
1588ifndef ALIQUIET
1589 @echo "***** Making dependences for $< *****";
1590endif
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
1594ifndef ALIQUIET
1595 @echo "***** Making dependences for $< *****";
1596endif
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
1600ifndef ALIQUIET
1601 @echo "***** Making dependences for $< *****";
1602endif
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
1610ZDCsimCHECKS := $(patsubst %.cxx,ZDC/check/%.viol,$(SRCS))
1611
1612check-ZDC: $(ZDCsimCHECKS)
1613
1614# IRST coding rule check
1615ZDC/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
1621ZDC/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
1626ZDC/check/%.viol : ZDC/check/%.i
1627 @cd ZDC ; [ -r ZDC ] || ln -s ../ZDC ZDC
1628 $(MUTE)echo $@ ; $(CODE_CHECK) $< ./ZDC > $@
1629
1630ZDCsimPREPROC = $(patsubst %.viol,%.i,$(ZDCsimCHECKS))
1631
1632ZDCsimREVENGS = $(patsubst %.viol,%.ii,$(ZDCsimCHECKS))
1633
1634.SECONDARY: $(ZDCsimREVENGS) $(ZDCsimPREPROC)
1635
1636reveng-ZDCsim: ZDCsim/check/classDiagram.dot
1637
1638ZDCsim/check/classDiagram.dot: $(ZDCsimPREPROC)
1639 @$(REV_ENG) $^
1640 @-mv classDiagram.dot $@
1641
1642revdisp-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
1650clean-ZDC:
1651ifndef ALIQUIET
1652 @echo "***** Cleaning ZDC *****"
1653endif
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
1659clean-check-ZDC:
1660ifndef ALIQUIET
1661 @echo "***** Cleaning code check for ZDC *****"
1662endif
1663 $(MUTE)rm -f `find ZDC/check -name '*.i'` `find ZDC/check -name '*.ii'` `find ZDC/check -name '*.viol'`
1664
1665clean-reveng-ZDC:
1666ifndef ALIQUIET
1667 @echo "***** Cleaning reverse engineering files for ZDC *****"
1668endif
1669 $(MUTE)rm -f `find ZDC/check -name '*.dot'`
1670