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 $(SHLD) $(SOFLAGS) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) -o $(CURDIR)/$@ $(notdir $(@PACKAGE@O) $(@PACKAGE@DO)) $(SHLIB) ;\
143 cd $(CURDIR) ; rm -rf $$TMPDIR
146 $(@PACKAGE@BIN):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk
148 @echo "***** Making executable $@ *****"
150 $(MUTE)$(LD) $(LDFLAGS) $(@PACKAGE@O) $(@PACKAGE@DO) $(BINLIBDIRS) $(LIBS) $(@PACKAGE@ELIBS) $(EXEFLAGS) -o $@
152 $(@PACKAGE@DS): $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH) @MODULE@/module.mk
154 @echo "***** Creating $@ *****";
156 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
157 $(MUTE)rootcint -f $@ -c $(@PACKAGE@DEFINE) $(CINTFLAGS) $(@PACKAGE@INC) $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH)
159 $(@PACKAGE@DO): $(@PACKAGE@DS)
161 @echo "***** Compiling $< *****";
163 $(MUTE)$(CXX) -c $(@PACKAGE@INC) -I$(ALICE_ROOT) $< -o $@ $(@PACKAGE@CXXFLAGS)
165 #Different targets for the module
167 all-@PACKAGE@: $(@PACKAGE@LIB)
169 depend-@PACKAGE@: $(@PACKAGE@DEP)
171 # determination of object files
172 $(MODDIRO)/%.o: $(MODDIRO)/%.cxx $(MODDIRO)/%.d
174 @echo "***** Compiling $< *****";
176 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
177 $(MUTE)$(CXX) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CXXFLAGS)
179 $(MODDIRO)/%.o: $(MODDIR)/%.cxx $(MODDIRO)/%.d
181 @echo "***** Compiling $< *****";
183 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
184 $(MUTE)$(CXX) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CXXFLAGS)
186 $(MODDIRO)/%.o: $(MODDIR)/%.F $(MODDIRO)/%.d
188 @echo "***** Compiling $< *****";
190 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
191 $(MUTE)$(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS)
193 $(MODDIRO)/%.o: $(MODDIR)/%.f $(MODDIRO)/%.d
195 @echo "***** Compiling $< *****";
197 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
198 $(MUTE)$(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS)
200 $(MODDIRO)/%.o: $(MODDIR)/%.c $(MODDIRO)/%.d
202 @echo "***** Compiling $< *****";
204 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
205 $(MUTE)$(CC) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CFLAGS)
207 $(@PACKAGE@DDEP): $(@PACKAGE@DS)
209 @echo "***** Making dependencies for $< *****";
211 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
212 @share/alibtool depend "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
214 $(MODDIRO)/%.d: $(MODDIRS)/%.cxx
216 @echo "***** Making dependencies for $< *****";
218 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
219 @share/alibtool depend "$(@PACKAGE@DEFINE) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
220 $(MODDIRO)/%.d: $(MODDIRS)/%.f
222 @echo "***** Making dependencies for $< *****";
224 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
225 @share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
226 $(MODDIRO)/%.d: $(MODDIRS)/%.F
228 @echo "***** Making dependencies for $< *****";
230 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
231 $(MUTE)share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
232 $(MODDIRO)/%.d: $(MODDIRS)/%.c
234 @echo "***** Making dependencies for $< *****";
236 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
237 @share/alibtool depend "$(@PACKAGE@DEFINE) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@