Correct problem with Make-depend due to the new location of objects
[u/mrichter/AliRoot.git] / PMD / Makefile
index 45579e58ea90e0603adad6fca530861fcb4a2fe5..c0360b384d2f77608f1d82bde9edb7fc659713e9 100644 (file)
@@ -9,7 +9,7 @@ PACKAGE = PMD
 
 # C++ sources
 
-SRCS          = AliPMD.cxx
+SRCS          = AliPMD.cxx AliPMDv0.cxx AliPMDv1.cxx AliPMDv2.cxx
 
 # C++ Headers
 
@@ -19,19 +19,19 @@ HDRS          = $(SRCS:.cxx=.h) PMDLinkDef.h
 
 DICT          = PMDCint.cxx
 DICTH         = $(DICT:.cxx=.h)
-DICTO         = $(DICT:.cxx=.o)
+DICTO         = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(DICT))
 
 # FORTRAN Objectrs
 
-FOBJS         = $(FSRCS:.f=.o)
+FOBJS         = $(patsubst %.f,tgt_$(ALICE_TARGET)/%.o,$(FSRCS))
 
 # C Objects
 
-COBJS         = $(CSRCS:.c=.o)
+COBJS         = $(patsubst %.c,tgt_$(ALICE_TARGET)/%.o,$(CSRCS))
 
 # C++ Objects
 
-OBJS          = $(SRCS:.cxx=.o) $(DICTO)
+OBJS          = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS)) $(DICTO)
 
 # C++ compilation flags
 
@@ -45,12 +45,12 @@ FFLAGS      = $(FOPT)
  
 # Target
 
-SLIBRARY       = $(ALICE_ROOT)/lib/libPMD.$(SL)
-ALIBRARY       = $(ALICE_ROOT)/lib/libPMD.a
+SLIBRARY       = $(LIBDIR)/libPMD.$(SL)
+ALIBRARY       = $(LIBDIR)/libPMD.a
 
 default:       $(SLIBRARY)
 
-$(ALICE_ROOT)/lib/libPMD.$(SL):        $(OBJS)
+$(LIBDIR)/libPMD.$(SL):        $(OBJS)
 
 $(DICT):                       $(HDRS)
 
@@ -64,4 +64,4 @@ include $(ALICE_ROOT)/conf/GeneralMacros
 
 ############################ Dependencies #####################################
 
-include Make-depend 
+-include tgt_$(ALICE_TARGET)/Make-depend