X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=build%2Fmodule.tpl;h=c8bb6b7252037b3316be5ee981d87f67a9b1b7f9;hp=15e76a0b7546691b4f5d8ada0aa09c78b6773e12;hb=2d8cad5a75bb4efd3e9d1c918b8ce095e37597d2;hpb=a8a3f5c260d21283cf2b5655e7e1386cf3d8b10a diff --git a/build/module.tpl b/build/module.tpl index 15e76a0b754..c8bb6b72520 100644 --- a/build/module.tpl +++ b/build/module.tpl @@ -102,9 +102,11 @@ endif #The actual library file @PACKAGE@LIB:=$(LIBPATH)/lib@PACKAGE@.$(SOEXT) +@PACKAGE@ALIB:=$(LIBPATH)/lib@PACKAGE@.$(AEXT) #Add this to the modules libs @MODULE@LIBS += $(@PACKAGE@LIB) +@MODULE@ALIBS += $(@PACKAGE@ALIB) #The actual binary file @@ -117,6 +119,7 @@ endif ifeq ($(TYPE),lib) ALLLIBS += $(@PACKAGE@LIB) +ALLALIBS += $(@PACKAGE@ALIB) BINLIBS += -l@PACKAGE@ else ALLEXECS += $(@PACKAGE@BIN) @@ -154,11 +157,30 @@ endif cd $(CURDIR) ; rm -rf $$TMPDIR $(MUTE)chmod a-w $@ +$(@PACKAGE@ALIB):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk +ifndef ALIQUIET + @echo "***** Linking static library $@ *****" +endif + $(MUTE)TMPDIR=/tmp/@MODULE@$$$$.`date +%M%S` ; \ + export TMPDIR; mkdir $$TMPDIR ; cd $$TMPDIR ; \ + find $(CURDIR)/@MODULE@/tgt_$(ALICE_TARGET) -name '*.o' -exec ln -s {} . \; ;\ + rm -f $(CURDIR)/$@ ;\ + $(ALLD) $(ALFLAGS) $(CURDIR)/$@ $(notdir $(@PACKAGE@O) $(@PACKAGE@DO)) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) $(ALLIB);\ + cd $(CURDIR) ; rm -rf $$TMPDIR + $(MUTE)chmod a-w $@ + + $(@PACKAGE@BIN):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk ifndef ALIQUIET @echo "***** Making executable $@ *****" endif - $(MUTE)$(LD) $(LDFLAGS) $(@PACKAGE@O) $(@PACKAGE@DO) $(BINLIBDIRS) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) $(LIBS) $(EXEFLAGS) -o $@ +ifeq ($(ALIPROFILE),YES) + @echo "Not implemented yet" + $(MUTE)$(LD) $(LDFLAGS) $(@PACKAGE@O) $(ARLIBS) $(SHLIBS) $(LIBS) $(EXEFLAGS) -o $@ +#$(MUTE)$(LD) $(LDFLAGS) $(@PACKAGE@O) $(@PACKAGE@DO) $(BINLIBDIRS) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) $(LIBS) $(EXEFLAGS) -o $@ +else + $(MUTE)$(LD) $(LDFLAGS) $(@PACKAGE@O) $(@PACKAGE@DO) $(BINLIBDIRS) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) $(LIBS) $(EXEFLAGS) -o $@ +endif $(@PACKAGE@DS): $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH) @MODULE@/module.mk ifndef ALIQUIET @@ -176,7 +198,7 @@ endif #Different targets for the module ifeq ($(TYPE),lib) -all-@PACKAGE@: $(@PACKAGE@LIB) +all-@PACKAGE@: $(@PACKAGE@LIB $(@PACKAGE@ALIB) else all-@PACKAGE@: $(@PACKAGE@BIN) endif