4 @PACKAGE@FFLAGS:=$(FFLAGS)
6 @PACKAGE@FFLAGS:=$(PACKFFLAGS)
10 @PACKAGE@CFLAGS:=$(CFLAGS)
12 @PACKAGE@CFLAGS:=$(PACKCFLAGS)
16 @PACKAGE@CXXFLAGS:=$(CXXFLAGS)
18 @PACKAGE@CXXFLAGS:=$(PACKCXXFLAGS)
22 ifeq ($(PLATFORM),linuxicc)
23 @PACKAGE@DCXXFLAGS:=$(filter-out -O%,$(CXXFLAGS)) -O0
25 @PACKAGE@DCXXFLAGS:=$(filter-out -O%,$(CXXFLAGS))
28 @PACKAGE@DCXXFLAGS:=$(PACKCXXFLAGS)
38 # Headerfiles exported to common place:
39 @PACKAGE@EXPORT:=$(EXPORT)
40 @PACKAGE@EXPORTDEST:=$(patsubst %,$(EXPORTDIR)/%,$(EXPORT))
43 #Extra include,libs, defines etc.
45 @PACKAGE@DEFINE:=$(EDEFINE)
47 @PACKAGE@INC:=$(patsubst %,-I%,$(EINCLUDE)) -I@MODULE@
49 @PACKAGE@ELIBS:=$(patsubst %,-l%,$(ELIBS))
50 @PACKAGE@ELIBSDIR:=$(patsubst %,-L%,$(ELIBSDIR))
52 #c sources and headers
54 @PACKAGE@CS:=$(patsubst %,$(MODDIR)/%,$(CSRCS))
55 @PACKAGE@CH:=$(patsubst %,$(MODDIR)/%,$(CHDRS))
58 @PACKAGE@FS:=$(patsubst %,$(MODDIR)/%,$(FSRCS))
60 #c++ sources and header
61 @PACKAGE@S:=$(patsubst %,$(MODDIR)/%,$(SRCS))
62 @PACKAGE@H:=$(patsubst %,$(MODDIR)/%,$(HDRS)) $(EHDRS)
64 #############################################################################
66 # If special rootcint headerfiles is specified use them
67 # else use all headers
70 @PACKAGE@CINTHDRS:=$(@PACKAGE@H)
72 @PACKAGE@CINTHDRS:=$(CINTHDRS)
74 #############################################################################
78 @PACKAGE@DH:=$(MODDIR)/$(DHDR)
82 @PACKAGE@CO:=$(patsubst %,$(MODDIRO)/%, $(CSRCS:.c=.o))
84 @PACKAGE@FO:=$(patsubst %,$(MODDIRO)/%, $(TEMP:.f=.o))
85 @PACKAGE@O:= $(patsubst %,$(MODDIRO)/%, $(SRCS:.cxx=.o)) $(@PACKAGE@FO) $(@PACKAGE@CO)
90 @PACKAGE@DS:=$(MODDIRO)/G__@PACKAGE@.cxx
91 @PACKAGE@DO:=$(MODDIRO)/G__@PACKAGE@.o
92 @PACKAGE@DDEP:=$(@PACKAGE@DO:.o=.d)
93 @PACKAGE@DEP:=$(@PACKAGE@O:.o=.d) $(@PACKAGE@DDEP)
98 @PACKAGE@DEP:=$(@PACKAGE@O:.o=.d)
102 #The actual library file
104 @PACKAGE@LIB:=$(LIBPATH)/lib@PACKAGE@.$(SOEXT)
105 @PACKAGE@ALIB:=$(LIBPATH)/lib@PACKAGE@.$(AEXT)
107 #Add this to the modules libs
108 @MODULE@LIBS += $(@PACKAGE@LIB)
109 @MODULE@ALIBS += $(@PACKAGE@ALIB)
111 #The actual binary file
113 @PACKAGE@BIN:=$(BINPATH)/@PACKAGE@
115 #Add to modules list of binaries
116 @MODULE@BINS += $(@PACKAGE@BIN)
118 # Use in the main Makefile
121 ALLLIBS += $(@PACKAGE@LIB)
122 ALLALIBS += $(@PACKAGE@ALIB)
123 BINLIBS += -l@PACKAGE@
125 ALLEXECS += $(@PACKAGE@BIN)
128 # include all dependency files
129 INCLUDEFILES +=$(@PACKAGE@DEP)
131 EXPORTFILES += $(@PACKAGE@EXPORTDEST)
135 #The exportfiles only include if any!!
137 ifdef @PACKAGE@EXPORT
138 #$(@PACKAGE@EXPORTDEST): $(patsubst %,@MODULE@/%,$(@PACKAGE@EXPORT))
140 $(@PACKAGE@EXPORTDEST): $(EXPORTDIR)/%.h: @MODULE@/%.h
142 @echo "***** Copying file $^ to $@ *****"
144 @[ -d $(dir $@) ] || mkdir $(dir $@)
148 $(@PACKAGE@LIB):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk
150 @echo "***** Linking library $@ *****"
152 $(MUTE)TMPDIR=/tmp/@MODULE@$$$$.`date +%M%S` ; \
153 export TMPDIR; mkdir $$TMPDIR ; cd $$TMPDIR ; \
154 find $(CURDIR)/@MODULE@/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\
155 rm -f $(CURDIR)/$@ ;\
156 $(SHLD) $(SOFLAGS) -o $(CURDIR)/$@ $(notdir $(@PACKAGE@O) $(@PACKAGE@DO)) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) $(SHLIB);\
157 cd $(CURDIR) ; rm -rf $$TMPDIR
160 $(@PACKAGE@ALIB):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk
162 @echo "***** Linking static library $@ *****"
164 $(MUTE)TMPDIR=/tmp/@MODULE@$$$$.`date +%M%S` ; \
165 export TMPDIR; mkdir $$TMPDIR ; cd $$TMPDIR ; \
166 find $(CURDIR)/@MODULE@/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\
167 rm -f $(CURDIR)/$@ ;\
168 $(ALLD) $(ALFLAGS) $(CURDIR)/$@ $(notdir $(@PACKAGE@O) $(@PACKAGE@DO)) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) $(ALLIB);\
169 cd $(CURDIR) ; rm -rf $$TMPDIR
173 $(@PACKAGE@BIN):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk
175 @echo "***** Making executable $@ *****"
177 ifeq ($(ALIPROFILE),YES)
178 $(MUTE)$(LD) $(LDFLAGS) $(@PACKAGE@O) $(ARLIBS) $(SHLIBS) $(LIBS) $(EXEFLAGS) -o $@
180 $(MUTE)$(LD) $(LDFLAGS) $(@PACKAGE@O) $(@PACKAGE@DO) $(BINLIBDIRS) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) $(LIBS) $(EXEFLAGS) -o $@
183 $(@PACKAGE@DS): $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH) @MODULE@/module.mk
185 @echo "***** Creating $@ *****";
187 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
188 $(MUTE)rootcint -f $@ -c $(@PACKAGE@DEFINE) $(CINTFLAGS) $(@PACKAGE@INC) $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH)
190 $(@PACKAGE@DO): $(@PACKAGE@DS)
192 @echo "***** Compiling $< *****";
194 $(MUTE)$(CXX) -c $(@PACKAGE@INC) -I$(ALICE_ROOT) $< -o $@ $(@PACKAGE@DCXXFLAGS)
196 #Different targets for the module
199 all-@PACKAGE@: $(@PACKAGE@LIB $(@PACKAGE@ALIB)
201 all-@PACKAGE@: $(@PACKAGE@BIN)
204 depend-@PACKAGE@: $(@PACKAGE@DEP)
206 # determination of object files
207 $(MODDIRO)/%.o: $(MODDIRO)/%.cxx $(MODDIRO)/%.d
209 @echo "***** Compiling $< *****";
211 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
212 $(MUTE)$(CXX) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CXXFLAGS)
214 $(MODDIRO)/%.o: $(MODDIR)/%.cxx $(MODDIRO)/%.d
216 @echo "***** Compiling $< *****";
218 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
219 $(MUTE)$(CXX) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CXXFLAGS)
221 $(MODDIRO)/%.o: $(MODDIR)/%.F $(MODDIRO)/%.d
223 @echo "***** Compiling $< *****";
225 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
226 $(MUTE)$(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS)
228 $(MODDIRO)/%.o: $(MODDIR)/%.f $(MODDIRO)/%.d
230 @echo "***** Compiling $< *****";
232 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
233 $(MUTE)$(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS)
235 $(MODDIRO)/%.o: $(MODDIR)/%.c $(MODDIRO)/%.d
237 @echo "***** Compiling $< *****";
239 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
240 $(MUTE)$(CC) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CFLAGS)
242 $(@PACKAGE@DDEP): $(@PACKAGE@DS)
244 @echo "***** Making dependencies for $< *****";
246 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
247 @share/alibtool depend "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
249 $(MODDIRO)/%.d: $(MODDIRS)/%.cxx
251 @echo "***** Making dependencies for $< *****";
253 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
254 @share/alibtool depend "$(@PACKAGE@DEFINE) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
255 $(MODDIRO)/%.d: $(MODDIRS)/%.f
257 @echo "***** Making dependencies for $< *****";
259 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
260 @share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
261 $(MODDIRO)/%.d: $(MODDIRS)/%.F
263 @echo "***** Making dependencies for $< *****";
265 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
266 $(MUTE)share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
267 $(MODDIRO)/%.d: $(MODDIRS)/%.c
269 @echo "***** Making dependencies for $< *****";
271 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
272 @share/alibtool depend "$(@PACKAGE@DEFINE) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
274 @PACKAGE@CHECKS := $(patsubst %.cxx,@PACKAGE@/check/%.viol,$(SRCS))
276 check-@PACKAGE@: $(@PACKAGE@CHECKS)
278 # IRST coding rule check
279 @PACKAGE@/check/%.i : @PACKAGE@/%.cxx
280 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
281 $(MUTE)$(CXX) -E $(@PACKAGE@DEFINE) $(@PACKAGE@INC) $< > $@ $(@PACKAGE@CXXFLAGS)
282 @cd $(dir $@) ; $(IRST_INSTALLDIR)/patch/patch4alice.prl $(notdir $@)
284 # IRST coding rule check
285 @PACKAGE@/check/%.viol : @PACKAGE@/check/%.i
286 @cd @PACKAGE@ ; [ -r @PACKAGE@ ] || ln -s ../@PACKAGE@ @PACKAGE@
287 -@echo $@ ; $(CODE_CHECK) $< ./@PACKAGE@ > $@
289 @PACKAGE@PREPROC = $(patsubst %.viol,%.i,$(@PACKAGE@CHECKS))
291 @PACKAGE@REVENGS = $(patsubst %.viol,%.ii,$(@PACKAGE@CHECKS))
293 .SECONDARY: $(@PACKAGE@REVENGS) $(@PACKAGE@PREPROC)
295 reveng-@PACKAGE@: @PACKAGE@/check/classDiagram.dot
297 @PACKAGE@/check/classDiagram.dot: $(@PACKAGE@PREPROC)
299 @-mv classDiagram.dot $@
301 revdisp-@PACKAGE@: reveng-@PACKAGE@
302 @echo revdisp for @PACKAGE@
303 @cd @PACKAGE@/check ; \
304 $(IRST_INSTALLDIR)/webreveng/create-class-diagram-pages.sh
305 @sed -e "s/\@PACKAGE\@/@PACKAGE@/g" < $(ALICE_ROOT)/build/HomePage.html > @PACKAGE@/check/HomePage.html