4 @PACKAGE@FFLAGS:=$(FFLAGS)
6 @PACKAGE@FFLAGS:=$(PACKFFLAGS)
10 @PACKAGE@CFLAGS:=$(CFLAGS)
12 @PACKAGE@CFLAGS:=$(PACKCFLAGS)
16 @PACKAGE@CXXFLAGS:=$(CXXFLAGS)
18 @PACKAGE@CXXFLAGS:=$(PACKCXXFLAGS)
28 # Headerfiles exported to common place:
29 @PACKAGE@EXPORT:=$(EXPORT)
30 @PACKAGE@EXPORTDEST:=$(patsubst %,$(EXPORTDIR)/%,$(EXPORT))
33 #Extra include,libs, defines etc.
35 @PACKAGE@DEFINE:=$(EDEFINE)
37 @PACKAGE@INC:=$(patsubst %,-I%,$(EINCLUDE)) -I@MODULE@
39 @PACKAGE@ELIBS:=$(patsubst %,-l%,$(ELIBS))
40 @PACKAGE@ELIBSDIR:=$(patsubst %,-L%,$(ELIBSDIR))
42 #c sources and headers
44 @PACKAGE@CS:=$(patsubst %,$(MODDIR)/%,$(CSRCS))
45 @PACKAGE@CH:=$(patsubst %,$(MODDIR)/%,$(CHDRS))
48 @PACKAGE@FS:=$(patsubst %,$(MODDIR)/%,$(FSRCS))
50 #c++ sources and header
51 @PACKAGE@S:=$(patsubst %,$(MODDIR)/%,$(SRCS))
52 @PACKAGE@H:=$(patsubst %,$(MODDIR)/%,$(HDRS)) $(EHDRS)
54 #############################################################################
56 # If special rootcint headerfiles is specified use them
57 # else use all headers
60 @PACKAGE@CINTHDRS:=$(@PACKAGE@H)
62 @PACKAGE@CINTHDRS:=$(CINTHDRS)
64 #############################################################################
68 @PACKAGE@DH:=$(MODDIR)/$(DHDR)
72 @PACKAGE@CO:=$(patsubst %,$(MODDIRO)/%, $(CSRCS:.c=.o))
74 @PACKAGE@FO:=$(patsubst %,$(MODDIRO)/%, $(TEMP:.f=.o))
75 @PACKAGE@O:= $(patsubst %,$(MODDIRO)/%, $(SRCS:.cxx=.o)) $(@PACKAGE@FO) $(@PACKAGE@CO)
80 @PACKAGE@DS:=$(MODDIRO)/G__@PACKAGE@.cxx
81 @PACKAGE@DO:=$(MODDIRO)/G__@PACKAGE@.o
82 @PACKAGE@DDEP:=$(@PACKAGE@DO:.o=.d)
83 @PACKAGE@DEP:=$(@PACKAGE@O:.o=.d) $(@PACKAGE@DDEP)
88 @PACKAGE@DEP:=$(@PACKAGE@O:.o=.d)
92 #The actual library file
94 @PACKAGE@LIB:=$(LIBPATH)/lib@PACKAGE@.$(SOEXT)
96 #Add this to the modules libs
97 @MODULE@LIBS += $(@PACKAGE@LIB)
99 #The actual binary file
101 @PACKAGE@BIN:=$(BINPATH)/@PACKAGE@
103 #Add to modules list of binaries
104 @MODULE@BINS += $(@PACKAGE@BIN)
106 # Use in the main Makefile
109 ALLLIBS += $(@PACKAGE@LIB)
110 BINLIBS += -l@PACKAGE@
112 ALLEXECS += $(@PACKAGE@BIN)
115 # include all dependency files
116 INCLUDEFILES +=$(@PACKAGE@DEP)
118 EXPORTFILES += $(@PACKAGE@EXPORTDEST)
122 #The exportfiles only include if any!!
124 ifdef @PACKAGE@EXPORT
125 #$(@PACKAGE@EXPORTDEST): $(patsubst %,@MODULE@/%,$(@PACKAGE@EXPORT))
127 $(@PACKAGE@EXPORTDEST): $(EXPORTDIR)/%.h: @MODULE@/%.h
129 @echo "***** Copying file $^ to $@ *****"
131 @[ -d $(dir $@) ] || mkdir $(dir $@)
135 $(@PACKAGE@LIB):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk
137 @echo "***** Linking library $@ *****"
139 $(MUTE)TMPDIR=/tmp/@MODULE@$$$$.`date +%M%S` ; \
140 export TMPDIR; mkdir $$TMPDIR ; cd $$TMPDIR ; \
141 find $(CURDIR)/@MODULE@/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\
142 rm -f $(CURDIR)/$@ ;\
143 $(SHLD) $(SOFLAGS) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) -o $(CURDIR)/$@ $(notdir $(@PACKAGE@O) $(@PACKAGE@DO)) $(SHLIB) ;\
144 cd $(CURDIR) ; rm -rf $$TMPDIR
147 $(@PACKAGE@BIN):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk
149 @echo "***** Making executable $@ *****"
151 $(MUTE)$(LD) $(LDFLAGS) $(@PACKAGE@O) $(@PACKAGE@DO) $(BINLIBDIRS) $(LIBS) $(@PACKAGE@ELIBS) $(EXEFLAGS) -o $@
153 $(@PACKAGE@DS): $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH) @MODULE@/module.mk
155 @echo "***** Creating $@ *****";
157 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
158 $(MUTE)rootcint -f $@ -c $(@PACKAGE@DEFINE) $(CINTFLAGS) $(@PACKAGE@INC) $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH)
160 $(@PACKAGE@DO): $(@PACKAGE@DS)
162 @echo "***** Compiling $< *****";
164 $(MUTE)$(CXX) -c $(@PACKAGE@INC) -I$(ALICE_ROOT) $< -o $@ $(@PACKAGE@CXXFLAGS)
166 #Different targets for the module
168 all-@PACKAGE@: $(@PACKAGE@LIB)
170 depend-@PACKAGE@: $(@PACKAGE@DEP)
172 # determination of object files
173 $(MODDIRO)/%.o: $(MODDIRO)/%.cxx $(MODDIRO)/%.d
175 @echo "***** Compiling $< *****";
177 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
178 $(MUTE)$(CXX) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CXXFLAGS)
180 $(MODDIRO)/%.o: $(MODDIR)/%.cxx $(MODDIRO)/%.d
182 @echo "***** Compiling $< *****";
184 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
185 $(MUTE)$(CXX) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CXXFLAGS)
187 $(MODDIRO)/%.o: $(MODDIR)/%.F $(MODDIRO)/%.d
189 @echo "***** Compiling $< *****";
191 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
192 $(MUTE)$(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS)
194 $(MODDIRO)/%.o: $(MODDIR)/%.f $(MODDIRO)/%.d
196 @echo "***** Compiling $< *****";
198 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
199 $(MUTE)$(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS)
201 $(MODDIRO)/%.o: $(MODDIR)/%.c $(MODDIRO)/%.d
203 @echo "***** Compiling $< *****";
205 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
206 $(MUTE)$(CC) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CFLAGS)
208 $(@PACKAGE@DDEP): $(@PACKAGE@DS)
210 @echo "***** Making dependencies for $< *****";
212 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
213 @share/alibtool depend "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
215 $(MODDIRO)/%.d: $(MODDIRS)/%.cxx
217 @echo "***** Making dependencies for $< *****";
219 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
220 @share/alibtool depend "$(@PACKAGE@DEFINE) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
221 $(MODDIRO)/%.d: $(MODDIRS)/%.f
223 @echo "***** Making dependencies for $< *****";
225 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
226 @share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
227 $(MODDIRO)/%.d: $(MODDIRS)/%.F
229 @echo "***** Making dependencies for $< *****";
231 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
232 $(MUTE)share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
233 $(MODDIRO)/%.d: $(MODDIRS)/%.c
235 @echo "***** Making dependencies for $< *****";
237 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
238 @share/alibtool depend "$(@PACKAGE@DEFINE) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@