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=$(shell mktemp -d /tmp/$$$$.XXXXXX) ;\
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
144 $(@PACKAGE@BIN):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk
146 @echo "***** Making executable $@ *****"
148 $(MUTE)$(LD) $(LDFLAGS) $(@PACKAGE@O) $(@PACKAGE@DO) $(BINLIBDIRS) $(LIBS) $(@PACKAGE@ELIBS) $(EXEFLAGS) -o $@
150 $(@PACKAGE@DS): $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH) @MODULE@/module.mk
152 @echo "***** Creating $@ *****";
154 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
155 $(MUTE)rootcint -f $@ -c $(@PACKAGE@DEFINE) $(CINTFLAGS) $(@PACKAGE@INC) $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH)
157 $(@PACKAGE@DO): $(@PACKAGE@DS)
159 @echo "***** Compiling $< *****";
161 $(MUTE)$(CXX) -c $(@PACKAGE@INC) -I$(ALICE_ROOT) $< -o $@ $(@PACKAGE@CXXFLAGS)
163 #Different targets for the module
165 all-@PACKAGE@: $(@PACKAGE@LIB)
167 depend-@PACKAGE@: $(@PACKAGE@DEP)
169 # determination of object files
170 $(MODDIRO)/%.o: $(MODDIRO)/%.cxx $(MODDIRO)/%.d
172 @echo "***** Compiling $< *****";
174 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
175 $(MUTE)$(CXX) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CXXFLAGS)
177 $(MODDIRO)/%.o: $(MODDIR)/%.cxx $(MODDIRO)/%.d
179 @echo "***** Compiling $< *****";
181 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
182 $(MUTE)$(CXX) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CXXFLAGS)
184 $(MODDIRO)/%.o: $(MODDIR)/%.F $(MODDIRO)/%.d
186 @echo "***** Compiling $< *****";
188 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
189 $(MUTE)$(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS)
191 $(MODDIRO)/%.o: $(MODDIR)/%.f $(MODDIRO)/%.d
193 @echo "***** Compiling $< *****";
195 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
196 $(MUTE)$(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS)
198 $(MODDIRO)/%.o: $(MODDIR)/%.c $(MODDIRO)/%.d
200 @echo "***** Compiling $< *****";
202 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
203 $(MUTE)$(CC) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CFLAGS)
205 $(@PACKAGE@DDEP): $(@PACKAGE@DS)
207 @echo "***** Making dependencies for $< *****";
209 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
210 @share/alibtool depend "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
212 $(MODDIRO)/%.d: $(MODDIRS)/%.cxx
214 @echo "***** Making dependencies for $< *****";
216 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
217 @share/alibtool depend "$(@PACKAGE@DEFINE) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
218 $(MODDIRO)/%.d: $(MODDIRS)/%.f
220 @echo "***** Making dependencies for $< *****";
222 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
223 @share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
224 $(MODDIRO)/%.d: $(MODDIRS)/%.F
226 @echo "***** Making dependencies for $< *****";
228 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
229 $(MUTE)share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
230 $(MODDIRO)/%.d: $(MODDIRS)/%.c
232 @echo "***** Making dependencies for $< *****";
234 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
235 @share/alibtool depend "$(@PACKAGE@DEFINE) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@