-############################### STEER Makefile ################################
-
-# Include machine specific definitions
-
-include $(ALICE_ROOT)/conf/GeneralDef
-include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
-
-PACKAGE = STEER
-
-# C++ sources
-
-SRCS = AliDetector.cxx AliHeader.cxx AliMagF.cxx \
- AliDigit.cxx AliHit.cxx AliPoints.cxx \
- AliDisplay.cxx AliMC.cxx AliRun.cxx AliGenerator.cxx \
- AliLego.cxx AliModule.cxx AliDigitNew.cxx \
- AliGeometry.cxx AliRecPoint.cxx AliSegmentation.cxx \
- AliHitMap.cxx AliMagFC.cxx AliMagFCM.cxx \
- AliMagFDM.cxx AliLegoGenerator.cxx AliLegoGeneratorXYZ.cxx\
- AliLegoGeneratorPhiZ.cxx AliLegoGeneratorEta.cxx \
- AliRndm.cxx \
- AliKalmanTrack.cxx AliCluster.cxx AliTracker.cxx\
- AliMCQA.cxx AliPDG.cxx AliDebugVolume.cxx \
- AliGenEventHeader.cxx AliStack.cxx AliConfig.cxx \
- AliRunDigitizer.cxx AliDigitizer.cxx
-# C++ Headers
-
-HDRS = $(SRCS:.cxx=.h) AliPDG.h $(ROOTSYS)/include/TH2.h \
- $(ROOTSYS)/include/TRandom.h STEERLinkDef.h
-
-# Library dictionary
-
-DICT = STEERCint.cxx
-DICTH = $(DICT:.cxx=.h)
-DICTO = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(DICT))
-
-# FORTRAN Objectrs
-
-FOBJS = $(patsubst %.F,tgt_$(ALICE_TARGET)/%.o,$(FSRCS))
-
-# C Objects
-
-COBJS = $(patsubst %.c,tgt_$(ALICE_TARGET)/%.o,$(CSRCS))
-
-# C++ Objects
-
-OBJS = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS)) $(DICTO)
-
-# C++ compilation flags
-
-CXXFLAGS = $(CXXOPTS) -I$(ROOTSYS)/include -I. -I$(ALICE_ROOT)/include/
-
-# FORTRAN compilation flags
-
-FFLAGS = $(FOPT)
-
-##### TARGETS #####
-
-# Target
-
-SLIBRARY = $(LIBDIR)/libSTEER.$(SL)
-ALIBRARY = $(LIBDIR)/lib/libSTEER.a
-
-default: $(SLIBRARY)
-
-$(LIBDIR)/libSTEER.$(SL): $(OBJS)
-
-$(DICT): $(HDRS)
-
-depend: $(SRCS)
-
-HEADERS = $(SRCS:.cxx=.h) AliPDG.h AliConst.h AliCallf77.h AliMCProcess.h AliConfig.h AliGenEventHeader.h
-
-TOCLEAN = $(OBJS) *Cint.cxx *Cint.h
-
-CHECKS = $(patsubst %.cxx,check/%.viol,$(SRCS))
-
-############################### General Macros ################################
-
-include $(ALICE_ROOT)/conf/GeneralMacros
-
-############################ Dependencies #####################################
-
--include tgt_$(ALICE_TARGET)/Make-depend
-
-
-
-
-
-
+PACKAGE = invalid-only-for-proof
+
+include Makefile.arch
+
+SRCS = $(wildcard *.cxx)
+HDRS = $(SRCS:.cxx=.h)
+DHDR = $(PACKAGE)LinkDef.h
+
+
+ifndef PACKCXXFLAGS
+ PACKCXXFLAGS = $(CXXFLAGS)
+endif
+
+ALICEINC = -I.
+ALICEINC += -I./$(PACKAGE)/
+
+ifneq ($(ESD_INCLUDE),)
+ ALICEINC += -I../$(ESD_INCLUDE)
+endif
+
+ifneq ($(AOD_INCLUDE),)
+ ALICEINC += -I../$(AOD_INCLUDE)
+endif
+
+ifneq ($(STEERBase_INCLUDE),)
+ ALICEINC += -I../$(STEERBase_INCLUDE)
+endif
+
+# only if no par file was loaded before
+#ifeq ($(ALICEINC),-I.)
+ ifneq ($(ALICE_ROOT),)
+ ALICEINC += -I$(ALICE_ROOT)/include
+ endif
+#endif
+
+ifeq ($(PLATFORM),macosx)
+ROOTLIBDIR := $(shell $(RC) --libdir)
+ifeq ($(PACKAGE),STEERBase)
+ PACKLDFLAGS = -L$(ROOTLIBDIR) -lVMC -lMinuit -lEG -lGeom
+endif
+ifeq ($(PACKAGE),ESD)
+ PACKLDFLAGS = $(STEERBase_LIBS) -L$(ROOTLIBDIR) -lVMC -lEG -lGeom
+endif
+ifeq ($(PACKAGE),AOD)
+ PACKLDFLAGS = $(STEERBase_LIBS) -L$(ROOTLIBDIR) -lEG -lGeom
+endif
+ifeq ($(PACKAGE),CDB)
+ PACKLDFLAGS = $(STEERBase_LIBS) -L$(ROOTLIBDIR) -lMinuit -lTree -lXMLParser
+endif
+endif
+
+
+CXXFLAGS += $(ALICEINC) -g
+
+SRCS += G__$(PACKAGE).cxx
+OBJS = $(SRCS:.cxx=.o)
+
+lib$(PACKAGE).so: $(OBJS)
+ @echo "Linking" $@ ...
+ @/bin/rm -f $@
+ifeq ($(PLATFORM),macosx)
+ $(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@ $(PACKLDFLAGS) $(EXPLLINKLIBS)
+else
+ $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(PACKLDFLAGS) $(EXPLLINKLIBS)
+endif
+ @chmod a+x $@
+ @echo "done"
+
+%.o: %.cxx %.h
+ $(CXX) $(PACKCXXFLAGS) -c $< -o $@
+
+clean:
+ @rm -f $(OBJS) *.so G__$(PACKAGE).*
+
+G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
+ @echo "Generating dictionaries ..." $(ALICEINC)
+ rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^