Restoring the functionallity of the PAR files: partial fix
[u/mrichter/AliRoot.git] / STEER / Makefile
index 0a8c18f..0739bca 100644 (file)
@@ -1,88 +1,60 @@
-############################### STEER Makefile ################################
+PACKAGE = invalid-only-for-proof
 
-# Include machine specific definitions
+include Makefile.arch
 
-include $(ALICE_ROOT)/conf/GeneralDef
-include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
+SRCS     = $(wildcard *.cxx)
+HDRS     = $(SRCS:.cxx=.h)
+DHDR     = $(PACKAGE)LinkDef.h
 
-PACKAGE = STEER
 
-# C++ sources
+ifndef PACKCXXFLAGS
+   PACKCXXFLAGS = $(CXXFLAGS)
+endif
 
-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\
-                AliLegoGeneratorEta.cxx        AliRndm.cxx \
-               AliKalmanTrack.cxx              AliCluster.cxx \
-               AliMCQA.cxx
+ALICEINC = -I.
+ALICEINC += -I./$(PACKAGE)/
 
-# C++ Headers
+ifneq ($(ESD_INCLUDE),)
+   ALICEINC += -I../$(ESD_INCLUDE) 
+endif
 
-HDRS          = $(SRCS:.cxx=.h) AliPDG.h $(ROOTSYS)/include/TH2.h \
-                               $(ROOTSYS)/include/TRandom.h STEERLinkDef.h 
+ifneq ($(AOD_INCLUDE),)
+   ALICEINC += -I../$(AOD_INCLUDE) 
+endif
 
-# Library dictionary
+ifneq ($(STEERBase_INCLUDE),)
+   ALICEINC += -I../$(STEERBase_INCLUDE)
+endif
 
-DICT          = STEERCint.cxx
-DICTH         = $(DICT:.cxx=.h)
-DICTO         = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(DICT))
+# only if no par file was loaded before
+#ifeq ($(ALICEINC),-I.)
+  ifneq ($(ALICE_ROOT),)
+    ALICEINC += -I$(ALICE_ROOT)/include
+  endif
+#endif
 
-# 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
-
-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 
 
+CXXFLAGS += $(ALICEINC) -g
 
+SRCS         += G__$(PACKAGE).cxx
+OBJS          = $(SRCS:.cxx=.o)
 
+lib$(PACKAGE).so: $(OBJS)
+       @echo "Linking" $@ ...
+       @/bin/rm -f $@
+       $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
+       @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) $^