X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=build%2Fmodule.tpl;h=934f64b2890ec6c9175028d4e62f75c4475474c3;hp=852603fc3fcc3e3fca27ca331e16eb38d69828b8;hb=82910ea7bb9cae402ea911eac7e6e5d71f4ad41f;hpb=a544e979cf197a42105ca81d1a661cf8d0fed45a diff --git a/build/module.tpl b/build/module.tpl index 852603fc3fc..934f64b2890 100644 --- a/build/module.tpl +++ b/build/module.tpl @@ -30,8 +30,9 @@ endif @PACKAGE@EXPORTDEST:=$(patsubst %,$(EXPORTDIR)/%,$(EXPORT)) -#Extra include,libs etc. -#@PACKAGE@INC:=$(patsubst %,-I@MODULE@/%,$(EINCLUDE)) -I@MODULE@ +#Extra include,libs, defines etc. + +@PACKAGE@DEFINE:=$(EDEFINE) @PACKAGE@INC:=$(patsubst %,-I%,$(EINCLUDE)) -I@MODULE@ @@ -73,6 +74,8 @@ TEMP:=$(FSRCS:.F=.o) @PACKAGE@FO:=$(patsubst %,$(MODDIRO)/%, $(TEMP:.f=.o)) @PACKAGE@O:= $(patsubst %,$(MODDIRO)/%, $(SRCS:.cxx=.o)) $(@PACKAGE@FO) $(@PACKAGE@CO) + + ifdef WITHDICT @PACKAGE@DS:=$(MODDIRO)/G__@PACKAGE@.cxx @PACKAGE@DO:=$(MODDIRO)/G__@PACKAGE@.o @@ -90,10 +93,15 @@ endif @PACKAGE@LIB:=$(LIBPATH)/lib@PACKAGE@.$(SOEXT) +#Add this to the modules libs +@MODULE@LIBS += $(@PACKAGE@LIB) + #The actual binary file @PACKAGE@BIN:=$(BINPATH)/@PACKAGE@ +#Add to modules list of binaries +@MODULE@BINS += $(@PACKAGE@BIN) # Use in the main Makefile @@ -114,93 +122,111 @@ EXPORTFILES += $(@PACKAGE@EXPORTDEST) #The exportfiles only include if any!! ifdef @PACKAGE@EXPORT -$(@PACKAGE@EXPORTDEST): $(patsubst %,@MODULE@/%,$(@PACKAGE@EXPORT)) - @echo "***** Copying file @MODULE@/$(notdir $@) to $@ WRONG !!!*****" +#$(@PACKAGE@EXPORTDEST): $(patsubst %,@MODULE@/%,$(@PACKAGE@EXPORT)) + +$(@PACKAGE@EXPORTDEST): $(EXPORTDIR)/%.h: @MODULE@/%.h +ifndef ALIQUIET + @echo "***** Copying file $^ to $@ *****" +endif @[ -d $(dir $@) ] || mkdir $(dir $@) - cp @MODULE@/$(notdir $@) $@ + @cp $^ $@ endif $(@PACKAGE@LIB):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk +ifndef ALIQUIET @echo "***** Linking library $@ *****" - $(SHLD) $(SOFLAGS) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) -o $@ $(@PACKAGE@O) $(@PACKAGE@DO) $(SHLIB) +endif + $(MUTE)$(SHLD) $(SOFLAGS) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) -o $@ $(@PACKAGE@O) $(@PACKAGE@DO) $(SHLIB) $(@PACKAGE@BIN):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk - @echo "***** Makeing executable $@ *****" - $(LD) $(LDFLAGS) $(@PACKAGE@O) $(@PACKAGE@DO) $(BINLIBDIRS) $(LIBS) $(@PACKAGE@ELIBS) $(EXEFLAGS) -o $@ +ifndef ALIQUIET + @echo "***** Making executable $@ *****" +endif + $(MUTE)$(LD) $(LDFLAGS) $(@PACKAGE@O) $(@PACKAGE@DO) $(BINLIBDIRS) $(LIBS) $(@PACKAGE@ELIBS) $(EXEFLAGS) -o $@ -$(@PACKAGE@DS): $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH) +$(@PACKAGE@DS): $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH) @MODULE@/module.mk +ifndef ALIQUIET @echo "***** Creating $@ *****"; +endif @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) - rootcint -f $@ -c $(CINTFLAGS) $(@PACKAGE@INC) $^ + $(MUTE)rootcint -f $@ -c $(@PACKAGE@DEFINE) $(CINTFLAGS) $(@PACKAGE@INC) $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH) $(@PACKAGE@DO): $(@PACKAGE@DS) - @echo "***** (Re)compiling $< *****"; - $(CXX) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CXXFLAGS) +ifndef ALIQUIET + @echo "***** Compiling $< *****"; +endif + $(MUTE)$(CXX) -c $(@PACKAGE@INC) -I$(ALICE_ROOT) $< -o $@ $(@PACKAGE@CXXFLAGS) #Different targets for the module all-@PACKAGE@: $(@PACKAGE@LIB) - depend-@PACKAGE@: $(@PACKAGE@DEP) # determination of object files +$(MODDIRO)/%.o: $(MODDIRO)/%.cxx $(MODDIRO)/%.d +ifndef ALIQUIET + @echo "***** Compiling $< *****"; +endif + @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) + $(MUTE)$(CXX) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CXXFLAGS) + $(MODDIRO)/%.o: $(MODDIR)/%.cxx $(MODDIRO)/%.d - @echo "***** (Re)compiling $< *****"; +ifndef ALIQUIET + @echo "***** Compiling $< *****"; +endif @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) - $(CXX) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CXXFLAGS) + $(MUTE)$(CXX) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CXXFLAGS) $(MODDIRO)/%.o: $(MODDIR)/%.F $(MODDIRO)/%.d - @echo "***** (Re)compiling $< *****"; +ifndef ALIQUIET + @echo "***** Compiling $< *****"; +endif @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) - $(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS) + $(MUTE)$(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS) $(MODDIRO)/%.o: $(MODDIR)/%.f $(MODDIRO)/%.d - @echo "***** (Re)compiling $< *****"; +ifndef ALIQUIET + @echo "***** Compiling $< *****"; +endif @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) - $(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS) + $(MUTE)$(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS) $(MODDIRO)/%.o: $(MODDIR)/%.c $(MODDIRO)/%.d - @echo "***** (Re)compiling $< *****"; +ifndef ALIQUIET + @echo "***** Compiling $< *****"; +endif @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) - $(CC) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CFLAGS) + $(MUTE)$(CC) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CFLAGS) $(@PACKAGE@DDEP): $(@PACKAGE@DS) +ifndef ALIQUIET @echo "***** Making dependencies for $< *****"; +endif @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) @share/alibtool depend "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@ -$(MODDIRO)/%.d: $(MODDIRS)/%.cxx $(EXPORTFILES) +$(MODDIRO)/%.d: $(MODDIRS)/%.cxx +ifndef ALIQUIET @echo "***** Making dependencies for $< *****"; +endif @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) - share/alibtool depend "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@ -$(MODDIRO)/%.d: $(MODDIRS)/%.f $(EXPORTFILES) + @share/alibtool depend "$(@PACKAGE@DEFINE) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@ +$(MODDIRO)/%.d: $(MODDIRS)/%.f +ifndef ALIQUIET @echo "***** Making dependencies for $< *****"; +endif @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) - share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@ -$(MODDIRO)/%.d: $(MODDIRS)/%.F $(EXPORTFILES) + @share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@ +$(MODDIRO)/%.d: $(MODDIRS)/%.F +ifndef ALIQUIET @echo "***** Making dependencies for $< *****"; +endif @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) - share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@ -$(MODDIRO)/%.d: $(MODDIRS)/%.c $(EXPORTFILES) + $(MUTE)share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@ +$(MODDIRO)/%.d: $(MODDIRS)/%.c +ifndef ALIQUIET @echo "***** Making dependencies for $< *****"; +endif @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;) - share/alibtool depend "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@ - - -#Directory creation - -#$(MODDIRO): -# @echo "***** Making $@ *****" -# mkdir -p $@ - - - - - - - - - - - + @share/alibtool depend "$(@PACKAGE@DEFINE) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@