# C++ sources
-GSRCS = TGeant3.cxx TPaveTree.cxx THIGZ.cxx gucode.cxx
+GSRCS = TGeant3.cxx TPaveTree.cxx THIGZ.cxx \
+ TGeant3GUI.cxx AliGeant3.cxx
# C++ Headers
GDICT = TGeant3Cint.cxx
GDICTH = $(GDICT:.cxx=.h)
-GDICTO = $(GDICT:.cxx=.o)
+GDICTO = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(GDICT))
# Geant Objects
-GOBJS = $(GSRCS:.cxx=.o) $(FOBJS) $(GDICTO)
+GOBJS = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(GSRCS)) $(FOBJS) $(GDICTO)
# 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)
# Dummy Geant321 class
DDICT = TGeant3DummyCint.cxx
DDICTH = $(DDICT:.cxx=.h)
-DDICTO = $(DDICT:.cxx=.o)
+DDICTO = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(DDICT))
# Geant Objects
-DOBJS = $(DSRCS:.cxx=.o) $(DDICTO)
+DOBJS = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(DSRCS)) $(DDICTO)
# Dummy Routines in Geant321
JSRCS = G3Dummy.cxx
-JOBJS = G3Dummy.o
+JOBJS = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(JSRCS))
# C++ compilation flags
# Target
-SLIBRARY = $(ALICE_ROOT)/lib/libTGeant3.$(SL) \
- $(ALICE_ROOT)/lib/libG3Dummy.$(SL) \
- $(ALICE_ROOT)/lib/libTGeant3Dummy.$(SL)
-ALIBRARY = $(ALICE_ROOT)/lib/libTGeant3.a
+SLIBRARY = $(LIBDIR)/libTGeant3.$(SL) \
+ $(LIBDIR)/libG3Dummy.$(SL) \
+ $(LIBDIR)/libTGeant3Dummy.$(SL)
+ALIBRARY = $(LIBDIR)/libTGeant3.a
-default: headers $(SLIBRARY)
+default: $(SLIBRARY)
-$(ALICE_ROOT)/lib/libTGeant3.$(SL): $(GOBJS)
+$(LIBDIR)/libTGeant3.$(SL): $(GOBJS)
-$(ALICE_ROOT)/lib/libG3Dummy.$(SL): $(JOBJS)
+$(LIBDIR)/libG3Dummy.$(SL): $(JOBJS)
-$(ALICE_ROOT)/lib/libTGeant3Dummy.$(SL): $(DOBJS)
+$(LIBDIR)/libTGeant3Dummy.$(SL): $(DOBJS)
$(GDICT): $(GHDRS)
DEPINC += -I$(ALICE_ROOT)/GEANT321
-HEADERS = $(filter-out %LinkDef.h,$(GHDRS))
-
depend: $(GSRCS) $(FSRCS)
TOCLEAN = $(GOBJS) $(JOBJS) $(DOBJS) *Cint.cxx *Cint.h
############################ Dependencies #####################################
-include Make-depend
+-include tgt_$(ALICE_TARGET)/Make-depend
+
+### Target check creates violation reports (.viol), which depend on
+### stripped files (.ii), which in turn depend on preprocessed
+### files (.i). Dependences are in conf/GeneralDef.
+
+CHECKS = $(patsubst %.cxx,check/%.viol,$(GSRCS))
+
+check: $(CHECKS)
+
+
+
+
+
+
+