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)$(SHLD) $(SOFLAGS) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) -o $@ $(@PACKAGE@O) $(@PACKAGE@DO) $(SHLIB)
141 $(@PACKAGE@BIN):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk
143 @echo "***** Making executable $@ *****"
145 $(MUTE)$(LD) $(LDFLAGS) $(@PACKAGE@O) $(@PACKAGE@DO) $(BINLIBDIRS) $(LIBS) $(@PACKAGE@ELIBS) $(EXEFLAGS) -o $@
147 $(@PACKAGE@DS): $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH) @MODULE@/module.mk
149 @echo "***** Creating $@ *****";
151 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
152 $(MUTE)rootcint -f $@ -c $(@PACKAGE@DEFINE) $(CINTFLAGS) $(@PACKAGE@INC) $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH)
154 $(@PACKAGE@DO): $(@PACKAGE@DS)
156 @echo "***** Compiling $< *****";
158 $(MUTE)$(CXX) -c $(@PACKAGE@INC) -I$(ALICE_ROOT) $< -o $@ $(@PACKAGE@CXXFLAGS)
160 #Different targets for the module
162 all-@PACKAGE@: $(@PACKAGE@LIB)
164 depend-@PACKAGE@: $(@PACKAGE@DEP)
166 # determination of object files
167 $(MODDIRO)/%.o: $(MODDIR)/%.cxx $(MODDIRO)/%.d
169 @echo "***** Compiling $< *****";
171 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
172 $(MUTE)$(CXX) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CXXFLAGS)
174 $(MODDIRO)/%.o: $(MODDIR)/%.F $(MODDIRO)/%.d
176 @echo "***** Compiling $< *****";
178 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
179 $(MUTE)$(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS)
181 $(MODDIRO)/%.o: $(MODDIR)/%.f $(MODDIRO)/%.d
183 @echo "***** Compiling $< *****";
185 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
186 $(MUTE)$(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS)
188 $(MODDIRO)/%.o: $(MODDIR)/%.c $(MODDIRO)/%.d
190 @echo "***** Compiling $< *****";
192 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
193 $(MUTE)$(CC) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CFLAGS)
195 $(@PACKAGE@DDEP): $(@PACKAGE@DS)
197 @echo "***** Making dependencies for $< *****";
199 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
200 @share/alibtool depend "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
202 $(MODDIRO)/%.d: $(MODDIRS)/%.cxx
204 @echo "***** Making dependencies for $< *****";
206 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
207 @share/alibtool depend "$(@PACKAGE@DEFINE) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
208 $(MODDIRO)/%.d: $(MODDIRS)/%.f
210 @echo "***** Making dependencies for $< *****";
212 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
213 @share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
214 $(MODDIRO)/%.d: $(MODDIRS)/%.F
216 @echo "***** Making dependencies for $< *****";
218 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
219 $(MUTE)share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
220 $(MODDIRO)/%.d: $(MODDIRS)/%.c
222 @echo "***** Making dependencies for $< *****";
224 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
225 @share/alibtool depend "$(@PACKAGE@DEFINE) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@