]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/src/Makefile
Check for lib directories
[u/mrichter/AliRoot.git] / HLT / src / Makefile
index 26058a284b40597803e96463c01c4a763597a103..85e0f74e6d57abf25c9414dcde46de389dd7a0dd 100644 (file)
@@ -1,87 +1,77 @@
-############################### TPC Makefile ##################################
-
-# Include machine specific definitions
-
-include $(ALICE_ROOT)/conf/GeneralDef
-include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
-
-PACKAGE = AliL3
-
-# C++ sources
-
-
-SRCS          = AliL3ConfMapper.cxx AliL3ConfMapPoint.cxx AliLevel3.cxx\
-                AliL3ConfMapTrack.cxx AliL3ConfMapFit.cxx AliL3Track.cxx\
-                AliL3Transform.cxx AliL3TrackMerger.cxx AliL3VertexArray.cxx \
-                 AliL3Vertex.cxx AliL3VertexFinder.cxx \
-                 AliL3Merger.cxx AliL3GlobalMerger.cxx AliL3ClustFinder.cxx \
-                 AliL3TrackArray.cxx AliL3InterMerger.cxx AliL3Logger.cxx \
-                 AliL3MemHandler.cxx AliL3FileHandler.cxx AliL3Evaluate.cxx \
-                 AliL3Benchmark.cxx AliL3Display.cxx AliL3ClustFinderNew.cxx
-                
-
-# C++ Headers
-
-HDRS          = $(SRCS:.cxx=.h) AliL3LinkDef.h
-# Library dictionary
-
-DICT          = AliL3Cint.cxx
-DICTH         = $(DICT:.cxx=.h)
-DICTO         = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(DICT))
-
-# FORTRAN Objectrs
-
-FOBJS         = $(FSRCS:.f=.o)
-
-# C Objects
-
-COBJS         = $(CSRCS:.c=.o)
-
-# C++ Objects
-
-OBJS          = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS)) $(DICTO)
-
-# C++ compilation flags
-
-CXXFLAGS      = $(CXXOPTS) -g -I$(ROOTSYS)/include -I. -I$(ALICE_ROOT)/include/  -I$(ALICE_ROOT)/TPC  -I$(ALICE_ROOT)/CONTAINERS
-
-#CXXFLAGS      = $(CXXOPTS) -g -Wall -I$(ROOTSYS)/include -I. -I $(ALICE_ROOT)/TPC -I$(ALICE_ROOT)/include/ -DCOMPILING
-# FORTRAN compilation flags
-
-FFLAGS      = $(FOPT)
-##### TARGETS #####
-# Target
-
-SLIBRARY       = $(LEVEL3)/lib_$(USERNAME)/libAliL3.$(SL)
-
-default:       $(SLIBRARY)
-
-$(LEVEL3)/lib_$(USERNAME)/libAliL3.$(SL):  $(OBJS)
-
-$(DICT):               $(HDRS)
-
-depend:                        $(SRCS)
-
-TOCLEAN                        = $(OBJS) *Cint.h *Cint.cxx
-
-############################### General Macros ################################
-
-include $(ALICE_ROOT)/conf/GeneralMacros
-
-############################ Dependencies #####################################
-
-include tgt_$(ALICE_TARGET)/Make-depend 
-
-###########
-mrproper:
-       rm -fr tgt_Linux
-       rm -fr $(DICT) $(DICTH) $(DICTO)
-clean:
-       rm -fr tgt_Linux/*.o
-       rm -fr $(LEVEL3)/lib_$(USERNAME)/libAliL3.so
-       rm -fr $(DICT) $(DICTH) $(DICTO)
-
-wipe: clean mrproper
+#$Id$
+###########################
+# Makefile for HLT code.  #
+#                         #
+# Author: Anders Vestbo   #                    
+###########################
+
+USEPACKAGE = ROOT
+#USEPACKAGE = ALIROOT
+
+CXX         = g++
+LD          = g++
+CXXFLAGS    = -O2 -Wall -fPIC
+LDFLAGS     = -O2
+SOFLAGS     = -shared
+
+TOPDIR = $(HOME)/level3code
+OBJDIR = lib
+LIBDIR = $(LEVEL3)/lib_$(USERNAME)
+
+ifeq ($(USEPACKAGE),ROOT) 
+INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp
+endif
+
+ifeq ($(USEPACKAGE),ALIROOT)
+INCLUDES = -I$(ROOTSYS)/include -I$(TOPDIR)/hough -I$(TOPDIR)/src -I$(TOPDIR)/comp -I$(ALICE_ROOT)/include/ -I$(ALICE_ROOT)/TPC -I$(ALICE_ROOT)/CONTAINERS -I$(ALICE_ROOT)/STEER
+endif
+
+SRCS   = AliL3ConfMapper.cxx AliL3ConfMapPoint.cxx AliLevel3.cxx\
+          AliL3ConfMapTrack.cxx AliL3ConfMapFit.cxx AliL3Track.cxx\
+          AliL3Transform.cxx AliL3TrackMerger.cxx AliL3VertexArray.cxx \
+          AliL3Vertex.cxx AliL3VertexFinder.cxx \
+          AliL3Merger.cxx AliL3GlobalMerger.cxx AliL3ClustFinderNew.cxx \
+          AliL3TrackArray.cxx AliL3InterMerger.cxx AliL3Logger.cxx \
+          AliL3MemHandler.cxx  AliL3Benchmark.cxx AliL3Display.cxx\
+
+DICT = AliL3Cint.cxx
+DICTH = AliL3Cint.h
+DICTO = $(OBJDIR)/AliL3Cint.o
+
+ifeq ($(USEPACKAGE),ROOT)
+HDRS = $(SRCS:.cxx=.h) AliL3LinkDef.h
+OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(DICTO)
+endif
+
+ifeq ($(USEPACKAGE),ALIROOT)
+HDRS = $(SRCS:.cxx=.h) AliL3FileHandler.h AliL3LinkDef.h
+OBJS = $(patsubst %.cxx,$(OBJDIR)/%.o,$(SRCS)) $(OBJDIR)/AliL3FileHandler.o $(DICTO)
+endif
+
+LEVELSO = $(LIBDIR)/libAliL3.so
+
+all : $(OBJDIR) $(LIBDIR) $(LEVELSO) 
+
+$(LEVELSO) : $(OBJS)
+       $(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
+
+$(DICT) : $(HDRS)
+       @echo "Generating dictionary..."
+       @rootcint -f $(DICT) -c $(INCLUDES) $(HDRS)
+
+$(OBJDIR)/%.o : %.cxx 
+       $(CXX) $(CXXFLAGS) -c $(INCLUDES) -o $@ $<
+
+$(OBJDIR) : 
+       test ! -e $(OBJDIR) && mkdir -p $(OBJDIR)
+
+$(LIBDIR) :
+       test ! -e $(LIBDIR) && mkdir -p $(LIBDIR)
+
+clean :
+       rm -f $(OBJDIR)/*.o
+       rm -f $(LIBDIR)/libAliL3.so
+       rm $(DICT) $(DICTH) 
+
+so :
+       rm -f $(LIBDIR)/libAliL3.so
\ No newline at end of file