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)export TMPDIR=/tmp/@MODULE@$$$$.`date +%M%S` ; mkdir $$TMPDIR ; \
140 cd $$TMPDIR ; find $(CURDIR)/@MODULE@/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\
141 $(SHLD) $(SOFLAGS) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) -o $(CURDIR)/$@ $(notdir $(@PACKAGE@O) $(@PACKAGE@DO)) $(SHLIB) ;\
142 cd $(CURDIR) ; rm -rf $$TMPDIR
145 $(@PACKAGE@BIN):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk
147 @echo "***** Making executable $@ *****"
149 $(MUTE)$(LD) $(LDFLAGS) $(@PACKAGE@O) $(@PACKAGE@DO) $(BINLIBDIRS) $(LIBS) $(@PACKAGE@ELIBS) $(EXEFLAGS) -o $@
151 $(@PACKAGE@DS): $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH) @MODULE@/module.mk
153 @echo "***** Creating $@ *****";
155 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
156 $(MUTE)rootcint -f $@ -c $(@PACKAGE@DEFINE) $(CINTFLAGS) $(@PACKAGE@INC) $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH)
158 $(@PACKAGE@DO): $(@PACKAGE@DS)
160 @echo "***** Compiling $< *****";
162 $(MUTE)$(CXX) -c $(@PACKAGE@INC) -I$(ALICE_ROOT) $< -o $@ $(@PACKAGE@CXXFLAGS)
164 #Different targets for the module
166 all-@PACKAGE@: $(@PACKAGE@LIB)
168 depend-@PACKAGE@: $(@PACKAGE@DEP)
170 # determination of object files
171 $(MODDIRO)/%.o: $(MODDIRO)/%.cxx $(MODDIRO)/%.d
173 @echo "***** Compiling $< *****";
175 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
176 $(MUTE)$(CXX) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CXXFLAGS)
178 $(MODDIRO)/%.o: $(MODDIR)/%.cxx $(MODDIRO)/%.d
180 @echo "***** Compiling $< *****";
182 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
183 $(MUTE)$(CXX) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CXXFLAGS)
185 $(MODDIRO)/%.o: $(MODDIR)/%.F $(MODDIRO)/%.d
187 @echo "***** Compiling $< *****";
189 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
190 $(MUTE)$(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS)
192 $(MODDIRO)/%.o: $(MODDIR)/%.f $(MODDIRO)/%.d
194 @echo "***** Compiling $< *****";
196 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
197 $(MUTE)$(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS)
199 $(MODDIRO)/%.o: $(MODDIR)/%.c $(MODDIRO)/%.d
201 @echo "***** Compiling $< *****";
203 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
204 $(MUTE)$(CC) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CFLAGS)
206 $(@PACKAGE@DDEP): $(@PACKAGE@DS)
208 @echo "***** Making dependencies for $< *****";
210 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
211 @share/alibtool depend "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
213 $(MODDIRO)/%.d: $(MODDIRS)/%.cxx
215 @echo "***** Making dependencies for $< *****";
217 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
218 @share/alibtool depend "$(@PACKAGE@DEFINE) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
219 $(MODDIRO)/%.d: $(MODDIRS)/%.f
221 @echo "***** Making dependencies for $< *****";
223 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
224 @share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
225 $(MODDIRO)/%.d: $(MODDIRS)/%.F
227 @echo "***** Making dependencies for $< *****";
229 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
230 $(MUTE)share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
231 $(MODDIRO)/%.d: $(MODDIRS)/%.c
233 @echo "***** Making dependencies for $< *****";
235 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
236 @share/alibtool depend "$(@PACKAGE@DEFINE) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@